Package com.kraken.api.service.bank
Class BankService
- java.lang.Object
-
- com.kraken.api.service.bank.BankService
-
@Singleton public class BankService extends java.lang.ObjectA service class for interacting with global bank operations. This class handles operations on the bank interface like: opening, closing, depositing all items, and depositing all equipment.For depositing or withdrawing specific items use
BankInventoryQueryandBankQueryrespectively.
-
-
Constructor Summary
Constructors Constructor Description BankService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanclose()Closes the bank interface if it is open.booleandepositAll()Deposit all items in the players inventory into the bank.booleandepositAllEquipment()Deposits all worn items from the players equipment tab into the bank.booleandepositContainers()Deposits items in stored containers (like wilderness loot bags, rune pouches, etc...) into the bank.booleanenterPin(int[] pin)Enters the bank pin using the provided 4 digits.intgetXAmount()Returns the current amount the X variable is set to.booleanisClosed()Determines whether the bank interface is closed.booleanisOpen()Checks whether the bank interface is open.booleanisPinOpen()Returns true when the bank PIN interface is open and false otherwise.voidonScriptCallbackEvent(net.runelite.api.events.ScriptCallbackEvent event)booleansetWithdrawMode(boolean noted)Sets the withdrawal mode as either a note or item.voidsetXAmount(int amount)Sets the X number of items to withdraw or deposit.
-
-
-
Method Detail
-
isOpen
public boolean isOpen()
Checks whether the bank interface is open.- Returns:
trueif the bank interface is open,falseotherwise.
-
isClosed
public boolean isClosed()
Determines whether the bank interface is closed.This method provides the inverse of the
isOpenmethod by checking whether the bank interface is not open.- Returns:
trueif the bank interface is closed,falseotherwise.
-
isPinOpen
public boolean isPinOpen()
Returns true when the bank PIN interface is open and false otherwise.- Returns:
- True for an open bank pin interface
-
onScriptCallbackEvent
@Subscribe public void onScriptCallbackEvent(net.runelite.api.events.ScriptCallbackEvent event)
-
enterPin
public boolean enterPin(int[] pin)
Enters the bank pin using the provided 4 digits.- Parameters:
pin- An integer array of size 4 which contains the bank pin to enter.- Returns:
- boolean true if the pin was entered and false otherwise. This will return true if the pin was entered at all. This doesn't necessarily mean the pin was correct.
-
setWithdrawMode
public boolean setWithdrawMode(boolean noted)
Sets the withdrawal mode as either a note or item. If the withdrawal mode already matches the provided parameter no action will be taken.- Parameters:
noted- The boolean representing which withdraw mode to set. When set to false items will be withdrawn while true will withdraw items in a noted format.- Returns:
- True if the withdrawal mode was set correctly and false otherwise.
-
setXAmount
public void setXAmount(int amount)
Sets the X number of items to withdraw or deposit. The X variable can be set to any arbitrary integer value to withdraw or deposit X amount of a given item.- Parameters:
amount- The number of items to withdraw or deposit
-
getXAmount
public int getXAmount()
Returns the current amount the X variable is set to. The X variable can be set to any arbitrary integer value to withdraw or deposit X amount of a given item.- Returns:
- The current X amount
-
close
public boolean close()
Closes the bank interface if it is open.- Returns:
- True if the bank interface was closed successfully and false otherwise
-
depositAll
public boolean depositAll()
Deposit all items in the players inventory into the bank.- Returns:
- True if the deposit was successful and false otherwise
-
depositAllEquipment
public boolean depositAllEquipment()
Deposits all worn items from the players equipment tab into the bank.- Returns:
- True if the deposit was successful and false otherwise
-
depositContainers
public boolean depositContainers()
Deposits items in stored containers (like wilderness loot bags, rune pouches, etc...) into the bank.- Returns:
- True if the deposit was successful and false otherwise
-
-