Jump to content

LogoutTab logout not working


Recommended Posts

Posted

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?

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

 

Posted
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

Posted (edited)

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
Posted
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.

Posted (edited)
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

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...