Items

The items file stores any functions and procedures that have anything to do with RS items. These functions have their own file because items can appear in many different RS interfaces such as the inventory, bank, and chat box.

The source for this file can be found here.

Constant: Item Colors

Integer constants that represents static item colors.

Example:

FindColors(tpa, ITEM_OUTLINE_BLACK, Box, 0);

findItem

function findItem(dtm: integer; boxArr: TBoxArray; sort: boolean): TIntegerArray;

Loops though each index of the TBoxArray ‘boxArr’ searching for the DTM ‘dtm’. If succesfull it will add the box index to the result. If sort is true it will order the result from (low..high).

Note

  • by Ollybest
  • Last Updated: 26 May 2013 by Olly

Example:

arr := findItem(myDTM, boxArr, true);

findItem; overload

function findItem(bmp, tol: integer; boxArr: TBoxArray; sort: boolean): TIntegerArray; overload;

Loops though each index of the TBoxArray ‘boxArr’ searching for the bitmap ‘bmp’. If succesfull it will add the box index to the result. If sort is true it will order the result from (low..high).

Note

  • by Ollybest
  • Last Updated: 19 August 2013 by Olly

Example:

arr := findItem(bmp, 50, boxArr, true);

findItem; overload

function findItem(bmp, tol: integer; boxArr: TBoxArray): integer; overload;

Overloaded function. Searches for the bitmap ‘bmp’ and returns the amount of item matches in ‘boxArr’.

Note

  • by Ollybest
  • Last Updated: 19 August 2013 by Olly

Example:

writeln(findItem(bmp, 20, boxArr));

findItem; overload

function findItem(dtm: integer; boxArr: TBoxArray): integer; overload;

Overloaded function. Searches for the dtm ‘dtm’ and returns the amount of item matches in ‘boxArr’.

Note

  • by Ollybest
  • Last Updated: 26 May 2013 by Olly

Example:

writeln(findItem(myDTM, boxArr));

isItemIn

function isItemIn(area: TBox): boolean;

Uses the black outline of a item to result whether or not a item is in the area.

Note

  • by Ollybest
  • Last Updated: 15 November 2014 by Ashaman88

Example:

writeln(isItemIn(box));

getItemAmount

function getItemAmount(area: TBox): integer;

Searches and returns the item amount (top left) in the area.

Note

  • by Olly
  • Last Updated: 14 October 2013 by Olly

Example:

writeln(getItemAmount(tabBackpack.getSlotBox(1)));