zabuzo
Well-Known Member
- Joined
- Jun 10, 2016
- Messages
- 238
- Reaction score
- 54
I want to create a spell that uses health to regen some mana
I tried it:
But didn't work as i want...
I want to cure 200-300 mana
But removes 150-300 health...
What i'm doing wrong?
I tried it:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
function onGetFormulaValues(cid, level, maglevel)
min = 200
max = 300
return min, max
end
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
But didn't work as i want...
I want to cure 200-300 mana
But removes 150-300 health...
What i'm doing wrong?