Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

LogoutTab logout not working

Featured Replies

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?

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

  • Author

the reason im not using that is because i already tried that first and it still didnt work

 

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
		}
	}
}

 

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

5 minutes ago, Shudsy said:

Stop(); logs you out

Ah yeah, It has a boolean method whether to stay logged in or not

  • 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 by roguehippo

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.

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 by The Undefeated

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.