Jump to content

bank.depositAllExcept spam clicking deposit all button


Trivial

Recommended Posts

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.

 

9r4rsjE.png

 

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 by Damighty
Link to comment
Share on other sites


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;

Link to comment
Share on other sites

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.

 

9r4rsjE.png

 

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...