Gametab Stats

The Gametab Stats file holds functions and procedures that are used in the runescape Stats gametab.

The source for this file can be found here.

Consts, Types, Vars

The following constants, types and variables are used throughout the chatBox methods.

const Skill type

Constants that represent the two different stats types for a skill. When reading a skill level, there is either a static skill level or a dynamic skill level. The dynamic skill level is the level that changes when you boost a skill.

  • SKILL_STATIC
  • SKILL_DYNAMIC

const Skill Info Type

Constants that represent the different skill info types. These are used when reading the skill XP.

  • INFO_CURRENT_XP
  • INFO_REMAINDER
  • INFO_NEXT_LEVEL
  • INFO_BONUS_XP

type TRSTabStats

type
  TRSTabStats = type TRSInterface;

A type that stores the stats tab interface properties.

var tabStats

var
  tabStats: TRSTabStats;

A variable through which scripters can access the TRSTabStats type methods.

TRSTabStats methods

The following methods should be called through the tabStats variable.

Example:

if tabStats.isOpen() then
  writeln('It''s open!');

isOpen

function TRSTabStats.isOpen(): boolean;

Returns true if the stats gametab is open.

Note

  • by Olly
  • Last Updated: 14 September 2013 by Olly

Example:

if tabStats.isOpen() then
  writeln('The stats tab is currently open!');

open

function TRSTabStats.open(): boolean;

Returns true if the stats gametab is successfully opened.

Note

  • by Olly
  • Last Updated: 14 September 2013 by Olly

Example:

if tabStats.open() then
  writeln('We opened the stats tab');

getSkillBox

function TRSTabStats.getSkillBox(skill: integer): TBox;

Returns a TBox around the skill information. The skill is one of the skill constants found in globals.simba.

Note

  • by Olly
  • Last Updated: 14 September 2013 by Olly

Example:

var
  b: TBox;
begin
  b := tabStats.getSkillBox(SKILL_ATTACK);

end;

getSkillLevel

function TRSTabStats.getSkillLevel(skill: integer; skillType: integer = SKILL_STATIC): integer;

Returns the skill level of **skill*, if unsuccesfull it will return -1.

  • skill : The skill level to get (skill constants are found in globals.simba).
  • skillType : Which skill level to read (either SKILL_STATIC or SKILL_DYNAMIC) (default = SKILL_STATIC)

Note

  • by Olly
  • Last Updated: 14 September 2013 by Olly

Example:

writeln(tabStats.getSkillLevel(SKILL_ATTACK));
// To get the dymanic (boosted or weakened) skill
writeln(tabStats.getSkillLevel(SKILL_ATTACK, SKILL_DYNAMIC));

getSkillInfo

function TRSTabStats.getSkillInfo(skill: integer; infoType: string): integer;

Returns the XP information about the skill skill.

  • skill - The skill XP to get (skill constants are found in globals.simba).
  • infoType - What XP information to get. SKill into type constants are found at top of this page.

Note

  • by Olly
  • Last Updated: 2 August 2015 by The Mayor

Example:

var
  bonusXP, currXP, remXP, nextLvl: Integer;
begin
  currXP := tabStats.getSkillInfo(SKILL_ATTACK, INFO_CURRENT_XP);
  bonusXP := tabStats.getSkillInfo(SKILL_ATTACK, INFO_BONUS_XP);
  remXP := tabStats.getSkillInfo(SKILL_ATTACK, INFO_REMAINDER);
  nextLvl := tabStats.getSkillInfo(SKILL_ATTACK, INFO_NEXT_LEVEL);
end;