Target Info

The targetinfo file holds functions and procedures that are used to interact with the runescape Target interface.

The source for this file can be found here.

Consts, Types, Vars

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

type TRStargetInfo

type
  TRStargetInfo = type TRSInterface;

A type that stores the Target Info interface properties.

var targetInfo

var
  targetInfo: TRStargetInfo;

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

TRSTargetInfo methods

The following methods should be called through the targetInfo variable.

Example:

if targetInfo.isOpen() then
  writeln('TargetInfo screen is open!');

isOpen

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

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

Note

  • by Thomas
  • Last Updated: 22 September 2015 by Thomas

Example:

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

hasTarget

function TRSTargetInfo.hasTarget(waitTime: integer = 0): boolean;

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

Note

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

Example:

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

getName

function TRSTargetInfo.getName(): string;

Returns the name of the current target, if the target info is open.

Note

  • by Thomas
  • Last Updated: 22 September 2015 by Thomas

Example:

writeln(targetInfo.getName());