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.

Sleep is broken

Featured Replies

So i am currently in the making of a script which interacts with an object. And it keeps on spam clicking the object. I have the code below after my interaction with the object.

sleep(random(4000, 7000)); 

Even after using the code above it will spam click every 1 seconds.

 

 

So i am currently in the making of a script which interacts with an object. And it keeps on spam clicking the object. I have the code below after my interaction with the object.

sleep(random(4000, 7000)); 

Even after using the code above it will spam click every 1 seconds.

 

Are you sure its not the rest of your code? :xdoge:

  • Author

Are you sure its not the rest of your code? 78ZISi3.png

 

 

show the rest of the code

 

 

It works just fine smile.png

 

Show us your code ^^

 

This is from my stealing state

Entity chest = objects.closest("Chest");
			if (!myPlayer().isAnimating() && chest != null) {
			chest.interact("Search for traps");
			sleep(random(4000, 7000));
			}

I'm very inexperienced when it comes to coding but i'm going to take a guess maybe the sleep line doesn't trigger because the interacting makes the if statement false? :s

This is from my stealing state

Entity chest = objects.closest("Chest");
			if (!myPlayer().isAnimating() && chest != null) {
			chest.interact("Search for traps");
			sleep(random(4000, 7000));
			}

I'm very inexperienced when it comes to coding but i'm going to take a guess maybe the sleep line doesn't trigger because the interacting makes the if statement false? :s

 

The bot isn't checking for traps either right? It's because your if statement conditional isn't resolving to true, and you have code after this block that's actually doing the spam clicking. 

Problem has been fixed.

 

OSBot seemed to be using an old version of the script (that didn't contain the sleep).

 

Deleting OSBot folder and rebuilding script solved it.

Create an account or sign in to comment

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.