Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with my first script

Featured Replies

Hi guys, I'm working on my first script ever, and I was wondering if you could help me with banking.

 

How do I tell the script to run to the bank and bank the goods when the bot's inventory is full?

 

 

 

Thanks,

Safron

add me on skype, we can maybe find out of something :)

  • Author

there's an issue with my ubuntu and I'm not currently able to install skype. I can talk in PM though.


if (inventory.isFull()) {

  if (!bank.isOpen())

       bank.open();

  else if (bank.isOpen()) {

       bank.depositAll();

       bank.close();

   }

 }

Look at what Acerd posted, this is for you to help with opening the bank.

To let it walk to the bank, you need to check if your inventory is full and your player is not in the bank area.

If the player is not in the bank area --> walking.webwalk(BANK_AREA):

If the player is in the bank area -->

Execute bank code

Paste with comments to explain things.

//we check if our inventory is full and we are in bank area.
if (getInventory().isFull() && Banks.VARROCK_WEST.contains(myPlayer())) {
    //We are in the bank are, doing banking.
    //check if bank is open
    if(getBank().isOpen()){
        //Bank open, we are depositing it
        getBank().depositAll();
    }else{
        //if bank is closed, open it.
        getBank().open();
    }
}else{
    //We are walking to the bank area, because we are not in it.
    getWalking().webWalk(Banks.VARROCK_WEST);
}

Raw paste:

if (getInventory().isFull() && Banks.VARROCK_WEST.contains(myPlayer())) {
    if(getBank().isOpen()){
        getBank().depositAll();
    }else{
        getBank().open();
    }
}else{
    getWalking().webWalk(Banks.VARROCK_WEST);
}

 

Good luck tongue.png

Edited by Vilius

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.