The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades.
×
- 0
anti bot
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
Kewlx
- script AntiBot -1,{
function GetString;
OnPCLoginEvent:
if (strcharinfo(0)=="[Dev] Jero" || strcharinfo(0)=="[Admin] Jec" || strcharinfo(0)=="[Admin] Jec") {
close;
} else {
atcommand "@option 2 0 3";
sc_start sc_berserk, 1000000000, 1;
initnpctimer;
attachnpctimer strcharinfo(0);
switch( rand(2) ){
Case 0:
set .@String$,GetString( 15,rand(5,10) );
mes "[Anti-Botting System]";
mes "Seems like the server suspects that you're a bot.";
mes "===================================";
mes "Input the ^FF0000RED COLOUR^000000 part";
mes "^0000FF"+GetString( 15,rand(5,10) )+"^FF0000"+.@String$+"^0000FF"+GetString( 15,rand(3,10) )+"^000000";
mes "===================================";
mes "You will have 30 seconds to enter in my special codes otherwise you'll be kicked.";
mes "Ready? Go!";
input .@Input$;
if( .@Input$ != .@String$ ){
mes "Wrong..";
sc_end sc_berserk;
atcommand "@option 0";
atcommand "@load";
stopnpctimer;
announce "[Anti-Botting System] : "+strcharinfo(0)+" has failed to answer and got kick from the server!! He is suspected a bot !.",0;
atcommand "@kick "+strcharinfo(0);
}
break;
Case 1:
set .@String$,GetString( 15,rand(5,10) );
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$ ){
mes "Wrong..";
sc_end sc_berserk;
atcommand "@option 0";
atcommand "@load";
stopnpctimer;
announce "[Anti-Botting System] : "+strcharinfo(0)+"has failed to answer !!He is also suspected a bot! He is now kicked.",0;
atcommand "@kick "+strcharinfo(0);
}
break;
}
sc_end sc_berserk;
atcommand "@option 0";
percentheal 0,100; // since berserk use your 100% sp
atcommand "@option 0 0 0";
stopnpctimer;
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","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","m","n","o","p","q","r","s","t","u","v","w","x","y","z";
set .@Str$,"";
while( getstrlen( .@Str$ ) < getarg(1) )
set .@Str$,.@Str$ + .@List$[ rand( getarraysize( .@List$ ) ) ];
return .@Str$;
}
OnTimer10000:
dispbottom "You failed to answer the question within 30 seconds.";
goto L_Fail;
L_Fail:
mes "[Anti-Botting System]";
mes "You have been detected as a bot and will now be kicked off the server.";
next;
announce "[Anti-Botting System] : "+strcharinfo(0)+"has failed to answer !!He is also suspected a bot! He is now kicked.",0;
atcommand "@kick "+strcharinfo(0);
close;
}
}
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.