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.

This makes abso-fuckin-lutely no sense...

Featured Replies

stuck_zpsvkfax7im.png


So... even if it gets stuck in the while loop, it should log "check4" then immediately log "check5"

I am very fucking confused.  

Easy fix... just moved the "action=isAnimating" to the top of the while statement...  Just really not understanding what exactly happened here

 

You need brackets { and } around the statements you wish to loop or that while statement will only loop the statement below it. 

Without brackets around your code block after the while loop it will only use the next line ^^
So it makes a lot of sense actually ;)

 

Other things I see in here:
- Stop using while loops, Use the onLoop properly instead. (Basicly the onLoop is already a while loop you need)
- Stop using interactable or Entity classes, use RS2Object instead to get the Tree.
- Why are you saving the animation in a boolean? Could just put the animation check inside the statement. Saves you some memory
- if(action == true) can just be if(action) 

There is still room for a lot of improvements here, try to read some book about java and you'll understand it way way better.

Edited by Khaleesi

Apart from the cancer that is now in my eyes from the code, the above answer is correct. Java is different than python in this respect. Execute multiline chunks after for/while/if statements with brackets.

  • Author

Ahhh, I see... back when I learned java (err 10 years ago now?) there wasn't eclipse...  Compiling would only tell you the line that an error was on.  I thought the new software inserted the { } for you since it tabbed the things for you but I guess not.  

I tried starting with the boolean statement in the () but it gave me an error so I moved it to the outside, probably just typoed something.  

Thanks for the suggestions. Wouldn't it be more memory efficient to keep it in a while loop that simply checks for an action rather than re-running through the entire onLoop?  I also count each onLoop and use that for antiban properties so racking up that count uncontrollably wasn't really desired.  Have it take different paths, bank different, and going to have it examine random objects/right click players/hover stats/go off page and such every few hundred onLoops.

And to K9... This is my first program after not touching programming since Highschool.  I've managed to get a script capable of running error free with more anti-ban than most the scripts out there in 2 sessions that were a few hours long...  Instead of calling it cancer, make helpful suggestions like Khaleesi and Zeni did. Welcome the new member to the community.  Just because this is the internet doesn't mean it's necessary to be a dick. 

Please post in the scripting help section in the future if you have questions about scripting. This section is more for general updates on scripts people are making

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.