Postado Fevereiro 20, 2016 9 anos Gostaria que alguém pudesse ajudar a adaptar esse script. Uso base PokeStorm e ele não é compatível. Já tenho adicionado no servidor e até usa no pokemon mas não da atributos quando boost e também não mostra o boost tipo "Alakazam +1". Se precisar de mais algum só falar. Spoiler function onUse(cid, item, frompos, item2, topos) local cfg = { qnt = 1, --Quantos boosts o pokémon irá receber. max = 50, --Boost máximo do seu servidor. chance = 20, --Chance de falhar, em % boost_fail = 5, --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 pokémon no Main Slot!") elseif #getCreatureSummons(cid) <= 0 then return doPlayerSendCancel(cid, "Você precisa estar usando seu pokémon para conseguir boostá-lo!") elseif boost >= cfg.max then return doPlayerSendCancel(cid, "Seu pokémon já se encontra no nível máximo 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 pokémon avançou do nível [+"..tonumber(boost).."] de boost para o nível [+"..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 pokémon avançou do nível [+"..tonumber(boost).."] de boost para o nível [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) end return true end up Editado Fevereiro 20, 2016 9 anos por Drakopoulos up (veja o histórico de edições)
Postado Fevereiro 21, 2016 9 anos 14 horas atrás, Drakopoulos disse: Gostaria que alguém pudesse ajudar a adaptar esse script. Uso base PokeStorm e ele não é compatível. Já tenho adicionado no servidor e até usa no pokemon mas não da atributos quando boost e também não mostra o boost tipo "Alakazam +1". Se precisar de mais algum só falar. Ocultar conteúdo function onUse(cid, item, frompos, item2, topos) local cfg = { qnt = 1, --Quantos boosts o pokémon irá receber. max = 50, --Boost máximo do seu servidor. chance = 20, --Chance de falhar, em % boost_fail = 5, --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 pokémon no Main Slot!") elseif #getCreatureSummons(cid) <= 0 then return doPlayerSendCancel(cid, "Você precisa estar usando seu pokémon para conseguir boostá-lo!") elseif boost >= cfg.max then return doPlayerSendCancel(cid, "Seu pokémon já se encontra no nível máximo 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 pokémon avançou do nível [+"..tonumber(boost).."] de boost para o nível [+"..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 pokémon avançou do nível [+"..tonumber(boost).."] de boost para o nível [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) end return true end up tenta: Spoiler 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, "desculpe nao foi possivel.") end if #getCreatureSummons(cid) >= 1 and doPlayerRemoveItem(cid, 12618, 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) doSendMagicEffect(getThingPos(item.uid), 29) 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) doPlayerSendTextMessage(cid, 27, "parabens, seu "..pokemon..", foi bostado +1.") doPlayerSendTextMessage(cid, 27, "agora o seu "..pokemon.." esta +"..boosts + boost..".") doSendAnimatedText(getThingPos(item2.uid), "BOOST!", 71) doPlayerSetVocation(cid,4) else return doPlayerSendCancel(cid, "use seu pokemon.") end return true end
Postado Fevereiro 21, 2016 9 anos Autor @lenardo88 Já tentei esse ai tbm, mas nem funciona, da erro na parte offense, defence, agility . . .
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.