Deposit Box

The depositbox file holds functions and procedures that are used in the runescape deposit box 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.

const Deposit Buttons

Constants that represent the quick deposit buttons:

  • QUICK_DEPOSITBOX_INVENTORY
  • QUICK_DEPOSITBOX_EQUIPMENT
  • QUICK_DEPOSITBOX_BOB
  • QUICK_DEPOSITBOX_MONEY_POUCH

type TRSDepositBox

type
  TRSDepositBox = type TRSInterface;

A type that stores the deposit box interface properties.

var depositBox

var
  depositBox: TRSDepositBox;

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

TRSDepositBox methods

The following methods should be called through the depositBox variable.

Example:

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

isOpen

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

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

Note

  • by Olly
  • Last Updated: 8 August 2014 by The Mayor

Example:

if depositBox.isOpen() then
  writeln('The deposit box interface is open!');

close

function TRSDepositBox.close(): boolean;

Returns true if the collectBox screen is successfully closed.

Note

  • by Olly
  • Last Updated: 15 January 2014 by The Mayor

Example:

if depositBox.close() then
  writeln('Closed the deposit box');

getSlotBoxes

function TRSDepositBox.getSlotBoxes(): TBoxArray;

Returns a TBoxArray of all of the deposit box slot boxes.

Note

  • by Olly
  • Last Updated: 15 January 2014 by The Mayor

Example:

var
  boxArr: TBoxArray;
begin
  boxArr := depositBox.getSlotBoxes();

end;

getSlotBox

function TRSDepositBox.getSlotBox(slot: integer): TBox;

Returns the TBox of the deposit box slot slot . Slots start at the top left at 1 and count across the columns.

Note

  • by Olly
  • Last Updated: 15 January 2014 by The Mayor

Example:

mouseBox(depositBox.getSlotBox(1), MOUSE_MOVE);

isItemInSlot

function TRSDepositBox.isItemInSlot(slot: integer): boolean;

Returns true if an item is in the deposit box slot slot .

Note

  • by Olly
  • Last Updated: 02 January 2013 by Ashaman88

Example:

if depositBox.isItemInSlot(1) then
  writeln('We have an item in deposit box slot number 1');

count

function TRSDepositBox.count(): integer;

Returns the number of items currently in the deposit box

Note

  • by Olly
  • Last Updated: 15 January 2014 by The Mayor

Example:

var
  c: integer;
begin
  c := depositBox.count();

end;

getCountDTM

function TRSDepositBox.getCountDTM(DTM: integer): integer;

Returns how many items match the DTM in the deposit box.

Note

  • by Olly
  • Last Updated: 02 January 2013 by Ashaman88

Example:

var
  dtm: integer;
  i: integer;
begin
  dtm := dtmFromString('lotsofstuffhere');
  i := depositBox.getCountDTM(dtm);
  writeln('We counted ' + intToStr(i) + ' items in the deposit box.');
end;

getCountBitmap

function TRSDepositBox.getCountBitmap(BMP, tolerance: integer): integer;

Returns how many items match the BMP with a tolerance of tolerance in the deposit box.

Note

  • by Olly
  • Last Updated: 02 January 2013 by Ashaman88

Example:

var
  bmp: integer;
  i: integer;
begin
  bmp := bitmapFromString('lotsofstuffhere');
  i := depositBox.getCountBitmap(dtm);
  writeln('We counted ' + intToStr(i) + ' items in the deposit box');
end;

isEmpty

function TRSDepositBox.isEmpty(): boolean;

Returns true if the deposit box is empty.

Note

  • by Olly
  • Last Updated: 15 January 2014 by The Mayor

Example:

if depositBox.isEmpty() then
  writeln('The deposit box is enpty');

isFull

function TRSDepositBox.isFull(): boolean;

Returns true if the deposit box is full.

Note

  • by Olly
  • Last Updated: 02 January 2013 by Ashaman88

Example:

if (depositBox.isPackFull) then
  writeln('our depositBox pack is full!');

quickDeposit

function TRSDepositBox.quickDeposit(depositType: integer): boolean;

Returns true if it successfully deposits using one of the depositType deposit button. The deposit button constants can be found at the top of this file.

Note

  • by Olly
  • Last Updated: 15 January 2014 by The Mayor

Example:

depositBox.quickDeposit(QUICK_DEPOSITBOX_INVENTORY);

deposit

function TRSDepositBox.deposit(slots: TIntegerArray; amounts: TIntegerArray = []; oneByOne: boolean = false): boolean;

Returns true if it deposits items into the deposit box. It can deposit all items, or specific slots and amounts. It can also deposit each item one by one.

  • slots : The slots you want to deposit
  • amounts : The amounts of the slots to deposit. Set to -1 to deposit all. Deposits all of every item by default.
  • oneByOne : Will click items one by one to deposit (default = false)

Note

  • by Coh3n
  • Last Updated: 24 May 2015 by The Mayor

Examples:

depositBox.deposit([2..28]);
depositBox.deposit([1, 2, 3, 4], [-1, 10, 15, 14]);
depositBox.deposit([1..28], , true); // one by one