SkillAPI
Skill API.
ClassRLPlugins API
public class SkillAPIMembers
Static methods
- booleancanSelectReward(Skill)
Check if the skill's reward widget can be selected.
- intgetBoostedLevel(Skill)
Gets the current boosted level of a skill (current level, including temporary boosts).
- intgetBoostedTotalLevel()
Gets the total boosted level across all skills.
- intgetExperience(Skill)
Gets the total experience earned in a specific skill.
- intgetExperienceAt(int)
Gets the minimum experience required to reach a specific base level.
- intgetExperienceToNextLevel(Skill)
Calculates the experience needed to reach the next base level for a given skill.
- intgetLevel(Skill)
Gets the current base level of a skill, without boosts.
- intgetLevelAt(int)
Gets the base skill level corresponding to a total experience value.
- WidgetgetRewardWidget(Skill)
Gets the reward widget in the experience rewards widget (lamp, book, ...) for a given skill.
- intgetTotalExperience()
Gets the total experience across all skills.
- intgetTotalLevel()
Gets the total level across all skills (base levels, not boosted).
canSelectReward(Skill)static
public static boolean canSelectReward(Skill skill)Check if the skill's reward widget can be selected.
This can be false if, for example, the skill is not yet unlocked (like herblore).
Parameters
skill- The skill to check.
Returns
True if the skill's reward widget can be selected, false otherwise.
getBoostedLevel(Skill)static
public static int getBoostedLevel(Skill skill)Gets the current boosted level of a skill (current level, including temporary boosts).
Parameters
skill- The skill to check.
Returns
The skill's boosted level.
getBoostedTotalLevel()static
public static int getBoostedTotalLevel()Gets the total boosted level across all skills.
Returns
The sum of all boosted skill levels.
getExperience(Skill)static
public static int getExperience(Skill skill)Gets the total experience earned in a specific skill.
Parameters
skill- The skill to check.
Returns
The skill's current total experience.
getExperienceAt(int)static
public static int getExperienceAt(int level)Gets the minimum experience required to reach a specific base level.
Parameters
level- The skill level to check (0 to XP_TABLE.length - 1).
Returns
The total experience at that level, or 0 if the level is out of the calculated bounds.
getExperienceToNextLevel(Skill)static
public static int getExperienceToNextLevel(Skill skill)Calculates the experience needed to reach the next base level for a given skill.
Parameters
skill- The skill to check.
Returns
The experience required for the next level, or 0 if the skill is already at MAX_SKILL_LEVEL.
getLevel(Skill)static
public static int getLevel(Skill skill)Gets the current base level of a skill, without boosts.
Parameters
skill- The skill to check.
Returns
The skill's base level.
getLevelAt(int)static
public static int getLevelAt(int experience)Gets the base skill level corresponding to a total experience value.
The returned level will not exceed MAX_SKILL_LEVEL.
Parameters
experience- The total experience earned in a skill.
Returns
The calculated level based on experience, or -1 if no level is found (should only happen for experience < 0).
getRewardWidget(Skill)static
public static Widget getRewardWidget(Skill skill)Gets the reward widget in the experience rewards widget (lamp, book, ...) for a given skill.
Parameters
skill- The preferred skill.
Returns
The reward widget corresponding the requested skill.
getTotalExperience()static
public static int getTotalExperience()Gets the total experience across all skills.
Returns
The sum of all skill experience.
getTotalLevel()static
public static int getTotalLevel()Gets the total level across all skills (base levels, not boosted).
Returns
The sum of all skill levels.
Also allowed
Every class has these, as in plain Java.
equals, toString