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.

Osbot ignoring delays

Featured Replies

When i run the script, in the beginning it is fine, everything is happening like it is supposed, delays are working just fine, but after like 10-20 mins script start glitching (looks like it is running without any delays, just spam clicking every single task etc.) when i RR script everything is working fine again. Kinda interesting. Script im using for delay -

Quote

 void randomDelay(float min, float max){
            int random = (int)(max * Math.random() + min);
            try 
            {
                sleep(random);
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

 

I would say it's you silly random delay that is glitching out. Just use static sleep.

15 minutes ago, Nikoman said:

When i run the script, in the beginning it is fine, everything is happening like it is supposed, delays are working just fine, but after like 10-20 mins script start glitching (looks like it is running without any delays, just spam clicking every single task etc.) when i RR script everything is working fine again. Kinda interesting. Script im using for delay -

 

Seems like your sleeps are being interrupted. Why, idk.

  • Author
15 minutes ago, Wife said:

I would say it's you silly random delay that is glitching out. Just use static sleep.

Isn't that too sketchy that every single time the delay is exact,for example, 500ms ...? Btw maybe you or @dreameo have some good random delay scripts, that are working fine?

6 minutes ago, Nikoman said:

Isn't that too sketchy that every single time the delay is exact,for example, 500ms ...? Btw maybe you or @dreameo have some good random delay scripts, that are working fine?

(200, 700)

  • Author

Sleep(random) works well. Thank you guys, can close this topic . :)

void randomDelay(float min, float max){
            int random = (int)(max * Math.random() + min);
            try 
            {
                sleep(random);
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

@Nikoman you don't need to create a whole new method just for this, you don't need to declare a local variable and you don't need to use the Math class to get a random number. Everything can be done using the OSBot API in one line:

sleep(random(min, max));

Why are you using float types?

Why aren't you using conditional sleeps?

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.