Nadr0j Posted October 22, 2022 Share Posted October 22, 2022 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! Quote Link to comment Share on other sites More sharing options...
Chris Posted October 22, 2022 Share Posted October 22, 2022 execute(webwalkevent); 1 Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted October 23, 2022 Share Posted October 23, 2022 (edited) 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 October 23, 2022 by Khaleesi Quote Link to comment Share on other sites More sharing options...
Rays Posted October 23, 2022 Share Posted October 23, 2022 Consider moving the execution of the WebWalking to your OnLoop if a condition is met (e.g. needToGoHome == true). Quote Link to comment Share on other sites More sharing options...