SRL Archive - OSR Outdated Tutorials

Guide to adding anti-ban to your scripts!


rj

2013-03-01 18:15:50

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:

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:

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:

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:

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!

dzpliu

2013-03-03 05:31:35

Procedure HumanMove;
Begin
case random(200) of
1..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;

how do you add this to a existing procedure? for example:

procedure MakeStaffs;
begin
MouseSpeed := 40;
InvMouse(14, mouse_left);
Wait(100);
InvMouse(15, mouse_left);
Wait(300 + Random(20));
if(finddtm(make, x, y, MSX1, MSY1, MSX2, MSY2))then
begin
MMouse(RandomRange(X - 5, X + 5), RandomRange(y - 7, y + 5), 0, 0);
if WaitUptext('Make', 100+Random(300)) then
ClickMouse2(mouse_Left)
else
Writeln('Could not find Make DTM');
Wait(18000 + Random(20));
end;
end;

rj

2013-03-03 10:06:35

From: dzpliu
how do you add this to a existing procedure? for example:


Declare X and Y as globals variables and instead of

MMouse(RandomRange(X - 5, X + 5), RandomRange(y - 7, y + 5), 0, 0);

Just do
HumanMove;

Sin

2013-03-03 10:17:38

Well done, but this is all depending on whether you're using MiddleTPA();, or a spiral finding method.
If it's spiral, it'll go to the top left of the item :p

Bicep

2013-03-10 11:48:17

Hi RJJ95 thanks for the awesome guide. I have tried to add this into my powerminer script (very noob) but just wondering. Does it matter if you add this into an existing procedure or make a new one? I have tried adding this to an existing one using Humanmove; but got compiling errors.

rj

2013-03-11 17:46:40

From: Bicep
Hi RJJ95 thanks for the awesome guide. I have tried to add this into my powerminer script (very noob) but just wondering. Does it matter if you add this into an existing procedure or make a new one? I have tried adding this to an existing one using Humanmove; but got compiling errors.


Can you post the code?

Lord Waffles

2013-03-14 13:58:44

This is pretty awesome, thank you for posting.

I'm extremely new to the forums and i'm currently working on my own script. I'm to the point I need to select an item from an inventory slot. How does one get the mouse co-ords of the locations in your inventory/screen? I tried searching, but unless i'm doing it wrong…the search feature on the site doesn't seem to find me much of anything…


EDIT: Never mind I figured it out. For those who may also be curious when you have simba opened you may have noticed the co-ords in the bottom left? To get that to reset to the location of the window just simply drag the window selector over the RS window…I can't believe I didn't think of it sooner…

rj

2013-03-14 18:55:53

From: Lord Waffles
This is pretty awesome, thank you for posting.

I'm extremely new to the forums and i'm currently working on my own script. I'm to the point I need to select an item from an inventory slot. How does one get the mouse co-ords of the locations in your inventory/screen? I tried searching, but unless i'm doing it wrong…the search feature on the site doesn't seem to find me much of anything…


EDIT: Never mind I figured it out. For those who may also be curious when you have simba opened you may have noticed the co-ords in the bottom left? To get that to reset to the location of the window just simply drag the window selector over the RS window…I can't believe I didn't think of it sooner…

Np.

Im New Sry

2013-03-23 12:25:51

RJJ, way to go man! I'm still learning and I am pretty nooby at this. Now, for example, I want to click on Clay. My code is this

Program wtf;
{$i SRL/srl.simba}
Var
x,y:integer;
Procedure WhereIsDatClay;
var
ClayCTS, i, L, r, counter:integer;
ClayTPA:TPointArray;
begin
ClayCTS := GetToleranceSpeed;

SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03,2.94);

FindColorsTolerance(ClayTPA, 7781861, MSX1, MSY1, MSX2, MSY2, 8);

SetColorToleranceSpeed(ClayCTS);
SetToleranceSpeed2Modifiers(0.02,0.02);

L := High(ClayTPA)
marktime(counter);
for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));
mmouse(ClayTPA[r].x, ClayTPA[r].y, 10, 12);
if waituptext('lay', 300) then
clickmouse2(mouse_left);
repeat
Wait(1500+random(350));
Until not IsUpText('lay') or (InvFull);
until(InvFull);
end;
end;
begin
SetupSRL;
WhereIsDatClay;
end.

Now, what I have to do, is change

mmouse(ClayTPA[r].x, ClayTPA[r].y, 10, 12);

to what exactly? I tried doing

HumanMove(ClayTPA);
but got "Invalid number of parameters at this line".

My code is

Program wtf;
{$i SRL/srl.simba}
Var
x,y:integer;
Procedure HumanMove;
Begin
case random(200) of
1..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;
Procedure WhereIsDatClay;
var
ClayCTS, i, L, r, counter:integer;
ClayTPA:TPointArray;
begin
ClayCTS := GetToleranceSpeed;

SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03,2.94);

FindColorsTolerance(ClayTPA, 7781861, MSX1, MSY1, MSX2, MSY2, 8);

SetColorToleranceSpeed(ClayCTS);
SetToleranceSpeed2Modifiers(0.02,0.02);

L := High(ClayTPA)
marktime(counter);
for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));
HumanMove(ClayTPA);
if waituptext('lay', 300) then
clickmouse2(mouse_left);
repeat
Wait(1500+random(350));
Until not IsUpText('lay') or (InvFull);
until(InvFull);
end;
end;
begin
SetupSRL;
WhereIsDatClay;
end.

rj

2013-03-23 14:24:36

From: Im New Sry
RJJ, way to go man! I'm still learning and I am pretty nooby at this. Now, for example, I want to click on Clay. My code is this

Program wtf;
{$i SRL/srl.simba}
Var
x,y:integer;
Procedure WhereIsDatClay;
var
ClayCTS, i, L, r, counter:integer;
ClayTPA:TPointArray;
begin
ClayCTS := GetToleranceSpeed;

SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03,2.94);

FindColorsTolerance(ClayTPA, 7781861, MSX1, MSY1, MSX2, MSY2, 8);

SetColorToleranceSpeed(ClayCTS);
SetToleranceSpeed2Modifiers(0.02,0.02);

L := High(ClayTPA)
marktime(counter);
for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));
mmouse(ClayTPA[r].x, ClayTPA[r].y, 10, 12);
if waituptext('lay', 300) then
clickmouse2(mouse_left);
repeat
Wait(1500+random(350));
Until not IsUpText('lay') or (InvFull);
until(InvFull);
end;
end;
begin
SetupSRL;
WhereIsDatClay;
end.

Now, what I have to do, is change

mmouse(ClayTPA[r].x, ClayTPA[r].y, 10, 12);

to what exactly? I tried doing

HumanMove(ClayTPA);
but got "Invalid number of parameters at this line".

My code is

Program wtf;
{$i SRL/srl.simba}
Var
x,y:integer;
Procedure HumanMove;
Begin
case random(200) of
1..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;
Procedure WhereIsDatClay;
var
ClayCTS, i, L, r, counter:integer;
ClayTPA:TPointArray;
begin
ClayCTS := GetToleranceSpeed;

SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03,2.94);

FindColorsTolerance(ClayTPA, 7781861, MSX1, MSY1, MSX2, MSY2, 8);

SetColorToleranceSpeed(ClayCTS);
SetToleranceSpeed2Modifiers(0.02,0.02);

L := High(ClayTPA)
marktime(counter);
for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));
HumanMove(ClayTPA);
if waituptext('lay', 300) then
clickmouse2(mouse_left);
repeat
Wait(1500+random(350));
Until not IsUpText('lay') or (InvFull);
until(InvFull);
end;
end;
begin
SetupSRL;
WhereIsDatClay;
end.



Well, make your clicking procedure more like:

 case random(200) of
1..160: mmouse(ClayTPA[r].x+(RandomRange(r - 7, r + 7)), ClayTPA[r].y+(RandomRange(r - 7, r + 7)), 0, 0);
161..190: mmouse(ClayTPA[r].x+(RandomRange(r - 9, r + 9)), ClayTPA[r].y+(RandomRange(r - 9, r + 9)), 0, 0);
191..200: mmouse(ClayTPA[r].x+(RandomRange(r - 12, r + 12)), ClayTPA[r].y+(RandomRange(r - 12, r + 12)), 0, 0);
End;

Because the program is storing the location in r instead of x and y, i advise keeping this local so it would look like:

Program wtf;
{$i SRL/srl.simba}
Var
x,y:integer;

Procedure WhereIsDatClay;
var
ClayCTS, i, L, r, counter:integer;
ClayTPA:TPointArray;
begin
ClayCTS := GetToleranceSpeed;

SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03,2.94);

FindColorsTolerance(ClayTPA, 7781861, MSX1, MSY1, MSX2, MSY2, 8);

SetColorToleranceSpeed(ClayCTS);
SetToleranceSpeed2Modifiers(0.02,0.02);

L := High(ClayTPA)
marktime(counter);
for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));

if waituptext('lay', 300) then
case random(200) of
1..160: mmouse(ClayTPA[r].x+(RandomRange(r - 7, r + 7)), ClayTPA[r].y+(RandomRange(r - 7, r + 7)), 0, 0);
161..190: mmouse(ClayTPA[r].x+(RandomRange(r - 9, r + 9)), ClayTPA[r].y+(RandomRange(r - 9, r + 9)), 0, 0);
191..200: mmouse(ClayTPA[r].x+(RandomRange(r - 12, r + 12)), ClayTPA[r].y+(RandomRange(r - 12, r + 12)), 0, 0);
End;
repeat
Wait(1500+random(350));
Until not IsUpText('lay') or (InvFull);
//until(InvFull);
end;
end;
begin
SetupSRL;
WhereIsDatClay;
end.

Im New Sry

2013-03-23 14:47:52

From: RJJ95
Well, make your clicking procedure more like:

 case random(200) of
1..160: mmouse(ClayTPA[r].x+(RandomRange(r - 7, r + 7)), ClayTPA[r].y+(RandomRange(r - 7, r + 7)), 0, 0);
161..190: mmouse(ClayTPA[r].x+(RandomRange(r - 9, r + 9)), ClayTPA[r].y+(RandomRange(r - 9, r + 9)), 0, 0);
191..200: mmouse(ClayTPA[r].x+(RandomRange(r - 12, r + 12)), ClayTPA[r].y+(RandomRange(r - 12, r + 12)), 0, 0);
End;

Because the program is storing the location in r instead of x and y, i advise keeping this local so it would look like:

Program wtf;
{$i SRL/srl.simba}
Var
x,y:integer;

Procedure WhereIsDatClay;
var
ClayCTS, i, L, r, counter:integer;
ClayTPA:TPointArray;
begin
ClayCTS := GetToleranceSpeed;

SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03,2.94);

FindColorsTolerance(ClayTPA, 7781861, MSX1, MSY1, MSX2, MSY2, 8);

SetColorToleranceSpeed(ClayCTS);
SetToleranceSpeed2Modifiers(0.02,0.02);

L := High(ClayTPA)
marktime(counter);
for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));

if waituptext('lay', 300) then
case random(200) of
1..160: mmouse(ClayTPA[r].x+(RandomRange(r - 7, r + 7)), ClayTPA[r].y+(RandomRange(r - 7, r + 7)), 0, 0);
161..190: mmouse(ClayTPA[r].x+(RandomRange(r - 9, r + 9)), ClayTPA[r].y+(RandomRange(r - 9, r + 9)), 0, 0);
191..200: mmouse(ClayTPA[r].x+(RandomRange(r - 12, r + 12)), ClayTPA[r].y+(RandomRange(r - 12, r + 12)), 0, 0);
End;
repeat
Wait(1500+random(350));
Until not IsUpText('lay') or (InvFull);
//until(InvFull);
end;
end;
begin
SetupSRL;
WhereIsDatClay;
end.


Thank you! And stupid me, got confused with 'until not blahblah or (InvFull)' :D

Hobbit

2013-03-23 19:38:27

https://github.com/SRL/SRL-5/commit/0497c973f11c4d5b17b39d7c98258aaec48113b5

Ian

2013-03-23 20:10:36

Useful tips about the mouse movements, although it's misleading to make statements like
You may be wondering, how does Jagex detect bots? The answer is 4 things:

unless you work for Jagex. We don't know how Jagex detects bots, all we can do is speculate about what they could do and if they are doing it. We do know that whatever they are doing isn't working against us.

Please don't get the wrong idea about this post, I always use randomness in my scripts, I just think that it's arrogant to say we know "the four things Jagex uses to detect bots".

rj

2013-03-23 20:13:17

From: BMWxi
Useful tips about the mouse movements, although it's misleading to make statements like

unless you work for Jagex. We don't know how Jagex detects bots, all we can do is speculate about what they could do and if they are doing it. We do know that whatever they are doing isn't working against us.

Please don't get the wrong idea about this post, I always use randomness in my scripts, I just think that it's arrogant to say we know "the four things Jagex uses to detect bots".


let me change to 4 basic things lol i didn't mean to post an outline

Ian

2013-03-23 20:54:22

From: RJJ95
let me change to 4 basic things lol i didn't mean to post an outline


Yeah lol, we can't limit ourselves! :)

personally I think the most important things are taking breaks and randomization of clicks and times, but I'm sure there's more to Jagex's ability than that :)

Also, not getting into any loop fiascos.

Sin

2013-03-23 21:16:48

From: BMWxi
Yeah lol, we can't limit ourselves! :)

personally I think the most important things are taking breaks and randomization of clicks and times, but I'm sure there's more to Jagex's ability than that :)

Also, not getting into any loop fiascos.



kriss1993

2013-06-19 15:25:57

Umm, not sure if I got it right but u tell me guys
http://www.upload.ee/image/3394016/is_that_how_it_works.JPG
theres the picture of how i see it

al4k

2013-06-19 15:35:48

From: kriss1993
Umm, not sure if I got it right but u tell me guys
http://www.upload.ee/image/3394016/is_that_how_it_works.JPG
theres the picture of how i see it


MMouse(x,y,7,7) == MMouse(RandomRange(x-3,x+3),RandomRange(y-3,y+3),0,0)

btw that is the slowest loading image I have ever seen

rj

2013-06-19 15:39:50

From: kriss1993
Umm, not sure if I got it right but u tell me guys
http://www.upload.ee/image/3394016/is_that_how_it_works.JPG
theres the picture of how i see it


Resize that picture please..lol it's massive

kriss1993

2013-06-19 15:52:39

If I would resize it it wouldnt be readable and is 5MB rly that massive?

al4k

2013-06-19 15:57:14

From: Officer Barbrady
Resize that picture please..lol it's massive


here http://gyazo.com/e2fc23212cd4d70ff11f842a50ebca90

rj

2013-06-19 16:15:24

From: al4k
here http://gyazo.com/e2fc23212cd4d70ff11f842a50ebca90


Ahh that's much better

kriss1993

2013-06-19 16:18:08

however u didnt answer me if im getting it right or not?

Athylus

2013-08-13 13:10:30

Nvm I fixed my problem. I can now left click, also using ACA. Works like a charm.

grasshopper1494

2013-11-04 16:43:51

How is it possible to search for the crown?