Marshmello 271 Postado Junho 4, 2017 Share Postado Junho 4, 2017 Fala Pessoal Hoje estou trazendo um sistema de boost stone iguazinho do otPokemon Como Funciona: Quando o Player atinge o numero de boost stone de 5 no seu pokemon aparti do 6 se ela falhar volta pro 5, entao se vc consegui fazer q a boost va ate o 10 se ela falhar volta pro 5 de boost dnv Chega de enrrolação vamos la Em actions/scritpt crie um arquivo chamado Boost Stone.lua Coloque isso dentro Spoiler -- Scrit Por Marshmello function onUse(cid, item, fromPosition, itemEx, toPosition) local meuovo = { qnt = 1, --quantidade de boost q vai ser adicionada maxi = 30, --maximo de boost chance = 64, --chance de falhar boost_fail = 6, --- quanditade q ela pode falhar falhar = 5, --- pra onde a boost vai voltar quando falhar } local minhabola = getPlayerSlotItem(cid, 8).uid local boost = getItemAttribute(minhabola, "boost") or 0 if minhabola <= 0 then return doPlayerSendCancel(cid, "Coloque um pokémon no Main Slot!") elseif boost >= meuovo.maxi then return doPlayerSendCancel(cid, "Seu pokémon já se encontra no nível máximo de boost!") end if boost >= meuovo.boost_fail then if math.random(1, 100) <= meuovo.chance then doItemSetAttribute(minhabola, "boost", (boost + meuovo.qnt)) doSendMagicEffect(fromPosition, 173) doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid,"Falhou!") doItemSetAttribute(minhabola, "boost", (meuovo.falhar)) doRemoveItem(item.uid, 1) end else doItemSetAttribute(minhabola, "boost", (boost + meuovo.qnt)) doSendMagicEffect(fromPosition, 173) doRemoveItem(item.uid, 1) end return true end Agora vai em actions.xml e coloque isso Spoiler <action itemid="ID DA BOOST" event="script" value="Boost Stone.lua" allowfaruse="1"/> Gosto Deixe Seu REP+ OBS: Peço que não remova os Creditos pois deu trabalho fazer Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/ Compartilhar em outros sites More sharing options...
Marshmello2 5 Postado Junho 4, 2017 Share Postado Junho 4, 2017 Oba tava querendo um script desse Obg @Marshmello Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717714 Compartilhar em outros sites More sharing options...
Josegvb 87 Postado Junho 4, 2017 Share Postado Junho 4, 2017 nao irei usar mas vlw pela contribuçao! tomara q compartilhasem mais scripts assim pra quem precise Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717716 Compartilhar em outros sites More sharing options...
DarkWore 113 Postado Junho 4, 2017 Share Postado Junho 4, 2017 Bem Legal, Obrigado por Compartilhar. Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717717 Compartilhar em outros sites More sharing options...
VelhoBarreiro 52 Postado Junho 4, 2017 Share Postado Junho 4, 2017 Muito bom! Não curto OTPokemon, mas contribuiu com a comunidade! Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717718 Compartilhar em outros sites More sharing options...
Marshmello 271 Postado Junho 4, 2017 Autor Share Postado Junho 4, 2017 1 hora atrás, Josegvb disse: nao irei usar mas vlw pela contribuçao! tomara q compartilhasem mais scripts assim pra quem precise 1 hora atrás, DarkWore disse: Bem Legal, Obrigado por Compartilhar. Dnds 21 minutos atrás, VelhoBarreiro disse: Não curto OTPokemon, mas contribuiu com a comunidade! Fiz mais ela pq um amigo me pediu ae acabei postando aki Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717719 Compartilhar em outros sites More sharing options...
wevertonvrb 25 Postado Junho 5, 2017 Share Postado Junho 5, 2017 (editado) 4 horas atrás, Marshmello disse: Fala Pessoal Hoje estou trazendo um sistema de boost stone iguazinho do otPokemon Como Funciona: Quando o Player atinge o numero de boost stone de 5 no seu pokemon aparti do 6 se ela falhar volta pro 5, entao se vc consegui fazer q a boost va ate o 10 se ela falhar volta pro 5 de boost dnv Chega de enrrolação vamos la Em actions/scritpt crie um arquivo chamado Boost Stone.lua Coloque isso dentro Ocultar conteúdo -- Scrit Por Marshmello function onUse(cid, item, fromPosition, itemEx, toPosition) local meuovo = { qnt = 1, --quantidade de boost q vai ser adicionada maxi = 30, --maximo de boost chance = 64, --chance de falhar boost_fail = 6, --- quanditade q ela pode falhar falhar = 5, --- pra onde a boost vai voltar quando falhar } local minhabola = getPlayerSlotItem(cid, 8).uid local boost = getItemAttribute(minhabola, "boost") or 0 if minhabola <= 0 then return doPlayerSendCancel(cid, "Coloque um pokémon no Main Slot!") elseif boost >= meuovo.maxi then return doPlayerSendCancel(cid, "Seu pokémon já se encontra no nível máximo de boost!") end if boost >= meuovo.boost_fail then if math.random(1, 100) <= meuovo.chance then doItemSetAttribute(minhabola, "boost", (boost + meuovo.qnt)) doSendMagicEffect(fromPosition, 173) doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid,"Falhou!") doItemSetAttribute(minhabola, "boost", (meuovo.falhar)) doRemoveItem(item.uid, 1) end else doItemSetAttribute(minhabola, "boost", (boost + meuovo.qnt)) doSendMagicEffect(fromPosition, 173) doRemoveItem(item.uid, 1) end return true end Agora vai em actions.xml e coloque isso Mostrar conteúdo oculto <action itemid="ID DA BOOST" event="script" value="Boost Stone.lua" allowfaruse="1"/> Gosto Deixe Seu REP+ OBS: Peço que não remova os Creditos pois deu trabalho fazer bom esse script não foi desenvolvido por você, ou talvez ate tenha mas eu tenho esse script a anos a unica diferença é que o meu não tem isso de meu ovo e minha bola que axei ridiculo encontrei o link http://www.###.com/forum/forums/topic/37849-action-script-de-boost-stone-parecido-com-otpokemon/ ele também não foi o criador e não pois credito, bote o credito pra ele também, pois você apenas edito esse script. ESTOU IMAGINANDO O TRABALHO QUE VOCÊ TEVE PARA FAZER ESSE SCRIPT Editado Junho 5, 2017 por wevertonvrb Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717723 Compartilhar em outros sites More sharing options...
DarkWore 113 Postado Junho 5, 2017 Share Postado Junho 5, 2017 (editado) 18 minutos atrás, wevertonvrb disse: bom esse script não foi desenvolvido por você, ou talvez ate tenha mas eu tenho esse script a anos a unica diferença é que o meu não tem isso de meu ovo e minha bola que axei ridiculo encontrei o link http://www.###.com/forum/forums/topic/37849-action-script-de-boost-stone-parecido-com-otpokemon/ ele também não foi o criador e não pois credito, bote o credito pra ele também, pois você apenas edito esse script. ESTOU IMAGINANDO O TRABALHO QUE VOCÊ TEVE PARA FAZER ESSE SCRIPT Os Scripts são semelhantes mais não os mesmos. Editado Junho 5, 2017 por DarkWore erro corrigido Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717724 Compartilhar em outros sites More sharing options...
Marshmello 271 Postado Junho 5, 2017 Autor Share Postado Junho 5, 2017 5 minutos atrás, DarkWore disse: Eu tambem andei pesquisando e vi o mesmo @Marshmello eu também estava vendo e vi que você é o breno só mudou o nome, porfavor coloque os devidos créditos. Creditos de q? se minha script e bem diferente do cara acissa olha bem 10 minutos atrás, wevertonvrb disse: bom esse script não foi desenvolvido por você, ou talvez ate tenha mas eu tenho esse script a anos a unica diferença é que o meu não tem isso de meu ovo e minha bola que axei ridiculo encontrei o link http://www.###.com/forum/forums/topic/37849-action-script-de-boost-stone-parecido-com-otpokemon/ ele também não foi o criador e não pois credito, bote o credito pra ele também, pois você apenas edito esse script. ESTOU IMAGINANDO O TRABALHO QUE VOCÊ TEVE PARA FAZER ESSE SCRIPT Preste bem atenção na script bem diferente do cara q voce postou n fale mer.da Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717725 Compartilhar em outros sites More sharing options...
wevertonvrb 25 Postado Junho 5, 2017 Share Postado Junho 5, 2017 Agora, Marshmello disse: Creditos de q? se minha script e bem diferente do cara acissa olha bem Preste bem atenção na script bem diferente do cara q voce postou n fale mer.da EU NÃO LIGO SE VC QUEIRA FICAR COM OS CRÉDITOS DOS OUTROS ENTÃO SE EU POSTAR O MEU AQUI P CREDITO É MEU? PORQUE EU TAMBÉM FIZ MUITAS ALTERAÇÕES CREDITOS PARA MIN Spoiler function onUse(cid, item, frompos, item2, topos) if isPlayer(item2.uid) then return doPlayerSendCancel(cid, "Você só pode usar a boost stone em seu pokemon!") end if not isCreature(item2.uid) then return doPlayerSendCancel(cid, "Você só pode boostar seu pokemon!") end if not isPlayer(getCreatureMaster(item2.uid)) then return doPlayerSendCancel(cid, "Voce nao pode dar boost em pokemons selvagens.") end local cfg = { qnt = 1, --Quantos boosts o pokémon irá receber. max1 = 100, max2 = 150, max3 = 200, max4 = 240, max5 = 280, max6 = 300, --Boost máximo do seu servidor. chance1 = 80, --Chance de dar certo em % chance2 = 78, chance3 = 76, chance4 = 68, chance5 = 64, chance6 = 60, boost_fail = 80, --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, "Você precisa estar usando seu pokemon para conseguir boosta-lo!") elseif boost >= cfg.max6 then return doPlayerSendCancel(cid, "Seu pokemon ja se encontra no nivel maximo de boost!") end if boost < cfg.boost_fail then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) end if boost >= cfg.boost_fail and boost <= cfg.max1 then if math.random(1, 100) <= cfg.chance1 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max1 and boost <= cfg.max2 then if math.random(1, 100) <= cfg.chance2 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max2 and boost <= cfg.max3 then if math.random(1, 100) <= cfg.chance3 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max3 and boost <= cfg.max4 then if math.random(1, 100) <= cfg.chance4 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max4 and boost <= cfg.max5 then if math.random(1, 100) <= cfg.chance5 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max5 and boost <= cfg.max6 then if math.random(1, 100) <= cfg.chance6 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end return true end Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717727 Compartilhar em outros sites More sharing options...
Marshmello 271 Postado Junho 5, 2017 Autor Share Postado Junho 5, 2017 Agora, wevertonvrb disse: EU NÃO LIGO SE VC QUEIRA FICAR COM OS CRÉDITOS DOS OUTROS ENTÃO SE EU POSTAR O MEU AQUI P CREDITO É MEU? PORQUE EU TAMBÉM FIZ MUITAS ALTERAÇÕES CREDITOS PARA MIN Mostrar conteúdo oculto function onUse(cid, item, frompos, item2, topos) if isPlayer(item2.uid) then return doPlayerSendCancel(cid, "Você só pode usar a boost stone em seu pokemon!") end if not isCreature(item2.uid) then return doPlayerSendCancel(cid, "Você só pode boostar seu pokemon!") end if not isPlayer(getCreatureMaster(item2.uid)) then return doPlayerSendCancel(cid, "Voce nao pode dar boost em pokemons selvagens.") end local cfg = { qnt = 1, --Quantos boosts o pokémon irá receber. max1 = 100, max2 = 150, max3 = 200, max4 = 240, max5 = 280, max6 = 300, --Boost máximo do seu servidor. chance1 = 80, --Chance de dar certo em % chance2 = 78, chance3 = 76, chance4 = 68, chance5 = 64, chance6 = 60, boost_fail = 80, --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, "Você precisa estar usando seu pokemon para conseguir boosta-lo!") elseif boost >= cfg.max6 then return doPlayerSendCancel(cid, "Seu pokemon ja se encontra no nivel maximo de boost!") end if boost < cfg.boost_fail then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) end if boost >= cfg.boost_fail and boost <= cfg.max1 then if math.random(1, 100) <= cfg.chance1 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max1 and boost <= cfg.max2 then if math.random(1, 100) <= cfg.chance2 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max2 and boost <= cfg.max3 then if math.random(1, 100) <= cfg.chance3 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max3 and boost <= cfg.max4 then if math.random(1, 100) <= cfg.chance4 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max4 and boost <= cfg.max5 then if math.random(1, 100) <= cfg.chance5 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max5 and boost <= cfg.max6 then if math.random(1, 100) <= cfg.chance6 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end return true end Fé pra voce n le perguntei nada Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717728 Compartilhar em outros sites More sharing options...
DarkWore 113 Postado Junho 5, 2017 Share Postado Junho 5, 2017 Agora, Marshmello disse: Fé pra voce n le perguntei nada Agora, wevertonvrb disse: EU NÃO LIGO SE VC QUEIRA FICAR COM OS CRÉDITOS DOS OUTROS ENTÃO SE EU POSTAR O MEU AQUI P CREDITO É MEU? PORQUE EU TAMBÉM FIZ MUITAS ALTERAÇÕES CREDITOS PARA MIN Mostrar conteúdo oculto function onUse(cid, item, frompos, item2, topos) if isPlayer(item2.uid) then return doPlayerSendCancel(cid, "Você só pode usar a boost stone em seu pokemon!") end if not isCreature(item2.uid) then return doPlayerSendCancel(cid, "Você só pode boostar seu pokemon!") end if not isPlayer(getCreatureMaster(item2.uid)) then return doPlayerSendCancel(cid, "Voce nao pode dar boost em pokemons selvagens.") end local cfg = { qnt = 1, --Quantos boosts o pokémon irá receber. max1 = 100, max2 = 150, max3 = 200, max4 = 240, max5 = 280, max6 = 300, --Boost máximo do seu servidor. chance1 = 80, --Chance de dar certo em % chance2 = 78, chance3 = 76, chance4 = 68, chance5 = 64, chance6 = 60, boost_fail = 80, --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, "Você precisa estar usando seu pokemon para conseguir boosta-lo!") elseif boost >= cfg.max6 then return doPlayerSendCancel(cid, "Seu pokemon ja se encontra no nivel maximo de boost!") end if boost < cfg.boost_fail then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) end if boost >= cfg.boost_fail and boost <= cfg.max1 then if math.random(1, 100) <= cfg.chance1 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max1 and boost <= cfg.max2 then if math.random(1, 100) <= cfg.chance2 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max2 and boost <= cfg.max3 then if math.random(1, 100) <= cfg.chance3 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max3 and boost <= cfg.max4 then if math.random(1, 100) <= cfg.chance4 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max4 and boost <= cfg.max5 then if math.random(1, 100) <= cfg.chance5 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end if boost >= cfg.boost_fail and boost > cfg.max5 and boost <= cfg.max6 then if math.random(1, 100) <= cfg.chance6 then doItemSetAttribute(myball, "boost", (boost + cfg.qnt)) doSendAnimatedText(getThingPos(summon), "+1 BOOST", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon subiu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost + 1).."].") doRemoveItem(item.uid, 1) else doItemSetAttribute(myball, "boost", (boost - cfg.qnt)) doSendAnimatedText(getThingPos(summon), "Fail!", 215) doPlayerSendTextMessage(cid, 27, "Seu pokemon desceu do nivel [+"..tonumber(boost).."] de boost para o nivel [+"..tonumber(boost - 1).."].") doRemoveItem(item.uid, 1) end end return true end Parem com essa discussão sem sentido, @Marshmello já corrigi o erro os scripts são muito semelhantes e isso confunde muito. Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717731 Compartilhar em outros sites More sharing options...
Marshmello 271 Postado Junho 5, 2017 Autor Share Postado Junho 5, 2017 Agora, DarkWore disse: Parem com essa discussão sem sentido, @Marshmello já corrigi o erro os scripts são muito semelhantes e isso confunde muito. são um pouco mais nem tanto, isso tmbn n tira ideia do cara vim fala merda no meu post, e outra o post q ele postou nem do forum é Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717732 Compartilhar em outros sites More sharing options...
wevertonvrb 25 Postado Junho 5, 2017 Share Postado Junho 5, 2017 Agora, Marshmello disse: são um pouco mais nem tanto, isso tmbn n tira ideia do cara vim fala merda no meu post, e outra o post q ele postou nem do forum é PEGAR ALGO DE UM FORUM E LEVAR PRA OUTRO É SIMPLES MAN MINHA ULTIMA POSTAGEM N QUERO SER NEGATIVADO Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717733 Compartilhar em outros sites More sharing options...
DarkWore 113 Postado Junho 5, 2017 Share Postado Junho 5, 2017 Agora, Marshmello disse: são um pouco mais nem tanto, isso tmbn n tira ideia do cara vim fala merda no meu post, e outra o post q ele postou nem do forum é Marshmello de qualquer forma não é necessário utilizar palavras ofensivas isso não vai levar á lugar nenhum. Link para o comentário https://xtibia.com/forum/topic/245369-perfeito-system-boost-stone/#findComment-1717734 Compartilhar em outros sites More sharing options...
Posts Recomendados