Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script antibot2 -1,{
- OnPCLoginEvent:
- set #checkbot,0;
- if(#botter >= 1) {
- doevent "anti-bot::Oncheckb"; }
- }
- - script anti-bot -1,{
- OnNPCKillEvent:
- if( rand(100) < 98 ) {goto end;} // 2% chance when killing mob.
- Oncheckb:
- function GetString;
- //if (getgmlevel() >= 3) { goto end;}
- if(#checkbot >= 1) { goto end; } // do not ask anymore until recon
- sc_start sc_berserk, 1000000000, 1;
- set #botter,1;
- On2nd:
- 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 "@jailfor 10d "+strcharinfo(0)+"";
- announce "[Anti-BOT]: The user [" +strcharinfo(0) +"] Has Been Jailed For 10 Days.",0,0xe80f0f;
- set #botter,0;
- end;}
- mes "Wrong..";
- set #botter,#botter + 1;
- next;
- goto On2nd;
- }
- sc_end sc_berserk;
- percentheal 100,100;
- set #botter,0;
- set #checkbot,1;
- close;
- 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$;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement