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.

I don't understand this, im noob):

Featured Replies

Where I have the red line (This is Apa's tea thiever guide, was reading it line by line to try and learn)

Few questions,

1) Why does the script there say to drop when the inventory is empty (If this was correct in the tutorial ?)

2) I was gonna try and make my own walking to bank and walk back, would this be using the walk entity feature, or what part of the API do i utilize to try this? (Using the cake stall, and replaced the entity of tea stall with cake , thats it so far.

3)Why is the empty inventory in the onstart instead of onloop, is that to clear the inventory when the script is starting?

4) Maybe I missed this in the guide, what is "case" ?

f07534c2c43549ba80a9c44268660066.png

 

 

if (!getInventory().isEmpty()) {
    return State.Drop;
}

Means if the inventory is NOT empty. The ! is a negator to booleans

boolean bool = true;
if (bool) {
// do if true
}

if (!bool) {
//do if false
}

For walking I recommend using webWalker for longer distances where obstacles may be in your way

getWalking().webWalk(Banks.ARDOUGNE_SOUTH)

and for shorter distances where doors etc arent a problem use walk instead.

Edited by Hereweald

  • Author
if (!getInventory().isEmpty()) {
    return State.Drop;
}

Means if the inventory is NOT empty. The ! is a negator to booleans

boolean bool = true;
if (bool) {
// do if true
}

if (!bool) {
//do if false
}

I assumed the ! means opposite, but wouldnt it just be wrote along the lines of isntEmpty ?

inventory.isntempty

over

!inventory.isempty

Edited by Drewyboyo

I assumed the ! means opposite, but wouldnt it just be wrote along the lines of isntEmpty ?

inventory.isntempty

over

!inventory.isempty

 

http://www.osbot.org/api

 

Read through the API, .isntEmpty() isn't a method.

Switch basically means switch around the different cases so:

switch(random(1, 30)) {
case 1:
//do if random(1, 30) produces 1
    break;
case 2:
//do if random(1, 30) produces 2
    break;
}

So for this if getState() method returns the State State.DROP; then it will call the Drop case and execute whatever is written in there.

 

and i think you are misreading, its not in the onStart() it is its own method.

Edited by Hereweald

  • Author

No need to create a isntEmpty when you can just do !isEmpty 

so the ! is infront of isEmpty or inventory.. or both..

so the ! is infront of isEmpty or inventory.. or both..

! Basically means NOT, like !Inventory.isEmpty() means NOT empty.

Not knowing what '!' means is a pretty hard signal that you don't know much about Java. To be blunt, you need to learn a lot more before you will realistically know what you're doing.

  • Author

Not knowing what '!' means is a pretty hard signal that you don't know much about Java. To be blunt, you need to learn a lot more before you will realistically know what you're doing.

I already knew it meant like the opposite, but to me it didn't make sense how the ! is infront of inventory and not isempty, because then I read it as opposite of inventory and not opposite of is empty and thats why it was confusing me :b

Not knowing what '!' means is a pretty hard signal that you don't know much about Java. To be blunt, you need to learn a lot more before you will realistically know what you're doing.

You mean any programming language?

 

@OP, I'd read through some Java guides before attempting to make your own script. Just because it ends up working doesn't mean you won't get banned (more to do with the API than Java in general).

  • Author

You mean any programming language?

 

@OP, I'd read through some Java guides before attempting to make your own script. Just because it ends up working doesn't mean you won't get banned (more to do with the API than Java in general).

m8 im not worried about anti ban right now, no ones first script had antiban lol. everyone started somewhere.

m8 im not worried about anti ban right now, no ones first script had antiban lol. everyone started somewhere.

I'm not talking Anti-ban. I'm talking you mess up the script and your bot starts doing really obvious things a person wouldn't do.

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.