Trivial Posted February 22, 2015 Posted February 22, 2015 (edited) When I have tunas and swordfish in my inventory, using this method the bot first right click deposit all's the tunas and after that spam clicks the deposit all button inside the actual bank window until all the swordfish are in the bank. Is it a bug or something that im doing wrong? Heres the code: if (!s.bank.isOpen()) { if (bankbooth != null) { if (bankbooth.isVisible()) { if (!s.myPlayer().isMoving()) { bankbooth.interact("Bank"); Script.sleep(Script.random(800, 1600)); } } else { s.camera.toEntity(bankbooth); } } } else { s.bank.depositAllExcept(Main.TOOL_ID); } Edited February 22, 2015 by Damighty
Khaleesi Posted February 22, 2015 Posted February 22, 2015 What is your code to trigger this piece of code? Since this hasn't any issues in it. Khaleesi
Trivial Posted February 22, 2015 Author Posted February 22, 2015 private State getState() { if (inventory.isFull()){ return State.BANK; } else { return State.FISH; } } case BANK: if (Bank.contains(myPlayer())) { status = "Banking"; new Banking(this); //OP is the banking class } else { sleep(random(500,750)); status = "Walking to bank"; if (Docks1.contains(myPlayer())) { localWalker.walkPath(WalkToBFrom1); } else if (Docks2.contains(myPlayer())) { localWalker.walkPath(WalkToBFrom2); } } break;
Isolate Posted February 22, 2015 Posted February 22, 2015 add a sleep after the button interaction When I have tunas and swordfish in my inventory, using this method the bot first right click deposit all's the tunas and after that spam clicks the deposit all button inside the actual bank window until all the swordfish are in the bank. Is it a bug or something that im doing wrong? Heres the code: if (!s.bank.isOpen()) { if (bankbooth != null) { if (bankbooth.isVisible()) { if (!s.myPlayer().isMoving()) { bankbooth.interact("Bank"); Script.sleep(Script.random(800, 1600)); } } else { s.camera.toEntity(bankbooth); } } } else { s.bank.depositAllExcept(Main.TOOL_ID); } and why isn't Script.sleep(Script.random(800, 1600)); //--------------------------------------- s.sleep(Script.random(800, 1600)); like the rest of them?
Trivial Posted February 22, 2015 Author Posted February 22, 2015 add a sleep after the button interaction and why isn't Script.sleep(Script.random(800, 1600)); //--------------------------------------- s.sleep(Script.random(800, 1600)); like the rest of them? I tried adding a sleep, and all it did was it made the bot sleep after it deposit everything and spammed the deposit button. And using s.sleep just tells me that the static method sleep from MethodProvider should be accessed in a static way.
Lemons Posted February 22, 2015 Posted February 22, 2015 I tried adding a sleep, and all it did was it made the bot sleep after it deposit everything and spammed the deposit button. And using s.sleep just tells me that the static method sleep from MethodProvider should be accessed in a static way. I have also noticed this issue, using depositAllExcept() when none of the exceptions are in the inventory generally involves it spam clicking the deposit button 4-8 extra times in a fraction of a second.
Trivial Posted February 22, 2015 Author Posted February 22, 2015 I have also noticed this issue, using depositAllExcept() when none of the exceptions are in the inventory generally involves it spam clicking the deposit button 4-8 extra times in a fraction of a second. I was going to test the same thing by adding a condition to check that and use depositAll(), but was too lazy to do that. But now that you said it, its an easy fix. Thanks