D
Deleted member 210450
Guest
Hi!
I was trying to find it in documentation or in Otland in general, but could not find it.
Ive got spell that deals dmg & heals:
There's constant, pre-typed skill (sword in this case). I'd like to change to "current equipped weapon's skill", so If player has axe equipped it will be SKILL_AXE and so on.
And, just in case, how to write entire formula (because if you tell me "SKILL_WEAPONTYPE" i probably won't know how to put that into script).
Thanks in advance.
I was trying to find it in documentation or in Otland in general, but could not find it.
Ive got spell that deals dmg & heals:
Code:
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
local skill,lvl = getPlayerSkill(cid,SKILL_SWORD),getPlayerLevel(cid)
local min = skill * 2.75 + lvl + 5 --change this formula to change the min amount of healing
local max = skill * 3.5 + lvl + 8 --change this formula to change the max amount of healing
doCreatureAddHealth(cid, math.random(min,max))
return doCombat(cid, combat, var)
end
There's constant, pre-typed skill (sword in this case). I'd like to change to "current equipped weapon's skill", so If player has axe equipped it will be SKILL_AXE and so on.
And, just in case, how to write entire formula (because if you tell me "SKILL_WEAPONTYPE" i probably won't know how to put that into script).
Thanks in advance.