RS123 Posted May 29, 2018 Share Posted May 29, 2018 This code does not open or deposit items into the GE bank. Please help! Thank you. if (!bank.isOpen()) { NPC banker = npcs.closest("Banker"); if (banker != null) { if (banker.isOnScreen()) { banker.interact("Bank"); sleep(random(450,1000)); if (!getBank().isOpen()) { getBank().open(); } } else { camera.toEntity(banker); } } else { bank.depositAll(); sleep(random(250,450)); } } Quote Link to comment Share on other sites More sharing options...
ThatGamerBlue Posted May 29, 2018 Share Posted May 29, 2018 bank.open(); // insert shitty antiban sleep here bank().depositAll(); // insert more shitty antiban here bank().close(); done you dont need any of the specific banker interaction Quote Link to comment Share on other sites More sharing options...
Butters Posted May 29, 2018 Share Posted May 29, 2018 What errors are you getting? Easiest way to do it would be something like if (Banks.GRAND_EXCHANGE.constains(myPlayer()) { if (bank.isOpen) { bank.depositAll(); CONDITIONAL_SLEEP_UNTIL_INVENTORY_EMPTY // Search in forums for code to do this } else { try { bank.open(); } catch (Exception e) { } } } else { walking.webwalk(Banks.GRAND_EXCHANGE); } Didn't check code or syntax Quote Link to comment Share on other sites More sharing options...
RS123 Posted May 29, 2018 Author Share Posted May 29, 2018 @Butters No errors. It's just not executing. Quote Link to comment Share on other sites More sharing options...
RS123 Posted May 29, 2018 Author Share Posted May 29, 2018 28 minutes ago, Butters said: What errors are you getting? Easiest way to do it would be something like if (Banks.GRAND_EXCHANGE.constains(myPlayer()) { if (bank.isOpen) { bank.depositAll(); CONDITIONAL_SLEEP_UNTIL_INVENTORY_EMPTY // Search in forums for code to do this } else { try { bank.open(); } catch (Exception e) { } } } else { walking.webwalk(Banks.GRAND_EXCHANGE); } Didn't check code or syntax if (Banks.GRAND_EXCHANGE.contains(myPlayer())) { if (bank.isOpen()) { bank.depositAll(); new ConditionalSleep(1900, 5100) { @Override public boolean condition() throws InterruptedException { return true; } }; } else { try { bank.open(); } catch (Exception e) { } } } else { walking.webWalk(Banks.GRAND_EXCHANGE); } fixed some errors But it's not working Quote Link to comment Share on other sites More sharing options...
Butters Posted May 29, 2018 Share Posted May 29, 2018 7 minutes ago, RS123 said: if (Banks.GRAND_EXCHANGE.contains(myPlayer())) { if (bank.isOpen()) { bank.depositAll(); new ConditionalSleep(1900, 5100) { @Override public boolean condition() throws InterruptedException { return true; } }; } else { try { bank.open(); } catch (Exception e) { } } } else { walking.webWalk(Banks.GRAND_EXCHANGE); } fixed some errors But it's not working Replace conditional sleep with something like this new ConditionalSleep(5000 250) { @Override public boolean condition() throws InterruptedException { return inventory.isEmpty(); } }; And reading some examples/playing around would help. What's not working? Quote Link to comment Share on other sites More sharing options...
RS123 Posted May 29, 2018 Author Share Posted May 29, 2018 41 minutes ago, ThatGamerBlue said: bank.open(); // insert shitty antiban sleep here bank().depositAll(); // insert more shitty antiban here bank().close(); done you dont need any of the specific banker interaction I'm kinda new so I don't understand the antiban sleep thing... Quote Link to comment Share on other sites More sharing options...
RS123 Posted May 29, 2018 Author Share Posted May 29, 2018 8 minutes ago, Butters said: Replace conditional sleep with something like this new ConditionalSleep(5000 250) { @Override public boolean condition() throws InterruptedException { return inventory.isEmpty(); } }; And reading some examples/playing around would help. What's not working? Hmm... code didn't work. It will not open the grand exchange bank and deposit Quote Link to comment Share on other sites More sharing options...
Dab in a Lab Posted May 29, 2018 Share Posted May 29, 2018 (edited) I'd do something like NPC banker = npcs.closest("Banker"); if (banker != null) { banker.interact("Bank"); new ConditionalSleep( ) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen } }.sleep(); if getBank().isOpen() getBank().depositAll(); } Don't know whats up with the black lines Edited May 29, 2018 by Dab in a Lab Quote Link to comment Share on other sites More sharing options...