Siegh
Thronar Developer
Hello!
This is a part of a script of a weapon damage formula that I'm using. It works perfectly fine, the damage is calculated and dealt to the target.
My question is: I'm trying to add a function that will add a portion of the damage dealt to your SP but I'm not sure how to relate the addSoul function to the result of the formula. How do I add the result of the calculation to a variable?
Thanks in advance
This is a part of a script of a weapon damage formula that I'm using. It works perfectly fine, the damage is calculated and dealt to the target.
My question is: I'm trying to add a function that will add a portion of the damage dealt to your SP but I'm not sure how to relate the addSoul function to the result of the formula. How do I add the result of the calculation to a variable?
Code:
function onGetFormulaValues(player, skill, attack, factor)
local min = ((((player:getLevel() * 4) + (attack * (skill*0.1)))/2)*crit)
local max = ((player:getLevel() * 4) + (attack * (skill*0.1))*crit)
return -min, -max
end
critical:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
critical:execute(player, variant)
Thanks in advance