function addPoke(cid, storage)
setPlayerStorageValue(cid, storage, 1)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not isCreature(itemEx.uid) then
return doPlayerSendCancel(cid, "Invalid action.")
end
local showpokedex = ""
local img = ""
local p = pokemons[getCreatureName(itemEx.uid)]
if p then
img = p[2]
showpokedex = doShowTextDialog(cid, img, io.open('data/actions/scripts/descriptions/'.. p[3] ..'.txt'):read("*all"))
if isMonster(itemEx.uid) then
return getPlayerStorageValue(cid, p[1]) ~= 1 and doPlayerSendTextMessage(cid, 22, "Você acaba de Registrar ".. getCreatureName(itemEx.uid) .." Na Sua Pokedex") and doPlayerSendTextMessage(cid, 22, "Você ganhou ".. p[1]400 .." de experiência") and doPlayerAddExperience(cid, p[1]-7300) and showpokedex and addPoke(cid, p[1]) or getPlayerStorageValue(cid, p[1]) == 1 and showpokedex
end
end
if getCreatureName(itemEx.uid) == getCreatureName(cid) then
local list = "Pokedex registration: \n"
local pokemonss = 0
for i = 7274,7424 do
if getPlayerStorageValue(cid, i) == 1 then
list = list.."\n[".. pokestorages[1] .."] - ".. pokestorages[2] ..""
pokemonss = pokemonss + 1
elseif getPlayerStorageValue(cid, i) == -1 then
list = list.."\n[".. pokestorages[1] .."] - Pokémon Desconhecido"
end
end
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Você Tem ".. pokemonss .."Pokémons Registrados em Sua Pokedex")
doShowTextDialog(cid, item.itemid, "".. list .."\n\nEnd of registration.")
end
return true
end
tenta por esse ai cara, se n der avisa aki, e se ajudei Rep++ ![]()





info
Grupo: Campones
Registrado: 20/05/11
Posts: 4
Reputação: +1
Char no Tibia: '-'
Boa noite galera, estou com uma dúvida, baixei um Server de Poketibia, porém quando entrei no servidor, testei o Sistema de Pokedex..
Funciona normalmente, porém a experiência ganha de cada pokemon que adiciona está vindo "-17"
Como configuro a experiencia que ganha quando cada pokemon é adicionado na Pokedex?
Este é o data\actions\scripts\pokedex.txt que veio no servidor...
Me ajudem por favor!