February 16, 20187 yr Hey'a everyone, I can't find a way to log out wait some time then log back in, the code I have so far is: getLogoutTab().logOut(); // Logs out sleep(random(25000, 30000)); // Ignore the time I'll change this later AutoLogin(); // <------------ this doesn't work for some reason and just comes up with an error 'AutoLogin();' is what is used on the OSBOT documentation. Thanks for any response -Flewis
February 16, 20187 yr I believe it should login automatically after that sleep. Edited February 16, 20187 yr by Jammer
February 16, 20187 yr AutoLogin() isn't a method, it's the initializer for a class. Your script only runs when your fully logged into the game to prevent new scripters from easily throwing null pointers and crashing the client. I'd suggest first learning a bit of Java and how objects are constructed before attempting to do something like this. If you still want to go ahead without learning the necessary knowledge, you will need to start OSBot with -norandoms enabled so you can execute code at the login screen.
February 16, 20187 yr You need to create your own login handler class or use Explvs if you want to do that. A lot more code to it then just sleeping when you log out
February 16, 20187 yr Author 35 minutes ago, Alek said: AutoLogin() isn't a method, it's the initializer for a class. Your script only runs when your fully logged into the game to prevent new scripters from easily throwing null pointers and crashing the client. I'd suggest first learning a bit of Java and how objects are constructed before attempting to do something like this. If you still want to go ahead without learning the necessary knowledge, you will need to start OSBot with -norandoms enabled so you can execute code at the login screen. Yeah sorry that was me just being stupid, thank you for the heads up I am fairly new to scripting in Java and I have gone pretty big for a first project but everything has been successful so far. Also how do I start OSBOT with -norandoms? 26 minutes ago, Juggles said: You need to create your own login handler class or use Explvs if you want to do that. A lot more code to it then just sleeping when you log out Okay thank you, could you link me to Explv's login handler class, he has so many resources. Edited February 16, 20187 yr by flewis
Create an account or sign in to comment