Postado Maio 27, 2015 10 anos Olá Pessoal do TK, hoje vim pedir à voces, para que editem este Script da boost stone para Min... Este Script faz com que a Boost Stone falhe igual no OTP, mais quero que a Boost tbm aumente a Vida do pokemon, À cada Boost + 500HP... Ta Ai o Script, Obrigado function onUse(cid, item, frompos, item2, topos) local cfg = { qnt = 1, --Quantos boosts o pokémon irá receber. max = 15, --Boost máximo do seu servidor. chance = 2, --Chance de falhar, em % boost_fail = 9, --A partir de quantos boosts poderá falhar. } local myball = getPlayerSlotItem(cid, 8).uid local summon = getCreatureSummons(cid)[1] local boost = getItemAttribute(myball, "boost") or 0 if myball <= 0 then return doPlayerSendCancel(cid, "Coloque um pokemon no Main Slot!") elseif #getCreatureSummons(cid) <= 0 then return doPlayerSendCancel(cid, "Voce precisa estar usando seu pokemon para conseguir boosta-lo!") elseif boost >= cfg.max then return doPlayerSendCancel(cid, "Seu pokemon ja se encontra no nivel maximo de boost!") end if boost >= cfg.boost_fail then if math.random(1, 100) <= cfg.chance then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon evoluiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Sua boost stone falhou!") doRemoveItem(item.uid, 1) end else doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon evoluiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) end return true end Editado Maio 27, 2015 10 anos por zikadmz (veja o histórico de edições)
Postado Maio 27, 2015 10 anos Tenta assim function onUse(cid, item, frompos, item2, topos) local cfg = { qnt = 1, --Quantos boosts o pokémon irá receber. max = 15, --Boost máximo do seu servidor. chance = 2, --Chance de falhar, em % boost_fail = 9, --A partir de quantos boosts poderá falhar. } local myball = getPlayerSlotItem(cid, 8).uid local summon = getCreatureSummons(cid)[1] local boost = getItemAttribute(myball, "boost") or 0 if myball <= 0 then return doPlayerSendCancel(cid, "Coloque um pokemon no Main Slot!") elseif #getCreatureSummons(cid) <= 0 then return doPlayerSendCancel(cid, "Voce precisa estar usando seu pokemon para conseguir boosta-lo!") elseif boost >= cfg.max then return doPlayerSendCancel(cid, "Seu pokemon ja se encontra no nivel maximo de boost!") end if boost >= cfg.boost_fail then if math.random(1, 100) <= cfg.chance then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doCreatureAddHealth(cid, -500) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon evoluiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Sua boost stone falhou!") doRemoveItem(item.uid, 1) end else doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon evoluiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) end return true end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.