Skip to main content

Banking & Deposit Box

Verification boundary

revision-sensitive RuneLite UI, packet, or in-game outcomes; treat those as live-client verification pending unless the page records direct evidence.

This document covers Bank Actions, Deposit Box Actions APIs, and the Bank Workflow Builder for assembling declarative, tick-advanced banking sequences.


Banking Flow Workflow


Bank Actions API

BankActions provides the result-aware bank interaction API. It requires the bank to remain open for item and mode operations. All write methods return InteractionResult and adhere to pacing rules.

Core Methods

  • isOpen(): Returns true if the bank interface is open and visible.
  • openNearestAccessible(): Opens the nearest path-reachable object registered by the active Shortest Path bank destination catalog. The object must expose the exact Bank action. Falls back to the nearest path-reachable bank NPC when no eligible object matches.
  • openNearest(): Compatibility delegate to openNearestAccessible().
  • count(int itemId) / count(String name): Returns the quantity of the item in the bank.
  • contains(int itemId, int quantity) / contains(Collection<Integer> ids, int quantity): Checks if the bank contains the specified item(s).
  • withdraw(int itemId, int amount) / withdraw(String name, int amount): Withdraws the specified quantity.
  • withdrawNoted(int itemId, int amount) / withdrawNoted(String name, int amount): Withdraws the specified quantity in noted form.
  • withdrawAll(int itemId) / withdrawAll(String name): Withdraws all of the item (queues Withdraw-All).
  • depositInventory(): Deposits the entire inventory.
  • depositEquipment(): Deposits all equipped items.
  • deposit(int itemId, int quantity): Deposits a selective quantity from the bank inventory pane.
  • depositAll(): Alias for depositInventory().
  • ensureWithdrawMode(InteractionResult noted): Toggles withdraw mode (noted or item).
  • ensureWithdrawMode(BankWithdrawMode mode): Typed overload for item/note mode.
  • ensureWithdrawQuantity(int amount): Submits an amount to an open bank quantity prompt.
  • click(BankWidget widget): Clicks supported typed bank controls, returning a result.

Example

InteractionResult open = BankActions.openNearestAccessible();
if (open.failed()) {
return;
}

if (BankActions.isOpen() && BankActions.count(561) >= 100) {
BankActions.ensureWithdrawMode(BankWithdrawMode.NOTE);
BankActions.withdrawNoted(561, 100);
}

The grouped BankActions surface preserves the same result model:

InteractionResult open = BankActions.openNearestAccessible();

Important Behavior

  • openNearestAccessible() uses the active Shortest Path destinations/game_features/bank.tsv catalog as the bank-object registry. At least one object interaction tile must appear in the catalog's accessible bank set, the object must expose Bank, and local pathfinding must reach it. TileObjectQuery.nearestByPath() ranks eligible candidates by path distance. This covers bank-facing Grand Exchange booths without hardcoded object IDs or name matching.
  • If Shortest Path has no active catalog, object discovery fails closed and the bank-NPC fallback remains available.
  • close() succeeds when the bank remains closed. Otherwise, it waits for ActionPacer and queues a click before dispatching native WIDGET_CLOSE through the revision-cached MenuDispatcher. Reflection failure returns PACKET_NOT_QUEUED. See menu-action-dispatch.md.
  • withdraw(...) and deposit(...) use direct menu actions for quantities 1, 5, 10, or the bank's configured X quantity. Other positive quantities open the client-owned X prompt; callers must wait until that prompt is visible before calling ensureWithdrawQuantity(...).
  • ensureWithdrawQuantity(...) submits an amount to an already-visible bank quantity prompt through DialogActions; it does not mutate the bank quantity varbit.
  • Retain BankInteraction.withdrawX(Widget, int, InteractionResult) default-amount behavior unless live verification dictates otherwise.

Deposit Box Actions API

DepositBoxActions interacts with the bank deposit box interface (widget group 192). It allows bulk or selective deposits without opening a full bank interface.

Query Methods

  • isOpen(): Returns true if the deposit box container (group 192) is visible.

Action Methods

  • depositAll(): Clicks the deposit-all-inventory button (child 4).
  • depositEquipment(): Clicks the deposit-all-equipment button (child 6).
  • deposit(int itemId, int quantity): Deposits the exact quantity of the item.
  • deposit(String name, int quantity): Deposits by display name (partial, case-insensitive).
  • deposit(Predicate<Widget> predicate, int quantity): Deposits items matching a widget predicate.
  • close(): Clicks the close button (child 1).

Deposit Quantity Mapping

QuantityAction Queued
1Deposit-1
5Deposit-5
10Deposit-10
Any other valueDeposit-All

Bank workflow builder

BankWorkflowBuilder.create(BankRestockPlan) returns a TypesafeCarouselStateMachine<BankRestockState>. The plan accepts optional InventoryLoadout and EquipmentLoadout targets. reconcile(inventory, equipment) copies and reconciles both before building.

BankRestockPlan plan = BankRestockPlan.builder()
.inventoryLoadout(inventoryLoadout)
.equipmentLoadout(equipmentLoadout)
.build();

TypesafeCarouselStateMachine<BankWorkflowBuilder.BankRestockState> machine =
BankWorkflowBuilder.create(plan);

Pulse once per client tick. The source-defined states are OPEN_BANK, DEPOSIT, WITHDRAW, CLOSE_BANK, and EQUIP. Use the returned CarouselResult or the workflow snapshot for status. Call reset() before reusing a terminal machine.

Loadout fulfillment workflow

LoadoutFulfillmentBuilder.create(LoadoutFulfillmentPlan) performs range-aware reconciliation in equipment-first order. It selectively deposits inventory overages, withdraws shortfalls in item or noted mode, closes the bank while equipping, and reopens it before continuing inventory work. A dispatched Withdraw-X or Deposit-X moves to SUBMIT_BANK_QUANTITY; the workflow submits the prompt on a later pulse and then returns to the phase that requested it.

The observable states are OPEN_BANK, EQUIPMENT, INVENTORY, SUBMIT_BANK_QUANTITY, and VERIFY. Terminal outcomes are available through LoadoutFulfillmentBuilder.responseOf(machine) as a FulfillmentResponse. Dispatch is not completion: pulse the machine until its snapshot becomes terminal and verify the resulting inventory and equipment state.