(BANK_AREA.contains(player)) {
Entity bankchest = closestObject(BANK_CHEST_ID);
if (bank.isOpen()) {
bank.depositAllExcept(STEEL_AXE);
} else {
if (bankchest != null) {
if (bankchest.isVisible()) {
bankchest.interact("Use");
sleep(random(700, 800));
} else {
client.moveCameraToEntity(bankchest);
}
}else{
} walk(DOOR_AREA);
Entity largedoor = closestObjectForName(LARGE_DOOR);
if (largedoor != null) {
if (largedoor.isVisible()) {
largedoor.interact("Open");
sleep(random(600, 900));
}
}
One reason why it wont do anything, you have after one "} else {//nothing inbetween so it has no action to do here so it will not do anything. }"
I'll rewrite this code for you as well.
public int onLoop() throws InterruptedException {
Area bankArea = new Area(2444, 3086, 2441, 3082);
Area treeArea = new Area(2472, 3106, 2459, 3081);
//Checks if your in bank area and inventory is full it will bank for you.
if (client.getMyPlayer().isInArea(bankArea) && client.getInventory().isFull()) {
RS2Object bankChest = closestObjectForName("Bank chest");
if (client.getBank().isOpen()) {
client.getBank().depositAllExcept("Steel axe");
client.getBank().close();
} else {
if (bankChest != null && bankChest.exists()) {
if (bankChest.isVisible()) {
bankChest.interact("Use");
sleep(random(700, 800));
} else {
client.moveCameraToEntity(bankChest);
}
}
}
}
//Checks if your inventory isn't full and if your not a tree area it will walk you there.
//If the closed door it blocking you it will open it and walk threw otherwise ignores.
if (!client.getMyPlayer().isInArea(treeArea) && !client.getInventory().isFull()) {
RS2Object largeDoor = closestObject(2466, 2469);
walk(treeArea);
if (largeDoor != null && largeDoor.exists()) {
if (largeDoor.getPosition().distance(client.getMyPlayer().getPosition()) <= 4)
largeDoor.interact("Open");
sleep(random(600, 900));
}
}
//checks if in wcing area and area isn't full to woodcut
if (client.getMyPlayer().isInArea(treeArea) && !client.getInventory().isFull()) {
//Woodcutting method in here.
}
//will check if its not in bank area and inventory is full
if (!client.getMyPlayer().isInArea(bankArea) && client.getInventory().isFull()) {
//walking back to bank area here.
}
return 50;
}
}
There, Nice clean method loop untested but should work fine.