No categories assigned

LUA:SetSkillMaxValue

Revision as of 12:32, 22 November 2013 by Jabantiz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: SetSkillMaxValue()

Sets the max value of the given skill

Syntax

SetSkillMaxValue(param1, param2)


Parameters

Required - param1 (Skill), param2 (int16)
param1 is the skill who's max value we want to set
param2 is the value we want to set it to

Usage

function respec(Player)
    skill = GetSkill(Player, "Offence")
    if skill ~= nil then
        SetSkillMaxValue(skill, 35)
    end
end

When this function is called the players offence skill max value will be set to 35

Note

If max value is set below the current value then current value will be changed to the given value as well