Ae queria uma ajudinha, para quem intende bem de script, Eu uso o PDA by slicer faz tempo, mais eu queria que quando o Pokémon estiver quase sumindo da tela, volta até o player novamente, eu já tentei varias vezes já tentei mexer no Poketele.lua no creaturescript mais parece, que esse script ta morto não funfa para nada Alguem poderia me ajudar?
local efeito = 1 -- coloque 0 para remover o efeito quando o pokemon teleportar
local max = 9 -- distancia max entre o pokemon e o player
local function doIncreaseSpeed(cid)
if not isCreature(cid) then return true end
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, 2.5*(getCreatureBaseSpeed(cid) + getSpeed(cid)))
end
function onThink(cid, interval)
if true then --not isCreature(cid) then
return true
end
if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
return true
end
if #getCreatureSummons(cid) >= 1 and not isCreature(getCreatureTarget(cid)) then
if getDistanceBetween(getThingPos(cid), getThingPos(getCreatureSummons(cid)[1])) > max then
doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid), false)
doSendMagicEffect(getThingPos(cid), 21)
end
end
return true
end
<event type="think" name="PokemonIdle" event="script" value="poketele.lua"/>