Spo teh pro
New Member
- Joined
- Jan 3, 2008
- Messages
- 319
- Reaction score
- 1
Hello..
I was fooling around with my energy strike spell because I wanted it to have the old (anything below 8.0 tibia) dmg but now when I do the spell it hits myself
Could anyone fix it so you attack the target that you've chosen? (just like now in tibia)
I just want to keep the dmg formula
Thank you in advance and ofcourse rep+
I was fooling around with my energy strike spell because I wanted it to have the old (anything below 8.0 tibia) dmg but now when I do the spell it hits myself
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
function getCombatFormulas(cid, level, magicLevel)
local formula_min = -(level * 1 + magicLevel * 1) * 0.8
local formula_max = -(level * 1 + magicLevel * 1) * 1
return formula_min, formula_max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
local distanceCombat = createCombatObject()
setCombatParam(distanceCombat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(distanceCombat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setCombatParam(distanceCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
function getCombatFormulas(cid, level, magicLevel)
local formula_min = -(level * 1 + magicLevel * 1) * 0.8
local formula_max = -(level * 1 + magicLevel * 1) * 1
return formula_min, formula_max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
function onCastSpell(cid, var)
if(variantToNumber(var) ~= 0) then
return doCombat(cid, distanceCombat, var)
end
return doCombat(cid, combat, var)
end
Could anyone fix it so you attack the target that you've chosen? (just like now in tibia)
I just want to keep the dmg formula
Thank you in advance and ofcourse rep+