Movements
local storage = 23432 -- storage
local eff = 2 -- efeito se n tiver a storage
local ef = 3 -- efeito se tiver a storage
function onStepIn(cid, item, position, fromPosition)
local pos = {x=752, y=1036, z=2} -- onde sera teleportado se n tiver a storage
local pid = getCreaturePosition(cid)
if getPlayerStorageValue(cid, storage) == 1 then
doPlayerSendTextMessage(cid, 20, "voce entrou")
doSendMagicEffect(pid , ef)
else
doTeleportThing(cid, pos)
doPlayerSendTextMessage(cid, 20, "complete a quest antes" )
doSendMagicEffect(pid, eff)
end
end
Movements.xml
<movevent type="StepIn" actionid="28530" event="script" value="tiler.lua"/>
Não esqueça de colocar a action id 28530 no map editor.