- Fórum
- xTibia - Notícias e Suporte
- Soluções
- Archived
- O Meu Sistema De Poke-Dex Não Esta Funcionando
PO
O Meu Sistema De Poke-Dex Não Esta Funcionando
Por pok302010, 24 de abr. de 2011 em Archived
otserv
tibia
script
1
719
Por pok302010, 24 de abr. de 2011 em Archived
info
Grupo: Campones
Registrado: 26/01/11
Posts: 56
Reputação: +5
Char no Tibia: Samanthaa Runlsh
Iai galererinha Xtibiana
Eu estou com um problema no meu Sistema de poke-dex.
Sem que agente usa,ele não funciona e diz essa mensagen "You cannot use this object"
Alguem sabe oque é?
tem como resouver?
Ai segue os scripts:
Script:
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, "Now you registered ".. getCreatureName(itemEx.uid) .." into pokedex!") and doPlayerSendTextMessage(cid, 22, "You gain ".. p[1]-7300 .." experience!") 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] .."] - Uknown pokemon"
end
end
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "You have ".. pokemonss .." unlocked pokemons.")
doShowTextDialog(cid, item.itemid, "".. list .."\n\nEnd of registration.")
end
return true
end
tag:
<action itemid="2376" event="script" value="pokemon/pokedex.lua" allowfaruse="1" blockwalls="1"/>
Bom galerinha é isso..Se alguem puder me ajudar eu irei agradeçer muito!!
E se tiver faltando alguma coisa para auciliar na reparação do script é so me falar!
e outra coisa que eu acho que vai ajudar vocês!O poke-dex parou de funcionar derrepente..Tipo assim,.:PUF:.
Obrigado!