whoknowshonestly Posted June 23, 2018 Share Posted June 23, 2018 (edited) Hi, I'm working on an AIO woodcutter as my first script. It chops and drops from 1-60, then banks yews at 60+. My problem is that I can't toggle shift click drop on either of my bots because the client seemingly misclicks on most of the logs and wont drop the majority of the inventory. Similarly in my banking script it sometimes talks to the banker instead of banking, and so I had to implement a workaround in case of it happening. Is this common? Is there a simple fix to this that I can check out as it would speed up my bots a decent amount. It works fine with normal dropping and the workaround but I'd love a solution to make it that bit better. Thanks in advance. EDIT TO ADD CODE: Dropping logs: private void dropWood(){ if (inventory.dropAllExcept("Bronze axe", "Steel axe", "Rune axe")){ new ConditionalSleep(100, 1000) { @Override public boolean condition() { return isInventoryEmpty(); } }.sleep(); } } Banking: private void bankWood() throws InterruptedException { if (getWalking().webWalk(Banks.GRAND_EXCHANGE)) { new ConditionalSleep(100, 1000) { @Override public boolean condition() { return isInBank(); } }.sleep(); } if (isInBank()) { if (!getBank().isOpen()) { if (getBank().open()){ new ConditionalSleep(100, 1000) { @Override public boolean condition() { return getBank().isOpen(); } }.sleep(); } } else if (getBank().isOpen()) { if (getBank().depositAllExcept("Bronze axe", "Steel axe", "Rune axe")) { new ConditionalSleep(100, 1000) { @Override public boolean condition() { return isInventoryEmpty(); } }.sleep(); } } } } Edited June 23, 2018 by whoknowshonestly Add code snippets Quote Link to comment Share on other sites More sharing options...
Eliot Posted June 23, 2018 Share Posted June 23, 2018 Seeing code would help. Quote Link to comment Share on other sites More sharing options...
whoknowshonestly Posted June 23, 2018 Author Share Posted June 23, 2018 6 minutes ago, Eliot said: Seeing code would help. I've put up the code for both the dropping and banking bits now. Quote Link to comment Share on other sites More sharing options...
dogetrix Posted June 23, 2018 Share Posted June 23, 2018 Your timeout time (100ms) for the ConditionalSleeps is shorter than the sleepTime (1 second). This might be causing some issues. From docs: Parameters: timeout - The specified time out. sleepTime - The time to sleep in milliseconds between timeout and conditions checks. 1 Quote Link to comment Share on other sites More sharing options...
whoknowshonestly Posted June 23, 2018 Author Share Posted June 23, 2018 4 minutes ago, dogetrix said: Your timeout time (100ms) for the ConditionalSleeps is shorter than the sleepTime (1 second). This might be causing some issues. From docs: Parameters: timeout - The specified time out. sleepTime - The time to sleep in milliseconds between timeout and conditions checks. Should it be more like (3000, 1000) instead? I'm going to give those numbers a shot and report back but if that's also a bad way to write it then let me know. Think I'm still misunderstanding sleep but other than that the code is coming together nicely. Quote Link to comment Share on other sites More sharing options...
Dab in a Lab Posted June 23, 2018 Share Posted June 23, 2018 (edited) Define either a RS2Object for a bank booth or an NPC for a banker. Have it like if (isInBank()) if (NPC/RS2Object != null) (NPC/RS2Object.interact("Bank")) Try adjust the conditional sleep, idk whats up with the misclicking. With the way you made the ConditionalSleep you're giving it 100ms to complete the task, so not allowing it enough time to drop everything may break it. I'd personally give it like (30000,1000). This will allow the bot 30 seconds to drop the inventory, and if it drops everything before the 30 seconds the "return getInventory().isEmpty();" will catch it 3 hours ago, whoknowshonestly said: Should it be more like (3000, 1000) instead? I'm going to give those numbers a shot and report back but if that's also a bad way to write it then let me know. Think I'm still misunderstanding sleep but other than that the code is coming together nicely. Edited June 23, 2018 by Dab in a Lab Quote Link to comment Share on other sites More sharing options...
whoknowshonestly Posted June 23, 2018 Author Share Posted June 23, 2018 45 minutes ago, Dab in a Lab said: Define either a RS2Object for a bank booth or an NPC for a banker. Have it like if (isInBank()) if (NPC/RS2Object != null) (NPC/RS2Object.interact("Bank")) Try adjust the conditional sleep, idk whats up with the misclicking. With the way you made the ConditionalSleep you're giving it 100ms to complete the task, so not allowing it enough time to drop everything may break it. I'd personally give it like (30000,1000). This will allow the bot 30 seconds to drop the inventory, and if it drops everything before the 30 seconds the "return getInventory().isEmpty();" will catch it I simplified some bits of the code after logging out the problem and it seems to be working now, fingers crossed. Thanks for your help. Quote Link to comment Share on other sites More sharing options...