Moj mistrz
Monster Creator
Hello, I want to make a weapon script for example stonecutter axe(in lua), but the problem is that damage factor dont work(or i'm using it wrong XD).
That's the script.
NOTE: it works very well without using FACTOR, but it dont matter if i'm using full def or full atk, it's still same dmg.
I've already used setOrigin(ORIGIN_MELEE) and it didn't worked(I thought it will fix the formulas by itself without adding any formula to script).
That's the script.
NOTE: it works very well without using FACTOR, but it dont matter if i'm using full def or full atk, it's still same dmg.
Code:
<melee id="2431" level="90" unproperly="1" script="sca.lua"/>
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
function onGetFormulaValues(cid, skill, attack, level, factor)
return -(level / 10), -((2 * (attack * (skill + 5.8) / 25 + (level - 1) / 10.)) / factor) + (level / 10)
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onUseWeapon(cid, var)
return combat:execute(cid, var)
end
I've already used setOrigin(ORIGIN_MELEE) and it didn't worked(I thought it will fix the formulas by itself without adding any formula to script).