Jump to content

Banking at GE


Recommended Posts

Posted

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));
                
            }
        }

 

Posted

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

Posted
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

Posted
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?

Posted
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... 

Posted
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

Posted (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 by Dab in a Lab

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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