Olá, eu gostaria de saber como posso fazer que la boost stone não trabalhe com o pokemons legendarios.
Traductor:
Hola, Quisiera saber como puedo hacer que la boost stone no funcione con los pokemones legendarios.
Mi Boost Stone Script:
function onUse(cid, item, topos, item2, frompos)
local myball = getPlayerSlotItem(cid, 8)
local boost = getItemAttribute(myball.uid, "boost") or 0
local boosts = 100
if boost == 1500 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 > 1500 then
newBoost = 1500
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
Gracias.