Stats¶
Methods responsible for dealing with the stats tab.
ERSSkill¶
ERSSkill = (ATTACK, HITPOINTS, MINING, STRENGTH, AGILITY, SMITHING, DEFENCE, HERBLORE, FISHING, RANGE, THIEVING, COOKING, PRAYER, CRAFTING, FIREMAKING, MAGIC, FLETCHING, WOODCUTTING, RUNECRAFTING, SLAYER, FARMING, CONSTRUCTION, HUNTER, TOTAL);
Stats.Setup()¶
procedure TRSStats.Setup(); override;
Internal method automatically called by SRL.Setup()
Stats.SetupAlignment()¶
procedure TRSStats.SetupAlignment(Mode: ERSClientMode); override;
Internal method automatically called by RSClient.ClientModeChanged()
Stats.GetSkillBoxes¶
function TRSStats.GetSkillBoxes(): TBoxArray;
Internal method used to retrieve the skill boxes.
Example:
Debug(Stats.GetSkillBoxes());
Stats.GetSkillBox¶
function TRSStats.GetSkillBox(skill: ERSSkill): TBox;
Method used to retrieve a skill box.
Example:
Debug(Stats.GetSkillBox(ERSSkill.AGILITY));
Stats.IsOpen¶
function TRSStats.IsOpen(): Boolean;
Returns true/false if the gametab is open or not.
Example:
WriteLn Stats.IsOpen();
Stats.Open¶
function TRSStats.Open(): Boolean;
Attempts to open the gametab.
Example:
WriteLn Stats.Open();
Stats.MouseOver¶
function TRSStats.MouseOver(skill: ERSSkill): Boolean;
Moves the mouse over to a skill box.
Example:
WriteLn Stats.MouseOver(ERSSkill.CONSTRUCTION);
Stats.GetSkillInfo¶
function TRSStats.GetSkillInfo(skill: ERSSkill; waitTime: Int32 = 1000): TRSSkillInfo;
Get the skill information about a skill when you hover it.
Example:
WriteLn Stats.GetSkillInfo(ERSSkill.CONSTRUCTION);
Stats.GetLevel¶
function TRSStats.GetLevel(skill: ERSSkill; useCache: Boolean = True): Int32;
Get the level of the specified skill. By default uses the levels cached in the Stats.Levels array. When using the cached methods, it can be used to retrieve the level of a skill while the gametab is open assuming the level is already cached.
Example:
WriteLn Stats.GetLevel(ERSSkill.HITPOINTS);
Stats.CacheAll¶
procedure TRSStats.CacheAll();
Method to update all cached levels.
Stats.IncrementCachedLevel¶
procedure TRSStats.IncrementCachedLevel(skill: ERSSkill);
Internal method to update cached levels. This is automatically called by Chat.LeveledUp().
Example:
WriteLn Stats.GetCurrentLevel(ERSSkill.PRAYER);
Stats.IncrementLevel(ERSSkill.PRAYER);
WriteLn Stats.GetCurrentLevel(ERSSkill.PRAYER);
Chat.LeveledUp() override¶
function TRSChat.LeveledUp(): Boolean; override;
Returns true if we have the level up message on the chat box and attempts to update Stats.Levels
Example:
if Chat.LeveledUp() then
Chat.ClickContinue(True);