0.4
Hello, I was trying to do this by myself, but I couldn't think in a way to make this work
I want exactly like the title. Knight uses exori, if the spell hits a monster or a player, the knight get healed, if hits 2 monsters or players, heals 2 times the healing and so on.
Thank you
Exori's code
Hello, I was trying to do this by myself, but I couldn't think in a way to make this work
I want exactly like the title. Knight uses exori, if the spell hits a monster or a player, the knight get healed, if hits 2 monsters or players, heals 2 times the healing and so on.
Thank you
Exori's code
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack, level / 5
return -(skillTotal * 0.9 + levelTotal), -(skillTotal * 1.9 + levelTotal)
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end