local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
function getCombatFormulas(cid, lv, maglv)
local formula_min = -((lv*0.25 + maglv*3) * 1.7)
local formula_max = -((lv*0.25 + maglv*3) * 2.1)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
function getCombatFormulas(cid, lv, maglv)
local formula_min = -((lv*0.25 + maglv*3) * 1.7)*1.3
local formula_max = -((lv*0.25 + maglv*3) * 2.1)*1.3
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "Formula")
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 2270, 1) then
return doCombat(cid, combat1, var)
else
return doCombat(cid, combat, var)
end
end