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".