DepositBox

DepositBox interface.

../../images/deposit_box_interface.png

EDepositButtons

EDepositButtons = enum(WORN, LOOT, INVENTORY);

Enum representing the 3 main deposit buttons of the DepositBox interface.


TDepositBox

Main record to interact with the DepositBox interface.


DepositBox.FindItemBoundaries

function TDepositBox.FindItemBoundaries(): TBoxArray;

Finds and returns the bounding boxes of items currently visible in the deposit box slots.

Used internally by the slot interface for item detection.

Example:

WriteLn DepositBox.FindItemBoundaries();

DepositBox.SetupInterface

procedure TDepositBox.SetupInterface;

Internal method used to setup the TDepositBox coordinates. This is automatically called for you on the DepositBox variable.


DepositBox.IsOpen

function TDepositBox.IsOpen(): Boolean;

Returns true if the DepositBox interface is open.

Example:

WriteLn DepositBox.IsOpen();

DepositBox.WaitOpen

function TDepositBox.WaitOpen(time: Integer; interval: Integer = -1): Boolean;

Returns true if the DepositBox is open within time milliseconds.

Example:

WriteLn DepositBox.WaitOpen();

DepositBox.Close

function TDepositBox.Close(escape: Boolean): Boolean;
function TDepositBox.Close(escapeProbability: Single = 0): Boolean; overload;

Closes the depositbox interface. Depending on escape or `escapeProbability the function will either click the button or press escape key.

Example:

 WriteLn DepositBox.Close();

DepositBox.Deposit

function TDepositBox.Deposit(
  item: TBankItem; useQuantityButtons: Boolean
): Boolean;

function TDepositBox.Deposit(
  item: TItem; useQuantityButtons: Boolean
): Boolean; overload;

Deposits the specified item into the deposit box. If useQuantityButton is False it will use ChooseOption

Example:

WriteLn DepositBox.Deposit('Lobster', True);

DepositBox.DepositArray

function TDepositBox.DepositArray(
  items: array of TBankItem; useQuantityButtons: Boolean
): Boolean;

function TDepositBox.DepositArray(
  items: TItemArray; useQuantityButtons: Boolean
): Boolean; overload;

Deposits an array of items into the deposit box. Returns True if all items were successfully deposited. If useQuantityButton is False it will use ChooseOption

Example:

DepositBox.DepositArray(['Lobster', 'Swordfish'], True);

DepositBox.DepositInventory

procedure TDepositBox.DepositInventory();

Clicks the deposit inventory button to deposit all inventory items at once.

Example:

DepositBox.DepositInventory();

DepositBox.DepositLootBag

procedure TDepositBox.DepositLootBag();

Clicks the deposit loot bag button to deposit all items from the looting bag.

Example:

DepositBox.DepositLootBag();

DepositBox.DepositEquipment

procedure TDepositBox.DepositEquipment();

Clicks the deposit worn items button to deposit all currently equipped items.

Example:

DepositBox.DepositEquipment();

DepositBox.DepositDifferent

function TDepositBox.DepositDifferent(
  items: TItemArray; useQuantityButton: Boolean = True
): Boolean;

Attempts to deposit all items found that are not the items passed as a paremeter.

Example:

WriteLn DepositBox.DepositDifferent(['Abyssal whip', 'Bandos chestplate', 'Bandos tassets']);

DepositBox.Hover

function TDepositBox.Hover(constref obj: TGObject; walk: Boolean = True): Boolean;
function TDepositBox.Hover(walk: Boolean = True): Boolean; overload;

Hovers the closest DepositBox that WaspLib is aware of.

This assumes that Map is being used and setup. It’s possible to use this with other systems but you need to configure it all manually.

It will always hover the closest DepositBox TGObject on your loaded map.

If you are too far, it will attempt to walk closer to it.


DepositBox.Open

function TDepositBox.Open(constref obj: TGObject; walk: Boolean = True): Boolean;
function TDepositBox.Open(walk: Boolean = True): Boolean; overload;

Opens the DepositBox for you. This assumes that Map is being used and setup.

It’s possible to use this with other systems but you need to configure it all manually.

It will always use the closest DepositBox RSObject WaspLib is aware of on your loaded map.

If you are too far, it will attempt to walk closer to it by default unless you set the walk parameter to False.

Example:

{$I WaspLib/main.simba}
begin
  Map.Setup([EChunk.VARROCK]);
  DepositBox.Open();
end.
../../images/DepositBoxopen.gif

DepositBox variable

Global TDepositBox variable.