Thread: Anti Bot System... Keeps macroers out from your server.

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 Anti Bot System... Keeps macroers out from your server. 
    Renown Programmer
    Harha's Avatar
    Join Date
    Jul 2006
    Age
    28
    Posts
    432
    Thanks given
    3
    Thanks received
    29
    Rep Power
    339
    I made this code today, because i was totally bored.. I got this idea from one Ragnarok Online private server, there was a system like this...
    I know, its stupid to ask every hour from players some numbers, but it keeps macroers out from your server.

    Here it is:

    Declare all this to client.java:

    Code:
    /* Anti Botting System (c) Pure Lord */
    
    public boolean typedNumber = false;
    public int antiBotTimer = 1200;
    public int antiBotNumber;
    public int warningTimer;
    public int warning;
    public int number;
    public String victim;
    
    public void antiBotSystem() {
    	if (antiBotTimer == 1) {
    		antiBotNumber = misc.random(10);
    		warning = 60;
    		sendMessage("[AntiBot]: Please and type this number: "+antiBotNumber+", like this: ::number #");
    	}
    
    	if (number == antiBotNumber && antiBotTimer == 0 && typedNumber == true) {
    		antiBotTimer = 1200;
    		antiBotNumber = 0;
    		warning = 0;
    		warningTimer = 0;
    		sendMessage("[AntiBot]: Thank you! This system keeps botters out from this server.");
    		typedNumber = false;
    	}
    
    	if (number < antiBotNumber && antiBotTimer == 0 && typedNumber == true) {
    		warningTimer = 120;
    		sendMessage("[AntiBot]: You typed it wrong! You have 1min time to ask correctly.");
    		typedNumber = false;
    	}
    
    	if (number > antiBotNumber && antiBotTimer == 0 && typedNumber == true) {
    		warningTimer = 120;
    		sendMessage("[AntiBot]: You typed it wrong! You have 1min time to ask correctly.");
    		typedNumber = false;
    	}
    
    	if (warning == 1) {
    		warningTimer = 120;
    		sendMessage("[AntiBot]: You have 1min time left to type it!");
    	}
    
    	if (warningTimer == 90) {
    		sendMessage("[AntiBot]: 45secs left to ask... Number is: "+antiBotNumber+". ");
    	}
    
    	if (warningTimer == 60) {
    		sendMessage("[AntiBot]: 30secs left to ask...");
    	}
    
    	if (warningTimer == 30) {
    		sendMessage("[AntiBot]: 15secs left to ask...");
    	}
    
    	if (warningTimer == 20) {
    		sendMessage("[AntiBot]: 10secs left to ask... Last Warning!");
    	}
    
    	if (warningTimer == 2) {
    		sendMessage("[AntiBot]: Congratulations, you have been banned permanently!");
    		PlayerHandler.messageToAll = "[AntiBot]: "+playerName+" Has caught from macroing...";
    		PlayerHandler.kickNick = victim;
    		appendToBanned(victim);
    	}
    }
    Add this to public boolean process:

    Code:
    antiBotSystem();
    		if (antiBotTimer >= -1) {
    		antiBotTimer -= 1;
    		}
    
    		if (antiBotTimer == -1) {
    		antiBotTimer = 0;
    		}
    
    		if (antiBotTimer == 0) {
    		antiBotTimer = 0;
    		}
    
    		if (warning >= -1) {
    		warning -= 1;
    		}
    
    		if (warning == -1) {
    		warning = 0;
    		}
    
    		if (warning == 0) {
    		warning = 0;
    		}
    
    		if (warningTimer >= -1) {
    		warningTimer -= 1;
    		}
    
    		if (warningTimer == -1) {
    		warningTimer = 0;
    		}
    
    		if (warningTimer == 0) {
    		warningTimer = 0;
    		}
    Add this command:

    Code:
    			else if (command.startsWith("number"))
    				{
    					try
    					{
    
    						int Number = Integer.parseInt(command.substring(7));
    						number = Number;
    						typedNumber = true;
    					}
    			catch(Exception e) { sendMessage("You typed it wrong, use like ::number #"); }
    		}
    Or if you are using sam servers command handler, use this command code, add it to commandHandler.java, but only if you have the commandHandler, if you dont have, use that code above.

    Code:
    			else if (command.startsWith("number"))
    				{
    					try
    					{
    
    						int Number = Integer.parseInt(command.substring(7));
    						c.number = Number;
    						c.typedNumber = true;
    					}
    			catch(Exception e) { c.message("You typed it wrong, use like ::number #"); }
    		}
    I hope that this will help servers to get macroers banned. Have fun with my code!
    Say, if here are any errors...
    Edit: I coded this to my Real-RS Project wich is based on Untouched.
    If you get any errors like: Cannot find symbol: "message", change all "message" tags to "sendMessage" or whatever your source uses. Other way is simply to copy another sendMessage void to client.java and name it to "message".
     

  2. #2  
    Kaji23
    Guest
    lol good tut if it works rep++
     

  3. #3  
    Jet Blue Lover!

    Lumby's Avatar
    Join Date
    Dec 2006
    Age
    26
    Posts
    564
    Thanks given
    16
    Thanks received
    45
    Rep Power
    165
    Good Job Might Try It Rep+

    ~Lumby
    May jetBlue be with you. Remember lowercase j capital B!



    Former Global Moderator
     

  4. #4  
    Community Veteran


    Join Date
    Jul 2006
    Age
    27
    Posts
    808
    Thanks given
    98
    Thanks received
    42
    Rep Power
    303
    Very nice job. Keep it up. Rep ++!
     

  5. #5  
    Banned
    Join Date
    Jul 2006
    Age
    30
    Posts
    281
    Thanks given
    2
    Thanks received
    2
    Rep Power
    0
    Nice one, +rep just cause its funny - although i prolly wont use it
     

  6. #6  
    Member
    Boomer's Avatar
    Join Date
    Sep 2006
    Posts
    1,282
    Thanks given
    309
    Thanks received
    795
    Rep Power
    1111
    Better way is to track the time inbetween clicks and check if they are similar and have a flag int increase every time they are close and after a certain amount of flags temporarily ban them


    [Only registered and activated users can see links. ] ||| FightScape | InnerFantasy | PkIsle | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ]
     

  7. #7  
    project-rs owner
    Join Date
    Sep 2006
    Age
    29
    Posts
    914
    Thanks given
    4
    Thanks received
    4
    Rep Power
    49
    boomer is right but this will just anoy the users

    but good work anyway
     

  8. #8  
    Community Veteran


    Join Date
    Jul 2006
    Posts
    789
    Thanks given
    31
    Thanks received
    80
    Rep Power
    177
    well it sucks if anyone wasnt paying attention or if a lot of people are chatting at once...
     

  9. #9  
    Community Veteran


    Join Date
    Jul 2006
    Age
    27
    Posts
    808
    Thanks given
    98
    Thanks received
    42
    Rep Power
    303
    Can you please read the pm that I sent you?
     

  10. #10  
    Mr.Lothar
    Guest
    nice for long time
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Remove the Anti-DDOS system
    By 'Mystic Flow in forum Suggestions
    Replies: 4
    Last Post: 03-25-2011, 12:26 PM
  2. 525 Anti Spam system !
    By Ellie in forum Snippets
    Replies: 9
    Last Post: 06-30-2010, 02:47 PM
  3. Anti-Noclipping system
    By Laxika in forum Tutorials
    Replies: 81
    Last Post: 03-13-2010, 11:09 PM
  4. Anti-Macro system
    By Untitled in forum Snippets
    Replies: 10
    Last Post: 01-16-2010, 12:48 PM
  5. simple anti null system
    By laurens in forum Tutorials
    Replies: 51
    Last Post: 07-29-2009, 02:18 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •