Jump to content

bypass osbot's stopping script because you've tried to login too many times?


The Hero of Time

Recommended Posts

it will stop the script with comment "for your accounts safety"

 

well, if you hop a lot, sometimes you can log out, and it will log back in. if you log out again in an hour or so it will just stop the script with that message. so my script stopped after like 4 hours because of that, the other time it stopped after 6hrs, so its just random. if osbot just logs back in ignoring that "for your accounts safety" then i could run my script for much longer. i get why its implemented, but its not usefull for hopping scripts.

 

 

can you disable it?

Edited by The Hero of Time
Link to comment
Share on other sites

Isolate showed that, but that disables the auto-login right? isnt the stopping script because too many tries part of something else

Yes it disables the autologin and I believe the tries are internal to the login hook. Re-registering the hook from a parallel thread might do the trick.

Link to comment
Share on other sites

so by disabling/enabling it it resest the tries? that'll be great

Yes it might work, I'm not sure as I've been advising people to do this for months on the forums, haven't actually had to try it myself. No one told me it doesn't work so I guess no news is good news. Just wondering though, why would you try to login and fail on purpose?

Link to comment
Share on other sites

Yes it might work, I'm not sure as I've been advising people to do this for months on the forums, haven't actually had to try it myself. No one told me it doesn't work so I guess no news is good news. Just wondering though, why would you try to login and fail on purpose?

on purpose? nono :P the script hops to another world to continue picking the item, and it will wait about 13-14 seconds before hopping again so you dont get kicked out, but somehow it will still kick you out sometimes, but thats rarely, so if the bot doesnt stop but just logs back in that would fix the problem

Link to comment
Share on other sites

on purpose? nono tongue.png the script hops to another world to continue picking the item, and it will wait about 13-14 seconds before hopping again so you dont get kicked out, but somehow it will still kick you out sometimes, but thats rarely, so if the bot doesnt stop but just logs back in that would fix the problem

Well, good luck with that but that I don't think the server kicking you out is a randomly defined behaviour so you may be able to study the case and find a workaround for that. But if you really want to dig into this when the API is up again, you could take a look at the LoginResponseCodeListener as Script implements that, so you have the onResponseCode(int) method in there which might help you define a behaviour when you get the response "too many login attempts" or "no reply from the login server".

Link to comment
Share on other sites

Well, good luck with that but that I don't think the server kicking you out is a randomly defined behaviour so you may be able to study the case and find a workaround for that. But if you really want to dig into this when the API is up again, you could take a look at the LoginResponseCodeListener as Script implements that, so you have the onResponseCode(int) method in there which might help you define a behaviour when you get the response "too many login attempts" or "no reply from the login server".

it doesn't try to login though, so you never get the message "too many login attempts" or "no reply from the login server".

 

osbot detects this without trying, same with getting banned, you log out and the script stops and you get a message your account has been disabled in the osbot logger, without it trying to login and see the ban message

Link to comment
Share on other sites

There's no way to modify Autologin in SDN scripts, with some hacks it is possible for private scripts tho. Preventing it from stopping the script can be difficult but what about restarting the script when this happens? If onExit() is called you can spawn a thread and restart your script.

so if the user stops the script it will restart again until user closes osbot? boge.png

Edited by The Hero of Time
Link to comment
Share on other sites

You can prevent the AUTO_LOGIN Random event from activating via response codes.

You may have to play around with shouldActivate & onResponseCode.

I 've done this before so it's deffo possible,  but not sure if this kinda stuff is allowed for SDN scripts.

		getBot().getRandomExecutor().registerHook(new RandomBehaviourHook(RandomEvent.AUTO_LOGIN) {
			private RandomSolver solver = getBot().getRandomExecutor().forEvent(RandomEvent.AUTO_LOGIN);
			@Override
			public void onResponseCode(int c) throws InterruptedException {
				//INSERT WORK_AROUND HERE
			}
			@Override
			public void onStart() throws InterruptedException {
				super.onStart();
				solver.onStart();
			}
			@Override
			public boolean shouldActivate() {
				return solver.shouldActivate(); //Play around with this
			}
			@Override
			public int onLoop() throws InterruptedException {
				super.onLoop();
				return solver.onLoop();
			}
			@Override
			public void onExit() throws InterruptedException {
				super.onExit();
				solver.onExit();
			}
		});
		
	}
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...