yeldarb Posted July 6, 2023 Share Posted July 6, 2023 (edited) Hello everyone this is my first post! So thank you for sharing this experience with me! Start off, big shout out to all the devs at OSBot keeping this thing stable!! Im currently working on a AIO Script. It incorporates each script ive wrote basically into one. I want to beable to have a fresh account and start the bot and have it go from tut island, to maxed main. Currently im running into issues creating a setup to call each script. Id really rather prefer not to use OSBots built in methods to queue scripts. Id like to use my RunnerScript as a "main hub", and execute from that while maintaining it in the background until the "Task" is complete and ready for another script. Im trying to have RunnerScript do the following: public RunnerScript extends Script { Miner miner; Script currentScript; @Override public void onStart(){ miner = new Miner(); currentScript = miner; } @Override public int onLoop() throws InterruptedException { currentScript.onLoop(); return 100; } } public Miner extends RunnerScript { public int onLoop(){ //Not Override method ... } public void onStart(){ //Not Override method ... } } Currently I have each script extending my RunnerScript, as a sort of MethodProvider. Although I keep getting ScriptExecutor, and ThreadPoolExecutor errors everytime it calls onLoop(), onStart(), etc... at com.yeldarb.Script.AIOScript.onStart(RunnerScript.java:40) //getMinerScript().onStart(); at org.osbot.rs07.event.ScriptExecutor.IiiIIiiiIiI(jl:531) at org.osbot.rs07.event.ScriptExecutor.start(jl:463) at org.osbot.LPT5.IiiIiiIIIIi(iw:176) at org.osbot.LPT1.IiiIiiIIIIi(su:519) 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) Thank you so much!! Sincerely, Yeldard Edited July 6, 2023 by yeldarb Fixing indentation in code blocks Quote Link to comment Share on other sites More sharing options...
Gunman Posted July 6, 2023 Share Posted July 6, 2023 @yeldarb Need to exchange context miner.exchangeContext(getBot()); 1 1 Quote Link to comment Share on other sites More sharing options...
yeldarb Posted July 12, 2023 Author Share Posted July 12, 2023 On 7/6/2023 at 8:54 AM, Gunman said: @yeldarb Need to exchange context miner.exchangeContext(getBot()); Thank you so much! That plus overriding exchangeContext to provide my TaskManager with the bot instance made it work like a charm! Thank you so much. Ill have to post a writeup shortly on my "setup". Im so excited to start adding scripts into this AIO! 1 Quote Link to comment Share on other sites More sharing options...