ate onde sei ele n tem tag no creaturescripts.xml por isso ele parece morto hihi...
tb troca isso..
if true then --not isCreature(cid) then return true end
para isso..
if not isCreature(cid) then return true end
info
Group: Príncipe
Joined: 19/08/10
Posts: 4k
Reputation: +1.1k
Gender: Masculino

ate onde sei ele n tem tag no creaturescripts.xml por isso ele parece morto hihi...
tb troca isso..
if true then --not isCreature(cid) then return true end
para isso..
if not isCreature(cid) then return true end
Edited Maio 24 by Slicer
e registra esse evento no summon, pode ser tanto pelo onSpawn quanto pelo goback.lua
Area incorreta
Topico Reportado.
PS: Area correta seria "Servidores e derivados > Pedidos e Duvidas - Servidores e Derivados"
info
Group: Príncipe
Joined: 19/08/10
Posts: 4k
Reputation: +1.1k
Gender: Masculino

na real tem q ser no login.lua n brun? acredito q ele funcione no player e n no summon ![]()
if #getCreatureSummons(cid) >= 1 and not isCreature(getCreatureTarget(cid)) then
edit: alias agora q vi q ele ja ta com a tag... entao tem q trocar oq eu flei pra trocar ali emcima e ver se ta registrado no login.lua
Edited Maio 24 by Slicer
info
Group: Herói
Joined: 12/06/12
Posts: 2.2k
Reputation: +739
Gender: Masculino
Tibia Character: Supreme Player

Estava atrás disso tambem, vi que você slicer falo que precisa ter algo no Login.lua , oque seria isso?
não é só colocar a tag?
é, tem que registrar no player, não tinha lido o script, só vi o nome na tag "pokemonidle" e fez sentido ser no summon...
enfim, basta usar esse script:
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 onLogin(cid)
registerCreatureEvent(cid, "PokemonIdle")
return true
end
function onThink(cid, interval)
if 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
e essas tags:
<event type="think" name="PokemonIdle" event="script" value="poketele.lua"/> <event type="login" name="PokemonIdleLogin" event="script" value="poketele.lua"/>
info
Group: Herói
Joined: 12/06/12
Posts: 2.2k
Reputation: +739
Gender: Masculino
Tibia Character: Supreme Player

/\ Obrigado brun xD testando aki! fica com meu rep++
Edit: Brun não pego man testei com account de god e account Normal
info
Group: Visconde
Joined: 26/08/12
Posts: 318
Reputation: +118
Gender: Masculino

/\ vdd brun, tb testei ake deu esse erro:
[25/05/2013 00:01:32] [Error - CreatureScript Interface]
[25/05/2013 00:01:32] data/creaturescripts/scripts/wildpoke.lua:onDirection
[25/05/2013 00:01:32] Description:
[25/05/2013 00:01:32] data/creaturescripts/scripts/wildpoke.lua:22: attempt to call global 'isSummon' (a nil value)
[25/05/2013 00:01:32] stack traceback:
[25/05/2013 00:01:32] data/creaturescripts/scripts/wildpoke.lua:22: in function <data/creaturescripts/scripts/wildpoke.lua:12>
info
Group: Campones
Joined: 07/10/12
Posts: 18
Reputation: +6
Tibia Character: Revaux

LOL Claro que não Acabei de testar Agora funfo Perfeitamente, eu fui seguindo os passos eu não intendo muito de script mesmo segui o passo do slicer encima, depois o do brun123 embaixo funfo direitinho vlw rep pros 2 ^^
info
Group: Visconde
Joined: 26/08/12
Posts: 318
Reputation: +118
Gender: Masculino

ae, consegui tb kkk
eu vi oq o markerkirito falo e fiz a mrm coisa ;p
info
Group: Infante
Joined: 06/03/13
Posts: 1.6k
Reputation: +319
Gender: Masculino
Tibia Character: Lord Sorte

Slicer And Brunin Salvadores Pda ^^
Creio Que A Duvida Ja Foi Senada Vou Reportar Para Que Movam
info
Group: Visconde
Joined: 24/07/12
Posts: 265
Reputation: +15

Estranho. uma ou duas versões anteriores tinha o poketele.lua. Porque foi removido?
info
Group: Campones
Joined: 06/10/12
Posts: 80
Reputation: 0
Tibia Character: Lian Colbert

Estranho. uma ou duas versões anteriores tinha o poketele.lua. Porque foi removido?
Porque foi removido eu já não sei. Mais eu só criei um novo .lua e adicionei o Script, fiz os passos que o Slicer explico depois segui o Bruno, e só troquei essa linha : local max = 9 -- distancia max entre o pokemon e o player
Por essa : local max = 6 -- distancia max entre o pokemon e o player
info
Group: Campones
Joined: 07/10/12
Posts: 18
Reputation: +6
Tibia Character: Revaux
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"/>