tenta assim..
local newPos = {x = 1000, y = 1000, z = 7} --pos pra onde serao levados
local time = 30 --tempo pra teleporta devolta, em segs
local function teleport(cid, pid, pos, pos2)
if isCreature(cid) then
doTeleportThing(cid, getClosestFreeTile(cid, pos))
doSendMagicEffect(getPlayerPosition(cid), 21)
end
if isCreature(pid) then
doTeleportThing(pid, getClosestFreeTile(pid, pos2 or pos))
doSendMagicEffect(getPlayerPosition(pid), 21)
end
end
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
if not isCreature(target) then
return doPlayerSendTextMessage(cid, 27, "You need a target to do this!")
end
local posCid = getPlayerPosition(cid)
local posTarget = getPlayerPosition(target)
teleport(cid, target, newPos)
addEvent(teleport, time*1000, cid, target, posCid, posTarget)
return true
end
coloque piso anti-logout no lugar.. se n teria q fazer um onLogin tb..




info
Grupo: Cavaleiro
Registrado: 04/09/12
Posts: 185
Reputação: +2
Gostaria de pedir uma spell que teleportasse eu e o target para um lugar do mapa (que eu possa configurar) durante 30 segundos.
Quando acabar os 30 segundos eu e ele voltassemos ao lugar.
Vlw
Editado Dezembro 27 por Allangod