- script antibot -1,{
OnPCLoginEvent:
attachnpctimer;
initnpctimer;
set .@rand_picture,rand( .picture_size );
mes "Antibot";
mes "Enter the code from the picture";
cutin ""+.picture$[.@rand_picture],4;
do{
set .@attempt,.@attempt + 1;
dispbottom "Attempt : "+.@attempt;
input( .@code_enter$ );
set .@result,( .@code_enter$ != .code$[.@rand_picture] );
if( .@result && .@attempt >= .max_attempt ){
OnTimer60000:
atcommand "@kick "+strcharinfo(0);
end;
}
}while( .@result );
stopnpctimer;
detachnpctimer;
mes "Done";
cutin "",255;
close;
OnInit:
// picture name
setarray .picture$,
"cutin001",
"cutin002",
"cutin003";
// code inside the picture
setarray .code$,
"abcdef001",
"abcdef002",
"abcdef003";
// max wrong attempt
set .max_attempt,5;
set .picture_size,getarraysize( .picture$ );
end;
}