Jump to content

need help again..


combat_acc
 Share

Recommended Posts

getBank().enableMode(Bank.BankMode.WITHDRAW_NOTE);
new ConditionalSleep(10000) {
	@[member='Override']

	public boolean condition() throws InterruptedException {
		return getBank().getWithdrawMode() == Bank.BankMode.WITHDRAW_NOTE;
	}
}.sleep();
getBank().withdrawAll("Shortbow");
new ConditionalSleep(10000) {
	@[member='Override']

	public boolean condition() throws InterruptedException {
		return !getBank().contains("Shortbow");
	}
}.sleep();

Here, this should work. Rather than having a random sleep after withdrawing, try using a conditional sleep. This will make it so it only sleeps as long as it needs to. 

 

EDIT: Encapsulate the bankmode stuff into an if statement as shown in Lewis's reply.

Edited by PlagueDoctor
Link to comment
Share on other sites

like so: (feel free to correct me)
final String BANK_BOOTH = "Banker";
NPC bankbooth = npcs.closest(BANK_BOOTH);

if (!bank.isOpen()) {
	bankbooth.interact("Bank");
	new ConditionalSleep(10000) {
		@[member='Override']
		public boolean condition() throws InterruptedException {
			return bank.isOpen();
		}
	}.sleep();
} else if (bank.isOpen()) {
if (!getBank().getWithdrawMode().equals(BankMode.WITHDRAW_NOTE)) {
getBank().enableMode(BankMode.WITHDRAW_NOTE);
new ConditionalSleep(10000) {
		@[member='Override']
		public boolean condition() throws InterruptedException {
			return getBank().getWithdrawMode().equals(BankMode.WITHDRAW_NOTE);
		}
	}.sleep();
} else if (bank.contains("Shortbow") && getBank().getWithdrawMode().equals(BankMode.WITHDRAW_NOTE)) {
bank.withdraw("Shortbow", AMOUNT);
new ConditionalSleep(10000) {
	@[member='Override']
	public boolean condition() throws InterruptedException {
		return inventory.contains("Shortbow");
	}
}.sleep();
}
}

 

Edited by Lewis
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

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