As the title says I can't seem to get my bot to walk to the castlewars doors and open them if they are closed.
Basically I need my guy to walk to the castlewars doors if my inventory is full and open them if they are closed. So far this is all I have after my code for banking.
P.S: I'm just starting out so I might be making obvious/stupid mistakes please take it easy on me
--------------------------------------------------------------
if (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));
}
}
I made a Door Area (the two squares in front of the doors) so that after the inventory is full it will walk to the Doors. However as you can see I don't have a way of saying something like:
if (!largedoors.isOpen)
largedoor.interact("Open");
so that if the doors are closed it will open them.
If you read this far then thanks, I know it might be confusing but I've tried a few different things and can't seem to get it to work.