BR
bug - poketibia

[Encerrado] (Bug) Boost Stone

Por BrunooMaciell, 24 de jun. de 2013 em Tópicos Sem Resposta

resolvido
script
4
1.2k
BrunooMaciellB
24 de junho de 2013 às 23:18

Estou com um bug no systema de boost stone !!

 

BUG

 

[24/06/2013 22:44:32] [Error - Action Interface]
[24/06/2013 22:44:32] data/actions/scripts/booststone.lua:onUse
[24/06/2013 22:44:32] Description:
[24/06/2013 22:44:32] data/actions/scripts/booststone.lua:25: attempt to perform arithmetic on a nil value
[24/06/2013 22:44:32] stack traceback:
[24/06/2013 22:44:32] data/actions/scripts/booststone.lua:25: in function

 

 

SCRIPT

 

function onUse(cid, item, topos, item2, frompos)
local myball = getPlayerSlotItem(cid, 8)
local boost = getItemAttribute(myball.uid, "boost") or 0
local boosts = 5
if boost == 70 then
doPlayerSendCancel(cid, "Your pokemon is already at maximum boost.")
return true
end
if not isSummon(item2.uid) then
doPlayerSendCancel(cid, "Use only in your pokemons.")
return true
end
boosts = boosts
local pokemon = getItemAttribute(myball.uid, "poke")
local off = pokes[pokemon].offense * boost_rate * boosts
local def = pokes[pokemon].defense * boost_rate * boosts
local agi = pokes[pokemon].agility * boosts
local spatk = pokes[pokemon].specialattack * boost_rate * boosts
local vit = pokes[pokemon].vitality * boost_rate * boosts
newBoost = boost + boosts
if newBoost > 70 then
newBoost = 70
end
doSetItemAttribute(myball.uid, "boost", newBoost)
doItemSetAttribute(myball.uid, "offense", getItemAttribute(myball.uid, "offense") + off)
doItemSetAttribute(myball.uid, "defense", getItemAttribute(myball.uid, "defense") + def)
doItemSetAttribute(myball.uid, "speed", getItemAttribute(myball.uid, "speed") + agi)
doItemSetAttribute(myball.uid, "specialattack", getItemAttribute(myball.uid, "specialattack") + spatk)
doItemSetAttribute(myball.uid, "vitality", getItemAttribute(myball.uid, "vitality") + vit)
doRemoveItem(item.uid)
doSendMagicEffect(getThingPos(item2.uid), 103)
doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +"..boosts..".")
doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..newBoost..".")
doSendAnimatedText(getThingPos(item2.uid), "+"..boosts.." Boost", 215)
return true
end

 

 

Rep++

2 meses depois...
vital900V
04 de agosto de 2013 às 18:34

Tópico movido para a seção de dúvidas e pedidos resolvidos.

vital900V
04 de agosto de 2013 às 18:34

Tópico movido para a seção de dúvidas e pedidos resolvidos.

4 anos depois...
StigalS
21 de abril de 2018 às 02:57
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.