Jump to content

Logout + Sleep


DylanSRT

Recommended Posts

Hi everyone,

I'm trying to get my farming/birdhouse scripts to logout and sleep for a certain amount of time before re initializing the AutoLogin function. At the current moment I have just been having it chill in bank and change tabs every few minutes.

So I tried using something like this:

logoutTab.logout();
sleep(3000000); //3m is 50mins in milliseconds

So right after it logs out, it tries to log back in with the auto logger (before completing the rest of the loop with the sleep). 

Has anyone done this successfully? Am I missing something?

Edit: would be great if we could get a logoutSleep(int seconds) method for the logoutTab api. Seems like something that would be useful to most scripters

Edited by DylanSRT
Link to comment
Share on other sites

11 minutes ago, DylanSRT said:

Hi everyone,

I'm trying to get my farming/birdhouse scripts to logout and sleep for a certain amount of time before re initializing the AutoLogin function. At the current moment I have just been having it chill in bank and change tabs every few minutes.

So I tried using something like this:


logoutTab.logout();
sleep(3000000); //3m is 50mins in milliseconds

So right after it logs out, it tries to log back in with the auto logger (before completing the rest of the loop with the sleep). 

Has anyone done this successfully? Am I missing something?

Edit: would be great if we could get a logoutSleep(int seconds) method for the logoutTab api. Seems like something that would be useful to most scripters

You have to override the default login handler with something like this 

Then use the CLI to launch the script with

-allow norandoms

 

 

  • Like 3
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...