Jump to content

Logout + Sleep


Recommended Posts

Posted (edited)

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

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