Bank

object Bank

Bank A utility class for withdrawing and depositing items, opening and closing the bank, and finding the closest usable bank.

Types

Amount
Link copied to clipboard
enum Amount : Enum<Bank.Amount>

Amount An enumeration providing standard bank amount options. X is the relative to whatever the current value of X is.

Functions

close
Link copied to clipboard
fun close(key: Boolean = false): Boolean

Closes the bank.

currentTab
Link copied to clipboard
fun currentTab(): Int
fun currentTab(index: Int): Boolean

Changes the current tab to the provided index.

deposit
Link copied to clipboard
fun deposit(id: Int, amount: Int): Boolean
fun deposit(id: Int, amount: Bank.Amount): Boolean

Deposits an item with the provided id and amount.

fun deposit(name: String, amount: Int): Boolean
fun deposit(name: String, amount: Bank.Amount): Boolean

Deposits an item with the provided name and amount.

depositAllExcept
Link copied to clipboard
fun depositAllExcept(vararg names: String?): Boolean

Deposits the players inventory excluding the specified item names.

fun depositAllExcept(vararg ids: Int): Boolean

Deposits the players inventory excluding the specified ids.

fun depositAllExcept(filter: Filter<Item>): Boolean

Deposits the players inventory excluding the items that match the provided filter.

depositEquipment
Link copied to clipboard
fun depositEquipment(): Boolean
depositInventory
Link copied to clipboard
fun depositInventory(): Boolean
get
Link copied to clipboard
fun get(predicate: Predicate<Item>? = null): List<Item>

{@inheritDoc}

getBank
Link copied to clipboard
fun getBank(): InteractableEntity

Finds the nearest bank InteractableEntity can be either Npc or GameObject

inViewport
Link copied to clipboard
fun inViewport(): Boolean
nearest
Link copied to clipboard
fun nearest(): Locatable

Returns the absolute nearest bank for walking purposes. Do not use this to open the bank.

Nil
Link copied to clipboard
fun Nil(): Item
open
Link copied to clipboard
fun open(): Boolean

Opens a random in-view bank. Do not continue execution within the current first after this method so BankPin may activate.

opened
Link copied to clipboard
fun opened(): Boolean
present
Link copied to clipboard
fun present(): Boolean

Determines if a bank is present in the loaded region.

quantityComponentValue
Link copied to clipboard
fun quantityComponentValue(amount: Bank.Amount?): Int

Gives the component value of the quantity amount to be used.

stream
Link copied to clipboard
fun stream(): BankItemStream

{@inheritDoc}

tabbed
Link copied to clipboard
fun tabbed(): Boolean
tabItem
Link copied to clipboard
fun tabItem(index: Int): Item

Returns the item in the specified tab if it exists.

withdraw
Link copied to clipboard
fun withdraw(id: Int, amount: Int): Boolean
fun withdraw(id: Int, amount: Bank.Amount): Boolean

Withdraws an item with the provided id and amount.

fun withdraw(name: String, amount: Int): Boolean
fun withdraw(name: String, amount: Bank.Amount): Boolean
fun withdraw(name: String, amount: Int, waitFor: Callable<Boolean>): Boolean
fun withdraw(name: String, amount: Bank.Amount, waitFor: Callable<Boolean>): Boolean

Withdraws an item with the provided name and amount. If multiple items of the same name are present, the first one is chosen.

fun withdraw(filter: Filter<Item>, amount: Int): Boolean
fun withdraw(filter: Filter<Item>, amount: Bank.Amount): Boolean
fun withdraw(filter: Filter<Item>, amount: Int, waitFor: Callable<Boolean>): Boolean
fun withdraw(filter: Filter<Item>, amount: Bank.Amount, waitFor: Callable<Boolean>): Boolean

Withdraws an item with the provided name and amount. If multiple items match the filter, the first one is chosen.

fun withdraw(item: Item, amount: Int): Boolean

Withdraws an item with the provided item and amount.

fun withdraw(id: Int, amount: Int, waitFor: Callable<Boolean>): Boolean
fun withdraw(id: Int, amount: Bank.Amount, waitFor: Callable<Boolean>): Boolean

Withdraws an item with the provided name and amount.

fun withdraw(item: Item, amount: Int, waitFor: Callable<Boolean>): Boolean

Withdraws the specified amount of the specified item and waits for the specified condition to be true.

withdrawAmount
Link copied to clipboard
fun withdrawAmount(id: Int, amount: Int): Int
fun withdrawAmount(id: Int, amount: Bank.Amount): Int
fun withdrawAmount(name: String, amount: Int): Int
fun withdrawAmount(name: String, amount: Bank.Amount): Int
fun withdrawAmount(filter: Filter<Item>, amount: Int): Int
fun withdrawAmount(filter: Filter<Item>, amount: Bank.Amount): Int
fun withdrawAmount(item: Item, amount: Int): Int

Withdraws the specified amount of the specified item.

withdrawModeNoted
Link copied to clipboard
fun withdrawModeNoted(): Boolean
fun withdrawModeNoted(noted: Boolean): Boolean
withdrawModeQuantity
Link copied to clipboard
fun withdrawModeQuantity(): Bank.Amount

Returns the currently filtered withdraw mode.

fun withdrawModeQuantity(amount: Bank.Amount): Boolean

filter or verify the current withdraw quantity mode within the bank. Bank must be opened if you intend to set, but can be checked without opening.

withdrawXAmount
Link copied to clipboard
fun withdrawXAmount(): Int

Check the current amount that is set to Withdraw-X