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.

Why is this code lagging/crashing my script?

Featured Replies

As soon as it collects the chaos rune, it starts lagging and giving null point exception errors. I have NO idea why. Can anyone shed some light please? :/

	@Override
	public int onLoop() throws InterruptedException {

		GroundItem cRune = getGroundItems().closest("Chaos rune");

		if (cRune.isVisible() && cRune != null) {
			cRune.interact("Take");
			Sleep.sleepUntil(() -> !cRune.isVisible(), 1000);
		} else {
			getWorlds().hopToF2PWorld();
			sleep(random(500, 1500));
		}
		return 700;
	}

 

  • Author
7 minutes ago, Gunman said:

@Lol_marcus Try swapping the .isVisible() and null check around in the first if statement. And your sleep condition may also throw an NPE. If it does just change it out with !cRune.Exists()

Did both and it seems to have stabilized. Thanks for that. :)

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.