kttallan 319 Posted February 12, 2017 Report Share Posted February 12, 2017 Então galera a um tempo atrás, um amigo meu recebeu uma encomenda de fazer uma simples Shiny Stone como conhecida pelo Otpokemon, porém ele não foi pago e me deu sendo que não tem utilidade para mim então postarei para vocês, Espero ter ajudado em algo. Vá em data/action e em actions.xml adicione a seguinte tag. <action itemid="ITEMID" event="script" value="Shiny stone.lua"/> Crie um arquivo em data/action chamado ShinyStone.lua e coloque o codigo abaixo. local effect = 31 PokemonShinys = { --["Pokemon_Name"] = {name = "Shiny_Pokemon_Name", quant = QUANTIDADE_DE_SHINY_STONE} ["Venusaur"] = {name = "Shiny Venusaur", quant = 1}, ["Electabuzz"] = {name = "Shiny Electabuzz", quant = 10}, ["Blastoise"] = {name = "Shiny Blastoise", quant = 9}, } function onUse(cid, item, fromPosition, itemEx, toPosition) if not isCreature(itemEx.uid) and isPokeball(itemEx.itemid) then if getPlayerSlotItem(cid, 8).uid == itemEx.uid then if #getCreatureSummons(cid) <= 0 then pokename = doCorrectString(getItemAttribute(itemEx.uid, "poke")) if PokemonShinys[pokename] then quant = PokemonShinys[pokename].quant if getPlayerItemCount(cid, item.itemid) >= quant then local newpoke = PokemonShinys[pokename].name doItemSetAttribute(itemEx.uid, "poke", newpoke) doItemSetAttribute(itemEx.uid, "description", "Contains a "..newpoke..".") doPlayerSendTextMessage(cid, 20, "Congratulations! You transform your "..pokename.." in his shiny form!") doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[newpoke]) doSendMagicEffect(getThingPos(cid), effect) doPlayerRemoveItem(cid, item.itemid, quant) doItemSetAttribute(itemEx.uid, "offense", pokes[newpoke].offense) doItemSetAttribute(itemEx.uid, "defense", pokes[newpoke].defense) doItemSetAttribute(itemEx.uid, "speed", pokes[newpoke].agility) doItemSetAttribute(itemEx.uid, "specialattack", pokes[newpoke].specialattack) doItemSetAttribute(itemEx.uid, "vitality", pokes[newpoke].vitality) else doPlayerSendCancel(cid, "You don't have "..quant.." shiny stones to evolve this ".. pokename .."!") end else doPlayerSendCancel(cid, pokename.." don't have a shiny evolution!") end else doPlayerSendCancel(cid, "You need call your pokemon!") end else doPlayerSendCancel(cid, "You need put "..pokename.." in the principal slot!") end else doPlayerSendCancel(cid, "You need use shiny stone in pokeball!") end return true end guilherme Silva 1 Link to comment https://xtibia.com/forum/topic/243533-otp-shiny-stone/ Share on other sites More sharing options...
XzXNoraX 48 Posted February 12, 2017 Report Share Posted February 12, 2017 Obrigado pela contribuição. Link to comment https://xtibia.com/forum/topic/243533-otp-shiny-stone/#findComment-1712040 Share on other sites More sharing options...
kttallan 319 Posted February 12, 2017 Author Report Share Posted February 12, 2017 Agora, Error404 disse: Obrigado pela contribuição. Como não iria utilizar decidi contribuir, foi um prazer! Link to comment https://xtibia.com/forum/topic/243533-otp-shiny-stone/#findComment-1712042 Share on other sites More sharing options...
Deadpool 862 Posted February 12, 2017 Report Share Posted February 12, 2017 24 minutos atrás, kttallan disse: Como não iria utilizar decidi contribuir, foi um prazer! No caso, varia de servidor pra servidor. Por causa dos atributos, mas isso é fácil, qualquer um faz aheuhd boa gatu <3 Link to comment https://xtibia.com/forum/topic/243533-otp-shiny-stone/#findComment-1712046 Share on other sites More sharing options...
kttallan 319 Posted February 12, 2017 Author Report Share Posted February 12, 2017 Agora, Deadpool disse: No caso, varia de servidor pra servidor. Por causa dos atributos, mas isso é fácil, qualquer um faz aheuhd boa gatu <3 Ele foi feito para PDA e PDA Open Source, são quase os mesmo attributos. Link to comment https://xtibia.com/forum/topic/243533-otp-shiny-stone/#findComment-1712047 Share on other sites More sharing options...
CaioSilva99 28 Posted February 12, 2017 Report Share Posted February 12, 2017 Obrigado,eu estava querendo este sistema,muito obrigado encarecido amigo. Link to comment https://xtibia.com/forum/topic/243533-otp-shiny-stone/#findComment-1712054 Share on other sites More sharing options...
Recommended Posts