Alakazizam Posted September 20, 2023 Share Posted September 20, 2023 So SOMETIMES my game takes a minuet to load up after putting in the login info and it seems like the handler stops before selecting the 'play now' button and it just stays stuck. I tried adding a check to see if the Play Now widget is not visible before running the main part of my script and if it is, interact with it. But it for some reason is not interacting with it. Any advice from you lovely people? Quote Link to comment Share on other sites More sharing options...
Alakazizam Posted September 20, 2023 Author Share Posted September 20, 2023 @Override public int onLoop() throws InterruptedException { if(getWidgets().get(378, 74) == null || !getWidgets().get(378, 74).isVisible()) { // my script } else { mouse.click(random(290, 480), random(305, 370), false); } return 602; } I just tried changing the widget interact to a mouse click and its just not doing anything. That particular widget is the "Play Now" button Quote Link to comment Share on other sites More sharing options...
Delivery Posted September 20, 2023 Share Posted September 20, 2023 try logging or printing, Is it the widget not being found? Try running this, Haven't tested it but it might work if (getWidgets().getWidgetContainingText("CLICK HERE TO PLAY") != null) { // Requires mouse click getWidgets().getWidgetContainingAction("Play").interact("Play"); } 1 Quote Link to comment Share on other sites More sharing options...
Alakazizam Posted September 20, 2023 Author Share Posted September 20, 2023 (edited) 35 minutes ago, xcx said: try logging or printing, Is it the widget not being found? Try running this, Haven't tested it but it might work if (getWidgets().getWidgetContainingText("CLICK HERE TO PLAY") != null) { // Requires mouse click getWidgets().getWidgetContainingAction("Play").interact("Play"); } Made updates, now we wait lol Edit: Still no luck, it's not seeing the widget for some reason. Edited September 20, 2023 by Alakazizam Quote Link to comment Share on other sites More sharing options...
Delivery Posted September 20, 2023 Share Posted September 20, 2023 42 minutes ago, Alakazizam said: Made updates, now we wait lol Edit: Still no luck, it's not seeing the widget for some reason. are you sure that the code in the onLoop is being reached? also Explv says disable random events if you overwrite it, Looks like he grabs the PLAY NOW text widget too haven't made my own yet though so can't really help much more Quote Link to comment Share on other sites More sharing options...
Alakazizam Posted September 20, 2023 Author Share Posted September 20, 2023 2 hours ago, xcx said: are you sure that the code in the onLoop is being reached? also Explv says disable random events if you overwrite it, Looks like he grabs the PLAY NOW text widget too haven't made my own yet though so can't really help much more Yeah it was in the onLoop. I changed it to look for a widget containing "Welcome to Old School RuneScape" and mouse click in the area containing the click here to play button and it seems to be running smoothly. Been semi monitoring it. Quote Link to comment Share on other sites More sharing options...
Alakazizam Posted September 20, 2023 Author Share Posted September 20, 2023 Nevermind. Still hanging up. Last few messages on the log are [INFO][Bot #1][09/20 02:01:40 AM]: Started random solver : Auto Login [INFO][Bot #1][09/20 02:01:48 AM]: Successfully logged in, waiting for welcome screen. [INFO][Bot #1][09/20 02:02:13 AM]: Login completion failed. Then it runs my onStart but the window is still up to click play and my checks to see if the widgets are there are saying they aren't Quote Link to comment Share on other sites More sharing options...
Delivery Posted September 20, 2023 Share Posted September 20, 2023 4 hours ago, Alakazizam said: Nevermind. Still hanging up. Last few messages on the log are [INFO][Bot #1][09/20 02:01:40 AM]: Started random solver : Auto Login [INFO][Bot #1][09/20 02:01:48 AM]: Successfully logged in, waiting for welcome screen. [INFO][Bot #1][09/20 02:02:13 AM]: Login completion failed. Then it runs my onStart but the window is still up to click play and my checks to see if the widgets are there are saying they aren't enable -debug when you launch and see if any null errors are being thrown somewhere and not being logged Quote Link to comment Share on other sites More sharing options...
Alakazizam Posted September 20, 2023 Author Share Posted September 20, 2023 10 hours ago, xcx said: enable -debug when you launch and see if any null errors are being thrown somewhere and not being logged Is this something I can do in OSBot or are you talking about the IDE debug? Can't find a debug option on the client Quote Link to comment Share on other sites More sharing options...
Delivery Posted September 21, 2023 Share Posted September 21, 2023 2 hours ago, Alakazizam said: Is this something I can do in OSBot or are you talking about the IDE debug? Can't find a debug option on the client when you launch add the cli args -debug or --debug can't remember if cli accepts 1 or 2 - 's But I've had troubles in the past where it would print to the debugger for errors instead of the log 1 Quote Link to comment Share on other sites More sharing options...