Olá pessoal do XTibia.
Bom, percebi que muitos servidores de pokemon estão precisando de uma Shiny Stone, então, estou aqui para ensinar a vocês como adicionar uma no servidor.
Não vou falar muito, vamos direto ao assunto!
Bom, veja este código:
local evo = {
["Abra"] = "Shiny Abra",
["Arcanine"] = "Shiny Arcanine",
["Beedrill"] = "Shiny Beedrill",
["Blastoise"] = "Shiny Blastoise",
["Dratini"] = "Shiny Dratini",
["Electabuzz"] = "Shiny Electabuzz",
["Electrode"] = "Shiny Electrode",
["Farfetchd"] = "Shiny Farfetchd",
["Grimer"] = "Shiny Grimer",
["Growlithe"] = "Shiny Growlithe",
["Gyarados"] = "Red Gyarados",
["Hitmonchan"] = "Shiny Hitmonchan",
["Hitmonlee"] = "Shiny Hitmonlee",
["Horsea"] = "Shiny Horsea",
["Jynx"] = "Shiny Jynx",
["Onix"] = "Crystal Onix",
["Kingler"] = "Shiny Kingler",
["Krabby"] = "Shiny Krabby",
["Parasect"] = "Shiny Parasect",
["Pikachu"] = "Shiny Pikachu",
["Raichu"] = "Shiny Raichu",
["Raticate"] = "Shiny Raticate",
["Scyther"] = "Shiny Scyther",
["Seadra"] = "Shiny Seadra",
["Tentacruel"] = "Shiny Tentacruel",
["Venomoth"] = "Shiny Venomoth",
["Venusaur"] = "Shiny Venusaur",
["Voltorb"] = "Shiny Voltorb",
["Electrode"] = "Shiny Electrode",
["Pinsir"] = "Shiny Pinsir",
["Gengar"] = "Shiny Gengar",
["Snorlax"] = "Big Snorlax",
["Vaporeon"] = "Shiny Vaporeon",
["Flareon"] = "Shiny Flareon",
["Jolteon"] = "Shiny Jolteon",
["Kadabra"] = "Shiny Kadabra",
["Alakazam"] = "Shiny Alakazam",
["Zubat"] = "Shiny Zubat",
["Pidgeot"] = "Shiny Pidgeot",
["Paras"] = "Shiny Paras",
["Parasect"] = "Shiny Parasect",
["Golbat"] = "Shiny Golbat",
}
local pokeballs = {
[2531] = {"Pokeball"},
[2557] = {"Superball"},
[2524] = {"Greatball"},
[2525] = {"Ultraball"},
[2523] = {"Masterball"},
}
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
local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid)
doRemoveCreature(itemEx.uid)
doRemoveItem(item.uid)
local summon = doCreateMonster(evo[monster], toPosition)
doConvinceCreature(cid, summon)
local balls = pokeballs[getPlayerSlotItem(cid,8).itemid]
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "name", ""..evo[monster].." "..balls[1])
doCreatureAddHealth(summon, health-maxHealth)
doSendMagicEffect(getThingPos(summon), 18)
return TRUE
end
end
return FALSE
end
Primeiramente, copie, cole em um bloco de notas e salve o código na extensão "lua" com o nome "shiny" exatamente como mostra a imagem:

Agora, coloque o arquivo "shiny.lua" no diretorio "DATA/ACTIONS/SCRIPTS/STONES" do seu servidor.
Depois, volte para a pasta "ACTIONS", e abra o arquivo "actions.xml"
pelo bloco de notas ou algum editor de texto.
Depois é só adicionar em qualquer linha vazia esta tag:
<action itemid="2361" event="script" allowfaruse="10" value="stones/shiny.lua"/>
Agora é só salvar e pronto, seu servidor tem uma shiny stone. :weight_lift:
ATENÇÃO: Caso quando alguem usar a shiny stone em um pokemon, e ele desaparecer e não voltar mais, é porque está faltando esse pokemon no servidor ou porque o script dele está com erros.
Favor enviar-me uma PM dizendo quais os pokemons shiny que devem estar faltando no script para eu atualizar o código. :construction:
Gostou? Resolveu o seu problema? Favor +REP!
Contato: darkvic369@live.com
:XTibia_smile:








