December 4, 20178 yr hello, im trying to logout when an enemy is seen. i can get to the log out function but when i call the code nothing happens. this is what im calling. if(logoutTab.logOut()) { sleep(150); pause(); } //logs out then pauses the script anyone got any ideas?
December 5, 20178 yr Just now, Muffins said: getLogoutTab().logOut(); use this, I believe it runs an event to open the logout tab, press the logout button, and stop the script. If your looking to pause the script and then log back in, you'd be better off using -norandoms and using your own login handler
December 5, 20178 yr Author the reason im not using that is because i already tried that first and it still didnt work
December 5, 20178 yr 12 minutes ago, Shudsy said: Tried using stop();? Stop doesn't logout, Just stops the script. Creating your own logout method wouldn't exactly be difficult though. if current tab != logout tab { // open logout tab } else { RS2Widget log = widget contains text "logout" if (log != null){ if (log.interact()){ // sleep until logged out } } }
December 5, 20178 yr 3 minutes ago, HeyImJamie said: Stop doesn't logout, Just stops the script. Creating your own logout method wouldn't exactly be difficult though. if current tab != logout tab { // open logout tab } else { RS2Widget log = widget contains text "logout" if (log != null){ if (log.interact()){ // sleep until logged out } } } Stop(); logs you out
December 5, 20178 yr 5 minutes ago, Shudsy said: Stop(); logs you out Ah yeah, It has a boolean method whether to stay logged in or not
December 5, 20178 yr Author i know stop() works, but i didnt want it to stop the script. It would probably work for now. and i could create my own method by why have the method in the client in the first place if it doesnt work. im checking to see if its somehow related to how im calling it. ANSWER: I feel dumb. Instead of returning the true or false return value it was just returning false. but now the problem is that it will not pause the script after calling "pause();" (i need it to stay logged out instead of just instantly logging back in) Edited December 5, 20178 yr by roguehippo
December 5, 20178 yr 3 hours ago, roguehippo said: i know stop() works, but i didnt want it to stop the script. It would probably work for now. and i could create my own method by why have the method in the client in the first place if it doesnt work. im checking to see if its somehow related to how im calling it. ANSWER: I feel dumb. Instead of returning the true or false return value it was just returning false. but now the problem is that it will not pause the script after calling "pause();" (i need it to stay logged out instead of just instantly logging back in) You could use a custom login handler instead then. Check out explv's one on the forums, it works very well.
December 5, 20178 yr 5 hours ago, roguehippo said: i know stop() works, but i didnt want it to stop the script. It would probably work for now. and i could create my own method by why have the method in the client in the first place if it doesnt work. im checking to see if its somehow related to how im calling it. ANSWER: I feel dumb. Instead of returning the true or false return value it was just returning false. but now the problem is that it will not pause the script after calling "pause();" (i need it to stay logged out instead of just instantly logging back in) Use a custom login handler for that or overwrite the break handler so it will break for x amount of time. Calling pause() is useless unless since you run a seperate thread to start it again. Edited December 5, 20178 yr by The Undefeated
Create an account or sign in to comment