Jump to content

Question

Posted (edited)

I want to add the countdown dispbottom to the script below,

time to answer 5 minutes if not answered auto kick.

every 1 minute it will appear a message on dispbottom

when the answer occurring disconnect character auto goto jail.

 

Please help,thanks. /thx

prontera,0,0,0    script    BOT    -1,{ // Main Script

    function GetString;



//Untuk setting map tertentu

//OnInit:

//OnPCLoadMapEvent:

//if( !Checking ) end;



OnNPCKillEvent:

//    if(getgmlevel() > 0) end;

    set @kill,@kill+1;

    if(@kill >= rand(200,400)){

    cutin "ein_soldier",2;

    if(checkcart() == 1) set @cart,1;

    if(checkfalcon() == 1) set @falcon,1;

    if(checkriding() == 1) set @riding,1;

    attachnpctimer strcharinfo(0);

    initnpctimer;

    sc_start sc_berserk, 1000000000, 1;

    sc_start sc_freeze, 1000000000, 1;

    atcommand "@option 2 0 3";

    set Checking,1;

    switch( rand(2) ){

    Case 0:

    set .@String$,GetString( 15,rand(5,10) );

    mes "[^FF0000SundanesPolice^000000]";

    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$ ){

    next;

    mes "[^FF0000Sundanes Police^000000]";

    mes "You Already Pass The Bot Check, Have A Fun Game !";

    mes "In You Found The Bot Please Report At: ^0000FFSundanes.ra9narok.web.id^000000";

    } else {

    if (BotDetected == 5) {

        mes "[^FF0000SundanesPolice^000000]";

        mes "You account have been banned for 6 years.";

        announce "[Sundanes Police]: The user [" +strcharinfo(0) +"] have been banned because of using bots.",0;

        atcommand "@ban +6y "+strcharinfo(0); // Banned 6 years

        atcommand "@kick "+strcharinfo(0);

    } else {

        set BotDetected, BotDetected + 1;

        mes "[^FF0000Sundanes Police^000000]";

        mes "You Are Not Pass The Bot Check!!if Over 5 Time Not Pass You Account Will Ban Forever!~";

        next;

        atcommand "@kick "+strcharinfo(0);

    } // End if

    end;

} // End if

    cutin "ein_soldier",255;

    atcommand "@option 0";

    stopnpctimer;

    detachnpctimer;

    sc_end sc_berserk;

    sc_end sc_freeze;

    percentheal 100,100;

    set BotDetected,0;

    set @kill,0;

    set Checking,0;

    if(@cart == 1) {

        setcart;

        set @cart,0;

    }

    if(@falcon == 1) {

        setfalcon;

        set @falcon,0;

    }

    if(@riding == 1) {

        setriding;

        set @riding,0;

    }

close;

end;

break;



    Case 1:

    set .@A,rand(100);

    set .@B,rand(100);

    mes "If A = "+.@A+" B = "+.@B;

    switch( rand(4) ){

    Case 0:

    set .@Answer,.@A + .@B;

    mes "How many is A + B ?";

    break;

    Case 1:

    set .@Answer,.@A - .@B;

    mes "How many is A - B ?";

    break;

    Case 2:

    set .@Answer,.@A * .@B;

    mes "How many is A * B ?";

    break;

    Case 3:

    set .@Answer,.@A / .@B;

    mes "How many is A / B ?";

    break;

    }

    input .@Input;

    if( .@Input == .@Answer ){

    next;

    mes "[^FF0000Sundanes Police^000000]";

    mes "You Already Pass The Bot Check, Have A Fun Game !";

    mes "In You Found The Bot Please Report At: ^0000FFSundanes.ra9narok.web.id^000000";

    } else {

    if (BotDetected == 5) {

        mes "[^FF0000SundanesPolice^000000]";

        mes "You account have been banned for 6 years.";

        announce "[Sundanes Police]: The user [" +strcharinfo(0) +"] have been banned because of using bots.",0;

        atcommand "@ban +6y "+strcharinfo(0); // Banned 6 years

        atcommand "@kick "+strcharinfo(0);

    } else {

        set BotDetected, BotDetected + 1;

        mes "[^FF0000Sundanes Police^000000]";

        mes "You Are Not Pass The Bot Check!!if Over 5 Time Not Pass You Account Will Ban Forever!~";

        next;

        atcommand "@kick "+strcharinfo(0);

    } // End if

    end;

} // End if

    cutin "ein_soldier",255;

    atcommand "@option 0";

    stopnpctimer;

    detachnpctimer;

    sc_end sc_berserk;

    sc_end sc_freeze;

    percentheal 100,100;

    set BotDetected,0;

    set Checking,0;

    set @kill,0;

    if(@cart == 1) {

        setcart;

        set @cart,0;

    }

    if(@falcon == 1) {

        setfalcon;

        set @falcon,0;

    }

    if(@riding == 1) {

        setriding;

        set @riding,0;

    }

close;

end;

break;

     

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","I","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","l","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$;

            }     

        }     

    }

}



//Setting Map tertentu

//bat_c01    mapflag    loadevent

BUMP

Edited by Yasunari Ishibashi

4 answers to this question

Recommended Posts

Posted


if(@kill >= rand(200,400)){

attachnpctimer;

initnpctimer;

// your antibot code here

stopnpctimer;

detachnpctimer;

}

end;

OnTimer60000:

atcommand "@kick "+strcharinfo(0);

end;

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...