local evo = {
["Alakazam"] = {"Shiny Alakazam", 1},
["Blaziken"] = {"Shiny Blaziken", 1},
["Charizard"] = {"Shiny Charizard", 1},
["Tyranitar"] = {"Shiny Tyranitar", 1},
["Ninetales"] = {"Shiny ninetales", 1},
["Scyther"] = {"Shiny Scyther", 1},
["Arcanine"] = {"Shiny Arcanine", 1},
["Blastoise"] = {"Shiny Blastoise", 1},
["Onix"] = {"Shiny Onix", 1},
["Snorlax"] = {"Shiny Snorlax", 1},
["Golbat"] = {"Shiny Golbat", 1},
["Crobat"] = {"Shiny Crobat", 1},
["Muk"] = {"Shiny Muk", 1},
["Dragonair"] = {"Shiny Dragonair", 1},
["Marowak"] = {"Shiny Marowak", 1},
}
local balls = {
[2394] = {newBall = 2394},
[2391] = {newBall = 2391},
[2393] = {newBall = 2393},
[2392] = {newBall = 2392},
[12832] = {newBall = 12832},
}
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]
local getShinyPokeballs = balls[getPlayerSlotItem(cid, 8).itemid]
doTransformItem(getPlayerSlotItem(cid, 8).uid, getShinyPokeballs.newBall)
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