Package net.storm.api.items
Interface IBank
- All Superinterfaces:
IItems<IBankItem>,ItemProvider<IBankItem>
Provides access to the bank interface and operations.
The bank stores items with up to 816 slots organized in tabs. This interface provides methods for:
- Opening and closing the bank
- Depositing items from inventory and equipment
- Withdrawing items (normal or noted)
- Managing bank tabs
- Querying bank contents
Example usage:
IBank bank = Static.getBank();
bank.open(BankLocation.GRAND_EXCHANGE);
bank.depositInventory();
bank.withdraw("Lobster", 10);
bank.close();
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the bank interface.default voiddeposit(int id, int amount) default voiddeposit(int id, int amount, boolean quick) default voiddefault voiddefault voidvoidDeposits items from the inventory matching a filter.default voiddepositAll(int... ids) default voiddepositAll(String... names) default voiddepositAll(Predicate<? super IItem> filter) default voiddepositAllExcept(int... ids) default voiddepositAllExcept(String... names) default voiddepositAllExcept(Predicate<? super IItem> filter) voidDeposits all equipped items into the bank.voidDeposits all items from the inventory into the bank.voidEmpties containers into the bank.getTabs()Gets all bank tab widgets.booleanChecks if the main bank tab is currently open.booleanChecks if the bank is in noted withdraw mode.booleanisOpen()Checks if the bank interface is currently open.booleanisTabOpen(int index) Checks if a specific bank tab is currently open.voidopen(net.runelite.api.coords.WorldArea area) Opens the nearest bank in the specified area.voidopen(BankLocation bankLocation) Opens the bank at a specific predefined location.voidOpens the main bank tab (all items).voidopenTab(int index) Opens a specific bank tab.voidsetWithdrawMode(boolean noted) Sets the withdraw mode for the bank.default voidwithdraw(int id, int amount) default voidwithdraw(int id, int amount, boolean quick) default voidwithdraw(int id, int amount, WithdrawMode withdrawMode) default voidwithdraw(int id, int amount, WithdrawMode withdrawMode, boolean quick) default voiddefault voiddefault voidwithdraw(String name, int amount, WithdrawMode withdrawMode) default voidwithdraw(String name, int amount, WithdrawMode withdrawMode, boolean quick) default voiddefault voiddefault voidwithdraw(Predicate<IItem> filter, int amount, WithdrawMode withdrawMode) voidwithdraw(Predicate<IItem> filter, int amount, WithdrawMode withdrawMode, boolean quick) Withdraws items from the bank matching a filter.default voidwithdrawAll(int id) default voidwithdrawAll(int id, WithdrawMode withdrawMode) default voidwithdrawAll(String name) default voidwithdrawAll(String name, WithdrawMode withdrawMode) default voidwithdrawAll(Predicate<IItem> filter) default voidwithdrawAll(Predicate<IItem> filter, WithdrawMode withdrawMode)
-
Method Details
-
isOpen
boolean isOpen()Checks if the bank interface is currently open.- Returns:
- true if the bank is open, false otherwise
-
open
void open(net.runelite.api.coords.WorldArea area) Opens the nearest bank in the specified area.This will path to the area and interact with a bank object.
- Parameters:
area- the area containing a bank
-
open
Opens the bank at a specific predefined location.This will path to the location and interact with the bank.
- Parameters:
bankLocation- the bank location
-
close
void close()Closes the bank interface. -
isMainTabOpen
boolean isMainTabOpen()Checks if the main bank tab is currently open.- Returns:
- true if the main tab is open, false otherwise
-
isTabOpen
boolean isTabOpen(int index) Checks if a specific bank tab is currently open.- Parameters:
index- the tab index (0-9)- Returns:
- true if the tab is open, false otherwise
-
openMainTab
void openMainTab()Opens the main bank tab (all items). -
openTab
void openTab(int index) Opens a specific bank tab.- Parameters:
index- the tab index (0-9)
-
getTabs
Gets all bank tab widgets.- Returns:
- list of bank tab widgets
-
setWithdrawMode
void setWithdrawMode(boolean noted) Sets the withdraw mode for the bank.- Parameters:
noted- true to withdraw as noted items, false for normal items
-
isNotedWithdrawMode
boolean isNotedWithdrawMode()Checks if the bank is in noted withdraw mode.- Returns:
- true if withdrawing noted items, false otherwise
-
depositInventory
void depositInventory()Deposits all items from the inventory into the bank. -
depositEquipment
void depositEquipment()Deposits all equipped items into the bank. -
emptyContainers
void emptyContainers()Empties containers into the bank. -
withdraw
Withdraws items from the bank matching a filter.This is the core withdraw method with full control over options.
- Parameters:
filter- the filter to match itemsamount- the amount to withdraw (use Integer.MAX_VALUE for all)withdrawMode- the withdraw mode (normal, noted, or default)quick- true to use quick-withdraw, false for menu interaction
-
deposit
Deposits items from the inventory matching a filter.This is the core deposit method with full control over options.
- Parameters:
filter- the filter to match itemsamount- the amount to deposit (use Integer.MAX_VALUE for all)quick- true to use quick-deposit, false for menu interaction
-
depositAll
-
depositAll
default void depositAll(int... ids) -
depositAll
-
depositAllExcept
-
depositAllExcept
default void depositAllExcept(int... ids) -
depositAllExcept
-
withdrawAll
-
withdrawAll
-
withdrawAll
default void withdrawAll(int id) -
withdrawAll
-
withdrawAll
-
withdrawAll
-
withdraw
-
withdraw
-
withdraw
-
withdraw
-
withdraw
default void withdraw(int id, int amount, boolean quick) -
withdraw
default void withdraw(int id, int amount) -
withdraw
-
withdraw
-
withdraw
-
withdraw
-
withdraw
-
deposit
-
deposit
default void deposit(int id, int amount, boolean quick) -
deposit
-
deposit
default void deposit(int id, int amount) -
deposit
-