[Encerrado] [Pedido] Problema com a Boost Stone.

ApShopAdmin
em Tópicos Sem Resposta

ApShopAdmin

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 20/05/13Posts: 23

Achei aqui no Xtibia um tutorial de Boost Stone.. eu segui, mais não deu mt certo aqui. tem os seguintes erros.

-Depois de usado ele não some.

-A mensagem que devia aparecer "BOOSTED" tambem não aparece.

-Depois de usar aparece escrito la em baixo "Sorry it's not possible."

-Fora isso ele boosta normal..

 

ps: Eu estou usando o Rust Remover.. (Não sei se tem a ver com isso. mais acho que não pois nao existe a action do Rust aqui)

Queria que vocês pudessem arrumar pra mim..

Desde já Agradeço!!

 

Valendo Rep+

 

@Edit

 

Tambem dá esse erro no console

 

 

 

[01/08/2013 06:49:21] [Error - Action Interface]
[01/08/2013 06:49:21] data/actions/scripts/booststone.lua:onUse
[01/08/2013 06:49:21] Description:
[01/08/2013 06:49:21] data/actions/scripts/booststone.lua:20: attempt to perform arithmetic on a nil value
[01/08/2013 06:49:21] stack traceback:
[01/08/2013 06:49:21] data/actions/scripts/booststone.lua:20: in function <data/actions/scripts/booststone.lua:1>

 


Script:

 

 

 

function onUse(cid, item, topos, item2, frompos)
local myball = getPlayerSlotItem(cid, 8)
local boost = getItemAttribute(myball.uid, "boost") or 0
local boosts = 0
if boost == 50 then
return doPlayerSendCancel(cid, "Sorry, is not possible.")
end
if #getCreatureSummons(cid) >= 1 then
if getPlayerAccess(cid) == 6 then
boosts = 50
end
boosts = boosts + 1
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 doSetItemAttribute(myball.uid, "boost", boost + boosts)
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), 40)
doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +1.")
doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..boosts + boost..".")
doSendAnimatedText(getThingPos(item2.uid), "BOOST!", 71)
doPlayerSetVocation(cid,4)
else
return doPlayerSendCancel(cid, "Only use in yours pokemons.")
end
return true
end

 

 

StyloMaldoso

a good son makes the house...;p
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 25/01/12Posts: 1593

 

function onUse(cid, item, topos, item2, frompos)
local ball = getPlayerSlotItem(cid, 8).uid
local boost = getItemAttribute(ball, "boost") or 0
local boosts = 1

if not isSummon(item2.uid) or cid ~= getCreatureMaster(item2.uid) then
return doPlayerSendCancel(cid, "Use a Boost Stone in your pokemons.")
end

if boost == 50 then
return doPlayerSendCancel(cid, "Sorry, is not possible.")
end

local pokemon = getItemAttribute(ball, "poke")
doSetItemAttribute(ball, "boost", boost + boosts)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid, 27, "Your pokeball is now +"..math.floor(boosts + boost).."!")

return true
end

Project Pokémon Mysterion OpenSoures 2016.

Em breve, mais informações!

 

23vfcht.png

ApShopAdmin

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 20/05/13Posts: 23

Cara Obrigadão!! <3

Rep+

Stigal

don't ever stop...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 28/11/10Posts: 3402Gênero: Masculino
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.

VI6MDIG.png

 

"O fracasso é a oportunidade de se começar de novo inteligentemente"

Minhas Redes Sociais: Youtube | Página & Grupo | Steam  | Discord Xtibia | Skype: @mrooger

 

OTpanel