Inventory Layouts

The Inventory Layouts is a handler for OSRS inventory.

You can configure the layouts manually but the recommended way is to use Inventory Form.


TRSInventoryLayouItem

Type that represents a single inventory layout item.


TRSInventoryLayouItem.ToJSON

function TRSInventoryLayouItem.ToJSON(): TJSONItem;

Convert the TRSInventoryLayoutItem into a TJSONItem.


TRSInventoryLayoutSlots

Type that represents an entire inventory layout.


TRSInventoryLayout.ToJSON

function TRSInventoryLayout.ToJSON(): TJSONItem;

Convert the TRSInventoryLayout into a TJSONItem.


TRSInventoryLayout

Main type to user Inventory Layouts.


InventoryLayout.SetupBankItems

procedure TRSInventoryLayout.SetupBankItems();

Internal function used to setup the TRSInventoryLayout TRSBankItems. This is automatically called for you when it’s needed.


InventoryLayout.IsValid

function TRSInventoryLayout.IsValid(): Boolean;

Returns true/false if whatever is inr you current Inventory is valid for your TRSInventoryLayout.

Example:

WriteLn layout.IsValid();

InventoryLayout.DepositDiff

function TRSInventoryLayout.DepositDiff(): Boolean;

Assuming the Bank is open, this will deposit every item in your inventory that doesn’t match your TRSInventoryLayout.

Example:

if Bank.Open() then
  layout.DepositDiff();

InventoryLayout.Withdraw

function TRSInventoryLayout.Withdraw(): Boolean;

Assuming the Bank is open, this will withdraw anything necessay so your Inventory contents match your TRSInventoryLayout.

Example:

if Bank.Open() then
  layout.Withdraw();

InventoryLayout.Reorder

function TRSInventoryLayout.Reorder(): Boolean;

Attempts to reorder the items in your Inventory to it matches your TRSInventoryLayout.

Example:

layout.Reorder();