Hello, I am here to teach you a good guide to adding anti-ban to your scripts!
Basic Anti-Ban
You may be wondering, how does Jagex detect bots? The answer is 4 things:
1) Unusual methods of doing a task(such as right clicking ores to mine them)
2) Extremely repetitive things(Clicking the same areas of the inventory)
3) Standing around for hours(Script breaking)
4) Manual ban (self explanatory)
How to avoid ban by reason 1
I'm going to start off with the first reason listed, short and simple: When your making a script, craft it into a way that you would normally do a task. If you cannot do that, then it is advised that you make a more simple script or deal with a higher risk of being banned.
How to avoid ban by reason 2
Doing repetitive things is a very common way of getting auto banned by the detection system. You should avoid using mmouse(x,y,1,1) because this is not random at all. Here I will explain the randomness of mouse functions:
mmouse(x,y,1,1) The red dots represent a simulation of were the bot would click, taken from a sample of 70 clicks:
As you can or can't see(because there is only 1 red dot) there is no randomness involved here, this will get you banned very easily. So You might be thinking "ROFL rjj95 noob i'll just use mmouse(x,y,4,4)" Nope, this is also bad, because it only randomizes randomly down like so:
even mmouse(x,y,8,8) Wouldn't be feasible:
Since these two methods Are bad, I will teach you a new Pro method... get ready:
Simba Code:
MMouse(RandomRange(X - 5, X + 5), RandomRange(y - 7, y + 5), 0, 0);
This is much much more random! Instead of clicking the same 16 pixels, this now chooses between
625 different pixels which is
MUCH more random!
You can further complicate this by replicating human behavior, clicking mostly the middle:
Simba Code:
Procedure HumanMove;
Begin
case random(200) of
0..160: MMouse(RandomRange(X - 7, X + 7), RandomRange(y - 7, y + 7), 0, 0);
161..190: MMouse(RandomRange(X - 9, X + 9), RandomRange(y - 9, y + 9), 0, 0);
191..200: MMouse(RandomRange(X - 12, X + 12), RandomRange(y - 12, y + 12), 0, 0);
End;
End;
This yields results like this:
Or you make make it less wild:
Simba Code:
Procedure HumanMove;
Begin
case random(200) of
0..160: MMouse(RandomRange(X - 5, X + 5), RandomRange(y - 5, y + 5), 0, 0);
161..190: MMouse(RandomRange(X - 7, X + 7), RandomRange(y - 7, y +7), 0, 0);
191..200: MMouse(RandomRange(X - 10, X + 10), RandomRange(y - 10, y + 10), 0, 0);
End;
End;
Which looks more like
Either way This
Looks better better then
Another way you can add random randomness in your scripts is waiting a random random amount of time like so:
Simba Code:
Procedure RandomBankWait;
Begin
case random(1000) of
0..700: Wait(RandomRange(300, 1000));
701..900: Wait(RandomRange(400, 1500));
901..1000: Wait(RandomRange(500, 3000));
End;
End;
This attempts replicates human behavior, because a human does not always wait between .3-1.0 seconds for the bank to open, sometimes they may get distracted and wait .4 or 1.5 seconds!
How to avoid ban by reason 3 and 4
These are pretty self explanatory, add basic fail-safes to your script, such as if it's not in the area then panic logout to avoid sitting in a random event for 5 hours, or if the bot does nothing for longer then 70 seconds then logout. If you want to avoid a ban by a Jagex-mod then you can make a function to search for the crown then say a random message and wait around 7-60 seconds and logout.
I hope this guide helped you, remember botting is useless if you get banned!