if not isCreature(item2.uid) then
return true
end
to
if not isCreature(item2.uid) then
return false end
Por BrunooMaciell, 03 de jun. de 2013 em Tópicos Sem Resposta
info
Grupo: Infante
Registrado: 25/01/12
Posts: 1.6k
Reputação: +330

if not isCreature(item2.uid) then
return true
end
to
if not isCreature(item2.uid) then
return false end
info
Grupo: Infante
Registrado: 27/08/11
Posts: 1.9k
Reputação: +85
Gênero: Masculino
Char no Tibia: Bruno Maciel

como assim troca o 1 pelo segundo nao entendi =sif not isCreature(item2.uid) then
return true
end
to
if not isCreature(item2.uid) then
return false end
info
Grupo: Artesão
Registrado: 22/07/12
Posts: 121
Reputação: +1

Acho que ele quis dizer assim Bruno!
nessa parte:
if not isCreature(item2.uid) then
return true
end
vc apaga e colocar essa:
if not isCreature(item2.uid) then
return false
end
-
-
Troca so:
true
Por:
false
¬¬
Editado Junho 3 por picapau100
info
Grupo: Infante
Registrado: 27/08/11
Posts: 1.9k
Reputação: +85
Gênero: Masculino
Char no Tibia: Bruno Maciel

vou ver aqui ^^
info
Grupo: Grão-Duque
Registrado: 28/07/11
Posts: 3.5k
Reputação: +570
Gênero: Masculino
Char no Tibia: Transloko

Tópico movido para a seção de dúvidas e pedidos resolvidos.
Tópico movido para a seção de dúvidas e pedidos resolvidos.
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

info
Grupo: Infante
Registrado: 27/08/11
Posts: 1.9k
Reputação: +85
Gênero: Masculino
Char no Tibia: Bruno Maciel
BUG
[03/06/2013 13:41:44] [Error - Action Interface]
[03/06/2013 13:41:45] data/actions/scripts/pokedex.lua:onUse
[03/06/2013 13:41:45] Description:
[03/06/2013 13:41:45] data/actions/scripts/pokedex.lua:38: attempt to index a boolean value
[03/06/2013 13:41:45] stack traceback:
[03/06/2013 13:41:45] data/actions/scripts/pokedex.lua:38: in function <data/actions/scripts/pokedex.lua:3>
SCRIPT
local rate = 20
function onUse(cid, item, fromPos, item2, toPos)
if not isCreature(item2.uid) then
return true
end
local poke = getCreatureName(item2.uid)
if isMonster(item2.uid) then
local this = newpokedex[getCreatureName(item2.uid)]
local leveltable = getPokemonExperienceTable(getCreatureName(item2.uid))
local myball = 0
if isSummon(item2.uid) then
myball = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)
end
if not getPlayerInfoAboutPokemon(cid, poke).dex then
local exp = this.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)
doAddPokemonInDexList(cid, poke)
else
doShowPokedexRegistration(cid, item2, myball, leveltable)
end
return true
end
if not isPlayer(item2.uid) then return true end
--alterado v2.7 \/\/
local kanto = 0
local johto = 0
for i = 1, #oldpokedex do
if getPlayerInfoAboutPokemon(item2.uid, oldpokedex[1]).dex then
if i <= 151 then
kanto = kanto+1
elseif i >= 209 then
johto = johto+1
end
end
end
local player = getRecorderPlayer(toPos, cid)
if cid == player then
doPlayerSendTextMessage(cid, 27, "You has unlocked "..kanto.." kanto's and "..johto.." johto's pokémons until now.")
doPlayerSetVocation(cid, 9)
openChannelDialog(cid)
end
return true
end
Rep+