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.

Handling lag?

Featured Replies

Hey, I made a post about this before, but here's another question. When I run 4-8 clients on one pc, scripts (generally) behave correctly. 

I tested then 35 clients on a pc and scripts start being stuck, etc.

To see what's up, I did a little test and noticed that the usual response time of methods is greatly increased, example:

1. Trade player

2. sleep 200ms.

2. loop -> log trade.isCurrentlyTrading(); => FALSE

3. After 1.8 secs => TRUE.

 

This applies to almost all methods.

So my question again is, how do you handle such inconsistency except by adding longer sleeps?

P.S. I use conditional sleeps, but that can't be applied everywhere.

Thanks!

Edited by Johnxtrem

1. If you think your scripts are starting to get stuck somewhere, since it's a private script, you can add longer sleeps to fit your needs. That's where trial and error comes into play for making a possibly flawless scripts. 

2. Especially for mule trades, it's advisable to make use of conditional sleeps.

3. If you lag is an issue, just add a longer sleep time, i don't see any harm to it. It's better than a stucked script.

You can definitely use conditional sleeps here.

if (trade.isCurrentlyTrading()) {
 	//do trade stuff 
} else {
	if (trade player) {//if we successfully try to trade with the player
		new ConditionalSleep(10000) {//sleep for 10 seconds or until condition is met
			@Override
			public boolean condition() throws InterruptedException {
				return trade.isCurrentlyTrading();
			}
		}
	}
}

 

As d0zza stated, conditional sleeps, conditional loops, checking the results of those sleeps and loops, checking the results of actions, etc. 

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.