SRL Archive - OSR Beginner Scripting Tutorials

Antiban: Explained


NKN

2012-06-22 22:01:11

Contents

  • Introduction
  • What is Antiban
  • When to use Antiban
  • Final Notes
Introduction

Hello everyone, this is the latest installment of my Explained tutorial series. I decided to write an Antiban tutorial, and explain when I use it, and why I don't in some scripts. Well, without further ado, let us begin.
What is Antiban


procedure Antiban;
begin
FindNormalRandoms;
case Random(90) of
0: RandomRClick;
2: PickUpMouse;
3: RandomMovement;
4: BoredHuman;
5: ExamineInv;
6: MakeCompass('N');
7: SetAngle(SRL_ANGLE_HIGH);
8: Wait(5000+random(2000));
9: HoverSkill(skill_attack,false);
end;
This is the basic Antiban I use. It runs through a case, which generates a random number through 90. I choose 90 as the number, because I have 9 options, and I want it to pick one of them around every ten attempts. Don't want it too often or not often enough.

Antiban is the process of randomizing a script, so you look more human. You don't want to just through it anywhere, though, or it looks pretty botty.


When to use Antiban

I typically use an Antiban such as above when I'm at a bank. If it involves something while not moving, I have it do an antiban when ever it banks. (I.E, Fletching, herblore, etc)

If it involves walking, or something where you're not in one place, I would suggest using Antiban sparingly, if at all. Most of the mouse/walking functions have randomness, and you could add your own. I usually don't put a full on antiban, just some small ones. Consider adding mini breaks, or such things as an antiban.

Make sure you throw it in the right times, like, right after you bank, or finish killing things, or finish walking to a location, not in the middle.

Final Notes

Thanks for reading guys, sorry I didn't show many examples, and for the shortness of this, but I hoped I got it across with many examples, as Antiban isn't that advanced, unless you want it to be. Described here is just a basic antiban for the beginner scripter. Thanks for reading.

ISRA3L

2012-06-23 15:20:31

Thanks, helped me with my first script… :) +rep

putonajonny

2012-06-23 21:00:21

Really good and simple tut, maybe add things like HoverSkill and get rid of that static wait and It'll be perfect :)

NKN

2012-06-23 21:21:58

From: putonajonny
Really good and simple tut, maybe add things like HoverSkill and get rid of that static wait and It'll be perfect :)


Done. :)

mike-gee420

2012-11-01 02:25:11

From: ISRA3L
Thanks, helped me with my first script… :) +rep


same :)

Rezozo

2012-11-02 17:52:38

Why no one tell me about this thread :(

Arigato! Now, Ima add some baws like A-B to my script! :D

Thanks NKN <3

xtrapsp

2012-11-07 10:35:02

NKN, possible to put cases in cases? Mega randomness :3

NKN

2012-11-07 16:01:39

From: xtrapsp
NKN, possible to put cases in cases? Mega randomness :3

Lol, wouldn't activate enough. Be crazy tho

Footy

2012-11-07 16:05:49

Its possible, but if you are using random(x) in both the case statements, just combine them. E.g.

 case random(2) of
case random(2) of
begin
...

Can become
Case random(4) of
begin

Sabzi

2012-11-07 16:16:41

Also there are srlprocs[antiban](something along those lines) which gives you a great utility to further customize your antiban in your script.
Iirc.