CH
pedido

[Encerrado] Boost Stone

Por Chapalirous, 28 de nov. de 2012 em Tópicos Sem Resposta

boost
4
807
ChapalirousC
28 de novembro de 2012 às 00:37

Boost Stone quando Chega no boost maximo ela continua Gastando e não boosta mais. Eu queria que parasse de gastar as Boost Stone quando chega no boost Máximo

 

 

 

function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) or not isSummon(item2.uid) then

doPlayerSendCancel(cid, "You can only give this Boost to trainers' pokemons.")

return true

end

if getCreatureHealth(item2.uid) == 0 then return true end

local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)

 

doPlayerSendTextMessage(cid, 27, "You gave a Boost Stone to "..getPokeName(item2.uid)..".")

doCreatureSay(cid, getPokeName(item2.uid)..", take this Boost!", TALKTYPE_SAY)

doRemoveItem(item.uid, 1)

 

local level = getItemAttribute(pb.uid, "level")

local exp = getItemAttribute(pb.uid, "exp")

local neededexp = getItemAttribute(pb.uid, "nextlevelexp")

local boost = getItemAttribute(pb.uid, "boost") or 0

if boost >= 200 then

doPlayerSendCancel(cid, "Your pokemon is already at maximum boost.")

return true

end

if getHappiness(item2.uid) < 50 then

doSendMagicEffect(getThingPos(item2.uid), 168)

return true

end

doCreatureSay(item2.uid, "BOOST+.", TALKTYPE_ORANGE_1)

doSetItemAttribute(pb.uid, "boost", boost + 1)

doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Your "..getPokeName(item2.uid).." has eaten a Boost Stone!")

doSendFlareEffect(getThingPos(item2.uid))

doSendAnimatedText(getThingPos(item2.uid), "B O O S T!", 215)

 

return false

end

Editado Novembro 28 por Chapalirous

MulizeuM
28 de novembro de 2012 às 11:00

EDITED O POSTE

 

 

 

function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) or not isSummon(item2.uid) then
doPlayerSendCancel(cid, "You can only give this Boost to trainers' pokemons.")
return true
end

if getCreatureHealth(item2.uid) == 0 then return true end
local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)

--doPlayerSendTextMessage(cid, 27, "You gave a Boost Stone to "..getPokeName(item2.uid)..".")

local level = getItemAttribute(pb.uid, "level")
local exp = getItemAttribute(pb.uid, "exp")
local neededexp = getItemAttribute(pb.uid, "nextlevelexp")
local boost = getItemAttribute(pb.uid, "boost") or 0

if boost >= 200 then
doPlayerSendCancel(cid, "Your pokemon is already at maximum boost.")
return true
end
doRemoveItem(item.uid, 1)

if getHappiness(item2.uid) < 50 then
doSendMagicEffect(getThingPos(item2.uid), 168)
return true
end

doCreatureSay(item2.uid, "BOOST+.", TALKTYPE_ORANGE_1)
doSetItemAttribute(pb.uid, "boost", boost + 1)
doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Your "..getPokeName(item2.uid).." has eaten a Boost Stone!")
doSendFlareEffect(getThingPos(item2.uid))
doSendAnimatedText(getThingPos(item2.uid), "B O O S T!", 215)
doCreatureSay(cid, getPokeName(item2.uid)..", take this Boost!", TALKTYPE_SAY)

return false
end

Editado Novembro 28 por mulizeu

ChapalirousC
28 de novembro de 2012 às 13:15

Deu Certo só que Porem quando eu vou tentar Usar a Boost Stone ainda continua aparecendo

 

13:13 (Kamiki) Chapalirous [325]: Electabuzz, take this Boost!

 

Mas não esta boostando

5 anos depois...
StigalS
20 de abril de 2018 às 00:48
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.