Production Screen

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

The source for this file can be found here.

Consts, Types, Vars

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

type TRSProductionScreen

type
  TRSProductionScreen = type TRSInterface;

A type that stores the production screen interface properties.

var productionScreen

var
  productionScreen: TRSProductionScreen;

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

TRSProductionScreen methods

The following methods should be called through the productionScreen variable.

Example:

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

isOpen

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

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

Note

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

Example:

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

clickStart

function TRSProductionScreen.clickStart(space: boolean = true): boolean;

Returns true if it successfully clicks the start button. The space parameter can be set to true to use spacebar (default = true) else it will use the mouse.

Note

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

Example:

if productionScreen.clickStart() then
  writeln('We started making something!');

getSkill

function TRSProductionScreen.getSkill(): Integer;

Returns the type of skill currently being trained in the production screen. It returns an integer, which can be compared against the skill constants.

Note

  • by Ashaman88
  • Last Updated: 01 January 2014 by Ashaman88

Example:

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

getSelectedBoxText

function TRSProductionScreen.getSelectedBoxText(): string;

Returns the string of the item currently being made.

Note

  • by Ashaman88
  • Last Updated: 01 January 2014 by Ashaman88

Example:

if (productionScreen.getSelectedBoxText()= 'hatchet') then
  writeln('The hatchet option is selected!');

findSelectedProductionText

function TRSConversationBox.findSelectedProductionText(txt: TStringArray): boolean;

Returns true if txt is found in the currently selected item’s name.

Note

  • by Ashaman88
  • Last Updated: January 01, 2013 by Ashaman88

Example:

if productionScreen.findSelectedProductionText(['atchet']) then
   writeln('The selected option is a hatchet!');

selectBox

function TRSProductionScreen.selectBox(slot: Integer; itemtxt: TStringArray = ['']): Boolean;

Returns true if it selects the item box slot which can be 1-30. If will scroll down to the box if necessary. The optional itemtxt parameter is used to verify the selected item is the correct one (default = [‘’])

Note

  • by Ashaman88
  • Last Updated: 01 January 2014 by Ashaman88

Example:

// Returns true if box 1 is selected
productionScreen.selectBox(1);

// Returns true if box 1 is selected AND the item name matches
productionScreen.selectBox(1, ['Bronze da', 'agger']);

close

function TRSProductionScreen.close(escape: boolean = true): Boolean;

Returns true if the productionScreen 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 TomTuff
  • Last Updated: 03 November 2014 by TomTuff

Example:

productionScreen.close();