local pokename = {
["Squirtle"] = {"wartortle", 45},
["Wartortle"] = {"blastoise", 85},
}
function onSay(cid, words, param, channel)
if #getCreatureSummons(cid) >= 1 then
local Pname = getCreatureName(getCreatureSummons(cid)[1])
if getPlayerLevel(cid) >= pokename[Pname][2] then
if pokename[Pname] then
local health, maxHealth = getCreatureHealth(getCreatureSummons(cid)[1]), getCreatureMaxHealth(getCreatureSummons(cid)[1])
doRemoveCreature(getCreatureSummons(cid)[1])
local summon = doCreateMonster(pokename[Pname][1], toPosition)
doConvinceCreature(cid, summon)
doCreatureAddHealth(summon, health-maxHealth)
doSendMagicEffect(getThingPos(summon), 18)
return TRUE
else
return doPlayerSendCancel(cid, "This pokemon don't have more evolutions.")
end
else
return doPlayerSendCancel(cid, "Need level "..pokename[Pname][2].." to envolve this pokemon!")
end
else
return doPlayerSendCancel(cid, "Need a pokemon to envolve")
end
return FALSE
end