Jump to content
  • 0

need help [for anti bot]


cjerick

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  05/19/14
  • Last Seen:  

just wondering, anyone here know's how to make an anti-bot system.

here's the description:
-when a person is afk or he/she doesn't move or god afked 30min or more a window will pop-up filled with random questions or captcha that needed to be answered and when got wrong for 3 consecutive times the character is force to log out or warp directly to prison.
-also, it has a limited time to answer or less he/she will have a 1 wrong attemp.

Ps.: if my post is in the wrong section don't delete let me inform so i will repost it to the right thread. thanks!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Try this, though i'm guessing there would be logical errors, as i've not tested it in-game.

-	script	sample	-1,{


OnPCLoginEvent:
CheckAFK:
	sleep2 1800000;
	if(checkidle() > 1800) {
		@Tries = 3;
		Captcha:
			mes "Input the text below:";
			@CapRand$ = .Captcha[rand(getarraysize(.Captcha$))];
			mes @CapRand$;
			mes "You have 1 minute to answer, and "+@Tries+" left.";
			@Timer = gettimetick(2)+60;
			input @Captcha$;
			if(@CapRand$ != @Captcha$ || @Timer > gettimetick(2)) {
				mes "You have entered the wrong captcha, or failed to answer it within a minute";
				@Tries--;
				if(@Tries < 1) {
					next;
					mes "You have exceeded the maximum tries, you will now be logged off.";
					atcommand "@kick "+strcharinfo(0);
				}
				next;
				goto Captcha;
			}
			mes "Thank you for cooperating, and sorry for the inconvenience.";
			close2;
	}
	goto CheckAFK;
end;

OnInit:
	setarray .Captcha$[0],"Test1","Test2","Test3";
	end;

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

Guest
Answer this question...

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

×
×
  • Create New...