battleportal.lua (data/movements/scripts):
function onStepIn(cid, item, pos, fromPos)
local pos = {x=123, y=456, z=7}
if isPlayer(cid) and getCreatureCondition(cid, CONDITION_INFIGHT) then
doTeleportThing(cid, fromPos)
doSendMagicEffect(fromPos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You can't enter in battle.")
else
doTeleportThing(cid, pos)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end
return true
end
Tag - movements.xml (data/movements):
<movevent type="StepIn" actionid="ACTIONID" script="battleportal.lua" />
Adicione o actionID configurado na tag, ao teleport (sem que tenha posição de destino configurada) e configure a posição de destino no script.