• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Damage formula = player max health TFS 1.3

Icaraii

Well-Known Member
Joined
Jan 5, 2020
Messages
469
Solutions
1
Reaction score
58
Hello, I would like to put the damage to exori as player max health / 16. Would it be like this?

Lua:
function onGetFormulaValues(player, creature)

    local maxHealth = creature:getMaxHealth()

    local min = (maxHealth / 16)
    local max = (maxHealth / 16) * 1,65
    return -min, -max

end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

Or there is a better way to do this?
 
Solution
Hello, I would like to put the damage to exori as player max health / 16. Would it be like this?

Lua:
function onGetFormulaValues(player, creature)

    local maxHealth = creature:getMaxHealth()

    local min = (maxHealth / 16)
    local max = (maxHealth / 16) * 1,65
    return -min, -max

end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

Or there is a better way to do this?
You basically have it, yeah.

Just change creature to player and replace the comma for a period in 1,65 -> 1.65
Hello, I would like to put the damage to exori as player max health / 16. Would it be like this?

Lua:
function onGetFormulaValues(player, creature)

    local maxHealth = creature:getMaxHealth()

    local min = (maxHealth / 16)
    local max = (maxHealth / 16) * 1,65
    return -min, -max

end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

Or there is a better way to do this?
You basically have it, yeah.

Just change creature to player and replace the comma for a period in 1,65 -> 1.65
 
Solution
Back
Top