Class ExperienceTracker

java.lang.Object
net.storm.sdk.script.paint.ExperienceTracker

public class ExperienceTracker extends Object
Tracks experience and level gains for a specific skill.

This immutable class records the starting experience and level for a skill, allowing calculation of gains over time. It is typically used in conjunction with DefaultPaint to display experience statistics.

Example usage:


 ExperienceTracker tracker = new ExperienceTracker(
     Skill.WOODCUTTING,
     Skills.getExperience(Skill.WOODCUTTING),
     Skills.getLevel(Skill.WOODCUTTING)
 );

 // Later...
 int xpGained = tracker.getExperienceGained();
 int levelsGained = tracker.getLevelsGained();
 
See Also:
  • Constructor Details

    • ExperienceTracker

      public ExperienceTracker()
  • Method Details

    • getExperienceGained

      public int getExperienceGained()
      Calculates the total experience gained since tracking started.
      Returns:
      the experience gained (current experience minus start experience)
    • getLevelsGained

      public int getLevelsGained()
      Calculates the number of levels gained since tracking started.
      Returns:
      the levels gained (current level minus start level)