OELABOELA2 Posted August 31, 2018 Share Posted August 31, 2018 Hey guys, I'm trying to make the bot go to the login screen and wait a few minutes and then log back in. While it's idling I want to be able to poll a variable to check if it needs to login or not. I've searched and found things about custom login/break handlers etc etc but what would be the best option in this case? Quote Link to comment Share on other sites More sharing options...
FrostBug Posted August 31, 2018 Share Posted August 31, 2018 Solution to similar problem was reached here https://osbot.org/forum/topic/145813-pausing-autologin/ Quote Link to comment Share on other sites More sharing options...
OELABOELA2 Posted August 31, 2018 Author Share Posted August 31, 2018 1 hour ago, FrostBug said: Solution to similar problem was reached here https://osbot.org/forum/topic/145813-pausing-autologin/ I'm doing exactly that but it's throwing me one error which I can't figure out: java.lang.NullPointerException at org.osbot.rs07.script.RandomPainter.onPaint(uf:63) at org.osbot.rs07.canvas.WrappedCanvas.IiiiIiiIiiiI(se:158) at org.osbot.rs07.canvas.WrappedCanvas.getGraphics(se:65) at av.q(av.java:39) at client.an(client.java:1673) at am.ah(am.java:392) at am.run(am.java:346) at java.lang.Thread.run(Unknown Source) Quote Link to comment Share on other sites More sharing options...
FrostBug Posted August 31, 2018 Share Posted August 31, 2018 53 minutes ago, OELABOELA2 said: I'm doing exactly that but it's throwing me one error which I can't figure out: java.lang.NullPointerException at org.osbot.rs07.script.RandomPainter.onPaint(uf:63) at org.osbot.rs07.canvas.WrappedCanvas.IiiiIiiIiiiI(se:158) at org.osbot.rs07.canvas.WrappedCanvas.getGraphics(se:65) at av.q(av.java:39) at client.an(client.java:1673) at am.ah(am.java:392) at am.run(am.java:346) at java.lang.Thread.run(Unknown Source) Did you exchange bot context with your break manager? Quote Link to comment Share on other sites More sharing options...
OELABOELA2 Posted August 31, 2018 Author Share Posted August 31, 2018 33 minutes ago, FrostBug said: Did you exchange bot context with your break manager? Seems like exchanging the context fixed it. The method was depricated though? Quote Link to comment Share on other sites More sharing options...
FrostBug Posted August 31, 2018 Share Posted August 31, 2018 3 hours ago, OELABOELA2 said: Seems like exchanging the context fixed it. The method was depricated though? It's generally for internal use. The deprecation in this case does not imply that the method will be removed. Though since this is how you override a break manager, I would argue that the method should no longer be deprecated. Quote Link to comment Share on other sites More sharing options...