@klbkevinklb registre dessa forma no xml para que o script funcione em todos os portais
movements.xml
<movevent type="StepIn" itemid="1387" event="script" value="teleportAction.lua"/>
Código que faz o pokemon retornar e não morrer, caso queira mesmo que o pokemon morra, use o script do Marshmello com o registramento do xml que eu falei.
teleportAction.lua
function onStepIn(cid, item, position, fromPosition)
if #getCreatureSummons(cid) >= 1 then
local pokeball = getPlayerSlotItem(cid, 8).uid
local poke = getCreatureSummons(cid)[1]
local btype = getPokeballType(pokeball.itemid)
local effect = pokeballs[btype].effect
if not effect then
effect = 21
end
local cd = getCD(pokeball.uid, "blink", 30)
if cd > 0 then
setCD(item.uid, "blink", 0)
end
doReturnPokemon(cid, poke, pokeball, effect)
doPlayerSendCancel(cid, '12//,hide')
doPlayerSendTextMessage(cid, 22, "Seu pokémon retornou para a pokebola.")
end
return true
end