Jump to content

SOLVED Auto Login Delay help


Dqtreats

Recommended Posts

EDIT: Found an event login from a couple years ago, outdated but it halfway worked. Got it working! Thanks for those who helped!

 

So I am trying to make a script that will allow me to log in for 30 seconds, grab a couple things, log out, and wait for 30 minutes for the items to refresh and then repeat. However I can't use a Break Handler because how long I stay logged in couple vary from time to time, depending on how far I am from my location. Unless I am able to call on the Break Handler to activate whenever I do a logoutTab.logOut(); command, then I am out of luck on a break handler. Example below.

 

public int onLoop() throws InterruptedException {
			if (myPlayer().getPosition() != Lumbridge) {
					getWalking().webWalk(Lumbridge);
				}

			if (!getInventory().contains("Air Rune")) {
					groundItems.closestThatContains("Air Rune").interact("Take");
				}

			if (getInventory().contains("Air Rune")) {
					log("Logging out for 30-45 minutes for runes to refresh.");
					logoutTab.logOut();
					sleep(random(1_800_000, 2_400_000)); //Sit on logout screen for 30-45 minutes before Auto Login handler kicks in.
    				}
	return 100;
}

 

Edited by Dqtreats
Fixed
Link to comment
Share on other sites

  • Dqtreats changed the title to SOLVED Auto Login Delay help

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