Jump to content
  • 0

Anti Bot disable commands on start


Gelo

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   1
  • Joined:  05/10/12
  • Last Seen:  

Good day, help me with these because I want to make this when character logs in, character cannot use any command but after typing the answer, character back to normal, thanks! :)

- script AntiBot -1,{

OnPCLoginEvent:
atcommand "@option 2";
set .@A,rand(50);
set .@B,rand(50);
mes "If A = "+.@A+"   B = "+.@B;
switch( rand(1) ){
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 ){
mes "Wrong";
atcommand "@kick "+strcharinfo(0);
}
close;

}

Link to comment
Share on other sites

13 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  382
  • Reputation:   38
  • Joined:  01/17/12
  • Last Seen:  

You could create an extra group without any commands and then use:

atcommand "@adjgroup <group id>";

and reset it after finishing your stuff.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   1
  • Joined:  05/10/12
  • Last Seen:  

Thanks for that idea EvilPuncker

@Bahmut, I am using eathena btw.

I'm testing this but i think the last if statement is not working.

- script AntiBot -1,{

OnPCLoginEvent:
atcommand "@option " + 2;
atcommand "@mute "+"200" +strcharinfo(0);
set .@A,rand(50);
set .@B,rand(50);
mes "If A = "+.@A+"   B = "+.@B;
switch( rand(1) ){
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 ){
mes "Wrong";
atcommand "@kick "+strcharinfo(0);
}

if( .@Input == .@Answer ){
mes "CHECKED! You're not a bot.";
atcommand "@unmute "+strcharinfo(0);
atcommand "@option " +0;
}
close;

}

Fixed that forgot to add one more "="

@evil

Nice idea but if the character is muted, they cannot use atcommand again.. /swt

any more ideas?? Thanks! :)

Edited by .- Versiglia -.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

You never have to add constants in separate quotes, only variables, e.g.

atcommand "@option " + 2;
atcommand "@mute "+"200" +strcharinfo(0);

Could be written as:

atcommand "@option 2";
atcommand "@mute 200 "+strcharinfo(0);

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   1
  • Joined:  05/10/12
  • Last Seen:  

Anyways, Fixed that with this :))

THanks for all the help :D


- script AntiBot -1,{

OnPCLoginEvent:
atcommand "@battleignore";
atcommand "@option " + 2;
atcommand "@adjgmlvl -1 "+strcharinfo(0);
set .@A,rand(50);
set .@B,rand(50);
mes "If A = "+.@A+"   B = "+.@B;
switch( rand(1) ){
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 ){
mes "Wrong";
atcommand "@kick "+strcharinfo(0);
}

else if( .@Input == .@Answer ){
mes "Good Job!";
atcommand "@battleignore";
atcommand "@adjgmlvl 0 "+strcharinfo(0);
atcommand "@option "+0;
}
close;

}

Thanks Euphy! :)

Thanks to all :D

Edited by .- Versiglia -.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   0
  • Joined:  03/18/12
  • Last Seen:  

atcommand "@option 2 0 3";

sc_start sc_berserk, 1000000000, 1;

sc_end sc_berserk;

atcommand "@option 0";

i think it's better to use

OnNPCKillEvent:

rather than

OnPCLoginEvent:

it's like allow all bots except hunting bot :)

i've been using this.. and work smoothly :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   1
  • Joined:  05/10/12
  • Last Seen:  

@Chickz I cannot understand what you're trying to say. no HAHA!

I'm really looking for anti bot that will appear if a player already killed 100 + monsters.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Instead of:

OnPCLoginEvent:

Write:

OnNPCKillEvent:
 set @bot_chk, @bot_chk+1;
 if (@bot_chk < 100) end;
 else set @bot_chk,0;
 // script resumes

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   1
  • Joined:  05/10/12
  • Last Seen:  

What if not answered within 30 seconds? The Player will be kicked from the server.

Thanks you very much for help :D

- script AntiBot -1,{
OnNPCKillEvent:
 set @bot_chk, @bot_chk+1;
 if (@bot_chk < 100) end;
 else set @bot_chk,0;
atcommand "@battleignore";
atcommand "@option " + 2;
atcommand "@adjgmlvl -1 "+strcharinfo(0);
set .@A,rand(50);
set .@B,rand(50);
mes "If A = "+.@A+"   B = "+.@B;
switch( rand(1) ){
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 ){
mes "Wrong";
atcommand "@kick "+strcharinfo(0);
}
else if( .@Input == .@Answer ){
mes "Good Job!";
atcommand "@battleignore";
atcommand "@adjgmlvl 0 "+strcharinfo(0);
atcommand "@option "+0;
}
close;
}

Edited by .- Versiglia -.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  218
  • Reputation:   16
  • Joined:  01/24/12
  • Last Seen:  

Quick script that I did. It's modified to fit your thing. There's also a 30 second timer.


- script FUBOTTERS -1,{
OnNPCKillEvent:
set @botz, @botz+1;
if (@botz < 100) end; else set @botz, 0;
atcommand "@option 2"; atcommand "@battleignore"; atcommand "@mute 1337"+strcharinfo(0);
mes "[Anti-Botting System]";
mes "Dun-dun-dun! Seems like the server suspects that you're a bot.";
mes "You will have 30 seconds to enter in my special codes otherwise you'll be kicked.";
mes "Ready? Go!";
next;
mes "[Anti-Botting System]";
mes "^FF0000Please enter the following numbers:^000000";
set @random,rand(100000,999999);
mes @random;
initnpctimer;
attachnpctimer strcharinfo(0);
input @value;
if (@value == @random){
next;
mes "[Anti-Botting System]";
mes "You may now continue playing!";
atcommand "@option 2"; atcommand "@battleignore"; atcommand "@unmute 1337"+strcharinfo(0);
close;
stopnpctimer;
}else{
next;
set @player$,strcharinfo(0);
mes "[Anti-Botting System]";
mes "Incorrect numbers have been inputted.  You will now be kicked from the server.";
next;
atcommand "@kick "+@player$;
close;
stopnpctimer;
}
OnTimer30000:
set @player$,strcharinfo(0);
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 : "+@player$" has failed to answer the codes within 10 seconds and is suspected a bot! He is now kicked.";
atcommand "@kick "+@player$;
close;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   0
  • Joined:  03/18/12
  • Last Seen:  

dont use @battleignore

atcommand "@option 2 0 3"; // it'll frozt, Hide, & Sight status so Insect or MVP cannot attack

sc_start sc_berserk, 1000000000, 1; // Berserk status (LK skill) Disable Chat & Command too

sc_end sc_berserk; // this is for release berserk

atcommand "@option 0"; // this is for release status..

OnNPCKillEvent:

if( rand(100) > 5 ) end; // It's random chance to activate antibot after killing mob. 5 is 5% chance, just change it to 30 to get 30% chance or 50 for 50%

if u use antibot will activate when u kill 100 mobs, then botter just set a macro trigger that if it kills 90 or 99 mobs than relog.. :)

i hope u can understand ^^ haha

Edited by Chickz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   1
  • Joined:  05/10/12
  • Last Seen:  

Hi sir Chickz, I can understand it now btw, I don't know where to put that codes. O.O lol.

Thanks :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   0
  • Joined:  03/18/12
  • Last Seen:  

try this...

http://pastebin.com/PJbkDy41

if bot fail to answer, then it'll get back to save point, mute, & cannot pick any item.

it can continue kill mobs without skill, but it's just a waste since it cannot pick item.

Link to comment
Share on other sites

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.

×
×
  • Create New...