BaseStats#

BaseStats handles cached stats information.

Unlike Stats, with BaseStats you don’t have to open stats gametab everytime to access skills information. When you start a wasplib script, BaseStats will start empty. The first time you ask it to retrieve a level with BaseStats.GetCurrentLevel() it will open the stats tab and cache every level for each skill so next times you use BaseStats.GetCurrentLevel() it doesn’t require to open the gametab.

Stats are also tracked if you call Chat.LeveledUp() when there’s a level up.


BaseStats.Setup#

procedure BaseStats.Setup(); static;

Internal method automatically called when required. You can call this yourBaseStats but you really don’t have to.


BaseStats.GetCurrentLevel#

function BaseStats.GetCurrentLevel(Skill: ERSSkill): Int32; static;

Similar to TRSStats.GetCurrentLevel() but uses the cached values.

Example:

WriteLn BaseStats.GetCurrentLevel(ERSSkill.PRAYER);

BaseStats.IncrementLevel#

procedure BaseStats.IncrementLevel(skill: ERSSkill); static;

Internal method to update cached levels. This is automatically called by Chat.LeveledUp().

Example:

WriteLn BaseStats.GetCurrentLevel(ERSSkill.PRAYER);
BaseStats.IncrementLevel(ERSSkill.PRAYER);
WriteLn BaseStats.GetCurrentLevel(ERSSkill.PRAYER);