Jump to content

Utility: Simple Cool Anti-Bot


rans

Recommended Posts


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

File Name: Simple Cool Anti-Bot

File Submitter: Thaddeus

File Submitted: 24 Jan 2015

File Category: Utilities

Content Author: Thaddeus


This is a Simple Code Improved by me and Originally the method was from Brian.

Features:
Random bot check will trigger when killing a mob.
25% Chance to trigger when killing a Mob.
If already passed the bot check. you will not be check again in the future. (Until you Recon)
You have 3 Chance to prove that you are not Bot.
If you fail. 10days of jail time.
If you reconnect during the checkpoint. you will return in checkpoint after reconnecting.

I have tested this in my server and works fine to me.
If you found bug. Please report it smile.png

PS: Sorry for my Grammar and Messy look Script happy.png



Click here to download this file

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

i cleaned it up (didn't optimize) and removed the use of goto

//===== Thaddeus Scripts ================================== 
//= Simple Cool Anti-Bot
//===== By: ================================================== 
//= Thaddeus
//===== Current Version: ===================================== 
//= 1.0
//===== Compatible With: ===================================== 
//= Hercules, rAthena, 3ceam, eAthena
//===== Description: =========================================
// Improvise Simple Anti-Bot! from method of Brian.
//===== Comments: ============================================
//= Change the % chance of triggering, change jail time.
//===== Additional Comments: =================================
//= 1.00 Initial Release
//===== Contact Info: =========================================
//= http://hercules.ws/board/user/457-thaddeus/
//============================================================
//===== Credits to: =========================================
//= Brian,
//============================================================


-	script	anti-bot2	-1,{
OnPCLoginEvent:
	set checkbot,0;
	if(botter >= 1) {
		doevent "anti-bot::Oncheckb";
	}

}

-	script	anti-bot	-1,{
OnNPCKillEvent:
	if( rand(100) < 75 ) { end;} // Default Setting: 75% Chance to Ignore the Anti-Bot
	Oncheckb:
	function GetString;
	if (getgmlevel() >= 3) { end;} /* Uncomment if you want to Ignore this by GM */
	if(checkbot >= 1) { end; }

	atcommand "@jail "+strcharinfo(0)+"";
	set botter,1;
	sc_start SC_BERSERK, 1000000000, 1;
	sc_start SC_FREEZE, 1000000000, 1;
	sleep2 3000;
	for(set botter,botter; botter < 4; set botter,botter + 1;){
		set .@String$,GetString( 15,rand(3,7) );
		mes "You Have 3 Chance to Type the Red Text Correctly";
		mes "If you failed- You will be jailed";
		mes "Input the ^FF0000RED COLOUR^000000 part";
		mes "^0000FF"+GetString( 15,rand(5,10) )+"^FF0000"+.@String$+"^0000FF"+GetString( 15,rand(3,10) )+"^000000";
		input .@Input$;
		if( .@Input$ != .@String$ ){
			if (botter >= 3) {
				atcommand "@unjail "+strcharinfo(0)+"";
				sleep2 1000;
				atcommand "@jailfor 10d "+strcharinfo(0)+"";
				announce "[Anti-BOT]: The user [" +strcharinfo(0) +"] Has Been Jailed For 10 Days.",0,0xe80f0f;
				set botter,0;
				close;
				end;
			}
			mes "Wrong..";
			next;
		} else {
			break;
		}
	}
	atcommand "@unjail "+strcharinfo(0)+"";
	set botter,0;
	set checkbot,1;
	sc_end SC_BERSERK;
	sc_end SC_FREEZE; 
	percentheal 100,100;
	sc_start SC_INC_AGI,240000,10;
	sc_start SC_BLESSING,240000,10; 
end;

	function	GetString	{
		if( getarg(0) & 1 ) setarray .@List$[ getarraysize( .@List$ ) ],"1","2","3","4","5","6","7","8","9";
		if( getarg(0) & 2 ) setarray .@List$[ getarraysize( .@List$ ) ],"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z";
		if( getarg(0) & 4 ) setarray .@List$[ getarraysize( .@List$ ) ],"a","b","c","d","e","f","g","h","i","j","k","m","n","o","p","q","r","s","t","u","v","w","x","y","z";
		//if( getarg(0) & 8 ) setarray .@List$[ getarraysize( .@List$ ) ],"!","@","#","$","%","^","&","*","(",")","-","=","/","+";

	set .@Str$,"";
		while( getstrlen( .@Str$ ) < getarg(1) )
		set .@Str$,.@Str$ + .@List$[ rand( getarraysize( .@List$ ) ) ];
		return .@Str$;

	}

}

sec_pri	mapflag	pvp	off
  • Upvote 1
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

 

i cleaned it up (didn't optimize) and removed the use of goto

//===== Thaddeus Scripts ================================== 
//= Simple Cool Anti-Bot
//===== By: ================================================== 
//= Thaddeus
//===== Current Version: ===================================== 
//= 1.0
//===== Compatible With: ===================================== 
//= Hercules, rAthena, 3ceam, eAthena
//===== Description: =========================================
// Improvise Simple Anti-Bot! from method of Brian.
//===== Comments: ============================================
//= Change the % chance of triggering, change jail time.
//===== Additional Comments: =================================
//= 1.00 Initial Release
//===== Contact Info: =========================================
//= http://hercules.ws/board/user/457-thaddeus/
//============================================================
//===== Credits to: =========================================
//= Brian,
//============================================================


-	script	anti-bot2	-1,{
OnPCLoginEvent:
	set checkbot,0;
	if(botter >= 1) {
		doevent "anti-bot::Oncheckb";
	}

}

-	script	anti-bot	-1,{
OnNPCKillEvent:
	if( rand(100) < 75 ) { end;} // Default Setting: 75% Chance to Ignore the Anti-Bot
	Oncheckb:
	function GetString;
	if (getgmlevel() >= 3) { end;} /* Uncomment if you want to Ignore this by GM */
	if(checkbot >= 1) { end; }

	atcommand "@jail "+strcharinfo(0)+"";
	set botter,1;
	sc_start SC_BERSERK, 1000000000, 1;
	sc_start SC_FREEZE, 1000000000, 1;
	sleep2 3000;
	for(set botter,botter; botter < 4; set botter,botter + 1;){
		set .@String$,GetString( 15,rand(3,7) );
		mes "You Have 3 Chance to Type the Red Text Correctly";
		mes "If you failed- You will be jailed";
		mes "Input the ^FF0000RED COLOUR^000000 part";
		mes "^0000FF"+GetString( 15,rand(5,10) )+"^FF0000"+.@String$+"^0000FF"+GetString( 15,rand(3,10) )+"^000000";
		input .@Input$;
		if( .@Input$ != .@String$ ){
			if (botter >= 3) {
				atcommand "@unjail "+strcharinfo(0)+"";
				sleep2 1000;
				atcommand "@jailfor 10d "+strcharinfo(0)+"";
				announce "[Anti-BOT]: The user [" +strcharinfo(0) +"] Has Been Jailed For 10 Days.",0,0xe80f0f;
				set botter,0;
				close;
				end;
			}
			mes "Wrong..";
			next;
		} else {
			break;
		}
	}
	atcommand "@unjail "+strcharinfo(0)+"";
	set botter,0;
	set checkbot,1;
	sc_end SC_BERSERK;
	sc_end SC_FREEZE; 
	percentheal 100,100;
	sc_start SC_INC_AGI,240000,10;
	sc_start SC_BLESSING,240000,10; 
end;

	function	GetString	{
		if( getarg(0) & 1 ) setarray .@List$[ getarraysize( .@List$ ) ],"1","2","3","4","5","6","7","8","9";
		if( getarg(0) & 2 ) setarray .@List$[ getarraysize( .@List$ ) ],"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z";
		if( getarg(0) & 4 ) setarray .@List$[ getarraysize( .@List$ ) ],"a","b","c","d","e","f","g","h","i","j","k","m","n","o","p","q","r","s","t","u","v","w","x","y","z";
		//if( getarg(0) & 8 ) setarray .@List$[ getarraysize( .@List$ ) ],"!","@","#","$","%","^","&","*","(",")","-","=","/","+";

	set .@Str$,"";
		while( getstrlen( .@Str$ ) < getarg(1) )
		set .@Str$,.@Str$ + .@List$[ rand( getarraysize( .@List$ ) ) ];
		return .@Str$;

	}

}

sec_pri	mapflag	pvp	off

Thanks for cleaning the script. i have uploaded a new version of this script with your script. thank you ^_^

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  06/04/15
  • Last Seen:  

Question: what if the script goes to check a player in the WORST moment, like meanwhile he is doing MVP or serious party?? How to prevent this?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

Question: what if the script goes to check a player in the WORST moment, like meanwhile he is doing MVP or serious party?? How to prevent this?

Checking will only occurs once, if they are already been checked it will skip checking again. 

well there is no way to prevent it during a serious hunting or else before going to a mvp hunting make sure that they have been check.

-or you can modify the script to make it trigger during/every login of char (which is very hassle to other players)

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   4
  • Joined:  01/04/12
  • Last Seen:  

i get status stone after unjail. its a bug?

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

On 10/5/2015 at 5:35 PM, Amellia sizilia sembiring said:

i get status stone after unjail. its a bug?

hello script need to update with SC_ i believe. 
just change the SC status with the correct format.

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

    parse_line: expected ')'
    40 :        atcommand "@jail "+strcharinfo(0)+"";
    41 :        set botter,1;
    42 :        sc_start SC_BERSERK, 1000000000, 1;
    43 :        sc_start SC_FREEZE, 1000000000, 1;
    44 :        sleep2 3000;
*   45 :        for(set botter,botter; botter < 4; set botter,botter + 1';')}{
    46 :                set .@String$,GetString( 15,rand(3,7) );
    47 :                mes "You Have 3 Chance to Type the Red Text Correctly";
    48 :                mes "If you failed- You will be jailed";
    49 :                mes "Input the ^FF0000RED COLOUR^000000 part";
    50 :                mes "^0000FF"+GetString( 15,rand(5,10) )+"^FF0000"+.@String$+"^0000FF"+GetString( 15,rand(3,10) )+"^000000";
[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/ains/antibot.txt', line '45'. Stopping...

got that error

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

×
×
  • Create New...