DepositBox¶
DepositBox interface.
TRSDepositBox¶
Main record to interact with the DepositBox interface.
DepositBox.FindItemBoundaries¶
function TRSDepositBox.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 TRSDepositBox.SetupInterface;
Internal method used to setup the TRSDepositBox coordinates. This is automatically called for you on the DepositBox variable.
DepositBox.IsOpen¶
function TRSDepositBox.IsOpen(): Boolean;
Returns true if the DepositBox interface is open.
Example:
WriteLn DepositBox.IsOpen();
DepositBox.WaitOpen¶
function TRSDepositBox.WaitOpen(time: Integer; interval: Integer = -1): Boolean;
Returns true if the DepositBox is open within time milliseconds.
Example:
WriteLn DepositBox.WaitOpen();
DepositBox.Close¶
function TRSDepositBox.Close(escape: Boolean): Boolean;
function TRSDepositBox.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 TRSDepositBox.Deposit(item: TRSBankItem; useQuantityButtons: Boolean): Boolean;
function TRSDepositBox.Deposit(item: TRSItem; useQuantityButtons: Boolean): Boolean; overload;
Deposits the specified item into the deposit box. If useQuantityButton is False it will use ChooseOption
Example:
DepositBox.Deposit('Lobster', True);
DepositBox.DepositArray¶
function TRSDepositBox.DepositArray(items: array of TRSBankItem; useQuantityButtons: Boolean): Boolean;
function TRSDepositBox.DepositArray(items: TRSItemArray; 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 TRSDepositBox.DepositInventory();
Clicks the deposit inventory button to deposit all inventory items at once.
Example:
DepositBox.DepositInventory();
DepositBox.DepositLootBag¶
procedure TRSDepositBox.DepositLootBag();
Clicks the deposit loot bag button to deposit all items from the looting bag.
Example:
DepositBox.DepositLootBag();
DepositBox.DepositEquipment¶
procedure TRSDepositBox.DepositEquipment();
Clicks the deposit worn items button to deposit all currently equipped items.
Example:
DepositBox.DepositEquipment();
DepositBox.DepositDifferent¶
function TRSDepositBox.DepositDifferent(items: TRSItemArray; 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 TRSDepositBox.Hover(constref obj: TRSObject; walk: Boolean = True): Boolean;
function TRSDepositBox.Hover(constref npc: TRSEntity; walk: Boolean = True): Boolean; overload;
function TRSDepositBox.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 TRSObject or TRSEntity on your loaded map.
If you are too far, it will attempt to walk closer to it.
DepositBox.Open¶
function TRSDepositBox.Open(constref obj: TRSObject; walk: Boolean = True): Boolean;
function TRSDepositBox.Open(constref npc: TRSEntity; walk: Boolean = True): Boolean; overload;
function TRSDepositBox.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 or RSNPC 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/osrs.simba}
begin
Map.Setup([ERSChunk.VARROCK]);
DepositBox.Open();
end.
DepositBox variable¶
Global TRSDepositBox variable.