Ir para conteúdo
  • Cadastre-se

(Resolvido)[AJUDA] Scripts


Ir para solução Resolvido por Adriano SwaTT,

Posts Recomendados

Olá galera, quero ajuda de vocês, quero que somente quando o pokemon tiver level 100, podera usar Shiny Stone nele, quando tiver level menor não da, e a rare candy, só da pra usar no seu pokemon, nos dos outros payers não.

Se alguém ajudar REP++

SHINY STONE.LUA

local evo = {

--nome do shiny, qnts stones precisa
["Snorlax"] = {"Shiny Snorlax", 1},
["Clefable"] = {"Shiny Clefable", 1},
["Snorlax"] = {"Shiny Snorlax", 1},
["Gengar"] = {"Shiny Gengar", 1},
["Mew"] = {"Shiny Mew", 1},
["Mewtwo"] = {"Shiny Mewtwo", 1},
["Articuno"] = {"Shiny Articuno", 1},
["Moltres"] = {"Shiny Moltres", 1},
["Zapdos"] = {"Shiny Zapdos", 1},
["Snorlax"] = {"", 1},
["Aerodactyl"] = {"Shiny Aerodactyl", 1},
["Ninetales"] = {"Shiny Ninetales", 1},
["Raichu"] = {"Shiny Raichu", 1},
["Alakazam"] = {"Shiny Alakazam", 1},
["Venusaur"] = {"Shiny Venusaur", 1},
["Charizard"] = {"Shiny Charizard", 1},
["Blastoise"] = {"Shiny Blastoise", 1}, --alterado v2.4
["Butterfree"] = {"Shiny Butterfree", 1},
["Beedrill"] = {"Shiny Beedrill", 1},
["Pidgeot"] = {"Shiny Pidgeot", 1},
["Rattata"] = {"Shiny Rattata", 1},
["Raticate"] = {"Shiny Raticate", 1},
["Fearow"] = {"Shiny Fearow", 1},
["Omastar"] = {"Shiny Omastar", 1},
["Omanyte"] = {"Shiny Omanyte", 1},
["Nidoking"] = {"Shiny Nidoking", 1},
["Zubat"] = {"Shiny Zubat", 1},
["Golbat"] = {"Shiny Golbat", 1},
["Rhyperior"] = {"Shiny Rhyperior", 1},
["Onix"] = {"Shiny Onix", 1},
["Oddish"] = {"Shiny Oddish", 1},
["Vileplume"] = {"Shiny Vileplume", 1},
["Paras"] = {"Shiny Paras", 1},
["Parasect"] = {"Shiny Parasect", 1},
["Venonat"] = {"Shiny Venonat", 1},
["Venomoth"] = {"Shiny Venomoth", 1},
["Growlithe"] = {"Shiny Growlithe", 1},
["Arcanine"] = {"Shiny Arcanine", 1},
["Abra"] = {"Shiny Abra", 1},
["Tentacool"] = {"Shiny Tentacool", 1},
["Tentacruel"] = {"Shiny Tentacruel", 1},
["Golem"] = {"Shiny Golem", 1},
["Farfetch'd"] = {"Shiny Farfetch'd", 1},
["Grimer"] = {"Shiny Grimer", 1},
["Muk"] = {"Shiny Muk", 1},
["Hypno"] = {"Shiny Hypno", 1},
["Krabby"] = {"Shiny Krabby", 1},
["Kingler"] = {"Shiny Kingler", 1},
["Voltorb"] = {"Shiny Voltorb", 1},
["Electrode"] = {"Shiny Electrode", 1},
["Cubone"] = {"Shiny Cubone", 1},
["Marowak"] = {"Shiny Marowak", 1},
["Hitmonlee"] = {"Shiny Hitmonlee", 1},
["Hitmonchan"] = {"Shiny Hitmonchan", 1},
["Tangela"] = {"Shiny Tangela", 1},
["Horsea"] = {"Shiny Horsea", 1},
["Seadra"] = {"Shiny Seadra", 1},
["Scyther"] = {"Shiny Scyther", 1},
["Jynx"] = {"Shiny Jynx", 1},
["Electabuzz"] = {"Shiny Electabuzz", 1},
["Kabutops"] = {"Shiny Kabutops", 1},
["Kabuto"] = {"Shiny Kabuto", 1},
["Pinsir"] = {"Shiny Pinsir", 1},
["Magikarp"] = {"Shiny Magikarp", 1},
["Gyarados"] = {"Shiny Gyarados", 1},
["Vaporeon"] = {"Shiny Vaporeon", 1},
["Jolteon"] = {"Shiny Jolteon", 1},
["Flareon"] = {"Shiny Flareon", 1},
["Dratini"] = {"Shiny Dratini", 1},
["Dragonair"] = {"Shiny Dragonair", 1},
["Dragonite"] = {"Shiny Dragonite", 1},
["Wigglytuff"] = {"Shiny Wigglytuff", 1},
["Charmander"] = {"Shiny Charmander", 1},
["Metagross"] = {"Shiny Metagross", 1},
["Machamp"] = {"Shiny Machamp", 1},
}
local balls = {
[11826] = {newBall = 11826},
[11832] = {newBall = 11832},
[11835] = {newBall = 11835},
[11829] = {newBall = 11829},
}

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

 

RARE CANDY.LUA

function onUse(cid, item, frompos, item2, topos)
 
if not isCreature(item2.uid) or not isSummon(item2.uid) then
doPlayerSendCancel(cid, "You can only give this candy to trainers' pokemons.")
return true
end
 
if getCreatureHealth(item2.uid) == 0 then return true end
 
local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)
 
if getLevel(item2.uid) >= 100 then
doPlayerSendCancel(cid, "Seu pokemon esta no level maximo.")
return true
end
 
doPlayerSendTextMessage(cid, 27, "Você deu um rare candy ao "..getPokeName(item2.uid)..".")
 
doCreatureSay(cid, getPokeName(item2.uid)..", coma isso!", TALKTYPE_SAY)
doRemoveItem(item.uid, 1)
 
 
local level = getItemAttribute(pb.uid, "level")
local exp = getItemAttribute(pb.uid, "exp")
local neededexp = getItemAttribute(pb.uid, "nextlevelexp")
 
if getHappiness(item2.uid) < 50 then
doSendMagicEffect(getThingPos(item2.uid), 168)
return true
end
 
doCreatureSay(item2.uid, "Hummm", TALKTYPE_ORANGE_1)
doItemSetAttribute(pb.uid, "rarecandy", level + 1)
doItemSetAttribute(pb.uid, "exp", exp + neededexp)
doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Seu "..getPokeName(item2.uid).." comeu um Rare Candy!")
doSendFlareEffect(getThingPos(item2.uid))
doSendAnimatedText(getThingPos(item2.uid), "Upei XD!", 215)
adjustPokemonLevel(pb.uid, getCreatureMaster(item2.uid), pb.itemid, true)
 
return true
end

Editado por felipinkoak (veja o histórico de edições)

                                                                                           SE TE AJUDEI CLICA EM  :accept:, NÃO CUSTA NADA  ;D 

Atenciosamente

     xPollo                                         

Da Play No Reggaezin Ai Boy

http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
 

Link para o post
Compartilhar em outros sites

@UP!

                                                                                           SE TE AJUDEI CLICA EM  :accept:, NÃO CUSTA NADA  ;D 

Atenciosamente

     xPollo                                         

Da Play No Reggaezin Ai Boy

http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
 

Link para o post
Compartilhar em outros sites

@UP!

                                                                                           SE TE AJUDEI CLICA EM  :accept:, NÃO CUSTA NADA  ;D 

Atenciosamente

     xPollo                                         

Da Play No Reggaezin Ai Boy

http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
 

Link para o post
Compartilhar em outros sites

No Shiny Stone:

local lvlmin = 100 -- level mínimo

local evo = {
--nome do shiny, qnts stones precisa
["Snorlax"] = {"Shiny Snorlax", 1},
["Clefable"] = {"Shiny Clefable", 1},
["Snorlax"] = {"Shiny Snorlax", 1},
["Gengar"] = {"Shiny Gengar", 1},
["Mew"] = {"Shiny Mew", 1},
["Mewtwo"] = {"Shiny Mewtwo", 1},
["Articuno"] = {"Shiny Articuno", 1},
["Moltres"] = {"Shiny Moltres", 1},
["Zapdos"] = {"Shiny Zapdos", 1},
["Snorlax"] = {"", 1},
["Aerodactyl"] = {"Shiny Aerodactyl", 1},
["Ninetales"] = {"Shiny Ninetales", 1},
["Raichu"] = {"Shiny Raichu", 1},
["Alakazam"] = {"Shiny Alakazam", 1},
["Venusaur"] = {"Shiny Venusaur", 1},
["Charizard"] = {"Shiny Charizard", 1},
["Blastoise"] = {"Shiny Blastoise", 1}, --alterado v2.4
["Butterfree"] = {"Shiny Butterfree", 1},
["Beedrill"] = {"Shiny Beedrill", 1},
["Pidgeot"] = {"Shiny Pidgeot", 1},
["Rattata"] = {"Shiny Rattata", 1},
["Raticate"] = {"Shiny Raticate", 1},
["Fearow"] = {"Shiny Fearow", 1},
["Omastar"] = {"Shiny Omastar", 1},
["Omanyte"] = {"Shiny Omanyte", 1},
["Nidoking"] = {"Shiny Nidoking", 1},
["Zubat"] = {"Shiny Zubat", 1},
["Golbat"] = {"Shiny Golbat", 1},
["Rhyperior"] = {"Shiny Rhyperior", 1},
["Onix"] = {"Shiny Onix", 1},
["Oddish"] = {"Shiny Oddish", 1},
["Vileplume"] = {"Shiny Vileplume", 1},
["Paras"] = {"Shiny Paras", 1},
["Parasect"] = {"Shiny Parasect", 1},
["Venonat"] = {"Shiny Venonat", 1},
["Venomoth"] = {"Shiny Venomoth", 1},
["Growlithe"] = {"Shiny Growlithe", 1},
["Arcanine"] = {"Shiny Arcanine", 1},
["Abra"] = {"Shiny Abra", 1},
["Tentacool"] = {"Shiny Tentacool", 1},
["Tentacruel"] = {"Shiny Tentacruel", 1},
["Golem"] = {"Shiny Golem", 1},
["Farfetch'd"] = {"Shiny Farfetch'd", 1},
["Grimer"] = {"Shiny Grimer", 1},
["Muk"] = {"Shiny Muk", 1},
["Hypno"] = {"Shiny Hypno", 1},
["Krabby"] = {"Shiny Krabby", 1},
["Kingler"] = {"Shiny Kingler", 1},
["Voltorb"] = {"Shiny Voltorb", 1},
["Electrode"] = {"Shiny Electrode", 1},
["Cubone"] = {"Shiny Cubone", 1},
["Marowak"] = {"Shiny Marowak", 1},
["Hitmonlee"] = {"Shiny Hitmonlee", 1},
["Hitmonchan"] = {"Shiny Hitmonchan", 1},
["Tangela"] = {"Shiny Tangela", 1},
["Horsea"] = {"Shiny Horsea", 1},
["Seadra"] = {"Shiny Seadra", 1},
["Scyther"] = {"Shiny Scyther", 1},
["Jynx"] = {"Shiny Jynx", 1},
["Electabuzz"] = {"Shiny Electabuzz", 1},
["Kabutops"] = {"Shiny Kabutops", 1},
["Kabuto"] = {"Shiny Kabuto", 1},
["Pinsir"] = {"Shiny Pinsir", 1},
["Magikarp"] = {"Shiny Magikarp", 1},
["Gyarados"] = {"Shiny Gyarados", 1},
["Vaporeon"] = {"Shiny Vaporeon", 1},
["Jolteon"] = {"Shiny Jolteon", 1},
["Flareon"] = {"Shiny Flareon", 1},
["Dratini"] = {"Shiny Dratini", 1},
["Dragonair"] = {"Shiny Dragonair", 1},
["Dragonite"] = {"Shiny Dragonite", 1},
["Wigglytuff"] = {"Shiny Wigglytuff", 1},
["Charmander"] = {"Shiny Charmander", 1},
["Metagross"] = {"Shiny Metagross", 1},
["Machamp"] = {"Shiny Machamp", 1},
}
local balls = {
[11826] = {newBall = 11826},
[11832] = {newBall = 11832},
[11835] = {newBall = 11835},
[11829] = {newBall = 11829},
}

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 getLevel(itemEx.uid) < lvlmin 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
else
    doPlayerSendCancel(cid, "Your pokemon is low level to use this item, "..lvlmin.." he needs at least level.")
return false
end
end
end
return FALSE
end

 

Teste assim o do Rare Candy.

    function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) or not isSummon(item2.uid) then
doPlayerSendCancel(cid, "You can only give this candy to trainers pokemons.")
return true
end

if getCreatureMaster(item2.uid) ~= cid then
doPlayerSendCancel(cid, "You can only give this candy in yours pokemons.")
return true
end

if getCreatureHealth(item2.uid) == 0 then
return true
end
 
local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)
 
if getLevel(item2.uid) >= 100 then
doPlayerSendCancel(cid, "Seu pokemon esta no level maximo.")
return true
end
 
doPlayerSendTextMessage(cid, 27, "Você deu um rare candy ao "..getPokeName(item2.uid)..".")
 
doCreatureSay(cid, getPokeName(item2.uid)..", coma isso!", TALKTYPE_SAY)
doRemoveItem(item.uid, 1)
 
 
local level = getItemAttribute(pb.uid, "level")
local exp = getItemAttribute(pb.uid, "exp")
local neededexp = getItemAttribute(pb.uid, "nextlevelexp")
 
if getHappiness(item2.uid) < 50 then
doSendMagicEffect(getThingPos(item2.uid), 168)
return true
end
 
doCreatureSay(item2.uid, "Hummm", TALKTYPE_ORANGE_1)
doItemSetAttribute(pb.uid, "rarecandy", level + 1)
doItemSetAttribute(pb.uid, "exp", exp + neededexp)
doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Seu "..getPokeName(item2.uid).." comeu um Rare Candy!")
doSendFlareEffect(getThingPos(item2.uid))
doSendAnimatedText(getThingPos(item2.uid), "Upei XD!", 215)
adjustPokemonLevel(pb.uid, getCreatureMaster(item2.uid), pb.itemid, true)
 
return true
end

 

Boa sorte.

Editado por Adriano SwaTT (veja o histórico de edições)

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Link para o post
Compartilhar em outros sites

ta ae.

candy

function onUse(cid, item, frompos, item2, topos)



if not isCreature(item2.uid) or not isSummon(item2.uid) then
doPlayerSendCancel(cid, "Você só pode dar rare candy para pokemons.")
return true
end

if getCreatureHealth(item2.uid) == 0 then return true end

local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)

if getLevel(item2.uid) >= 150 then
doPlayerSendCancel(cid, "Seu pokemon não pode subir mais leveis com essa candy.")
return true
end

local e = getCreatureMaster(cid)

if isSummon(item2.uid) and getCreatureName(item2.uid) == "Evolution" then
doPlayerSendCancel(cid, "Seu pokemon está evoluindo!")
return true
end

doPlayerSendTextMessage(cid, 27, "Você deu uma rare candy para "..getPokeName(item2.uid)..".")

doCreatureSay(cid, getPokeName(item2.uid)..", eat this candy!", TALKTYPE_SAY)
doRemoveItem(item.uid, 1)


local level = getItemAttribute(pb.uid, "level")
local exp = getItemAttribute(pb.uid, "exp")
local neededexp = getItemAttribute(pb.uid, "nextlevelexp")


if getHappiness(item2.uid) < 50 then
doSendMagicEffect(getThingPos(item2.uid), 168)
return true
end


doCreatureSay(item2.uid, "Yum.", TALKTYPE_ORANGE_1)
doItemSetAttribute(pb.uid, "rarecandy", level + 1)
doItemSetAttribute(pb.uid, "exp", exp + neededexp)
doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Seu "..getPokeName(item2.uid).." comeu uma rare candy!")
doSendFlareEffect(getThingPos(item2.uid))
doSendAnimatedText(getThingPos(item2.uid), "Level up!", 215)
adjustPokemonLevel(pb.uid, getCreatureMaster(item2.uid), pb.itemid, true)

return true
end

 

shiny stone

local evo = {


--nome do shiny, qnts stones precisa
["Snorlax"] = {"Shiny Snorlax", 1},
["Clefable"] = {"Shiny Clefable", 1},
["Snorlax"] = {"Shiny Snorlax", 1},
["Gengar"] = {"Shiny Gengar", 1},
["Mew"] = {"Shiny Mew", 1},
["Mewtwo"] = {"Shiny Mewtwo", 1},
["Articuno"] = {"Shiny Articuno", 1},
["Moltres"] = {"Shiny Moltres", 1},
["Zapdos"] = {"Shiny Zapdos", 1},
["Snorlax"] = {"", 1},
["Aerodactyl"] = {"Shiny Aerodactyl", 1},
["Ninetales"] = {"Shiny Ninetales", 1},
["Raichu"] = {"Shiny Raichu", 1},
["Alakazam"] = {"Shiny Alakazam", 1},
["Venusaur"] = {"Shiny Venusaur", 1},
["Charizard"] = {"Shiny Charizard", 1},
["Blastoise"] = {"Shiny Blastoise", 1}, --alterado v2.4
["Butterfree"] = {"Shiny Butterfree", 1},
["Beedrill"] = {"Shiny Beedrill", 1},
["Pidgeot"] = {"Shiny Pidgeot", 1},
["Rattata"] = {"Shiny Rattata", 1},
["Raticate"] = {"Shiny Raticate", 1},
["Fearow"] = {"Shiny Fearow", 1},
["Omastar"] = {"Shiny Omastar", 1},
["Omanyte"] = {"Shiny Omanyte", 1},
["Nidoking"] = {"Shiny Nidoking", 1},
["Zubat"] = {"Shiny Zubat", 1},
["Golbat"] = {"Shiny Golbat", 1},
["Rhyperior"] = {"Shiny Rhyperior", 1},
["Onix"] = {"Shiny Onix", 1},
["Oddish"] = {"Shiny Oddish", 1},
["Vileplume"] = {"Shiny Vileplume", 1},
["Paras"] = {"Shiny Paras", 1},
["Parasect"] = {"Shiny Parasect", 1},
["Venonat"] = {"Shiny Venonat", 1},
["Venomoth"] = {"Shiny Venomoth", 1},
["Growlithe"] = {"Shiny Growlithe", 1},
["Arcanine"] = {"Shiny Arcanine", 1},
["Abra"] = {"Shiny Abra", 1},
["Tentacool"] = {"Shiny Tentacool", 1},
["Tentacruel"] = {"Shiny Tentacruel", 1},
["Golem"] = {"Shiny Golem", 1},
["Farfetch'd"] = {"Shiny Farfetch'd", 1},
["Grimer"] = {"Shiny Grimer", 1},
["Muk"] = {"Shiny Muk", 1},
["Hypno"] = {"Shiny Hypno", 1},
["Krabby"] = {"Shiny Krabby", 1},
["Kingler"] = {"Shiny Kingler", 1},
["Voltorb"] = {"Shiny Voltorb", 1},
["Electrode"] = {"Shiny Electrode", 1},
["Cubone"] = {"Shiny Cubone", 1},
["Marowak"] = {"Shiny Marowak", 1},
["Hitmonlee"] = {"Shiny Hitmonlee", 1},
["Hitmonchan"] = {"Shiny Hitmonchan", 1},
["Tangela"] = {"Shiny Tangela", 1},
["Horsea"] = {"Shiny Horsea", 1},
["Seadra"] = {"Shiny Seadra", 1},
["Scyther"] = {"Shiny Scyther", 1},
["Jynx"] = {"Shiny Jynx", 1},
["Electabuzz"] = {"Shiny Electabuzz", 1},
["Kabutops"] = {"Shiny Kabutops", 1},
["Kabuto"] = {"Shiny Kabuto", 1},
["Pinsir"] = {"Shiny Pinsir", 1},
["Magikarp"] = {"Shiny Magikarp", 1},
["Gyarados"] = {"Shiny Gyarados", 1},
["Vaporeon"] = {"Shiny Vaporeon", 1},
["Jolteon"] = {"Shiny Jolteon", 1},
["Flareon"] = {"Shiny Flareon", 1},
["Dratini"] = {"Shiny Dratini", 1},
["Dragonair"] = {"Shiny Dragonair", 1},
["Dragonite"] = {"Shiny Dragonite", 1},
["Wigglytuff"] = {"Shiny Wigglytuff", 1},
["Charmander"] = {"Shiny Charmander", 1},
["Metagross"] = {"Shiny Metagross", 1},
["Machamp"] = {"Shiny Machamp", 1},
}
local balls = {
[11826] = {newBall = 11826},
[11832] = {newBall = 11832},
[11835] = {newBall = 11835},
[11829] = {newBall = 11829},
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getLevel(itemEx.uid) < 100 then
doPlayerSendCancel(cid, "Seu pokemon ainda não pode evoluir para Shiny , somente level 100..")
return true
end
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

Editado por kbpaulo (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

No Shiny Stone:

local lvlmin = 100 -- level mínimo

local evo = {
--nome do shiny, qnts stones precisa
["Snorlax"] = {"Shiny Snorlax", 1},
["Clefable"] = {"Shiny Clefable", 1},
["Snorlax"] = {"Shiny Snorlax", 1},
["Gengar"] = {"Shiny Gengar", 1},
["Mew"] = {"Shiny Mew", 1},
["Mewtwo"] = {"Shiny Mewtwo", 1},
["Articuno"] = {"Shiny Articuno", 1},
["Moltres"] = {"Shiny Moltres", 1},
["Zapdos"] = {"Shiny Zapdos", 1},
["Snorlax"] = {"", 1},
["Aerodactyl"] = {"Shiny Aerodactyl", 1},
["Ninetales"] = {"Shiny Ninetales", 1},
["Raichu"] = {"Shiny Raichu", 1},
["Alakazam"] = {"Shiny Alakazam", 1},
["Venusaur"] = {"Shiny Venusaur", 1},
["Charizard"] = {"Shiny Charizard", 1},
["Blastoise"] = {"Shiny Blastoise", 1}, --alterado v2.4
["Butterfree"] = {"Shiny Butterfree", 1},
["Beedrill"] = {"Shiny Beedrill", 1},
["Pidgeot"] = {"Shiny Pidgeot", 1},
["Rattata"] = {"Shiny Rattata", 1},
["Raticate"] = {"Shiny Raticate", 1},
["Fearow"] = {"Shiny Fearow", 1},
["Omastar"] = {"Shiny Omastar", 1},
["Omanyte"] = {"Shiny Omanyte", 1},
["Nidoking"] = {"Shiny Nidoking", 1},
["Zubat"] = {"Shiny Zubat", 1},
["Golbat"] = {"Shiny Golbat", 1},
["Rhyperior"] = {"Shiny Rhyperior", 1},
["Onix"] = {"Shiny Onix", 1},
["Oddish"] = {"Shiny Oddish", 1},
["Vileplume"] = {"Shiny Vileplume", 1},
["Paras"] = {"Shiny Paras", 1},
["Parasect"] = {"Shiny Parasect", 1},
["Venonat"] = {"Shiny Venonat", 1},
["Venomoth"] = {"Shiny Venomoth", 1},
["Growlithe"] = {"Shiny Growlithe", 1},
["Arcanine"] = {"Shiny Arcanine", 1},
["Abra"] = {"Shiny Abra", 1},
["Tentacool"] = {"Shiny Tentacool", 1},
["Tentacruel"] = {"Shiny Tentacruel", 1},
["Golem"] = {"Shiny Golem", 1},
["Farfetch'd"] = {"Shiny Farfetch'd", 1},
["Grimer"] = {"Shiny Grimer", 1},
["Muk"] = {"Shiny Muk", 1},
["Hypno"] = {"Shiny Hypno", 1},
["Krabby"] = {"Shiny Krabby", 1},
["Kingler"] = {"Shiny Kingler", 1},
["Voltorb"] = {"Shiny Voltorb", 1},
["Electrode"] = {"Shiny Electrode", 1},
["Cubone"] = {"Shiny Cubone", 1},
["Marowak"] = {"Shiny Marowak", 1},
["Hitmonlee"] = {"Shiny Hitmonlee", 1},
["Hitmonchan"] = {"Shiny Hitmonchan", 1},
["Tangela"] = {"Shiny Tangela", 1},
["Horsea"] = {"Shiny Horsea", 1},
["Seadra"] = {"Shiny Seadra", 1},
["Scyther"] = {"Shiny Scyther", 1},
["Jynx"] = {"Shiny Jynx", 1},
["Electabuzz"] = {"Shiny Electabuzz", 1},
["Kabutops"] = {"Shiny Kabutops", 1},
["Kabuto"] = {"Shiny Kabuto", 1},
["Pinsir"] = {"Shiny Pinsir", 1},
["Magikarp"] = {"Shiny Magikarp", 1},
["Gyarados"] = {"Shiny Gyarados", 1},
["Vaporeon"] = {"Shiny Vaporeon", 1},
["Jolteon"] = {"Shiny Jolteon", 1},
["Flareon"] = {"Shiny Flareon", 1},
["Dratini"] = {"Shiny Dratini", 1},
["Dragonair"] = {"Shiny Dragonair", 1},
["Dragonite"] = {"Shiny Dragonite", 1},
["Wigglytuff"] = {"Shiny Wigglytuff", 1},
["Charmander"] = {"Shiny Charmander", 1},
["Metagross"] = {"Shiny Metagross", 1},
["Machamp"] = {"Shiny Machamp", 1},
}
local balls = {
[11826] = {newBall = 11826},
[11832] = {newBall = 11832},
[11835] = {newBall = 11835},
[11829] = {newBall = 11829},
}

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 getLevel(itemEx.uid) < lvlmin 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
else
    doPlayerSendCancel(cid, "Your pokemon is low level to use this item, "..lvlmin.." he needs at least level.")
return false
end
end
end
return FALSE
end

 

Teste assim o do Rare Candy.

    function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) or not isSummon(item2.uid) then
doPlayerSendCancel(cid, "You can only give this candy to trainers pokemons.")
return true
end

if getCreatureMaster(item2.uid) ~= cid then
doPlayerSendCancel(cid, "You can only give this candy in yours pokemons.")
return true
end

if getCreatureHealth(item2.uid) == 0 then
return true
end
 
local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)
 
if getLevel(item2.uid) >= 100 then
doPlayerSendCancel(cid, "Seu pokemon esta no level maximo.")
return true
end
 
doPlayerSendTextMessage(cid, 27, "Você deu um rare candy ao "..getPokeName(item2.uid)..".")
 
doCreatureSay(cid, getPokeName(item2.uid)..", coma isso!", TALKTYPE_SAY)
doRemoveItem(item.uid, 1)
 
 
local level = getItemAttribute(pb.uid, "level")
local exp = getItemAttribute(pb.uid, "exp")
local neededexp = getItemAttribute(pb.uid, "nextlevelexp")
 
if getHappiness(item2.uid) < 50 then
doSendMagicEffect(getThingPos(item2.uid), 168)
return true
end
 
doCreatureSay(item2.uid, "Hummm", TALKTYPE_ORANGE_1)
doItemSetAttribute(pb.uid, "rarecandy", level + 1)
doItemSetAttribute(pb.uid, "exp", exp + neededexp)
doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Seu "..getPokeName(item2.uid).." comeu um Rare Candy!")
doSendFlareEffect(getThingPos(item2.uid))
doSendAnimatedText(getThingPos(item2.uid), "Upei XD!", 215)
adjustPokemonLevel(pb.uid, getCreatureMaster(item2.uid), pb.itemid, true)
 
return true
end

 

Boa sorte.

Não deu certo a Shiny Stone, continua evoluindo, a rare candy deu, vllw ai!

 

 

ta ae.

candy

function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) or not isSummon(item2.uid) then

doPlayerSendCancel(cid, "Você só pode dar rare candy para pokemons.")

return true

end

if getCreatureHealth(item2.uid) == 0 then return true end

local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)

if getLevel(item2.uid) >= 150 then

doPlayerSendCancel(cid, "Seu pokemon não pode subir mais leveis com essa candy.")

return true

end

local e = getCreatureMaster(cid)

if isSummon(item2.uid) and getCreatureName(item2.uid) == "Evolution" then

doPlayerSendCancel(cid, "Seu pokemon está evoluindo!")

return true

end

doPlayerSendTextMessage(cid, 27, "Você deu uma rare candy para "..getPokeName(item2.uid)..".")

doCreatureSay(cid, getPokeName(item2.uid)..", eat this candy!", TALKTYPE_SAY)

doRemoveItem(item.uid, 1)

local level = getItemAttribute(pb.uid, "level")

local exp = getItemAttribute(pb.uid, "exp")

local neededexp = getItemAttribute(pb.uid, "nextlevelexp")

if getHappiness(item2.uid) < 50 then

doSendMagicEffect(getThingPos(item2.uid), 168)

return true

end

doCreatureSay(item2.uid, "Yum.", TALKTYPE_ORANGE_1)

doItemSetAttribute(pb.uid, "rarecandy", level + 1)

doItemSetAttribute(pb.uid, "exp", exp + neededexp)

doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Seu "..getPokeName(item2.uid).." comeu uma rare candy!")

doSendFlareEffect(getThingPos(item2.uid))

doSendAnimatedText(getThingPos(item2.uid), "Level up!", 215)

adjustPokemonLevel(pb.uid, getCreatureMaster(item2.uid), pb.itemid, true)

return true

end

 

shiny stone

local evo = {

--nome do shiny, qnts stones precisa

["Snorlax"] = {"Shiny Snorlax", 1},

["Clefable"] = {"Shiny Clefable", 1},

["Snorlax"] = {"Shiny Snorlax", 1},

["Gengar"] = {"Shiny Gengar", 1},

["Mew"] = {"Shiny Mew", 1},

["Mewtwo"] = {"Shiny Mewtwo", 1},

["Articuno"] = {"Shiny Articuno", 1},

["Moltres"] = {"Shiny Moltres", 1},

["Zapdos"] = {"Shiny Zapdos", 1},

["Snorlax"] = {"", 1},

["Aerodactyl"] = {"Shiny Aerodactyl", 1},

["Ninetales"] = {"Shiny Ninetales", 1},

["Raichu"] = {"Shiny Raichu", 1},

["Alakazam"] = {"Shiny Alakazam", 1},

["Venusaur"] = {"Shiny Venusaur", 1},

["Charizard"] = {"Shiny Charizard", 1},

["Blastoise"] = {"Shiny Blastoise", 1}, --alterado v2.4

["Butterfree"] = {"Shiny Butterfree", 1},

["Beedrill"] = {"Shiny Beedrill", 1},

["Pidgeot"] = {"Shiny Pidgeot", 1},

["Rattata"] = {"Shiny Rattata", 1},

["Raticate"] = {"Shiny Raticate", 1},

["Fearow"] = {"Shiny Fearow", 1},

["Omastar"] = {"Shiny Omastar", 1},

["Omanyte"] = {"Shiny Omanyte", 1},

["Nidoking"] = {"Shiny Nidoking", 1},

["Zubat"] = {"Shiny Zubat", 1},

["Golbat"] = {"Shiny Golbat", 1},

["Rhyperior"] = {"Shiny Rhyperior", 1},

["Onix"] = {"Shiny Onix", 1},

["Oddish"] = {"Shiny Oddish", 1},

["Vileplume"] = {"Shiny Vileplume", 1},

["Paras"] = {"Shiny Paras", 1},

["Parasect"] = {"Shiny Parasect", 1},

["Venonat"] = {"Shiny Venonat", 1},

["Venomoth"] = {"Shiny Venomoth", 1},

["Growlithe"] = {"Shiny Growlithe", 1},

["Arcanine"] = {"Shiny Arcanine", 1},

["Abra"] = {"Shiny Abra", 1},

["Tentacool"] = {"Shiny Tentacool", 1},

["Tentacruel"] = {"Shiny Tentacruel", 1},

["Golem"] = {"Shiny Golem", 1},

["Farfetch'd"] = {"Shiny Farfetch'd", 1},

["Grimer"] = {"Shiny Grimer", 1},

["Muk"] = {"Shiny Muk", 1},

["Hypno"] = {"Shiny Hypno", 1},

["Krabby"] = {"Shiny Krabby", 1},

["Kingler"] = {"Shiny Kingler", 1},

["Voltorb"] = {"Shiny Voltorb", 1},

["Electrode"] = {"Shiny Electrode", 1},

["Cubone"] = {"Shiny Cubone", 1},

["Marowak"] = {"Shiny Marowak", 1},

["Hitmonlee"] = {"Shiny Hitmonlee", 1},

["Hitmonchan"] = {"Shiny Hitmonchan", 1},

["Tangela"] = {"Shiny Tangela", 1},

["Horsea"] = {"Shiny Horsea", 1},

["Seadra"] = {"Shiny Seadra", 1},

["Scyther"] = {"Shiny Scyther", 1},

["Jynx"] = {"Shiny Jynx", 1},

["Electabuzz"] = {"Shiny Electabuzz", 1},

["Kabutops"] = {"Shiny Kabutops", 1},

["Kabuto"] = {"Shiny Kabuto", 1},

["Pinsir"] = {"Shiny Pinsir", 1},

["Magikarp"] = {"Shiny Magikarp", 1},

["Gyarados"] = {"Shiny Gyarados", 1},

["Vaporeon"] = {"Shiny Vaporeon", 1},

["Jolteon"] = {"Shiny Jolteon", 1},

["Flareon"] = {"Shiny Flareon", 1},

["Dratini"] = {"Shiny Dratini", 1},

["Dragonair"] = {"Shiny Dragonair", 1},

["Dragonite"] = {"Shiny Dragonite", 1},

["Wigglytuff"] = {"Shiny Wigglytuff", 1},

["Charmander"] = {"Shiny Charmander", 1},

["Metagross"] = {"Shiny Metagross", 1},

["Machamp"] = {"Shiny Machamp", 1},

}

local balls = {

[11826] = {newBall = 11826},

[11832] = {newBall = 11832},

[11835] = {newBall = 11835},

[11829] = {newBall = 11829},

}

function onUse(cid, item, fromPosition, itemEx, toPosition)

if getLevel(item2.uid) < 100 then

doPlayerSendCancel(cid, "Seu pokemon ainda não pode evoluir para Shiny , somente level 100..")

return true

end

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

 

Não deu certo a Shiny Stone, ele não evolui..

                                                                                           SE TE AJUDEI CLICA EM  :accept:, NÃO CUSTA NADA  ;D 

Atenciosamente

     xPollo                                         

Da Play No Reggaezin Ai Boy

http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
 

Link para o post
Compartilhar em outros sites

Não da erro, não executa nenhuma mensagem?

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Link para o post
Compartilhar em outros sites

Não executa nenhuma mensagem, erro na onde?

                                                                                           SE TE AJUDEI CLICA EM  :accept:, NÃO CUSTA NADA  ;D 

Atenciosamente

     xPollo                                         

Da Play No Reggaezin Ai Boy

http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
 

Link para o post
Compartilhar em outros sites

xD...conseguiu arrumar ja.

Editado por kbpaulo (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

                                                                                           SE TE AJUDEI CLICA EM  :accept:, NÃO CUSTA NADA  ;D 

Atenciosamente

     xPollo                                         

Da Play No Reggaezin Ai Boy

http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
 

Link para o post
Compartilhar em outros sites
Deu certo, só que da esse erro agora!
 
 
[25/08/2014 23:29:50] [Error - Action Interface] 
[25/08/2014 23:29:50] data/actions/scripts/Shiny stone.lua:onUse
[25/08/2014 23:29:50] Description: 
[25/08/2014 23:29:50] data/actions/scripts/Shiny stone.lua:108: attempt to perform arithmetic on global 'boost' (a nil value)
[25/08/2014 23:29:50] stack traceback:
[25/08/2014 23:29:50] data/actions/scripts/Shiny stone.lua:108: in function <data/actions/scripts/Shiny stone.lua:90>
Editado por felipinkoak (veja o histórico de edições)

                                                                                           SE TE AJUDEI CLICA EM  :accept:, NÃO CUSTA NADA  ;D 

Atenciosamente

     xPollo                                         

Da Play No Reggaezin Ai Boy

http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
 

Link para o post
Compartilhar em outros sites

Tente assim:

 

local level = 100
local evo = {
--nome do shiny, qnts stones precisa
["Snorlax"] = {"Shiny Snorlax", 1},
["Clefable"] = {"Shiny Clefable", 1},
["Snorlax"] = {"Shiny Snorlax", 1},
["Gengar"] = {"Shiny Gengar", 1},
["Mew"] = {"Shiny Mew", 1},
["Mewtwo"] = {"Shiny Mewtwo", 1},
["Articuno"] = {"Shiny Articuno", 1},
["Moltres"] = {"Shiny Moltres", 1},
["Zapdos"] = {"Shiny Zapdos", 1},
["Snorlax"] = {"", 1},
["Aerodactyl"] = {"Shiny Aerodactyl", 1},
["Ninetales"] = {"Shiny Ninetales", 1},
["Raichu"] = {"Shiny Raichu", 1},
["Alakazam"] = {"Shiny Alakazam", 1},
["Venusaur"] = {"Shiny Venusaur", 1},
["Charizard"] = {"Shiny Charizard", 1},
["Blastoise"] = {"Shiny Blastoise", 1}, --alterado v2.4
["Butterfree"] = {"Shiny Butterfree", 1},
["Beedrill"] = {"Shiny Beedrill", 1},
["Pidgeot"] = {"Shiny Pidgeot", 1},
["Rattata"] = {"Shiny Rattata", 1},
["Raticate"] = {"Shiny Raticate", 1},
["Fearow"] = {"Shiny Fearow", 1},
["Omastar"] = {"Shiny Omastar", 1},
["Omanyte"] = {"Shiny Omanyte", 1},
["Nidoking"] = {"Shiny Nidoking", 1},
["Zubat"] = {"Shiny Zubat", 1},
["Golbat"] = {"Shiny Golbat", 1},
["Rhyperior"] = {"Shiny Rhyperior", 1},
["Onix"] = {"Shiny Onix", 1},
["Oddish"] = {"Shiny Oddish", 1},
["Vileplume"] = {"Shiny Vileplume", 1},
["Paras"] = {"Shiny Paras", 1},
["Parasect"] = {"Shiny Parasect", 1},
["Venonat"] = {"Shiny Venonat", 1},
["Venomoth"] = {"Shiny Venomoth", 1},
["Growlithe"] = {"Shiny Growlithe", 1},
["Arcanine"] = {"Shiny Arcanine", 1},
["Abra"] = {"Shiny Abra", 1},
["Tentacool"] = {"Shiny Tentacool", 1},
["Tentacruel"] = {"Shiny Tentacruel", 1},
["Golem"] = {"Shiny Golem", 1},
["Farfetch'd"] = {"Shiny Farfetch'd", 1},
["Grimer"] = {"Shiny Grimer", 1},
["Muk"] = {"Shiny Muk", 1},
["Hypno"] = {"Shiny Hypno", 1},
["Krabby"] = {"Shiny Krabby", 1},
["Kingler"] = {"Shiny Kingler", 1},
["Voltorb"] = {"Shiny Voltorb", 1},
["Electrode"] = {"Shiny Electrode", 1},
["Cubone"] = {"Shiny Cubone", 1},
["Marowak"] = {"Shiny Marowak", 1},
["Hitmonlee"] = {"Shiny Hitmonlee", 1},
["Hitmonchan"] = {"Shiny Hitmonchan", 1},
["Tangela"] = {"Shiny Tangela", 1},
["Horsea"] = {"Shiny Horsea", 1},
["Seadra"] = {"Shiny Seadra", 1},
["Scyther"] = {"Shiny Scyther", 1},
["Jynx"] = {"Shiny Jynx", 1},
["Electabuzz"] = {"Shiny Electabuzz", 1},
["Kabutops"] = {"Shiny Kabutops", 1},
["Kabuto"] = {"Shiny Kabuto", 1},
["Pinsir"] = {"Shiny Pinsir", 1},
["Magikarp"] = {"Shiny Magikarp", 1},
["Gyarados"] = {"Shiny Gyarados", 1},
["Vaporeon"] = {"Shiny Vaporeon", 1},
["Jolteon"] = {"Shiny Jolteon", 1},
["Flareon"] = {"Shiny Flareon", 1},
["Dratini"] = {"Shiny Dratini", 1},
["Dragonair"] = {"Shiny Dragonair", 1},
["Dragonite"] = {"Shiny Dragonite", 1},
["Wigglytuff"] = {"Shiny Wigglytuff", 1},
["Charmander"] = {"Shiny Charmander", 1},
["Metagross"] = {"Shiny Metagross", 1},
["Machamp"] = {"Shiny Machamp", 1},
}
local balls = {
[11826] = {newBall = 11826},
[11832] = {newBall = 11832},
[11835] = {newBall = 11835},
[11829] = {newBall = 11829},
}

function onUse(cid, item, fromPosition, itemEx, toPosition)

if getLevel(itemEx.uid) < 100 then

doPlayerSendCancel(cid, "Seu Pokemon precisa ser level 100 para usar a shiny stone.")

return true
end

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(ball, "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

 

Boa sorte.

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Link para o post
Compartilhar em outros sites

Vamos ver né, nunca trabalhei com servidor de Pokemons, algumas funções são diferentes.

 

Tomara que funcione.

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Link para o post
Compartilhar em outros sites

Agora ta dando isso:

[29/08/2014 12:52:12] [Error - Action Interface]

[29/08/2014 12:52:12] data/actions/scripts/Shiny stone.lua:onUse
[29/08/2014 12:52:12] Description:
[29/08/2014 12:52:12] (luaDoItemSetAttribute) Item not found

[29/08/2014 12:52:12] [Error - Action Interface]
[29/08/2014 12:52:12] data/actions/scripts/Shiny stone.lua:onUse
[29/08/2014 12:52:12] Description:
[29/08/2014 12:52:12] (luaDoItemSetAttribute) Item not found

[29/08/2014 12:52:12] [Error - Action Interface]
[29/08/2014 12:52:12] data/actions/scripts/Shiny stone.lua:onUse
[29/08/2014 12:52:12] Description:
[29/08/2014 12:52:12] (luaDoItemSetAttribute) Item not found

                                                                                           SE TE AJUDEI CLICA EM  :accept:, NÃO CUSTA NADA  ;D 

Atenciosamente

     xPollo                                         

Da Play No Reggaezin Ai Boy

http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
 

Link para o post
Compartilhar em outros sites
  • Solução

Teste assim:

 

local level = 100
local evo = {
--nome do shiny, qnts stones precisa
["Snorlax"] = {"Shiny Snorlax", 1},
["Clefable"] = {"Shiny Clefable", 1},
["Snorlax"] = {"Shiny Snorlax", 1},
["Gengar"] = {"Shiny Gengar", 1},
["Mew"] = {"Shiny Mew", 1},
["Mewtwo"] = {"Shiny Mewtwo", 1},
["Articuno"] = {"Shiny Articuno", 1},
["Moltres"] = {"Shiny Moltres", 1},
["Zapdos"] = {"Shiny Zapdos", 1},
["Snorlax"] = {"", 1},
["Aerodactyl"] = {"Shiny Aerodactyl", 1},
["Ninetales"] = {"Shiny Ninetales", 1},
["Raichu"] = {"Shiny Raichu", 1},
["Alakazam"] = {"Shiny Alakazam", 1},
["Venusaur"] = {"Shiny Venusaur", 1},
["Charizard"] = {"Shiny Charizard", 1},
["Blastoise"] = {"Shiny Blastoise", 1}, --alterado v2.4
["Butterfree"] = {"Shiny Butterfree", 1},
["Beedrill"] = {"Shiny Beedrill", 1},
["Pidgeot"] = {"Shiny Pidgeot", 1},
["Rattata"] = {"Shiny Rattata", 1},
["Raticate"] = {"Shiny Raticate", 1},
["Fearow"] = {"Shiny Fearow", 1},
["Omastar"] = {"Shiny Omastar", 1},
["Omanyte"] = {"Shiny Omanyte", 1},
["Nidoking"] = {"Shiny Nidoking", 1},
["Zubat"] = {"Shiny Zubat", 1},
["Golbat"] = {"Shiny Golbat", 1},
["Rhyperior"] = {"Shiny Rhyperior", 1},
["Onix"] = {"Shiny Onix", 1},
["Oddish"] = {"Shiny Oddish", 1},
["Vileplume"] = {"Shiny Vileplume", 1},
["Paras"] = {"Shiny Paras", 1},
["Parasect"] = {"Shiny Parasect", 1},
["Venonat"] = {"Shiny Venonat", 1},
["Venomoth"] = {"Shiny Venomoth", 1},
["Growlithe"] = {"Shiny Growlithe", 1},
["Arcanine"] = {"Shiny Arcanine", 1},
["Abra"] = {"Shiny Abra", 1},
["Tentacool"] = {"Shiny Tentacool", 1},
["Tentacruel"] = {"Shiny Tentacruel", 1},
["Golem"] = {"Shiny Golem", 1},
["Farfetch'd"] = {"Shiny Farfetch'd", 1},
["Grimer"] = {"Shiny Grimer", 1},
["Muk"] = {"Shiny Muk", 1},
["Hypno"] = {"Shiny Hypno", 1},
["Krabby"] = {"Shiny Krabby", 1},
["Kingler"] = {"Shiny Kingler", 1},
["Voltorb"] = {"Shiny Voltorb", 1},
["Electrode"] = {"Shiny Electrode", 1},
["Cubone"] = {"Shiny Cubone", 1},
["Marowak"] = {"Shiny Marowak", 1},
["Hitmonlee"] = {"Shiny Hitmonlee", 1},
["Hitmonchan"] = {"Shiny Hitmonchan", 1},
["Tangela"] = {"Shiny Tangela", 1},
["Horsea"] = {"Shiny Horsea", 1},
["Seadra"] = {"Shiny Seadra", 1},
["Scyther"] = {"Shiny Scyther", 1},
["Jynx"] = {"Shiny Jynx", 1},
["Electabuzz"] = {"Shiny Electabuzz", 1},
["Kabutops"] = {"Shiny Kabutops", 1},
["Kabuto"] = {"Shiny Kabuto", 1},
["Pinsir"] = {"Shiny Pinsir", 1},
["Magikarp"] = {"Shiny Magikarp", 1},
["Gyarados"] = {"Shiny Gyarados", 1},
["Vaporeon"] = {"Shiny Vaporeon", 1},
["Jolteon"] = {"Shiny Jolteon", 1},
["Flareon"] = {"Shiny Flareon", 1},
["Dratini"] = {"Shiny Dratini", 1},
["Dragonair"] = {"Shiny Dragonair", 1},
["Dragonite"] = {"Shiny Dragonite", 1},
["Wigglytuff"] = {"Shiny Wigglytuff", 1},
["Charmander"] = {"Shiny Charmander", 1},
["Metagross"] = {"Shiny Metagross", 1},
["Machamp"] = {"Shiny Machamp", 1},
}
local balls = {
[11826] = {newBall = 11826},
[11832] = {newBall = 11832},
[11835] = {newBall = 11835},
[11829] = {newBall = 11829},
}

function onUse(cid, item, fromPosition, itemEx, toPosition)

if getLevel(itemEx.uid) < 100 then

doPlayerSendCancel(cid, "Seu Pokemon precisa ser level 100 para usar a shiny stone.")

return true
end

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(pokeball.uid, "hp", 1)
doItemSetAttribute(pokeball.uid, "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

 

O script estava cheio de erros/detalhes ao meu ver.

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Link para o post
Compartilhar em outros sites

Funciono VLLW AEW, REP+++

                                                                                           SE TE AJUDEI CLICA EM  :accept:, NÃO CUSTA NADA  ;D 

Atenciosamente

     xPollo                                         

Da Play No Reggaezin Ai Boy

http://www.mjbstudio.com/myspace/mjb_playlist/jamming.mp3
 

Link para o post
Compartilhar em outros sites

bom... parabens adriano.. ta me devendo 1 rep pq e o mesmo script que deixei la na frente a unica diferença e que nã fiquei postandoa ahauah... depois te cobro no skype ahauah.

 

se precisar cara e so abrir outro topico ..que tentaremos ajudar..

 

agora vo ta reportando para poderem fechar esse , pois ja foi respondido.

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo