Progress Screen

The progressscreen file holds functions and procedures that are used in the runescape progress screen.

The source for this file can be found here.

Consts, Types, Vars

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

const Button

Constants that represent the two progress screen buttons.

  • PROGRESS_BUTTON_DONE
  • PROGRESS_BUTTON_CANCEL

type TRSProgressScreen

type
  TRSProgressScreen = type TRSInterface;

A type that stores the progressScreen properties.

var progressScreen

var
  progressScreen: TRSProgressScreen;

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

TRSProgressScreen methods

The following methods should be called through the progressScreen variable.

Example:

if progressScreen.isOpen() then
  writeln('Progress screen is open!');

isOpen

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

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

Note

  • by Ashaman88
  • Last Updated: 10 August 2014 by Ashaman88

Example:

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

getSkill

function TRSProgressScreen.getSkill(): integer;

Returns the skill that the open progress screen is for. The Skill constants can be found in globals.simba.

Note

  • by Ashaman88
  • Last Updated: 08 January 2013 by Ashaman88

Example:

if (progressScreen.getSkill()= SKILL_SMITHING) then
  writeln('The smithing progress screen is open!');

getButton

function TRSProgressScreen.getButton(): integer;

Returns the integer of the button present at the bottom of the progressScreen. The Button constants can be found at the top of this page.

Note

  • by Ashaman88
  • Last Updated: 12 August 2015 by The Mayor

Example:

if (progressScreen.getButton() = PROGRESS_BUTTON_DONE) then
  writeln('The done button is present!');

findButton

function TRSProgressScreen.findButton(buttonType: integer = -1; waitTime: integer = 0; lClick: boolean = false): boolean;

Returns true if the button buttonType is found (default = any button) . It will wait for waitTime for the button to appear (default = 0) and when found it will click the button if lClick is set to true (default = false) .

Note

  • by Ashaman88
  • Last Updated: 08 January 2013 by Ashaman88

Example:

if progressScreen.findButton(PROGRESS_BUTTON_DONE, 7000, True) then
  writeln('We waited for, and clicked the done button!');

getItem

function TRSProgressScreen.getItem(): string;

Returns the name of the items currently begin produced as a string.

Note

  • by Ashaman88
  • Last Updated: 08 January 2013 by Ashaman88

Example:

if (progressScreen.getItem() = 'Hatchet') then
  writeln('The hatchet is begin made!');

getPercentDone

function TRSProgressScreen.getPercentDone(): integer;

Returns the percentage of completion of the current progressScreen.

Note

  • by Ashaman88
  • Last Updated: 08 January 2013 by Ashaman88

Example:

if (progressScreen.getPercentDone() = 50) then
  writeln('We are 50% done!');

getTotalToMake

function TRSProgressScreen.getTotalToMake(): integer;

Returns the number of items to be made in the current progressScreen.

Note

  • by Ashaman88
  • Last Updated: 08 January 2013 by Ashaman88

Example:

if (progressScreen.getTotalToMake()= 25) then
  writeln('We are making 25 items!');