Base do evolution system do Kydrai ;~
~~> Crie um arquivo com o nome de stones.lua em actions/sctips e cole isso dentro:
local evo = {
["Pidgey"] = "Pidgeotto", -- Pidgey Evolui para Pidgeotto
["Pidgeotto"] = "Pidgeot", -- Pidgeotto evolui para pidgeot
}
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)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "name", ""..evo[monster].." Pokeball")
doCreatureAddHealth(summon, health-maxHealth)
doSendMagicEffect(getThingPos(summon), 18)
doPlayerSendTextMessage(cid, 27, "Your "..monster.." evolued to a "..evo[monster]..", Congratulations.")
doSendMagicEffect(getThingPos(cid), 28)
else
doPlayerSendCancel(cid, 'Pokemon not allowed.')
doSendMagicEffect(getThingPos(cid), 2)
return TRUE
end
end
return FALSE
end
~~> Em Actions.xml add:
<action itemid="xxxx" event="script" allowfaruse="10" value="stones.lua"/>
xxxx - ID da stone.
OBS: o item tem que ser usable , traduzindo : tem que ter a opção Use With...
GOSTOU? REP++ *-*








