Fiz uma spell dessa a um tempo
local evolutions = {
--["Pokemon_name"] = "Evolution_name",
["Dark Abra"] = "Light Abra",
}
function onCastSpell(cid, var)
if #getCreatureSummons(cid) > 0 then
local poke = getCreatureSummons(cid)[1]
if evolutions[getCreatureName(poke)] then
local position, lookDir, pokeName = getThingPos(poke), getCreatureLookDirection(poke), getCreatureName(poke)
doPlayerSendTextMessage(cid, 27, "Your "..pokeName.." transformed into a "..evolutions[pokeName].."!")
doRemoveCreature(poke)
doSummonMonster(cid, evolutions[pokeName])
local newPoke = getCreatureSummons(cid)[1]
doTeleportThing(newPoke, position)
doCreatureSetLookDir(newPoke, lookDir)
adjustStatus(newPoke, getPlayerSlotItem(cid, 8).uid, true, false)
else
return doPlayerSendCancel(cid, "This pokemon can't transform.")
end
else
return doPlayerSendCancel(cid, "You do not have summons.")
end
if useKpdoDlls then
doUpdateMoves(cid)
local posi = getThingPosWithDebug(newPoke, position)
posi.x = posi.x+1
posi.y = posi.y+1
doSendMagicEffect(posi, 250)
end
return true
end