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

How to use ConditonalSleep

Featured Replies

Since I think it's important scripters do this instead of adding static sleeps here's a basic guide on how to use them.

 

The ConditonalSleep interface takes a timeout parameter as well as a condition method that requires overriding. When the sleep() method is invoked on the instantiated anonymous implementation it will sleep until either the timeout argument is met or the condition returns true. The condition method will return true if the condition was met before the specified timeout or false if the timeout has passed.

 

For example the following code will sleep until either 5000 milliseconds has passed or the condition method returns true, then return the value.

return new ConditionalSleep(5000) {
	@Override
	public boolean condition() throws InterruptedException {
		return sI.myPlayer().isAnimating();
	}
}.sleep();

Edited by Swizzbeat

I use the Timer class and do this, which is the same thing I assume. xd

time.reset();
while(time.isRunning() && script.myPlayer().isAnimating()) {
    MethodProvider.sleep(50);
}
  • Author

 

I use the Timer class and do this, which is the same thing I assume. xd

time.reset();
while(time.isRunning() && script.myPlayer().isAnimating()) {
    MethodProvider.sleep(50);
}

Not really needed since the API already provides this in many different ways:

 

d616578977ea1f4711cedadb5508bceb.png

Edited by Swizzbeat

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.