• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Change Map Summ, Lua Problem.

Ghazer

Member
Joined
Mar 13, 2009
Messages
350
Reaction score
6
This is change map of Summ (I think the best changemap) but have one problem when actionid of tile position temple (1,2,3,4) is changed causes problems and does not work good.

LUA:
local towns = {7, 5, 4, 2, 6, 3, 1}
local tp = {
		id = 1387,
		position = {x = 986, y = 1118, z = 6}
}
 
-- Do not change
local currentTown = 1
local function removeTp(pos, id)
	local thing = getTileItemById(pos, id)
	if thing.uid > 0 then
		doRemoveItem(thing.uid)
	end
end	
 
function onThink(interval, lastExecution, thinkInterval)
    local toPos = getTownTemplePosition(towns[currentTown])
        for _, pid in ipairs(getPlayersOnline()) do
	            local temple = { x = 986, y = 1116, z = 6 }
		        doTeleportThing(pid, temple)
		        doRemoveConditions(pid)
		        doCreatureAddHealth(pid, getCreatureMaxHealth(pid))
		        doCreatureAddMana(pid, getCreatureMaxMana(pid))
    	        doBroadcastMessage("The map has been changed and all players have been teleported to the temple. Next map change will be in: 30 minutes!", MESSAGE_STATUS_WARNING)
		end		
 
	currentTown = currentTown + 1
	if not(towns[currentTown]) then
		currentTown = 1
	end
	
	removeTp(tp.position, tp.id)
    doCreateTeleport(tp.id, toPos, tp.position)
	return true
end

I think the problem is here but idk, its possible to fix?
LUA:
-- Do not change
local currentTown = 1
local function removeTp(pos, id)
	local thing = getTileItemById(pos, id)
	if thing.uid > 0 then
		doRemoveItem(thing.uid)
	end
end
 
when I use changemap and change action id and put stone and actionid on tile of temple of city, the changemap doesn't work for this temple
action id 8271
example
3bcd4d93bee64773a5c77aa.png
 
Last edited:
BUMP @Summ when I change actionid of temple tile where players appear when enter to teleport, changemap dont work in this map =/a
I change actionid for team battle event...


anyone know how to fix this? PLEASE!
 
Last edited:
I don't see an issue about using an actionid on temple pos, the script doesn't care about action ids..
Any errors?
 
V1AOp.png

zAyoz.png


This is temple of thais, and teleport have this position default... changemap dont work in this zone with team battle idk why =/ help!


The changemap only dont work with players, but senior tutor, gm, cm or god the changemap work good
 

Attachments

Yes, the default position of teleport is "thais" but if I dont change teleport positino i think teleport dont teleport to anything position. Dont work for normal players, but seriors tutors, gm and gods changemap work good, because this groupid no are in team battle event

pd sorry for my bad english

- - - Updated - - -

o`pp
 
Back
Top