achu q ngm sabe mexer muito bem nesse sistema de food do brun.. ;x
mano aprende a usa spoiler PLZZZZZZZZZZ... ta ae o script arrumado.. anyway, soh pra tu saber.. tu soh tinha esquecido uma "," perto da "ponyta"...
local a = {
[11638] = {level = {9, 10}, balltype = "normal",
pokemons = {"Slowpoke", "Magnemite", "Doduo", "Seel", "Grimer", "Gastly", "Droowze",
"Spearow", "Bulbasaur", "Charmander", "Squirtle", "Butterfree", "Beedrill", "Metapod", "Kakuna", "Pidgeotto", "Raticate",
"Ekans", "Abra", "Mankey", "Psyduck", "Pikachu", "Sandshrew", "Zubat", "Diglett", "Venonat", "Meowth", "Poliwag", "Growlithe", "Machop", "Weepinbell", "Ponyta", "Geodude"}
},
[11639] = {level = {44, 45}, balltype = "super",
pokemons = {"clefairy", "Omanyte", "Kabuto", "Arbok", "Raichu", "Nidorina",
"Nidorino", "Dodrio", "Muk", "Golbat", "Gloom", "Parasect", "Venomoth", "Dugtrio", "Persian",
"Golbat", "Clefairy", "Jigglypuff", "Venonat", "Sandshrew", "Vulpix", "Meowth", "Persian", "Psyduck", "Mankey",
"Poliwhirl", "Victreebel", "Machoke", "Graveler", "Slowbro", "Magnetom", "Geodude", "Farfetch'd", "Haunter", "Kingler",
"Electrode", "Weezing", "Rhyhorn", "Seadra", "jigglypuff", "Seaking", "Tauros", "Starmie", "Eevee", "Dratini", "Charmeleon",
"Wartortle", "Ivysaur"}
},
[11640] = {level = {59, 60}, balltype = "great",
pokemons = {"Pidgeot", "Fearow", "Sandslash", "Ninetales", "Vileplume", "Primeape", "Golduck",
"Kadabra", "Rapidash", "Clefable", "Wigglytuff", "Dewgong", "Onix", "Cloyster", "Hypno", "Exeggutor",
"Marowak", "Hitmonlee", "Hitmonchan", "Lickitung", "Chansey", "Tangela", "Mr. Mime", "Pinsir", "Vaporeon", "Jolteon",
"Hypno", "Dragonair", "Porygon"}
},
[11641] = {level = {80, 100}, balltype = "ultra",
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", "Alakazam", "Gengar", "Rhydon",
"Tentacruel"}
},
}
local extrastrength = 1.1
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)]
local pokeinfo = getPokemonStatus(pokemon)
if not pokeinfo then return true end
local btype = b.balltype
if not pokeballs[btype] then return true end
local gender = getRandomGenderByName(pokemon)
local level = math.random(b.level[1], b.level[2])
local offense = pokeinfo.off * level * extrastrength
local defense = pokeinfo.def * level * extrastrength
local agility = pokeinfo.agi * level * extrastrength
local spatk = pokeinfo.spatk * level * extrastrength
local vit = pokeinfo.vit * level * extrastrength
local happy = 180
local leveltable = getPokemonExperienceTable(pokemon)
local ball = 0
local sendToDepot = false
if getCreatureMana(cid) >= 6 then
sendToDepot = true
ball = doCreateItemEx(2219)
else
ball = item.uid
end
doItemSetAttribute(ball, "poke", pokemon)
doItemSetAttribute(ball, "hp", 1)
doItemSetAttribute(ball, "level", level)
doItemSetAttribute(ball, "exp", leveltable[level])
doItemSetAttribute(ball, "nextlevelexp", leveltable[level+1] - leveltable[level])
doItemSetAttribute(ball, "offense", offense)
doItemSetAttribute(ball, "defense", defense)
doItemSetAttribute(ball, "speed", agility)
doItemSetAttribute(ball, "vitality", vit)
doItemSetAttribute(ball, "specialattack", spatk)
doItemSetAttribute(ball, "happy", happy)
doItemSetAttribute(ball, "gender", gender)
doItemSetAttribute(ball, "description", "Contains a "..pokemon..".")
doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".")
doPlayerSendTextMessage(cid, 27, "You opened a pokemon prize box +"..item.itemid - (11637).."!")
doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon.." (level "..level.."), congratulations!")
if sendToDepot then
doPlayerSendMailByName(getCreatureName(cid), ball, 1)
doTransformItem(ball, pokeballs[btype].on)
doPlayerSendTextMessage(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.")
doRemoveItem(item.uid)
else
doTransformItem(ball, pokeballs[btype].on)
end
doSendMagicEffect(getThingPos(cid), 29)
return true
end










info
Grupo: Visconde
Registrado: 07/06/11
Posts: 359
Reputação: +37
local a = { [11638] = {level = {9, 10}, balltype = "normal", pokemons = {"Slowpoke", "Magnemite", "Doduo", "Seel", "Grimer", "Gastly", "Droowze", "Spearow", "Bulbasaur", "Charmander", "Squirtle", "Butterfree", "Beedrill", "Metapod", "Kakuna", "Pidgeotto", "Raticate", "Ekans", "Abra", "Mankey", "Psyduck", "Pikachu", "Sandshrew", "Zubat", "Diglett", "Venonat", "Meowth", "Poliwag", "Growlithe", "Machop", "Weepinbell" "Ponyta", "Geodude"}}, [11639] = {level = {44, 45}, balltype = "super", pokemons = {"clefairy", "Omanyte", "Kabuto", "Arbok", "Raichu", "Nidorina", "Nidorino", "Dodrio", "Muk", "Golbat", "Gloom", "Parasect", "Venomoth", "Dugtrio", "Persian", "Golbat", "Clefairy", "Jigglypuff", "Venonat", "Sandshrew", "Vulpix", "Meowth", "Persian", "Psyduck", "Mankey", "Poliwhirl", "Victreebel", "Machoke", "Graveler", "Slowbro", "Magnetom", "Geodude", "Farfetch'd", "Haunter", "Kingler", "Electrode", "Weezing", "Rhyhorn", "Seadra", "jigglypuff", "Seaking", "Tauros", "Starmie", "Eevee", "Dratini", "Charmeleon", "Wartortle", "Ivysaur"}}, [11640] = {level = {59, 60}, balltype = "great", pokemons = {"Pidgeot", "Fearow", "Sandslash", "Ninetales", "Vileplume", "Primeape", "Golduck", "Kadabra", "Rapidash", "Clefable", "Wigglytuff", "Dewgong", "Onix", "Cloyster", "Hypno", "Exeggutor", "Marowak", "Hitmonlee", "Hitmonchan", "Lickitung", "Chansey", "Tangela", "Mr. Mime", "Pinsir", "Vaporeon", "Jolteon", "Hypno", "Dragonair", "Porygon"}}, [11641] = {level = {80, 100}, balltype = "ultra", 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", "Alakazam", "Gengar", "Rhydon", "Tentacruel"}} }[/i][/b] [b][i]local extrastrength = 1.1 [/i][/b] [b][i]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)] local pokeinfo = getPokemonStatus(pokemon) if not pokeinfo then return true end local btype = b.balltype if not pokeballs[btype] then return true end local gender = getRandomGenderByName(pokemon) local level = math.random(b.level[1], b.level[2]) local offense = pokeinfo.off * level * extrastrength local defense = pokeinfo.def * level * extrastrength local agility = pokeinfo.agi * level * extrastrength local spatk = pokeinfo.spatk * level * extrastrength local vit = pokeinfo.vit * level * extrastrength local happy = 180 local leveltable = getPokemonExperienceTable(pokemon) local ball = 0 local sendToDepot = false if getCreatureMana(cid) >= 6 then sendToDepot = true ball = doCreateItemEx(2219) else ball = item.uid end doItemSetAttribute(ball, "poke", pokemon) doItemSetAttribute(ball, "hp", 1) doItemSetAttribute(ball, "level", level) doItemSetAttribute(ball, "exp", leveltable[level]) doItemSetAttribute(ball, "nextlevelexp", leveltable[level+1] - leveltable[level]) doItemSetAttribute(ball, "offense", offense) doItemSetAttribute(ball, "defense", defense) doItemSetAttribute(ball, "speed", agility) doItemSetAttribute(ball, "vitality", vit) doItemSetAttribute(ball, "specialattack", spatk) doItemSetAttribute(ball, "happy", happy) doItemSetAttribute(ball, "gender", gender) doItemSetAttribute(ball, "description", "Contains a "..pokemon..".") doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".") doPlayerSendTextMessage(cid, 27, "You opened a pokemon prize box +"..item.itemid - (11637).."!") doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon.." (level "..level.."), congratulations!") if sendToDepot then doPlayerSendMailByName(getCreatureName(cid), ball, 1) doTransformItem(ball, pokeballs[btype].on) doPlayerSendTextMessage(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.") doRemoveItem(item.uid) else doTransformItem(ball, pokeballs[btype].on) end doSendMagicEffect(getThingPos(cid), 29) return true[/i][/b] [b][i]end@All
Alguem Poderia Arrumar Minhas Box's
Eu Simplesmente Adc + Pokes Nelas Igual do PxG Agr ela n abre +
Editado Março 17 por uchiha1madara