local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
local area1 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 3, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}
setCombatArea(combat, createCombatArea(area1))
local parameters = { cid = cid, var = var, combat1 = combat1}
function onCastSpell(cid, var)
config = {
formula = (getCreatureMaxHealth(cid) / 100) * math.random(20,30) -- Change (20,30) to how min and max percent health you want to heal the player --
}
doCreatureAddHealth(cid, config.formula)
addEvent(doCombat, 0, cid, combat, var)
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
local area1 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 3, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}
setCombatArea(combat, createCombatArea(area1))
local parameters = { cid = cid, var = var, combat1 = combat1}
function onCastSpell(cid, var)
config = {
formula = (getCreatureMaxHealth(cid) / 100) * math.random(20,30) -- Change (20,30) to how min and max percent health you want to heal the player --
}
doCreatureAddHealth(cid, config.formula)
addEvent(doCombat, 0, cid, combat, var)
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
local area1 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 3, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}
setCombatArea(combat, createCombatArea(area1))
local parameters = { cid = cid, var = var, combat1 = combat1}
function onCastSpell(cid, var)
config = {
formula = (getCreatureMaxMana(cid) / 100) * math.random(20,30) -- Change (20,30) to how min and max percent mana you want to heal the player --
}
doCreatureAddMana(cid, config.formula)
addEvent(doCombat, 0, cid, combat, var)
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
function onGetFormulaValues(cid, level, maglevel)
local min = (getCreatureMaxMana(cid) / 100) * 20
local max = (getCreatureMaxMana(cid) / 100) * 30
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
function onGetFormulaValues(cid, level, maglevel)
local min = (getCreatureMaxHealth(cid) / 100) * 20
local max = (getCreatureMaxHealth(cid) / 100) * 30
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end