Collect Box

The CollectBox file holds functions and procedures that are used in the runescape collection box screen.

The source for this file can be found here.

Consts, Types, Vars

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

const Collect Buttons

Integer constants that represent the two collect buttons.

  • COLLECT_BUTTON_BANK
  • COLLECT_BUTTON_INV

type TRSCollectBox

type
  TRSCollectBox = type TRSInterface;

A type that stores the collection box interface properties.

var collectBox

var
  collectBox: TRSCollectBox;

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

TRSCollectBox methods

The following methods should be called through the collectBox variable.

Example:

if collectBox.isOpen() then
  writeln('Collect box screen is open!');

isOpen

function TRSCollectBox.isOpen(waitTime: integer = 0): boolean;

Returns true if the collectBox interface is open. The optional waitTime parameter (default = 0) is the maximum time (in milliseconds) it will keep looking.

Note

  • by Ashaman88
  • Last Updated: 15 March 2014 by Ashaman88

Example:

if collectBox.isOpen() then
  writeln('The collectBox screen is open!');

close

function TRSCollectBox.close(escape: boolean = true): boolean;

Returns true if the collectBox screen is successfully closed. It uses the ESC key by default, but the escape parameter can be set to false to close via the mouse.

Note

  • by Ashaman88
  • Last Updated: 15 March 2014 by Ashaman88

Example:

if collectBox.close() then
  writeln('Closed the collectBox');

collectButton

function TRSCollectBox.collectButton(button: integer): boolean;

Selects one of the two collect buttons. The button should be one of the two Collect Button constants at the top of this page.

Note

  • by Ashaman88
  • Last Updated: 17 March 2015 by The Mayor

Example:

if collectBox.collectButton(COLLECT_BUTTON_BANK) then
  writeln('collected to the bank');