Stats¶
Methods responsible for dealing with the stats tab.
ESkill¶
ESkill = (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 TStats.Setup(); override;
Internal method automatically called by SRL.Setup()
Stats.SetupAlignment¶
procedure TStats.SetupAlignment(); overload;
Internal method automatically called by GameClient.ClientModeChanged()
Stats.IsOpen¶
function TStats.IsOpen(): Boolean;
Returns true/false if the gametab is open or not.
Example:
WriteLn Stats.IsOpen();
Stats.Open¶
function TStats.Open(): Boolean;
Attempts to open the gametab.
Example:
WriteLn Stats.Open();
Stats.MouseOver¶
function TStats.MouseOver(skill: ESkill): Boolean;
Moves the mouse over to a skill box.
Example:
WriteLn Stats.MouseOver(ESkill.CONSTRUCTION);
Stats.GetSkillInfo¶
function TStats.GetSkillInfo(skill: ESkill; waitTime: Int32 = 1000): TSkillInfo;
Get the skill information about a skill when you hover it.
Example:
WriteLn Stats.GetSkillInfo(ESkill.CONSTRUCTION);
Stats.GetLevel¶
function TStats.GetLevel(skill: ESkill; 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(ESkill.HITPOINTS);
Stats.CacheAll¶
procedure TStats.CacheAll();
Method to update all cached levels.
Stats.IncrementCachedLevel¶
procedure TStats.IncrementCachedLevel(skill: ESkill);
Internal method to update cached levels. This is automatically called by Chat.LeveledUp().
Example:
WriteLn Stats.GetCurrentLevel(ESkill.PRAYER);
Stats.IncrementLevel(ESkill.PRAYER);
WriteLn Stats.GetCurrentLevel(ESkill.PRAYER);
Chat.LeveledUp() override¶
function TChat.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);