renancs
New Member
- Joined
- Jul 8, 2008
- Messages
- 252
- Reaction score
- 3
Im looking for this, and trying script, but dont work
i looking for a spell that damage according ur vocation, like this
whats wrong in the code?
i looking for a spell that damage according ur vocation, like this
Code:
--Calculed by ta4e--
--For tibia 8.31--
--Made in 07/11/08--
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)
function getCombatFormulas(cid, lv, maglv)
if isDruid(cid) then
local formula_min = -((lv*0.25 + maglv*3) * 1.2)
local formula_max = -((lv*0.25 + maglv*3) * 1.6)
else
local formula_min = -((lv*0.25 + maglv*3) * 1.7)
local formula_max = -((lv*0.25 + maglv*3) * 2.1)
end
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")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
whats wrong in the code?