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.

NPE when attempting to webwalk. First script. Help a newbie

Featured Replies

Entire project code

@ScriptManifest(author = "Me", info = "test", logo = "", name = "example script", version = 1)
public class MyScript extends Script {
    @Override
    public int onLoop() throws InterruptedException{
        return 1;
    }

    @Override
    public final void onStart() throws InterruptedException{
        log("Homing");
        Area home = new Area(3249, 3237, 3246, 3240);
        WebWalkEvent webWalkEvent = new WebWalkEvent(home);
        webWalkEvent.execute();
    }
}

Exception

[INFO][Bot #1][10/22 01:15:44 PM]: Homing
[ERROR][Bot #1][10/22 01:15:44 PM]: Error in script onStart(): example script
java.lang.NullPointerException: Cannot invoke "org.osbot.rs07.Bot.getEventExecutor()" because "IiiIIiIiiIi.bot" is null
	at org.osbot.rs07.script.MethodProvider.execute(di:569)
	at MyScript.onStart(MyScript.java:24)
	at org.osbot.rs07.event.ScriptExecutor.iiiIiiIiIII(ch:550)
	at org.osbot.rs07.event.ScriptExecutor.start(ch:366)
	at org.osbot.XB.iiiIIiIiiii(sr:93)
	at org.osbot.cA.iiiIIiIiiii(us:487)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
[INFO][Bot #1][10/22 01:15:44 PM]: Terminating script example script...
[INFO][Bot #1][10/22 01:15:44 PM]: Script example script has exited!

 

8 hours ago, Nadr0j said:

Entire project code

@ScriptManifest(author = "Me", info = "test", logo = "", name = "example script", version = 1)
public class MyScript extends Script {
    @Override
    public int onLoop() throws InterruptedException{
        return 1;
    }

    @Override
    public final void onStart() throws InterruptedException{
        log("Homing");
        Area home = new Area(3249, 3237, 3246, 3240);
        WebWalkEvent webWalkEvent = new WebWalkEvent(home);
        webWalkEvent.execute();
    }
}

Exception

[INFO][Bot #1][10/22 01:15:44 PM]: Homing
[ERROR][Bot #1][10/22 01:15:44 PM]: Error in script onStart(): example script
java.lang.NullPointerException: Cannot invoke "org.osbot.rs07.Bot.getEventExecutor()" because "IiiIIiIiiIi.bot" is null
	at org.osbot.rs07.script.MethodProvider.execute(di:569)
	at MyScript.onStart(MyScript.java:24)
	at org.osbot.rs07.event.ScriptExecutor.iiiIiiIiIII(ch:550)
	at org.osbot.rs07.event.ScriptExecutor.start(ch:366)
	at org.osbot.XB.iiiIIiIiiii(sr:93)
	at org.osbot.cA.iiiIIiIiiii(us:487)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
[INFO][Bot #1][10/22 01:15:44 PM]: Terminating script example script...
[INFO][Bot #1][10/22 01:15:44 PM]: Script example script has exited!

 

You should not execute any siuch heavy code that interacts with the game in the onStart method.
It's mainly for initlializing :)

execute(webwalkevent);

Edited by Khaleesi

Consider moving the execution of the WebWalking to your OnLoop if a condition is met (e.g. needToGoHome == true).

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.