Jar Posted January 4, 2019 Share Posted January 4, 2019 Do you need VIP to run local scripts, because my scripts onLoop doesn't seem to execute? I can run the script, and the onStart log outputs, but the onLoop doesn't? Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted January 4, 2019 Share Posted January 4, 2019 Can you show your script? Quote Link to comment Share on other sites More sharing options...
Spider Scripts Posted January 4, 2019 Share Posted January 4, 2019 (edited) no you don't need VIP to run local scripts, probably something in the code you wrote Edited January 4, 2019 by Spider Quote Link to comment Share on other sites More sharing options...
Veni Posted January 4, 2019 Share Posted January 4, 2019 Check the scope of your onloop in the class file or if you're relying on conditional execution that the criteria is being met? Quote Link to comment Share on other sites More sharing options...
Jar Posted January 4, 2019 Author Share Posted January 4, 2019 (edited) 33 minutes ago, Aftermath said: Check the scope of your onloop in the class file or if you're relying on conditional execution that the criteria is being met? import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(name = "ScriptTest", author = "Jar", version = 1.0, info = "", logo = "") public class ScriptTest extends Script { @Override public void onStart() { log("ScriptTest has started!"); } @Override public void onExit() { log("ScriptTest has ended!"); } @Override public int onLoop() { log("started loop"); return 100; //The amount of time in milliseconds before the loop starts over } @Override public void onPaint(Graphics2D g) { //This is where you will put your code for paint(s) } } I wasn't sure if I had to execute onLoop by calling it in onStart, but then every script I've seen doesn't do that, it just simply writes tasks within onLoop & they're executed simultaneously. Edited January 4, 2019 by Jar Quote Link to comment Share on other sites More sharing options...
Veni Posted January 4, 2019 Share Posted January 4, 2019 (edited) 1 hour ago, Jar said: import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(name = "ScriptTest", author = "Jar", version = 1.0, info = "", logo = "") public class ScriptTest extends Script { @Override public void onStart() { log("ScriptTest has started!"); } @Override public void onExit() { log("ScriptTest has ended!"); } @Override public int onLoop() { log("started loop"); return 100; //The amount of time in milliseconds before the loop starts over } @Override public void onPaint(Graphics2D g) { //This is where you will put your code for paint(s) } } I wasn't sure if I had to execute onLoop by calling it in onStart, but then every script I've seen doesn't do that, it just simply writes tasks within onLoop & they're executed simultaneously. You're correct, no need to execute onLoop through onStart, it handles it by itself. Are you sure that you're running the correct output file (not sure if you've maybe made changes)? I've run exactly what you posted and it is logging the loop output. Edited January 4, 2019 by Aftermath Quote Link to comment Share on other sites More sharing options...
Jar Posted January 4, 2019 Author Share Posted January 4, 2019 13 minutes ago, Aftermath said: You're correct, no need to execute onLoop through onStart, it handles it by itself. Are you sure that you're running the correct output file (not sure if you've maybe made changes)? I've run exactly what you posted and it is logging the loop output. I forgot to refresh my scripts in the selector Thanks for your time & help though :). Quote Link to comment Share on other sites More sharing options...