Ir para conteúdo
  • 0

Sobre shiny stone "-.-"


emersorox

Pergunta

Galera boa noite, Alguém por favor pode me ajudar nesse Script aqui: Ajuda seria que o Pokemon está usando só 2 Stones !!

Agradeço desde já quem puder me ajudar nesse Script Retribuo ajuda em Web: ^^

 

function onUse(cid, item, topos, item2, frompos)
local myball = getPlayerSlotItem(cid, 8):
local boost = getItemAttribute(myball.uid, "boost") or 0
local boosts = 5
if boost == 70 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 > 70 then
newBoost = 70
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
 
 
-----Shiny stone:
local evo = {
                           --nome do shiny, qnts stones precisa
["Snorlax"] = {"Shiny Snorlax", 8},
["Gengar"] = {"Shiny Gengar", 9},
["Ninetales"] = {"Shiny Ninetales",  7},
["Raichu"] = {"Shiny Raichu", 7},
["Alakazam"] = {"Shiny Alakazam", 10},
["Venusaur"] = {"Shiny Venusaur", 6},
["Charizard"] = {"Shiny Charizard", 7},
["Blastoise"] = {"Shiny Blastoise", 6}, --alterado v2.4
["Butterfree"] = {"Shiny Butterfree", 3},
["Beedrill"] = {"Shiny Beedrill", 3},
["Pidgeot"] = {"Shiny Pidgeot", 7},
["Rattata"] = {"Shiny Rattata", 1},
["Raticate"] = {"Shiny Raticate", 3},
["Fearow"] = {"Shiny Fearow", 6},
["Zubat"] = {"Shiny Zubat", 1},
["Golbat"] = {"Shiny Golbat", 3},
["Onix"] = {"Shiny Onix", 9},
["Salamence"] = {"Shiny Salamence", 10},
["Oddish"] = {"Shiny Oddish", 1},
["Paras"] = {"Shiny Paras", 1},
["Parasect"] = {"Shiny Parasect", 1},
["Venonat"] = {"Shiny Venonat", 2},
["Venomoth"] = {"Shiny Venomoth", 7},
["Growlithe"] = {"Shiny Growlithe", 4},
["Arcanine"] = {"Shiny Arcanine", 9},
["Abra"] = {"Shiny Abra", 7},
["Tentacool"] = {"Shiny Tentacool", 3},
["Tentacruel"] = {"Shiny Tentacruel", 7},
["Farfetch'd"] = {"Shiny Farfetch'd", 4},
["Muk"] = {"Shiny Muk", 5},
["Kingler"] = {"Shiny Kingler", 4},
["Voltorb"] = {"Shiny Voltorb", 3},
["Electrode"] = {"Shiny Electrode", 6},
["Cubone"] = {"Shiny Cubone", 4},
["Marowak"] = {"Shiny Marowak", 7},
["Hitmonlee"] = {"Shiny Hitmonlee", 7},
["Hitmonchan"] = {"Shiny Hitmonchan", 7},
["Tangela"] = {"Shiny Tangela", 7},
["Horsea"] = {"Shiny Horsea", 1},
["Seadra"] = {"Shiny Seadra", 5},
["Scyther"] = {"Shiny Scyther", 6},
["Jynx"] = {"Shiny Jynx", 7},
["Electabuzz"] = {"Shiny Electabuzz", 7},
["Pinsir"] = {"Shiny Pinsir", 5},
["Magikarp"] = {"Shiny Magikarp", 1},
["Gyarados"] = {"Shiny Gyarados", 10},
["Dratini"] = {"Shiny Dratini", 3},
["Dragonair"] = {"Shiny Dragonair", 7},
["Dragonite"] = {"Shiny Dragonite", 10},
["Salamence"] = {"Shiny Salamence", 10},
["Metagross"] = {"Shiny Metagross", 10},
["Tropius"] = {"Shiny Tropius", 10},
["Milotic"] = {"Shiny Milotic", 10},
}
local balls = {
[11826] = {newBall = 11826},
[11832] = {newBall = 11832},
[11835] = {newBall = 11835},
[11829] = {newBall = 11829},
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
   if isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then
          local monster = getCreatureName(itemEx.uid)
          if evo[monster] then  
                 if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then
                    doPlayerSendTextMessage(cid, 27, "Parabens! Seu "..getPokeName(itemEx.uid).." evoluiu para "..evo[monster][1].."!")
                    local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid)
                    doSendMagicEffect(getThingPos(itemEx.uid), 18)
                    doRemoveCreature(itemEx.uid)
                    doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1)
                    doRemoveItem(item.uid, 1)
                    doSummonMonster(cid,evo[monster][1])
                    local pokeball = getPlayerSlotItem(cid, 8):
                    doItemSetAttribute(pokeball.uid, "poke", evo[monster][1])
                    doItemSetAttribute(pokeball.uid, "level", pokes[evo[monster][1]].level)
                    doItemSetAttribute(ball, "hp", 1)
                    doItemSetAttribute(ball, "happy", 110)
                    local pk = getCreatureSummons(cid)[1]
                    adjustStatus(pk, pokeball.uid, true, false, true)
                    return TRUE
                 else
                    return doPlayerSendTextMessage(cid, 27, "You need atleast ".. evo[monster][2] .." stones to do it!")
                 end
          end
end
return FALSE
end

Link para o comentário
Compartilhar em outros sites

14 respostass a esta questão

Posts Recomendados

  • 0
26 minutos atrás, emersorox disse:

Ainda continua usando 2 shiny stone, por mais que eu declaro para 10 !

Mande seu actions.xml em spoiler

Link para o comentário
Compartilhar em outros sites

  • 0
Spoiler

<?xml version="1.0" encoding="UTF-8"?>
<actions>

    <!-- Agatha Quest -->
    <action actionid="6616" event="script" value="Agatha/Agatha_Colar.lua"/>  <!-- alterado v2.9 \/ -->
    <action actionid="3544" event="script" value="Agatha/Agatha_Door.lua"/>
    <action actionid="6655" event="script" value="Agatha/Agatha_Enigma.lua"/>
    <action actionid="6657" event="script" value="Agatha/Agatha_Espelho_Lab.lua"/>
    <action actionid="6658" event="script" value="Agatha/Agatha_Espelho_Out.lua"/>
    <action actionid="6660" event="script" value="Agatha/Agatha_Estante.lua"/>
    <action actionid="6661" event="script" value="Agatha/Agatha_Hammer.lua"/>
    <action actionid="6617-6653" event="script" value="Agatha/Agatha_Items.lua"/>
    <action actionid="6654" event="script" value="Agatha/Agatha_Receita.lua"/>
    <action actionid="6659" event="script" value="Agatha/Agatha_Receita[2].lua"/>

    <action itemid="12415" event="script" value="booststone.lua" allowfaruse="1"/>

    <action uniqueid="18729" event="script" value="tournament.lua"/>


    <action itemid="12594" event="script" value="Squirtle Bottle.lua"/>
    <action fromid="11790" toid="11803" event="script" value="other/doors.lua"/>
    <action itemid="2090" script="chave.lua" />
    <action itemid="2088" script="beldumdoor.lua" />
    <action itemid="2174" script="Rayquazadoor.lua" />
    <action itemid="12692" script="bike.lua" />

    <!--action itemid="2550" event="script" value="bike.lua"/-->

    <!-- Golden Arena -->
    <action actionid="65535" event="script" value="Quadro_Golden.lua"/>
    <action actionid="55356" event="script" value="Quadro_Golden_Rank.lua"/>
    <action itemid="6527" event="script" value="Meowth Coin.lua"/>

    <!-- Quests -->
    <action actionid="2000" event="script" value="quests/system.lua"/>
    <action actionid="2001" event="script" value="quests/system.lua"/>
    <action actionid="9000" event="script" value="quests/punch.lua"/>
    <action actionid="20001" event="script" value="quests/heart.lua"/>
    <action actionid="9001" event="script" value="quests/shiny.lua"/>
    <action itemid="1748" event="script" value="quests/milotic.lua"/>
    <action actionid="9002" event="script" value="quests/milotic2.lua"/>
    <action actionid="9003" event="script" value="quests/fire.lua"/>
    <action actionid="20002" event="script" value="quests/enigma.lua"/>
    <action itemid="9826" event="script" value="quests/beldum.lua"/>
    <action actionid="9004" event="script" value="quests/crystal.lua"/>
    <action actionid="9005" event="script" value="quests/boosthell.lua"/>
    <action actionid="9006" event="script" value="quests/boostpesadelo.lua"/>
    <action actionid="9007" event="script" value="quests/box4.lua"/>

                -----End----
    <!-- Weapons enchanting (Gems) -->
    <action itemid="2150" event="script" value="other/enchanting.lua"/>
    <action itemid="2149" event="script" value="other/enchanting.lua"/>
    <action itemid="7759" event="script" value="other/enchanting.lua"/>
    <action itemid="7760" event="script" value="other/enchanting.lua"/>
    <action itemid="7761" event="script" value="other/enchanting.lua"/>
    <action itemid="7762" event="script" value="other/enchanting.lua"/>

    <!-- Tools -->
    <action itemid="2420" event="script" value="tools/machete.lua"/>
    <action itemid="2442" event="script" value="tools/machete.lua"/>
    <action itemid="2580" event="script" value="tools/fishing.lua" allowfaruse="1"/>
    <action itemid="10223" event="script" value="tools/fishing.lua" allowfaruse="1"/>
    <action itemid="2554" event="script" value="tools/shovel.lua"/>
    <action itemid="5710" event="script" value="tools/shovel.lua"/>
    <action itemid="2120" event="script" value="tools/rope.lua"/>
    <action itemid="7731" event="script" value="tools/rope.lua"/>
    <action itemid="2553" event="script" value="tools/pick.lua"/>
    <action itemid="5908" event="script" value="tools/obsidian_knife.lua"/>
    <action itemid="5942" event="script" value="tools/blessed_wooden_stake.lua"/>

    <!-- Food -->
    <action itemid="2362;2666-2691" event="script" value="other/food.lua"/>
    <action fromid="2695" toid="2696" event="script" value="other/food.lua"/>
    <action fromid="2787" toid="2796" event="script" value="other/food.lua"/>
    <action itemid="5097" event="script" value="other/food.lua"/>
    <action itemid="6125" event="script" value="other/food.lua"/>
    <action itemid="6278" event="script" value="other/food.lua"/>
    <action itemid="6279" event="script" value="other/food.lua"/>
    <action itemid="6394" event="script" value="other/food.lua"/>
    <action itemid="6501" event="script" value="other/food.lua"/>
    <action fromid="6541" toid="6545" event="script" value="other/food.lua"/>
    <action itemid="6574" event="script" value="other/food.lua"/>
    <action itemid="7158" event="script" value="other/food.lua"/>
    <action itemid="7159" event="script" value="other/food.lua"/>
    <action fromid="7372" toid="7377" event="script" value="other/food.lua"/>
    <action itemid="7909" event="script" value="other/food.lua"/>
    <action fromid="8838" toid="8845" event="script" value="other/food.lua"/>
    <action itemid="8847" event="script" value="other/food.lua"/>
    <action itemid="12211;12213-12222" event="script" value="other/food.lua"/>

    <!-- Increase/Decrease ItemId -->
    <action itemid="461" event="function" value="increaseItemId"/>
    <action itemid="462" event="function" value="decreaseItemId"/>
    <action itemid="1873" event="function" value="increaseItemId"/>
    <action itemid="1874" event="function" value="decreaseItemId"/>
    <action itemid="1875" event="function" value="increaseItemId"/>
    <action itemid="1876" event="function" value="decreaseItemId"/>
    <action itemid="2162" event="function" value="increaseItemId"/>
    <action itemid="2163" event="function" value="decreaseItemId"/>
    <action itemid="3743" event="function" value="increaseItemId"/>
    <action itemid="3744" event="function" value="decreaseItemId"/>
    <action itemid="3947" event="function" value="increaseItemId"/>
    <action itemid="3948" event="function" value="decreaseItemId"/>
    <action itemid="1479" event="function" value="increaseItemId"/>
    <action itemid="1480" event="function" value="decreaseItemId"/>
    <action itemid="2037" event="function" value="increaseItemId"/>
    <action itemid="2038" event="function" value="decreaseItemId"/>
    <action itemid="2039" event="function" value="increaseItemId"/>
    <action itemid="2040" event="function" value="decreaseItemId"/>
    <action itemid="2058" event="function" value="increaseItemId"/>
    <action itemid="2059" event="function" value="decreaseItemId"/>
    <action itemid="2060" event="function" value="increaseItemId"/>
    <action itemid="2061" event="function" value="decreaseItemId"/>
    <action itemid="2066" event="function" value="increaseItemId"/>
    <action itemid="2067" event="function" value="decreaseItemId"/>
    <action itemid="2068" event="function" value="increaseItemId"/>
    <action itemid="2069" event="function" value="decreaseItemId"/>
    <action itemid="2064" event="function" value="increaseItemId"/>
    <action itemid="2065" event="function" value="decreaseItemId"/>
    <action itemid="2096" event="function" value="increaseItemId"/>
    <action itemid="2097" event="function" value="decreaseItemId"/>
    <action itemid="1786" event="function" value="increaseItemId"/>
    <action itemid="1787" event="function" value="decreaseItemId"/>
    <action itemid="1788" event="function" value="increaseItemId"/>
    <action itemid="1789" event="function" value="decreaseItemId"/>
    <action itemid="1790" event="function" value="increaseItemId"/>
    <action itemid="1791" event="function" value="decreaseItemId"/>
    <action itemid="1792" event="function" value="increaseItemId"/>
    <action itemid="1793" event="function" value="decreaseItemId"/>
    <action itemid="1634" event="function" value="increaseItemId"/>
    <action itemid="1635" event="function" value="decreaseItemId"/>
    <action itemid="1636" event="function" value="increaseItemId"/>
    <action itemid="1637" event="function" value="decreaseItemId"/>
    <action itemid="1638" event="function" value="increaseItemId"/>
    <action itemid="1639" event="function" value="decreaseItemId"/>
    <action itemid="1640" event="function" value="increaseItemId"/>
    <action itemid="1641" event="function" value="decreaseItemId"/>
    <action itemid="7058" event="function" value="increaseItemId"/>
    <action itemid="7059" event="function" value="decreaseItemId"/>
    <action itemid="8684" event="function" value="increaseItemId"/>
    <action itemid="8685" event="function" value="decreaseItemId"/>
    <action itemid="8686" event="function" value="increaseItemId"/>
    <action itemid="8687" event="function" value="decreaseItemId"/>
    <action itemid="8688" event="function" value="increaseItemId"/>
    <action itemid="8689" event="function" value="decreaseItemId"/>
    <action itemid="8690" event="function" value="increaseItemId"/>
    <action itemid="8691" event="function" value="decreaseItemId"/>
    <action itemid="9575" event="function" value="increaseItemId"/>
    <action itemid="9576" event="function" value="decreaseItemId"/>
    <action itemid="9577" event="function" value="increaseItemId"/>
    <action itemid="9578" event="function" value="decreaseItemId"/>
    <action itemid="9579" event="function" value="increaseItemId"/>
    <action itemid="9580" event="function" value="decreaseItemId"/>
    <action itemid="9581" event="function" value="increaseItemId"/>
    <action itemid="9582" event="function" value="decreaseItemId"/>
    <action itemid="9624" event="function" value="increaseItemId"/>
    <action itemid="9625" event="function" value="decreaseItemId"/>
    <action itemid="9747" event="function" value="increaseItemId"/>
    <action itemid="9748" event="function" value="decreaseItemId"/>
    <action itemid="9749" event="function" value="increaseItemId"/>
    <action itemid="9750" event="function" value="decreaseItemId"/>
    <action itemid="9825" event="function" value="increaseItemId"/>
    <action itemid="9827" event="function" value="increaseItemId"/>
    <action itemid="9828" event="function" value="decreaseItemId"/>
    <action itemid="9973" event="function" value="increaseItemId"/>
    <action itemid="9974" event="function" value="decreaseItemId"/>
    <action itemid="10044" event="function" value="increaseItemId"/>
    <action itemid="10045" event="function" value="decreaseItemId"/>

    <!-- Spellbooks -->
    <action itemid="2175" event="script" value="other/spellbook.lua"/>
    <action itemid="6120" event="script" value="other/spellbook.lua"/>
    <action fromid="8900" toid="8904" event="script" value="other/spellbook.lua"/>
    <action itemid="8918" event="script" value="other/spellbook.lua"/>

    <!-- Change gold -->
    <action itemid="2148;2152;2160;12416" event="script" value="other/changegold.lua"/>

    <!-- Construction kits -->
    <action fromid="3901" toid="3938" event="script" value="other/constructionkits.lua"/>
    <action fromid="5086" toid="5088" event="script" value="other/constructionkits.lua"/>
    <action fromid="6114" toid="6115" event="script" value="other/constructionkits.lua"/>
    <action fromid="6372" toid="6373" event="script" value="other/constructionkits.lua"/>
    <action fromid="7960" toid="7962" event="script" value="other/constructionkits.lua"/>
    <action fromid="8692" toid="8693" event="script" value="other/constructionkits.lua"/>
    <action itemid="7503" event="script" value="other/constructionkits.lua"/>
    <action itemid="7700" event="script" value="other/constructionkits.lua"/>

    <!-- Bed construction kits -->
    <action fromid="7904" toid="7907" event="script" value="other/furniturebeds.lua"/>

    <!-- Music, instruments -->
    <action fromid="2070" toid="2085" event="script" value="other/music.lua"/>
    <action itemid="2095" event="script" value="other/music.lua"/>
    <action itemid="2332" event="script" value="other/music.lua"/>
    <action itemid="2364" event="script" value="other/music.lua"/>
    <action fromid="2367" toid="2374" event="script" value="other/music.lua"/>
    <action fromid="3951" toid="3953" event="script" value="other/music.lua"/>
    <action itemid="3957" event="script" value="other/music.lua"/>
    <action itemid="5786" event="script" value="other/music.lua"/>
    <action itemid="6572" event="script" value="other/music.lua"/>

    <!-- Teleport (stairs, ladders) -->
    <action itemid="430" event="script" value="other/teleport.lua"/>
    <action itemid="1368" event="script" value="other/teleport.lua"/>
    <action itemid="1369" event="script" value="other/teleport.lua"/>
    <action itemid="1386" event="script" value="other/teleport.lua"/>
    <action itemid="3678" event="script" value="other/teleport.lua"/>
    <action itemid="5543" event="script" value="other/teleport.lua"/>
    <action itemid="8580" event="script" value="other/teleport.lua"/>
    <action itemid="8599" event="script" value="other/teleport.lua"/>
    <action itemid="10035" event="script" value="other/teleport.lua"/>

    <!-- Destroy -->
    <action id="2321;2390-2398;2400-2404;2406-2409;2411-2417;2419;2421-2441;2443-2454;3961-3964;3966;4846;6101;6528;6553;7379-7392;7402-7437;7449;7451-7456;7744-7758;7763-7777;7854-7883;7958;8601-8602;8924-8932;10293" event="script" value="other/destroy.lua"/>

    <!-- Bread Creating -->
    <action itemid="2692" event="script" value="other/createbread.lua"/>
    <action itemid="2694" event="script" value="other/createbread.lua"/>

    <!-- Windows -->
    <action fromid="5303" toid="5305" event="script" value="other/windows.lua"/>
    <action fromid="6436" toid="6473" event="script" value="other/windows.lua"/>
    <action fromid="6788" toid="6791" event="script" value="other/windows.lua"/>
    <action fromid="7025" toid="7032" event="script" value="other/windows.lua"/>
    <action fromid="10264" toid="10267" event="script" value="other/windows.lua"/>
    <action fromid="10488" toid="10491" event="script" value="other/windows.lua"/>

    <!-- Doors -->
    <action fromid="1209" toid="1214" event="script" value="other/doors.lua"/>
    <action fromid="1219" toid="1262" event="script" value="other/doors.lua"/>
    <action fromid="1539" toid="1542" event="script" value="other/doors.lua"/>
    <action fromid="3535" toid="3552" event="script" value="other/doors.lua"/>
    <action fromid="4913" toid="4918" event="script" value="other/doors.lua"/>
    <action fromid="5082" toid="5085" event="script" value="other/doors.lua"/>
    <action fromid="5098" toid="5145" event="script" value="other/doors.lua"/>
    <action fromid="5278" toid="5295" event="script" value="other/doors.lua"/>
    <action fromid="5515" toid="5518" event="script" value="other/doors.lua"/>
    <action fromid="5732" toid="5737" event="script" value="other/doors.lua"/>
    <action fromid="5745" toid="5749" event="script" value="other/doors.lua"/>
    <action fromid="6192" toid="6209" event="script" value="other/doors.lua"/>
    <action fromid="6249" toid="6266" event="script" value="other/doors.lua"/>
    <action fromid="6795" toid="6802" event="script" value="other/doors.lua"/>
    <action fromid="6891" toid="6908" event="script" value="other/doors.lua"/>
    <action fromid="7033" toid="7050" event="script" value="other/doors.lua"/>
    <action fromid="7054" toid="7057" event="script" value="other/doors.lua"/>
    <action fromid="8541" toid="8558" event="script" value="other/doors.lua"/>
    <action fromid="9165" toid="9184" event="script" value="other/doors.lua"/>
    <action fromid="9267" toid="9284" event="script" value="other/doors.lua"/>
    <action itemid="10032" event="script" value="other/doors.lua"/>
    <action itemid="10091" event="script" value="other/doors.lua"/>
    <action fromid="10268" toid="10285" event="script" value="other/doors.lua"/>
    <action fromid="10468" toid="10486" event="script" value="other/doors.lua"/>
    <action fromid="10774" toid="10776" event="script" value="other/doors.lua"/>
    <action fromid="10779" toid="10785" event="script" value="other/doors.lua"/>
    <action fromid="10788" toid="10791" event="script" value="other/doors.lua"/>

    <!-- Watch -->
    <action itemid="2036" event="script" value="other/watch.lua"/>
    <action fromid="1728" toid="1731" event="script" value="other/watch.lua"/>
    <action itemid="1877" event="script" value="other/watch.lua"/>
    <action fromid="6091" toid="6092" event="script" value="other/watch.lua"/>
    <action itemid="8187" event="script" value="other/watch.lua"/>

    <!-- Decay To -->
    <action fromid="2041" toid="2042" event="script" value="other/decayto.lua"/>
    <action fromid="2044" toid="2045" event="script" value="other/decayto.lua"/>
    <action fromid="2047" toid="2048" event="script" value="other/decayto.lua"/>
    <action fromid="2050" toid="2055" event="script" value="other/decayto.lua"/>
    <action fromid="5812" toid="5813" event="script" value="other/decayto.lua"/>
    <action itemid="7183" event="script" value="other/decayto.lua"/>
    <action itemid="9006" event="script" value="other/decayto.lua"/>
    <action fromid="9976" toid="9979" event="script" value="other/decayto.lua"/>

    <!-- Other -->
    <action itemid="2114" event="script" value="other/piggybank.lua"/>
    <action fromid="6570" toid="6571" event="script" value="other/surprisebag.lua"/>
    <action fromid="5792" toid="5797" event="script" value="other/dice.lua"/>
    <action itemid="6576" event="script" value="other/fireworksrocket.lua"/>
    <action itemid="6578" event="script" value="other/partyhat.lua"/>
    <action itemid="2785" event="script" value="other/blueberrybush.lua"/>
    <action itemid="2579" event="script" value="other/trap.lua"/>

    <action itemid="5791" event="script" value="other/stuffeddragon.lua"/>
    <action itemid="6566" event="script" value="other/stuffeddragon.lua"/>

-- POTIONS / ANTIDOTE
    <action itemid="12343;12345-12348" event="script" value="potion.lua" allowfaruse="1" blockwalls="1"/>
    <action itemid="12349" event="script" value="medicine.lua" allowfaruse="1" blockwalls="1"/>
    <action itemid="12344" event="script" value="revive.lua" allowfaruse="1" blockwalls="1"/>

-- BOXES (poke inicial)
    <action itemid="5353" event="script" value="starter.lua"/>

-- POKEMON PRIZE BOXES / RARE CANDY
    <action itemid="11638-11641;12227" event="script" value="box.lua"/>
    <action itemid="6569" event="script" value="DoceRaro.lua" allowfaruse="1"/>

-- POKEDEX
    <action itemid="2382" event="script" value="pokedex.lua" allowfaruse="1" blockwalls="1"/>
    <action itemid="7385" event="script" value="pokeinfo.lua"/>

-- LOJA DE ROUPAS
    <action itemid="3896;3897;3867;3868" event="script" value="roupas.lua"/>

-- GO/BACK E CATCH
    <action itemid="11826-11837;11737-11748;10975-10977;12621-12623;12769-12771" event="script" value="goback.lua"/>  <!-- alterado v2.9 -->
    <action itemid="12775;2391-2394;12617" event="script" value="catch.lua" allowfaruse="1"/>                   <!-- alterado v2.9 -->

-- CASSINO
    <action itemid="2547" event="script" value="coincase.lua"/>
    <action itemid="11421" event="script" value="slotmachine.lua"/>

-- TV / CAM
    <action itemid="11416-11418;11395-11398;11401-11404" event="script" value="television.lua"/>
    <action itemid="12330" event="script" value="camera.lua"/>

-- PC
    <action itemid="11462-11469" event="script" value="computer.lua"/>

-- BOOST MACHINE
    <action itemid="12352-12357" event="script" value="boost.lua"/>

-- ORDER
    <action itemid="2550" event="script" value="order.lua" allowfaruse="1" blockwalls="0"/>

-- PEDRAS DE EVO
    <action itemid="11441-11454;12242;12244;12417;12419;12401-12414" event="script" value="evolution.lua" allowfaruse="1"/>
    <action itemid="11454" event="script" value="shinystone.lua" allowfaruse="1"/>

  </actions>

 

Link para o comentário
Compartilhar em outros sites

  • 0

Então ainda não funcionou :

Spoiler

 

 

Spoiler

 

 

teste.png

O Script ficou assim :

 

Spoiler

function onUse(cid, item, topos, item2, frompos)
local myball = getPlayerSlotItem(cid, 8):
local boost = getItemAttribute(myball.uid, "boost") or 0
local boosts = 5
if boost == 70 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 > 70 then
newBoost = 70
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

local evo = {
          
["Snorlax"] = {"Shiny Snorlax", 8},
["Gengar"] = {"Shiny Gengar", 9},
["Ninetales"] = {"Shiny Ninetales",  7},
["Raichu"] = {"Shiny Raichu", 7},
["Alakazam"] = {"Shiny Alakazam", 10},
["Venusaur"] = {"Shiny Venusaur", 6},
["Charizard"] = {"Shiny Charizard", 7},
["Blastoise"] = {"Shiny Blastoise", 6}, --alterado v2.4
["Butterfree"] = {"Shiny Butterfree", 3},
["Beedrill"] = {"Shiny Beedrill", 3},
["Pidgeot"] = {"Shiny Pidgeot", 7},
["Rattata"] = {"Shiny Rattata", 1},
["Raticate"] = {"Shiny Raticate", 3},
["Fearow"] = {"Shiny Fearow", 6},
["Zubat"] = {"Shiny Zubat", 1},
["Golbat"] = {"Shiny Golbat", 3},
["Onix"] = {"Shiny Onix", 9},
["Salamence"] = {"Shiny Salamence", 10},
["Oddish"] = {"Shiny Oddish", 1},
["Paras"] = {"Shiny Paras", 1},
["Parasect"] = {"Shiny Parasect", 1},
["Venonat"] = {"Shiny Venonat", 2},
["Venomoth"] = {"Shiny Venomoth", 7},
["Growlithe"] = {"Shiny Growlithe", 4},
["Arcanine"] = {"Shiny Arcanine", 9},
["Abra"] = {"Shiny Abra", 7},
["Tentacool"] = {"Shiny Tentacool", 3},
["Tentacruel"] = {"Shiny Tentacruel", 7},
["Farfetch'd"] = {"Shiny Farfetch'd", 4},
["Muk"] = {"Shiny Muk", 5},
["Kingler"] = {"Shiny Kingler", 4},
["Voltorb"] = {"Shiny Voltorb", 3},
["Electrode"] = {"Shiny Electrode", 6},
["Cubone"] = {"Shiny Cubone", 4},
["Marowak"] = {"Shiny Marowak", 7},
["Hitmonlee"] = {"Shiny Hitmonlee", 7},
["Hitmonchan"] = {"Shiny Hitmonchan", 7},
["Tangela"] = {"Shiny Tangela", 7},
["Horsea"] = {"Shiny Horsea", 1},
["Seadra"] = {"Shiny Seadra", 5},
["Scyther"] = {"Shiny Scyther", 6},
["Jynx"] = {"Shiny Jynx", 7},
["Electabuzz"] = {"Shiny Electabuzz", 7},
["Pinsir"] = {"Shiny Pinsir", 5},
["Magikarp"] = {"Shiny Magikarp", 1},
["Gyarados"] = {"Shiny Gyarados", 10},
["Dratini"] = {"Shiny Dratini", 3},
["Dragonair"] = {"Shiny Dragonair", 7},
["Dragonite"] = {"Shiny Dragonite", 10},
["Salamence"] = {"Shiny Salamence", 10},
["Metagross"] = {"Shiny Metagross", 10},
["Tropius"] = {"Shiny Tropius", 10},
["Milotic"] = {"Shiny Milotic", 10},
}
local balls = {
[11826] = {newBall = 11826},
[11832] = {newBall = 11832},
[11835] = {newBall = 11835},
[11829] = {newBall = 11829},
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
   if isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then
          local monster = getCreatureName(itemEx.uid)
          local shinyMon = evo[monster][1]
          if evo[monster] then  
                 if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then
                    print("Quantidade de shiny stones atual1: "..getPlayerItemCount(cid, item.itemid))
                    doPlayerSendTextMessage(cid, 27, "Parabens! Seu "..getPokeName(itemEx.uid).." evoluiu para "..shinyMon.."!")
                    local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid)
                    doSendMagicEffect(getThingPos(itemEx.uid), 18)
                    doRemoveCreature(itemEx.uid)
                    doPlayerRemoveItem(cid, item.itemid, evo[monster][2])
                    doSummonMonster(cid, shinyMon)
                    local pokeball = getPlayerSlotItem(cid, 8):
                    doItemSetAttribute(pokeball.uid, "poke", shinyMon)
                    doItemSetAttribute(pokeball.uid, "level", pokes[shinyMon].level)
                    doItemSetAttribute(ball, "hp", 1)
                    doItemSetAttribute(ball, "happy", 110)
                    local pk = getCreatureSummons(cid)[1]
                    adjustStatus(pk, pokeball.uid, true, false, true)
                    print("Quantidade de shiny stones atual2: "..getPlayerItemCount(cid, item.itemid))
                    print("Quantidade de shiny stones nescessárias: "..evo[monster][2])
                    print("Shiny Name: "..shinyMon)
                    return TRUE
                 else
                    return doPlayerSendTextMessage(cid, 27, "You need atleast ".. shinyMon .." stones to do it!")
                 end
          end
end
    return false
end

 

teste.thumb.png.4f4f65a9078030f82bb9bb56d5d1d57f.png

Link para o comentário
Compartilhar em outros sites

  • 0
4 horas atrás, emersorox disse:

Então ainda não funcionou :

  Mostrar conteúdo oculto

 

 

  Mostrar conteúdo oculto

 

 

teste.png

O Script ficou assim :

 

  Ocultar conteúdo

function onUse(cid, item, topos, item2, frompos)

local myball = getPlayerSlotItem(cid, 8):

local boost = getItemAttribute(myball.uid, "boost") or 0

local boosts = 5

if boost == 70 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 > 70 then

newBoost = 70

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

local evo = {

          

["Snorlax"] = {"Shiny Snorlax", 8},

["Gengar"] = {"Shiny Gengar", 9},

["Ninetales"] = {"Shiny Ninetales",  7},

["Raichu"] = {"Shiny Raichu", 7},

["Alakazam"] = {"Shiny Alakazam", 10},

["Venusaur"] = {"Shiny Venusaur", 6},

["Charizard"] = {"Shiny Charizard", 7},

["Blastoise"] = {"Shiny Blastoise", 6}, --alterado v2.4

["Butterfree"] = {"Shiny Butterfree", 3},

["Beedrill"] = {"Shiny Beedrill", 3},

["Pidgeot"] = {"Shiny Pidgeot", 7},

["Rattata"] = {"Shiny Rattata", 1},

["Raticate"] = {"Shiny Raticate", 3},

["Fearow"] = {"Shiny Fearow", 6},

["Zubat"] = {"Shiny Zubat", 1},

["Golbat"] = {"Shiny Golbat", 3},

["Onix"] = {"Shiny Onix", 9},

["Salamence"] = {"Shiny Salamence", 10},

["Oddish"] = {"Shiny Oddish", 1},

["Paras"] = {"Shiny Paras", 1},

["Parasect"] = {"Shiny Parasect", 1},

["Venonat"] = {"Shiny Venonat", 2},

["Venomoth"] = {"Shiny Venomoth", 7},

["Growlithe"] = {"Shiny Growlithe", 4},

["Arcanine"] = {"Shiny Arcanine", 9},

["Abra"] = {"Shiny Abra", 7},

["Tentacool"] = {"Shiny Tentacool", 3},

["Tentacruel"] = {"Shiny Tentacruel", 7},

["Farfetch'd"] = {"Shiny Farfetch'd", 4},

["Muk"] = {"Shiny Muk", 5},

["Kingler"] = {"Shiny Kingler", 4},

["Voltorb"] = {"Shiny Voltorb", 3},

["Electrode"] = {"Shiny Electrode", 6},

["Cubone"] = {"Shiny Cubone", 4},

["Marowak"] = {"Shiny Marowak", 7},

["Hitmonlee"] = {"Shiny Hitmonlee", 7},

["Hitmonchan"] = {"Shiny Hitmonchan", 7},

["Tangela"] = {"Shiny Tangela", 7},

["Horsea"] = {"Shiny Horsea", 1},

["Seadra"] = {"Shiny Seadra", 5},

["Scyther"] = {"Shiny Scyther", 6},

["Jynx"] = {"Shiny Jynx", 7},

["Electabuzz"] = {"Shiny Electabuzz", 7},

["Pinsir"] = {"Shiny Pinsir", 5},

["Magikarp"] = {"Shiny Magikarp", 1},

["Gyarados"] = {"Shiny Gyarados", 10},

["Dratini"] = {"Shiny Dratini", 3},

["Dragonair"] = {"Shiny Dragonair", 7},

["Dragonite"] = {"Shiny Dragonite", 10},

["Salamence"] = {"Shiny Salamence", 10},

["Metagross"] = {"Shiny Metagross", 10},

["Tropius"] = {"Shiny Tropius", 10},

["Milotic"] = {"Shiny Milotic", 10},

}

local balls = {

[11826] = {newBall = 11826},

[11832] = {newBall = 11832},

[11835] = {newBall = 11835},

[11829] = {newBall = 11829},

}

function onUse(cid, item, fromPosition, itemEx, toPosition)

   if isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then

          local monster = getCreatureName(itemEx.uid)

          local shinyMon = evo[monster][1]

          if evo[monster] then  

                 if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then

                    print("Quantidade de shiny stones atual1: "..getPlayerItemCount(cid, item.itemid))

                    doPlayerSendTextMessage(cid, 27, "Parabens! Seu "..getPokeName(itemEx.uid).." evoluiu para "..shinyMon.."!")

                    local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid)

                    doSendMagicEffect(getThingPos(itemEx.uid), 18)

                    doRemoveCreature(itemEx.uid)

                    doPlayerRemoveItem(cid, item.itemid, evo[monster][2])

                    doSummonMonster(cid, shinyMon)

                    local pokeball = getPlayerSlotItem(cid, 8):

                    doItemSetAttribute(pokeball.uid, "poke", shinyMon)

                    doItemSetAttribute(pokeball.uid, "level", pokes[shinyMon].level)

                    doItemSetAttribute(ball, "hp", 1)

                    doItemSetAttribute(ball, "happy", 110)

                    local pk = getCreatureSummons(cid)[1]

                    adjustStatus(pk, pokeball.uid, true, false, true)

                    print("Quantidade de shiny stones atual2: "..getPlayerItemCount(cid, item.itemid))

                    print("Quantidade de shiny stones nescessárias: "..evo[monster][2])

                    print("Shiny Name: "..shinyMon)

                    return TRUE

                 else

                    return doPlayerSendTextMessage(cid, 27, "You need atleast ".. shinyMon .." stones to do it!")

                 end

          end

end

    return false

end

 

Mano, crie outro arquivo, ficar usando 2 onUse no mesmo arquivo .lua não dá certo...

Link para o comentário
Compartilhar em outros sites

  • 0
Agora, emersorox disse:

Eu já consegui arrumar esse erro obrigado pela atenção e ajuda. você tem algum Script de Boost Stone que aumenta o HP dos Pokemons?

Tenho, mas é para uso próprio do meu servidor!

Link para o comentário
Compartilhar em outros sites

  • 0

Nessa parte:

doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1)doRemoveItem(item.uid, 1)

Modifique para:

doRemoveItem(item.uid, 1)if evo[monster][2] > 1 then	doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1)end

 

Link para o comentário
Compartilhar em outros sites

  • 0
3 minutes ago, KarlKalvin said:

Cara... tá removendo 2 itens porque tem 2 tags e.e....

Só remover essa tag

doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1)

Você certamente não entendeu a ideia, o script tem que remover todas as stones necessárias, se forem mais de uma ele remove a que foi usada no use with e as demais desse id restantes para completar a quantidade de stones necessárias, se ele remover como tu ta falando, vai sempre remover apenas uma stone, e isso seria um erro.

Link para o comentário
Compartilhar em outros sites

  • 0

Eu já consegui vlw aí todos pela atenção e a disponibilidade de ajudar :D:D !!

Senhores, por favor alguém de vocês tem algum Script de Boost stone que aumente o HP do PoKemon?

Agradeço desde já senhores :D:D:D !!

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...