Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions api/src/main/java/com/tonic/api/widgets/BankAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public static int getX()
*/
public static void setX(int amount)
{
System.out.println(VarAPI.getVar(VarbitID.BANK_QUANTITY_TYPE));
int withdrawMode = VarAPI.getVar(VarbitID.BANK_QUANTITY_TYPE);
if(withdrawMode != 3)
{
Expand Down Expand Up @@ -361,19 +360,19 @@ public static void deposit(String name, int amount) {
public static void withdrawAction(int id, int amount, int slot) {
setX(amount);
if(amount == 1) {
WidgetAPI.interact(1, InterfaceID.Bankmain.TABS_LINE0, slot, id);
WidgetAPI.interact(2, InterfaceID.Bankmain.ITEMS, slot, id);
}
else if(amount == 5) {
WidgetAPI.interact(3, InterfaceID.Bankmain.TABS_LINE0, slot, id);
WidgetAPI.interact(3, InterfaceID.Bankmain.ITEMS, slot, id);
}
else if(amount == 10) {
WidgetAPI.interact(4, InterfaceID.Bankmain.TABS_LINE0, slot, id);
WidgetAPI.interact(4, InterfaceID.Bankmain.ITEMS, slot, id);
}
else if(amount == -1) {
WidgetAPI.interact(7, InterfaceID.Bankmain.TABS_LINE0, slot, id);
WidgetAPI.interact(7, InterfaceID.Bankmain.ITEMS, slot, id);
}
else {
WidgetAPI.interact(5, InterfaceID.Bankmain.TABS_LINE0, slot, id);
WidgetAPI.interact(5, InterfaceID.Bankmain.ITEMS, slot, id);
}
}

Expand Down Expand Up @@ -406,21 +405,21 @@ else if(amount == -1) {
* Deposits all items from the containers in inventory into the bank.
*/
public static void depositAllContainers() {
WidgetAPI.interact(1, InterfaceID.Bankmain.QUANTITYALL_TEXT, -1, -1);
WidgetAPI.interact(1, InterfaceID.Bankmain.DEPOSITCONTAINERS, -1, -1);
}

/**
* Deposits all items from the inventory into the bank.
*/
public static void depositAll() {
WidgetAPI.interact(1, InterfaceID.Bankmain.PLACEHOLDER_GRAPHIC, -1, -1);
WidgetAPI.interact(1, InterfaceID.Bankmain.DEPOSITINV, -1, -1);
}

/**
* Deposits all items from the equipment into the bank.
*/
public static void depositEquipment() {
WidgetAPI.interact(1, InterfaceID.Bankmain.SEARCH_GRAPHIC, -1, -1);
WidgetAPI.interact(1, InterfaceID.Bankmain.DEPOSITWORN, -1, -1);
}

/**
Expand Down