Jump to content

Keeping script logged out


Team Cape

Recommended Posts

As far as I've heard, unregistering the hook for the login random event is impossible now because unregistering hooks was taken out. 2 questions:

 

 

  1. Will the randomeventhandler override a sleep?

  2. If not, is there any way to manually create a 'break' within the script?

Edited by Imateamcape
Link to comment
Share on other sites

didnt mean overriding in that sense. was asking if it takes priority over sleeping. don't know why you would assume that type of overriding because it clearly has nothing to do with this (??)

 

if u feel like acting smart though, might as well actually help?

 

I think you have the wrong idea. Although your reaction of self defense might be a result of some insecurities. 

I was pointing out that those two words you used are the solution.

You need to override the break handler.

public void enableLoginManager() {

		script.log("Enabling Login Manager!");

		script.getBot().getRandomExecutor().registerHook(new RandomBehaviourHook(RandomEvent.AUTO_LOGIN) {
			public boolean shouldActivate() {
				return super.shouldActivate();
			}

			public boolean shouldActivatePreLoop() {
				return super.shouldActivatePreLoop();
			}

			public boolean shouldActivatePostLoop() {
				return super.shouldActivatePreLoop();
			}
		});

	}

	public void disableLoginManager() {

		script.log("Disabled Login Manager!");

		script.bot.getRandomExecutor().registerHook(new RandomBehaviourHook(RandomEvent.AUTO_LOGIN) {
			public boolean shouldActivate() {
				return false;
			}

			public boolean shouldActivatePreLoop() {
				return false;
			}

			public boolean shouldActivatePostLoop() {
				return false;
			}
		});

	}

  • Like 2
Link to comment
Share on other sites

 

I think you have the wrong idea. Although your reaction of self defense might be a result of some insecurities. 

I was pointing out that those two words you used are the solution.

You need to override the break handler.

 

my bad m8. that was my point though. as far as i know, doing that has been disabled. at least that was what i was told on a similar thread around a month ago

Link to comment
Share on other sites

my bad m8. that was my point though. as far as i know, doing that has been disabled. at least that was what i was told on a similar thread around a month ago

 

works as of today boge.png 

It was something else they changed i have read about it too, don't remember what exactly

Note: from my experience when you tell the script to log out with the osbot api the actualy loop will pause too meaning to re-enable login manager to log in you have to find  a way to check when to re-enable.

 

option 1) use your paint loop to check emote3.png

option 2) create a "login manager" thread which checks when to log in.

Edited by House
  • Like 1
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...