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