Gametabs

The gametab file holds any global gametab data.

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 Nav Buttons

Constants that represent the buttons on the navigation pane. These buttons contain the individual gametab buttons.

  • NAV_BUTTON_HERO
  • NAV_BUTTON_CUSTOM
  • NAV_BUTTON_ADVENTURES
  • NAV_BUTTON_POWERS
  • NAV_BUTTON_SOCIAL
  • NAV_BUTTON_EXTRAS
  • NAV_BUTTON_GROUPING
  • NAV_BUTTON_SETTINGS

const Tabs

Constants that represent each gametab.

  • TAB_TASK
  • TAB_STATS
  • TAB_BACKPACK
  • TAB_EQUIPMENT
  • TAB_PRAYER
  • TAB_MAGIC
  • TAB_MELEE
  • TAB_RANGED
  • TAB_DEFENSIVE
  • TAB_FRIENDS
  • TAB_FRIENDS_CHAT
  • TAB_CLAN_CHAT
  • TAB_NOTES
  • TAB_MUSIC

type TRSGameTab

type
  TRSGameTabs = type TRSInterface;

A type that stores the global gametab interface properties.

var gameTabs

var
  gameTabs: TRSGameTabs;

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

TRSGameTabs methods

The following methods should be called through the gameTabs variable.

Example:

if gameTabs.areMultiOpen() then
  writeln('Multiple gametabs are open');

getActiveTabArea

function TRSGameTabs.getActiveTabArea(): TBox;

Returns the TBox of the active tab. It will return [-1, -1, -1, -1] if no tabs are active.

Note

  • by Coh3n
  • Last Updated: 29 September 2015 by Thomas

Example:

var
  b: TBox;
begin
  b := gameTabs.getActiveTabArea()

end;

areMultiOpen

function TRSGameTabs.areMultiOpen(): boolean;

Returns true if more than one tab is open.

Note

  • by Coh3n
  • Last Updated: 26 July 2013 by Coh3n

Example:

if gameTabs.areMultiOpen() then
  writeln('Multiple tabs are open');

getTabAreas

function TRSGameTabs.getTabAreas(): TBoxArray;

Returns a TBoxArray of all the gametab tab boxes.

Note

  • by Coh3n
  • Last Updated: 26 July 2013 by Coh3n

Example:

if (gameTabs.areMultiOpen()) then
  writeln('Multiple tabs are open');

_findTab

function TRSGameTabs._findTab(var p: TPoint; tab: integer; searchBox: TBox): boolean;

Returns true if the gametab tab is found in the searchBox . The midpoint of the tab p is passed by reference.

Note

  • by Coh3n
  • Last Updated: 26 July 2013 by Coh3n

Example:

var
  p: TPoint;
begin
  if (gameTabs._findTab(p, TAB_BACKPACK, b)) then
  begin
    writeln('Opening the backpack tab');
    mouse(p.rand(5), MOUSE_LEFT);
  end;
end;

isTabVisible

function TRSGameTabs.isTabVisible(tab: integer; out tabBounds: TBox): boolean;

Returns true if the gametab tab is visible. If found will store the bounds of the tab in tabBounds

Note

  • by Olly
  • Last Updated: 21 November 2013 by Olly

Example:

var
  b: TBox;
begin
  writeln(gameTabs.isTabVisable(TAB_BACKPACK, b));

end;

isTabActive

function TRSGameTabs.isTabActive(tab: integer): boolean;

Returns true if the gametab tab is the crrently active tab.

Note

  • by Olly
  • Last Updated: 21 November 2013 by Olly

Example:

writeln(gameTabs.isActiveTab(TAB_BACKPACK));

waitTabActive

function TRSGameTabs.waitTabActive(tab: integer; timeOut: integer): boolean;

Returns true if the gametab tab is open within timeOut

Note

  • by Olly
  • Last Updated: 21 November 2013 by Olly

Example:

writeln(gameTabs.waitTabActive(TAB_BACKPACK, 1000));

openTab

function TRSGameTabs.openTab(tab: integer): boolean;

Returns true if it successfully open the gametab tab

Note

  • by Coh3n
  • Last Updated: 26 July 2013 by Coh3n

Example:

if gameTabs.openTab(TAB_EQUIPMENT) then
  writeLn('The equipment is open!);

getActiveTab

function TRSGameTabs.getActiveTab(): integer;

Returns the active tab number.

Note

  • by Coh3n
  • Last Updated: 26 July 2013 by Coh3n

Example:

if (gameTabs.getActiveTab() = TAB_BACKPACK) then
  writeln('The backpack is open');