Squirrelgun
New Member
- Joined
- May 2, 2009
- Messages
- 15
- Reaction score
- 0
Code:
function finalDamage(cid)
local magicLevel = getPlayerMagLevel(cid)
local distSkill = getPlayerSkill(cid, 4)
local damage = (-(magicLevel*distSkill))*4/20 -- Damage formula
return damage*0.8, damage
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "finalDamage")
This is the damage my spell does. I'd like to be able to use the currently equipped weapon's attack power in the formula too.
Is there a function like getWeaponDamage?
Edit: And if there isn't, how would I go about adding the function getWeaponDamage?
Thanks in advance! : )