viewing paste Unknown #56078 | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
-   script  Anti_Bot    -1,{
 
 
//===========================================================================
//===== Configurações: ======================================================
 
OnInit:
 
set .npc$, "^00B2EE[Security AntiBot]^000000";  //
 
//===========================================================================
//= Character ban time when canceling / making a wrong answer (Minutes)
//===========================================================================
 
set .bantime,5;
 
//===========================================================================
//= Number of chances that the player has to answer the questions.
//===========================================================================
 
set .chances,5;
 
//===========================================================================
//= Minimum account level for the anti-bot to perform checks.
//===========================================================================
 
set .NvMax,0;
 
//===========================================================================
//= Minimum number of monsters that must be killed to activate the script.
//===========================================================================
 
set .MinMonster,rand(100,300);
 
//===========================================================================
//= Color options in the menu.
//===========================================================================
 
setarray .cores$,   " Blue",
                    " Red",
                    " Black",
                    " Orange",
                    " Yellow",
                    " Green";
                    
set .arraysize,getarraysize(.cores$);
 
//===========================================================================
//= NPC's speech color. (Advisable not to touch here)
//===========================================================================
 
setarray .cores2$,  "^006eff",  // Azul
                    "^ff000a",  // Vermelho
                    "^000000",  // Preto
                    "^fd680d",  // Laranja
                    "^b69800",  // Amarelo
                    "^41ad00";  // Verde
 
//===========================================================================
//= Questions asked in case of verification 1. (Just complete the question)
//===========================================================================
 
setarray .imges$,   "bat_kiyom1",
                    "bat_crua1",
                    "bard_eland01",
                    "hair_f_22",
                    "hair_f_12",
                    "hair_f_19",
                    "kh_kiel01",
                    "lhz_diguts02",
                    "lhz_diguts02",
                    "prt_soldier",
                    "wish_maiden11",
                    "oliver_hum";
 
//===========================================================================
//= Perguntas feitas no caso da verificação 2. (Apenas complemente a pergunta)
//===========================================================================
 
setarray .pergs$,   "of the cover",
                    "of the cover",
                    "of the hat",
                    "of hair",
                    "of shoes",
                    "of hair",
                    "of clothing",
                    "of the tie",
                    "of the pants",
                    "of the hat",
                    "of the wings",
                    "of hair";
 
//===========================================================================
//= Número da cor que responde corretamente à pergunta.
//===========================================================================
 
setarray .resps2,0,1,5,0,3,5,0,1,0,3,2,4;
 
//===========================================================================
//= Checagem no Login:
//===== IMPORTANTE: =========================================================
//= Uncomment: "OnPCLoginEvent" if you want the npc to always be
//= activated when the character accesses the server.
 
end;
 
//OnPCLoginEvent:
//===== End of Settings: ==============================================
//===========================================================================
//===== Script Start: ===================================================
    
    set #antibot,.MinMonster;
    
    OnNPCKillEvent:
        if(set(#antibot,#antibot+rand(2))<.MinMonster) end;
        set .@opt,(checkcart()?128:0)|(checkriding()?32:0)|(checkfalcon()?16:0);
        set @AccLv,getgmlevel();
        atcommand "@option 1 4 2";
        setoption 0x40,1;
        attachnpctimer;
        initnpctimer;
    
    mes .npc$;
    mes (gettime(3)>= 6&&gettime(3)<= 12?"Good Morning":(gettime(3)>=13&&gettime(3)<=18?"Good Afternoon":"Good Night"))+", ^FFA500"+strcharinfo(0)+"^000000! To avoid malicious players, I need to test you...";
    
    while(1){
        next;
        set .@menu$,"";
        mes .@nome$;
        
        for(set @i,0;@i<.arraysize;set @i,@i+1){
            set .@num[@i],rand(.arraysize);
            for(set @o,0;@o<@i;set @o,@o+1)
                if(.@num[@i]==.@num[@o]){
                    set .@num[@i],rand(.arraysize); set @o,-1;
                }
        }
        
        if(rand(2)){
            mes .npc$;
            mes "What is the color "+.pergs$[set(.@num2,rand(getarraysize(.resps2)))]+" of the character in the illustration displayed on your screen?";
            cutin .imges$[.@num2],rand(5);
            set @resps,.resps2[.@num2];
        }else{
            mes .npc$;
            mes .cores2$[set(@resps,rand(.arraysize))]+"What color is currently being used in my speech? Select the correct color from the menu:";
        }
        
        for(set @i,0;@i<.arraysize;set @i,@i+1){
            //mes .cores2$[@i]+.cores$[@i];
            set .@menu$,.@menu$+"^3CB371[>]^000000" +.cores$[.@num[@i]]+":";
        }
        
        next;
        if(prompt(.@menu$)==255) {
            atcommand "@kick "+.bantime+"mn "+strcharinfo(0);
            end;
        }
        
        mes .@nome$;
        if(.@num[@menu-1]!=@resps){
            if(set(.@tentvs,.@tentvs+1) >= .chances){
                cutin "",255;
                mes .npc$;
                mes "^FF0000Suspicious activity detected! ^000000 For security reasons you will be disconnected from the server.";
                atcommand "@option 0 0 "+.@opt;
                atcommand "@kick "+strcharinfo(0)+"'";  
                end;
            }
            
            mes .npc$;
            mes "^FF0000Incorrect answer!^000000 You still own ^ff0000"+(.chances-.@tentvs)+"^000000 attempts.";
            cutin "",255;
            continue;
        }
        
        mes .npc$;
        mes "^3CB371Right answer!^000000 Thanks for answering the question, have a great game.";
        cutin "",255;
        setoption 0x40,0;
        atcommand "@option 0 0 "+.@opt;
        set #antibot,0;
        stopnpctimer;
        close;
    }
    end;
 
//===== End of Scriptt: ======================================================
//===========================================================================
//===== Check Response Time: (segundos*1000) ======================
 
    OnTimer60000:
        atcommand "@kick "+strcharinfo(0);
        end;
        
//===== End of Check: ====================================================
//===========================================================================
        
}
Viewed 533 times, submitted by Guest.