Lets say we have this code here
For example I would like to get health of each enemy that got hit by this spell How would I do it?
I know I can get the spectators around the player but it's not the same
I was thinking of having condition that will execute custom function but not sure if that's possible
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 52)
local area = createCombatArea({
{1, 0, 0, 1, 0, 0, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 0, 0, 1, 0, 0, 1}
})
setCombatArea(combat, area)
function onGetFormulaValues(cid, level, maglevel)
min = -((level / 5) + (maglevel * 10) + 25)
max = -((level / 5) + (maglevel * 20) + 50)
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
For example I would like to get health of each enemy that got hit by this spell How would I do it?
I know I can get the spectators around the player but it's not the same
I was thinking of having condition that will execute custom function but not sure if that's possible