u,U tava no cinema uahauh cabei de chegar.. vo arruma os bugs aki q deixei e ainda hj, ou no maximo amanha demanha posto o/
tenta usa esse.. a minha box ta um pouco diferente.. qlqr coisa soh procura as partes q tao como "--edited" e deixa igual na tua box... ^^
local a = {
[11638] = {level = {5, 10}, balltype = "normal",
pokemons = {"Slowpoke", "Magnemite", "Doduo", "Seel", "Grimer", "Gastly", "Drowzee", "Voltorb", "Cubone", "Koffing",
"Goldeen", "Vulpix", "Tentacool", "Bulbasaur", "Charmander", "Squirtle", "Butterfree", "Beedrill", "Metapod", "Kakuna",
"Raticate", "Spearow", "Ekans", "Abra", "Mankey", "Psyduck", "Pikachu", "Sandshrew", "Nidoran Female",
"Nidoran Male", "Zubat", "Diglett", "Venonat", "Meowth", "Poliwag", "Growlithe", "Machop", "Ponyta", "Geodude"}},
[11639] = {level = {21, 30}, balltype = "great",
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] = {level = {40, 50}, balltype = "super",
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] = {level = {70, 80}, 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", "Tentacruel", "Alakazam",
"Gengar", "Rhydon"}}
}
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", 15) --edited lvl 15 nos pokes
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)
if ballss[pokemon] then
doItemSetAttribute(ball, "ballType", btype)
end
if pokemon == "Hitmonchan" or pokemon == "Shiny Hitmonchan" then
doItemSetAttribute(item, "hands", 0)
end
doItemSetAttribute(ball, "description", "Contains a "..pokemon..".")
doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".")
-------------------Boost-------------------------- edited boost +5 pokes
local off = pokes[pokemon].offense * boost_rate * 5
local def = pokes[pokemon].defense * boost_rate * 5
local agi = pokes[pokemon].agility * 5
local spatk = pokes[pokemon].specialattack * boost_rate * 5
local vit = pokes[pokemon].vitality * boost_rate * 5
doSetItemAttribute(ball, "boost", 5)
doItemSetAttribute(ball, "offense", getItemAttribute(ball, "offense") + off)
doItemSetAttribute(ball, "defense", getItemAttribute(ball, "defense") + def)
doItemSetAttribute(ball, "speed", getItemAttribute(ball, "speed") + agi)
doItemSetAttribute(ball, "specialattack", getItemAttribute(ball, "specialattack") + spatk)
doItemSetAttribute(ball, "vitality", getItemAttribute(ball, "vitality") + vit)
-------------------------------------------------------
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)
if ballss[pokemon] then
doTransformItem(ball, pokeballs[pokemon].on)
else
doTransformItem(ball, pokeballs[btype].on)
end
doPlayerSendTextMessage(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.")
doRemoveItem(item.uid)
else
if ballss[pokemon] then
doTransformItem(ball, pokeballs[pokemon].on)
else
doTransformItem(ball, pokeballs[btype].on)
end
end
doSendMagicEffect(getThingPos(cid), 29)
return true
end









info
Grupo: Barão
Registrado: 30/09/10
Posts: 223
Reputação: +166
Char no Tibia: Sorcerer Manipulator
Alguem saberia como atualizar o cd bar automaticamente, e não só apertando atualizar (botão verde)
Estou fazendo novos portraits, tenho de todos só fazer, mais foda mesmo vai ser dos shinys.