Jump to content

LogoutTab logout not working


roguehippo

Recommended Posts

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?

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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