Bom, as prizes boxes não estão funcionando.
Script no actions:
local a = { [11638] = {balltype = "normal", ballid = 11826, pokemons = {"Shiny Tangela", "Shiny Venusaur", "Shiny Blastoise", "Shiny Tentacruel", "Shiny Charizard", "Shiny Arcanine", "Shiny Alakazam", "Shiny Abra", "Shiny Onix", "Shiny Marowak", "Shiny Muk", "Shiny Venomoth", "Shiny Raichu", "Shiny Electabuzz"}}, [11639] = {balltype = "great", ballid = 11832, pokemons = {"Pidgeotto", "Weepinbell", "Clefairy", "Omanyte", "Kabuto", "Arbok", "Raichu", "Nidorino", "Nidorina", "Dodrio", "Muk", "Golbat", "Gloom", "Parasect", "Venomoth", "Dugtrio", "Persian", "Poliwhirl", "Victreebel", "Machoke", "Graveler", "Slowbro", "Magneton", "Farfetch'd", "Haunter", "Kingler", "Electrode", "Weezing", "Rhyhorn", "Seadra", "Jigglypuff", "Seaking", "Tauros", "Starmie", "Eevee", "Dratini", "Charmeleon", "Wartortle", "Ivysaur"}}, [11640] = {balltype = "super", ballid = 11835, pokemons = {"Pidgeot", "Fearow", "Sandslash", "Ninetales", "Vileplume", "Primeape", "Golduck", "Kadabra", "Rapidash", "Clefable", "Wigglytuff", "Dewgong", "Onix", "Cloyster", "Hypno", "Exeggutor", "Marowak", "Hitmonchan", "Hitmonlee", "Lickitung", "Chansey", "Tangela", "Mr. Mime", "Pinsir", "Vaporeon", "Jolteon", "Flareon", "Porygon", "Dragonair"}}, [11641] = {balltype = "ultra", ballid = 11829, pokemons = {"Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Abra", "Dragonite", "Snorlax", "Kabutops", "Omastar", "Ditto", "Lapras", "Gyarados", "Magmar", "Electabuzz", "Jynx", "Scyther", "Kangaskhan", "Golem", "Venusaur", "Machamp", "Poliwrath", "Arcanine", "Nidoking", "Nidoqueen", "Charizard", "Blastoise", "Tentacruel", "Alakazam", "Gengar", "Rhydon"}} } local happy = 220 function onUse(cid, item, frompos, item2, topos) local b = a[item.itemid] if not b then return true end local pokemon = b.pokemons[math.random(#b.pokemons)] if not pokes[pokemon] then local btype = b.balltype if not pokeballs[btype] then return true end doPlayerSendTextMessage(cid, 27, "You opened a pokemon prize box +"..item.itemid - (11637).."!") doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon..", congratulations!") doSendMagicEffect(getThingPos(cid), 29) addPokeToPlayer(cid, pokemon, 0, nil, btype) --alterado v1.9 doRemoveItem(item.uid, 1) return true end end
No items está:
<item id="11638" article="a" name="pokemon prize box +1"> <attribute key="description" value="What poke surprise is hidden in this box?" /> </item> <item id="11639" article="a" name="pokemon prize box +2"> <attribute key="description" value="What poke surprise is hidden in this box?" /> </item> <item id="11640" article="a" name="pokemon prize box +3"> <attribute key="description" value="What poke surprise is hidden in this box?" /> </item> <item id="11641" article="a" name="pokemon prize box +4"> <attribute key="description" value="What poke surprise is hidden in this box?" /> </item>
e no Actions.xml tá:
<action itemid="11638-11641" event="script" value="box.lua"/>