Sistema De Poketele

superbruno100
em Scripts

superbruno100

Brunex
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 28/05/10Posts: 51Char 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

 

5639330bef004ee2b48a9b837bad6005.0.gif

 

Meus Pokemons ;D

 

727115.png

 

1375963.png