Não sei se todos os pokemons tem o mesmo padrão de storages e scripts, mas vou te passar um script de um pokemon que tenho aqui que não ocorre esse erro:
local efeito = 1 -- coloque 0 para remover o efeito quando o pokemon teleportar local max = 6 -- 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


info
Grupo: Campones
Registrado: 28/05/10
Posts: 51
Reputação: +6
Char no Tibia: Parei de jogar ;D
Gente preciso configurar com "PokeTele" (eu acho)... o que acontece... Toda vez que eu entro no PVP ou em qualquer teleporte que teleporta pra longe, buga a poke bola o pokemon fica aonde eu teleportei ai vc precisa logar, e quando vc volta e tira o pokemon ele morre... Quem me ajuda a resolver o problema dou REP+
System:
local efeito = 1 -- coloque 0 para remover o efeito quando o pokemon teleportar
local max = 7 -- distancia max entre o pokemon e o player
function onThink(cid, interval)
if not isCreature(cid) then
return true
end
if isInArray({'4820', '4821', '4822', '4823', '4824', '4825'}, getTileInfo(getThingPos(cid)).itemid) then
if getPlayerGroupId(cid) == 1 then
setPlayerGroupId(cid, 8)
end
return true
end
if #getCreatureSummons(cid) >= 1 then
if getPlayerGroupId(cid) == 1 then
setPlayerGroupId(cid, 8)
end
elseif #getCreatureSummons(cid) == 0 then
if getPlayerGroupId(cid) == 8 then
setPlayerGroupId(cid, 1)
end
end
if #getCreatureSummons(cid) >= 1 and not isCreature(getCreatureTarget(cid)) then
if math.abs((getThingPos(cid).x) - (getThingPos(getCreatureSummons(cid)[1]).x)) > max+1 then
doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid))
if efeito == 1 then
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 37)
end
return true
end
if math.abs((getThingPos(cid).y) - (getThingPos(getCreatureSummons(cid)[1]).y)) > max-1 then
doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid))
if efeito == 1 then
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 37)
end
return true
end
end
return true
end
Editado Junho 27 por Brunex