in spells.xml in spell line add:
soul="x"
x - number of soul to cast spell.
<instant name="Spell Name" words="spell words" lvl="1" mana="0" soul="1" exhaustion="1000" prem="0" enabled="1" needlearn="0" event="script" value="soul down.lua">
</instant>
function onCastSpell(cid, var)
local by = Erexo
local counter = 100 -- 1wasted soul gives you 100spend mana
local pos, soul = getPlayerPosition(cid), getPlayerSoul(cid)
if by == Erexo then
doPlayerAddSpentMana(cid, counter * soul + counter)
doPlayerAddSoul(cid, -soul)
doSendMagicEffect(pos, 12)
end
return true
end