Bem,eu testei aqui e quando dou dex no corpo nao acontece nada,somente no pokemon como sempre era
Meu Pokedex.lua do actions.
local rate = 50
function onUse(cid, item, fromPos, item2, toPos)
if not isCreature(item2.uid) then
local name = getItemNameById(item2.itemid)
if name:find("fainted") then
name = doCorrectPokemonName(name:gsub("fainted ", ""))
if not getPlayerInfoAboutPokemon(cid, name).dex then
local exp = newpokedex[name].level * rate
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked "..name.." and received "..exp.." experience points.")
doSendMagicEffect(getThingPos(cid), 210)
doPlayerAddExperience(cid, exp)
doAddPokemonInDexList(cid, name)
else
doShowPokedexRegistration(cid, name, getPlayerSlotItem(cid, 8).uid)
end
end
return true
end
local poke = getCreatureName(item2.uid)
if isMonster(item2.uid) then
local this = newpokedex[getCreatureName(item2.uid)]
local myball = 0
if isSummon(item2.uid) then
myball = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)
end
if isOutlanderPokemon(getCreatureName(item2.uid)) then return false end
if pokes[poke].dex then
if getPlayerStorageValue(cid, pokes[poke].dex) <= 0 then
exp = pokes[poke].level * rate
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked "..getCreatureName(item2.uid).." in your pokedex!")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained "..exp.." experience points.")
doSendMagicEffect(getThingPos(cid), 210)
doPlayerAddExperience(cid, exp)
setPlayerStorageValue(cid, pokes[poke].dex, 1)
doShowPokedexRegistration(cid, item2, myball)
return true
else
doShowPokedexRegistration(cid, item2, myball)
return true
end
end
doShowPokedexRegistration(cid, item2, myball)
return true
end
if not isPlayer(item2.uid) then return true end
local kanto = 0
local johto = 0
local other = 0
for i = 1, #oldpokedex do
if i <= 151 then
kanto = kanto+1
elseif i <= 251 and i > 151 then
johto = johto+1
elseif i >= 252 then
other = other+1
end
end --alterado v1.6
local player = getRecorderPlayer(toPos, cid)
if cid == player then
doPlayerSendTextMessage(cid, 27, "You has unlocked "..kanto.." kanto's and "..johto.." johto's and "..other.." other's pokémons until now.")
doPlayerSetVocation(cid, 9) --alterado v1.6
openChannelDialog(cid)
end
return true
end