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.

switching case if store contains items

Featured Replies

You can write it like this -

private String items[] = new String[] {"item1", "item2", "item3", };


private State getState()   {			
		if(getStore().isOpen()) {
			if(getStore().getAmount(items) <= 0) {				
				return State.HOP;
			}
		}
		if(inventory.isFull()) {
			return State.BANK;
		}
		return State.SHOP;
	}

Inside the bank script you could put an if statement ascertain whether or not your character is at the bank, such as

case BANK: 
    if(whateverbank.contains(myPlayer())) {
       check if bank is open, deposit stuff etc..
    } 
    else {
       walk to bank
    } 
  • Author

 

You can write it like this -

private String items[] = new String[] {"item1", "item2", "item3", };


private State getState()   {			
		if(getStore().isOpen()) {
			if(getStore().getAmount(items) <= 0) {				
				return State.HOP;
			}
		}
		if(inventory.isFull()) {
			return State.BANK;
		}
		return State.SHOP;
	}

Inside the bank script you could put an if statement ascertain whether or not your character is at the bank, such as

case BANK: 
    if(whateverbank.contains(myPlayer())) {
       check if bank is open, deposit stuff etc..
    } 
    else {
       walk to bank
    } 

got banking, walking to and from shop to bank down

 

private State getState() {
if (Shop.contains(myPlayer()) && !inventory.isFull())
return State.BUY;
if (!deposit.contains(myPlayer()) && inventory.isFull())
return State.WALK_BANK;
if (deposit.contains(myPlayer()) && inventory.isFull())
return State.BANK;
if (!Shop.contains(myPlayer()) && !inventory.isFull())
return State.WALK_SHOP;
if (store.isOpen()) {
if (store.getAmount(items) <= 0) {
return State.HOP;
}
}
return State.WAIT;
}

 

got banking, walking to and from shop to bank down

private State getState() {
if (Shop.contains(myPlayer()) && !inventory.isFull())
return State.BUY;
if (!deposit.contains(myPlayer()) && inventory.isFull())
return State.WALK_BANK;
if (deposit.contains(myPlayer()) && inventory.isFull())
return State.BANK;
if (!Shop.contains(myPlayer()) && !inventory.isFull())
return State.WALK_SHOP;
if (store.isOpen()) {
if (store.getAmount(items) <= 0) {
return State.HOP;
}
}
return State.WAIT;
}

 

Look on skype

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.