sabodden
Member
- Joined
- Sep 27, 2019
- Messages
- 138
- Reaction score
- 18
Would be possible in lua, maybe by using getCreatureLookDirection(target) to make the 'exori hur' more dynamic and skillable?
I would like to if target is backwards to the attacker: damage = damage * 2
And if target is beside to the attacker: damage = damage * 1.5
And one last if player is looking to the target direction damage = damage * 1
I would like to if target is backwards to the attacker: damage = damage * 2
And if target is beside to the attacker: damage = damage * 1.5
And one last if player is looking to the target direction damage = damage * 1
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
function onGetFormulaValues(cid, level, maglevel)
min = ( (maglevel * 15) * 0.5 ) * -1
max = ( (maglevel * 15) * 1.0 ) * -1
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end