emersonrox
New Member
- Joined
- May 30, 2016
- Messages
- 1
- Reaction score
- 0
The error is when I use the Shiny Stone that he is determined: Alakazam [80] [10] I wanted to stay: Shiny Alakazam [80] [10]... Help me anyone please !!!
---------------------------------------------------------------------------------------------------
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", 7},
["Gengar"] = {"Shiny Gengar", 7},
["Ninetales"] = {"Shiny Ninetales", 5},
["Raichu"] = {"Shiny Raichu", 5},
["Alakazam"] = {"Shiny Alakazam", 10},
["Venusaur"] = {"Shiny Venusaur", 7},
["Charizard"] = {"Shiny Charizard", 7},
["Blastoise"] = {"Shiny Blastoise", 7}, --alterado v2.4
["Butterfree"] = {"Shiny Butterfree", 5},
["Beedrill"] = {"Shiny Beedrill", 3},
["Pidgeot"] = {"Shiny Pidgeot", 5},
["Rattata"] = {"Shiny Rattata", 1},
["Raticate"] = {"Shiny Raticate", 3},
["Fearow"] = {"Shiny Fearow", 5},
["Zubat"] = {"Shiny Zubat", 1},
["Golbat"] = {"Shiny Golbat", 3},
["Onix"] = {"Shiny Onix", 7},
["Hitmontop"] = {"Shiny Hitmontop", 7},
["Oddish"] = {"Shiny Oddish", 1},
["Paras"] = {"Shiny Paras", 1},
["Parasect"] = {"Shiny Parasect", 3},
["Venonat"] = {"Shiny Venonat", 1},
["Venomoth"] = {"Shiny Venomoth", 5},
["Growlithe"] = {"Shiny Growlithe", 3},
["Arcanine"] = {"Shiny Arcanine", 5},
["Abra"] = {"Shiny Abra", 1},
["Tentacool"] = {"Shiny Tentacool", 3},
["Tentacruel"] = {"Shiny Tentacruel", 7},
["Farfetch'd"] = {"Shiny Farfetch'd", 3},
["Muk"] = {"Shiny Muk", 5},
["Kingler"] = {"Shiny Kingler", 3},
["Voltorb"] = {"Shiny Voltorb", 3},
["Electrode"] = {"Shiny Electrode", 5},
["Cubone"] = {"Shiny Cubone", 3},
["Marowak"] = {"Shiny Marowak", 5},
["Hitmonlee"] = {"Shiny Hitmonlee", 7},
["Hitmonchan"] = {"Shiny Hitmonchan", 7},
["Tangela"] = {"Shiny Tangela", 3},
["Horsea"] = {"Shiny Horsea", 1},
["Seadra"] = {"Shiny Seadra", 5},
["Scyther"] = {"Shiny Scyther", 3},
["Jynx"] = {"Shiny Jynx", 7},
["Electabuzz"] = {"Shiny Electabuzz", 5},
["Pinsir"] = {"Shiny Pinsir", 5},
["Magikarp"] = {"Shiny Magikarp", 1},
["Gyarados"] = {"Shiny Gyarados", 7},
["Dratini"] = {"Shiny Dratini", 3},
["Dragonair"] = {"Shiny Dragonair", 5},
["Dragonite"] = {"Shiny Dragonite", 8},
["Metagross"] = {"Shiny Metagross", 10},
["Tropius"] = {"Shiny Tropius", 10},
["Milotic"] = {"Shiny Milotic", 8},
["Ariados"] = {"Shiny Ariados", 5},
["Dodrio"] = {"Shiny Dodrio", 5},
["Espeon"] = {"Shiny Espeon", 7},
["Flareon"] = {"Shiny Flareon", 7},
["Golem"] = {"Shiny Golem", 7},
["Grimer"] = {"Shiny Grimer", 1},
["Hypno"] = {"Shiny Hypno", 5},
["Jolteon"] = {"Shiny Jolteon", 7},
["Krabby"] = {"Shiny Krabby", 1},
["Magby"] = {"Shiny Magby", 3},
["Magneton"] = {"Shiny Magneton", 5},
["Mr. Mime"] = {"Shiny Mr. Mime", 5},
["Nidoking"] = {"Shiny Nidoking", 7},
["Politoed"] = {"Shiny Politoed", 5},
["Rhydon"] = {"Shiny Rhydon", 7},
["Stantler"] = {"Shiny Stantler", 5},
["Umbreon"] = {"Shiny Umbreon", 7},
["Vaporeon"] = {"Shiny Vaporeon", 7},
["Villeplume"] = {"Shiny Vileplume", 5},
["Cleflable"] = {"Shiny Clefable", 7},
["tangrowth"] = {"Shiny tangrowth", 8},
["Roserade"] = {"Shiny Roserade", 7},
}
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
---------------------------------------------------------------------------------------------------
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", 7},
["Gengar"] = {"Shiny Gengar", 7},
["Ninetales"] = {"Shiny Ninetales", 5},
["Raichu"] = {"Shiny Raichu", 5},
["Alakazam"] = {"Shiny Alakazam", 10},
["Venusaur"] = {"Shiny Venusaur", 7},
["Charizard"] = {"Shiny Charizard", 7},
["Blastoise"] = {"Shiny Blastoise", 7}, --alterado v2.4
["Butterfree"] = {"Shiny Butterfree", 5},
["Beedrill"] = {"Shiny Beedrill", 3},
["Pidgeot"] = {"Shiny Pidgeot", 5},
["Rattata"] = {"Shiny Rattata", 1},
["Raticate"] = {"Shiny Raticate", 3},
["Fearow"] = {"Shiny Fearow", 5},
["Zubat"] = {"Shiny Zubat", 1},
["Golbat"] = {"Shiny Golbat", 3},
["Onix"] = {"Shiny Onix", 7},
["Hitmontop"] = {"Shiny Hitmontop", 7},
["Oddish"] = {"Shiny Oddish", 1},
["Paras"] = {"Shiny Paras", 1},
["Parasect"] = {"Shiny Parasect", 3},
["Venonat"] = {"Shiny Venonat", 1},
["Venomoth"] = {"Shiny Venomoth", 5},
["Growlithe"] = {"Shiny Growlithe", 3},
["Arcanine"] = {"Shiny Arcanine", 5},
["Abra"] = {"Shiny Abra", 1},
["Tentacool"] = {"Shiny Tentacool", 3},
["Tentacruel"] = {"Shiny Tentacruel", 7},
["Farfetch'd"] = {"Shiny Farfetch'd", 3},
["Muk"] = {"Shiny Muk", 5},
["Kingler"] = {"Shiny Kingler", 3},
["Voltorb"] = {"Shiny Voltorb", 3},
["Electrode"] = {"Shiny Electrode", 5},
["Cubone"] = {"Shiny Cubone", 3},
["Marowak"] = {"Shiny Marowak", 5},
["Hitmonlee"] = {"Shiny Hitmonlee", 7},
["Hitmonchan"] = {"Shiny Hitmonchan", 7},
["Tangela"] = {"Shiny Tangela", 3},
["Horsea"] = {"Shiny Horsea", 1},
["Seadra"] = {"Shiny Seadra", 5},
["Scyther"] = {"Shiny Scyther", 3},
["Jynx"] = {"Shiny Jynx", 7},
["Electabuzz"] = {"Shiny Electabuzz", 5},
["Pinsir"] = {"Shiny Pinsir", 5},
["Magikarp"] = {"Shiny Magikarp", 1},
["Gyarados"] = {"Shiny Gyarados", 7},
["Dratini"] = {"Shiny Dratini", 3},
["Dragonair"] = {"Shiny Dragonair", 5},
["Dragonite"] = {"Shiny Dragonite", 8},
["Metagross"] = {"Shiny Metagross", 10},
["Tropius"] = {"Shiny Tropius", 10},
["Milotic"] = {"Shiny Milotic", 8},
["Ariados"] = {"Shiny Ariados", 5},
["Dodrio"] = {"Shiny Dodrio", 5},
["Espeon"] = {"Shiny Espeon", 7},
["Flareon"] = {"Shiny Flareon", 7},
["Golem"] = {"Shiny Golem", 7},
["Grimer"] = {"Shiny Grimer", 1},
["Hypno"] = {"Shiny Hypno", 5},
["Jolteon"] = {"Shiny Jolteon", 7},
["Krabby"] = {"Shiny Krabby", 1},
["Magby"] = {"Shiny Magby", 3},
["Magneton"] = {"Shiny Magneton", 5},
["Mr. Mime"] = {"Shiny Mr. Mime", 5},
["Nidoking"] = {"Shiny Nidoking", 7},
["Politoed"] = {"Shiny Politoed", 5},
["Rhydon"] = {"Shiny Rhydon", 7},
["Stantler"] = {"Shiny Stantler", 5},
["Umbreon"] = {"Shiny Umbreon", 7},
["Vaporeon"] = {"Shiny Vaporeon", 7},
["Villeplume"] = {"Shiny Vileplume", 5},
["Cleflable"] = {"Shiny Clefable", 7},
["tangrowth"] = {"Shiny tangrowth", 8},
["Roserade"] = {"Shiny Roserade", 7},
}
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
Last edited: