SRL Archive - MSI Suggestions

"Human-like" breaking


NCDS

2010-09-20 22:10:22

Brought up recently in this thread.

My personal opinion would be to have it randomly choose between timing out, LogoutToLobby, or just Logout;

That's what I do in my personal scripts and it doesn't really effect anything, just makes the script more random.

Does anybody oppose me doing this?

Overtime

2010-09-20 22:19:44

Eh, I don't know about timing out because that does take a while for it to time out…

But it is more "human-like" especially if you just left afk because you had a phone call or something happened that you had to take care of.

But yes i do agree with the random LogoutToLobby or Just a simple Logout. I think you should bring this to the table of MSI :)

Thx for bringing up my Suggestion

NCDS

2010-09-20 22:41:55

We could always just have it timeout more randomly than the other two.

We could even combine them as well. Do something like:

Wait(RandomRange(60000 * 1, 60000 * 3));
if LoggedIn then
if InRange(Random(10), 1, 5) then
Logout
else
LogoutToLobby;

Coh3n

2010-09-20 22:52:48

Why not just do

case Random(6) of
0: Logout;
3, 6: Wait();
else
ExitToLobby;
end;
Of course it can be changed to whatever we want to happen most often.

NCDS

2010-09-20 22:58:39

From: Coh3n
Why not just do

case Random(6) of
0: Logout;
3, 6: Wait();
else
ExitToLobby;
end;
Of course it can be changed to whatever we want to happen most often.


Yeah that would be fine, I was just saying that for even more randomness we could have the char go AFK for a couple minutes, then log out sometimes.

Coh3n

2010-09-20 22:59:29

From: NCDS
Yeah that would be fine, I was just saying that for even more randomness we could have the char go AFK for a couple minutes, then log out sometimes.

Add that to the case. ;)

NCDS

2010-09-20 23:05:58

From: Coh3n
Add that to the case. ;)


That was my intent :staycool:

TRiLeZ

2010-09-21 00:11:56

Human-like breaking? Humans loose focus, and so should bots. So, when a certain amount of focus has been lost, it should take a break, and while it's taking a break, it will replenish focus. Once enough focus has been restored, it will end it's break and will continue to bot and start loosing focus again.

How will we show that the bot is loosing focus? Waiting a little more time at every wait and gradually decreasing the mouse speed.

That's just what my thoughts are on human-like breaking. :)

NCDS

2010-09-21 00:18:14

From: TRiLeZ
Human-like breaking? Humans loose focus, and so should bots. So, when a certain amount of focus has been lost, it should take a break, and while it's taking a break, it will replenish focus. Once enough focus has been restored, it will end it's break and will continue to bot and start loosing focus again.

How will we show that the bot is loosing focus? Waiting a little more time at every wait and gradually decreasing the mouse speed.

That's just what my thoughts are on human-like breaking. :)


For the sake of script efficiency, I don't see that happening, not that it's a bad idea.

I think the idea's already in this thread will do well representing human action.

Sir R. M8gic1an

2010-09-21 03:53:27

I like the idea. A lot actually :)

As for the losing of focus, that could be something to develop separately ;)

~RM

NCDS

2010-09-21 03:54:19

From: Sir R. Magician
I like the idea. A lot actually :)

As for the losing of focus, that could be something to develop separately ;)

~RM


I'm glad, because I plan on implementing this in the morning :)

Gu3st...

2010-09-21 08:17:07

What about a setting named "Human-Breaking" that the user can use if they want to? Default is of course not to use it.
I really liked Trilez' idea!

NCDS

2010-09-21 12:55:53

I suppose it wouldn't hurt to have the option for the user.

I'll add that too and if there are any objections it can be easily changed.


Edit:
Anyone object to this:

if HUMAN_BREAKING then
case Random(10) of
0..2: Logout;

1: while LoggedIn do
Wait(100);

3..6: begin
Wait(RandomRange(60000 * 1, 60000 * 3));
if LoggedIn then
if InRange(Random(10), 1, 5) then
Logout
else
ExitToLobby;
end;

7..9: ExitToLobby;
end
else
if InRange(Random(10), 2, 9) then
ExitToLobby;

Edit: Committed.

Overtime

2010-09-21 14:57:55

It looks good. You have my vote

Sir R. M8gic1an

2010-09-21 15:01:06

Errr… and what is the other one? inHuman? I'd say that const has no sense.

~RM

NCDS

2010-09-21 15:10:13

if HUMAN_BREAKING is false then it does what MSI always does now.

procedure MSI_HandleBreaking;
var
t: Integer;
begin
if (not LoggedIn) then
Exit;

if (BankScreen) then
CloseBank;

MSI_AddHeader('MSI_HandleBreaking');

if (HowManyPlayers = 1) or (PlayersActive = 1) then
begin
MSI_Debug('Taking a short break');

if HUMAN_BREAKING then
case Random(10) of

0..2: Logout;

1: while LoggedIn do
Wait(100);

3..6: begin
Wait(RandomRange(60000 * 1, 60000 * 3));
if LoggedIn then
if InRange(Random(10), 1, 5) then
Logout
else
ExitToLobby;
end;

7..9: ExitToLobby;
end
else
if InRange(Random(10), 2, 9) then
ExitToLobby;

t := (GetSystemTime + ((BREAK_TIME * 60000) + RandomRange(-300000, 300000)));
while GetSystemTime < t do
begin
Status('BREAK_TIME remaining: '+MsToTime(t - GetSystemTime, Time_Formal)+';');
Wait(RandomRange(2000, 25000));
if LoggedIn then
FindNormalRandoms;
end;

MSI_Debug('Break over, continuing to play');

if (LobbyScreen) then
MouseBox(80, 450, 560, 470, 1);
end else
begin
MSI_Debug('Switching players');
NextPlayer(True);
end;

t := GetSystemTime + 5000;
while (GetSystemTime < t) do
begin
Wait(50);
if (LoggedIn) then
Break;
end;

Inc(Stats_CustomVars[STATS_LOGINS]);
MSI_SendStats;
MSI_CloseHeader('MSI_HandleBreaking: ' + BoolToStr(LoggedIn));
end;

Thats the whole thing. I only added the const because it was suggested and could be easily removed, as I stated above.

Dervish

2010-09-21 16:32:37

From: TRiLeZ
Human-like breaking? Humans loose focus, and so should bots. So, when a certain amount of focus has been lost, it should take a break, and while it's taking a break, it will replenish focus. Once enough focus has been restored, it will end it's break and will continue to bot and start loosing focus again.

How will we show that the bot is loosing focus? Waiting a little more time at every wait and gradually decreasing the mouse speed.

That's just what my thoughts are on human-like breaking. :)


Not only by decreasing the mouse speed but also by having mini-breaks and if possible, having the mouse moving out of the RS Client to fake visiting other sites ?

However… it has been proven that most of the bans come from reports from other players.

NCDS

2010-09-21 16:47:31

From: Dr D. Dervish
Not only by decreasing the mouse speed but also by having mini-breaks and if possible, having the mouse moving out of the RS Client to fake visiting other sites ?

However… it has been proven that most of the bans come from reports from other players.


So what you guy's are suggestion is to have a Timer going during runtime, and as the timer progresses, slow down reaction time, then randomly afk for breaks as well as take "scheduled" breaks? That seems as if it would take quite a bit of editing to the core, but is certainly possible.


It would be quite simple to just add a Wait(RandomRange(30000, (60000 * 2) + Random(60000))); in MSI_AntiBan to simulate random afk's. That is, if that's what your after.

Dervish

2010-09-21 17:16:40

From: NCDS
So what you guy's are suggestion is to have a Timer going during runtime, and as the timer progresses, slow down reaction time, then randomly afk for breaks as well as take "scheduled" breaks? That seems as if it would take quite a bit of editing to the core, but is certainly possible.


It would be quite simple to just add a Wait(RandomRange(30000, (60000 * 2) + Random(60000))); in MSI_AntiBan to simulate random afk's. That is, if that's what your after.


TrileZ's original idea, and its great ^^ .

Imo what's most interesting would be having the mouse move out of the client.

When a human woodcuts, he usually doesn't just wait or move the mouse around, he browses the web or something :).

NCDS

2010-09-21 17:21:19

From: Dr D. Dervish
TrileZ's original idea, and its great ^^ .

Imo what's most interesting would be having the mouse move out of the client.

When a human woodcuts, he usually doesn't just wait or move the mouse around, he browses the web or something :).


So as an MSI_AntiBan, you just want the mouse to be moved off the RS client to represent a person browsing the web?

That seems more logical than TRiLeZ's idea. Just for script speed/efficiency purposes.

Coh3n

2010-09-21 18:26:47

From: Dr D. Dervish
When a human woodcuts, he usually doesn't just wait or move the mouse around, he browses the web or something :).

Isn't there already an antiban procedure that does this? IIRC, I've seen a script do this while testing. If not:

program new;
{$i srl/srl.scar}

procedure LeaveMainScreen(HowLong: Integer);
var
w, h, x, y: Integer;
begin
GetClientDimensions(w, h);

case Random(4) of
0: begin // Quadrant 1
x := (w + RandomRange(30, 50));
y := (0 - RandomRange(30, 50));
end;

1: begin // Quadrant 2
x := (0 - RandomRange(30, 50));
y := (0 - RandomRange(30, 50));
end;

2: begin // Quadrant 3
x := (0 - RandomRange(30, 50));
y := (h + RandomRange(30, 50));
end;

3: begin // Quadrant 4
x := (w + RandomRange(30, 50));
y := (h + RandomRange(30, 50));
end;
end;

MMouse(x, y, 0, 0);
Wait(HowLong + RandomRange(-1000, 1000));
end;

begin
SetupSRL;
ClearDebug;
MMouse(35, 88, 0, 0);
Wait(3000);
LeaveMainScreen(5000);
end.

NCDS

2010-09-21 18:36:30

From: Coh3n
Isn't there already an antiban procedure that does this? IIRC, I've seen a script do this while testing. If not:

program new;
{$i srl/srl.scar}

procedure LeaveMainScreen(HowLong: Integer);
var
w, h, x, y: Integer;
begin
GetClientDimensions(w, h);

case Random(4) of
0: begin // Quadrant 1
x := (w + RandomRange(30, 50));
y := (0 - RandomRange(30, 50));
end;

1: begin // Quadrant 2
x := (0 - RandomRange(30, 50));
y := (0 - RandomRange(30, 50));
end;

2: begin // Quadrant 3
x := (0 - RandomRange(30, 50));
y := (h + RandomRange(30, 50));
end;

3: begin // Quadrant 4
x := (w + RandomRange(30, 50));
y := (h + RandomRange(30, 50));
end;
end;

MMouse(x, y, 0, 0);
Wait(HowLong + RandomRange(-1000, 1000));
end;

begin
SetupSRL;
ClearDebug;
MMouse(35, 88, 0, 0);
Wait(3000);
LeaveMainScreen(5000);
end.


It shiouldn't even need to be that much code. Jagox should only be able to detect the mouse on the client so just move the bouse anywhere outside of MSBox should have the samme effect.

Coh3n

2010-09-21 23:41:00

From: NCDS
It shiouldn't even need to be that much code. Jagox should only be able to detect the mouse on the client so just move the bouse anywhere outside of MSBox should have the samme effect.

Yeah, I'm sure it can be done somehow in a few lines. But this works for now. :p

Gu3st...

2010-09-22 10:19:10

procedure LeaveMainScreen(HowLong : Integer);
var
ClientBox, B : TBox;
w, h : Integer;
P : TPoint;
begin
GetClientDimensions(w, h);
ClientBox := IntToBox(0, 0, w, h);
B := IntToBox(-30, -30, w+30, h+30);

while PointInBox(P, ClientBox) do
P := Point(RandomRange(B.X1, B.X2), RandomRange(B.Y1, B.Y2));

MMouse(P.X, P.Y, 0, 0);
Wait(HowLong);
end;
Should work… I wrote it in notepad though, so I haven't tested

Coh3n

2010-09-22 13:07:31

From: Zyt3x
Should work… I wrote it in notepad though, so I haven't tested

It would, but it could potentially wait a very long time before getting a point that's outside the client (since it's randomly chosen).

gamer716

2010-09-22 14:42:14

From: Coh3n
Isn't there already an antiban procedure that does this? IIRC, I've seen a script do this while testing. If not:


I was actually looking for something like this to incorporate into my script. Thanks!

Also, I was considering human-like inventory dropping procedure where it misclicks the item.

Gu3st...

2010-09-22 15:02:33

From: Coh3n
It would, but it could potentially wait a very long time before getting a point that's outside the client (since it's randomly chosen).
I tested it out, and it works just fine. Calculates where to move the mouse in 0ms.
I looped it 100 times and it took 16ms in total to calculate the points.

procedure LeaveMainScreen(HowLong : Integer);
var
ClientBox, B : TBox;
w, h : Integer;
P : TPoint;
begin
GetClientDimensions(w, h);
ClientBox := IntToBox(0, 0, w, h);
B := IntToBox(-30, -30, w+30, h+30);

while PointInBox(P, ClientBox) do
P := Point(RandomRange(B.X1, B.X2), RandomRange(B.Y1, B.Y2));

// Removed MMouse and Wait so only the calculation is counted.
end;

var
I, t : Integer;

begin
t := GetSystemTime;
for I := 1 to 100 do
LeaveMainScreen(0);
WriteLn(GetSystemTime-t);
end.

Dervish

2010-09-22 15:07:02

From: NCDS
It shiouldn't even need to be that much code. Jagox should only be able to detect the mouse on the client so just move the bouse anywhere outside of MSBox should have the samme effect.


How do you know ? pretty sure they can track outside the client aswell, aslong as you have it as focus .

NCDS

2010-09-22 15:25:20

From: NCDS
It shiouldn't even need to be that much code. Jagox should only be able to detect the mouse on the client so just move the bouse anywhere outside of MSBox should have the samme effect.


From: Dr D. Dervish
How do you know ? pretty sure they can track outside the client aswell, aslong as you have it as focus .

There really isn't much to do about it then as long as the user is using SMART.

Maybe there is, I'm not really in "code mode" at the momet. Give me an hour or so and I'll be working on my daily stuff..

Sir R. M8gic1an

2010-09-23 04:21:35

@Zytex: Coh3n is right. Your function potentially could lag us to hell. I'd suggesting just choosing a side to have the mouse go out from (randomly) and make sure it does.

~RM

Gu3st...

2010-09-23 08:10:00

From: Sir R. Magician
@Zytex: Coh3n is right. Your function potentially could lag us to hell. I'd suggesting just choosing a side to have the mouse go out from (randomly) and make sure it does.

~RM
I noticed the CPU use went up to 50% on both processses, so we can do it like this instead:
procedure LeaveMainScreen(HowLong : Integer);
var
ClientBox, B : TBox;
w, h, X, c : Integer;
P : TPoint;
begin
GetClientDimensions(w, h);
ClientBox := IntToBox(0, 0, w, h);
B := IntToBox(-30, -30, w+30, h+30);

while PointInBox(P, ClientBox) do
begin
P := Point(RandomRange(B.X1, B.X2), RandomRange(B.Y1, B.Y2));
Wait(1); // To stop lag
Inc(c);
if c > 50 then // To stop it from looping
MMouse(-30, -30, 0, 0);
end;

MMouse(P.X, P.Y, 0, 0);
Wait(HowLong);
end;
I don't like it when it moves the mouse in the same direction :/

Sir R. M8gic1an

2010-09-23 08:27:21

That still leaves you looping.


procedure LeaveMainScreen(HowLong : Integer);
var
ClientBox, B : TBox;
w, h, X, c : Integer;
P : TPoint;
begin
GetClientDimensions(w, h);
ClientBox := IntToBox(0, 0, w, h);
B := IntToBox(-30, -30, w+30, h+30);


case Random(4) of
0: P := Point(B.X1 - random(30) - 10, RandomRange(B.Y1, B.Y2);
1: P := Point(B.X2 + random(30) + 10, RandomRange(B.Y1, B.Y2);
2: P := Point(RandomRange(B.X1, B.X2), B.Y1 - random(30) -10);
3: P := Point(RandomRange(B.X1, B.X2, B.Y2 + random(30) + 10);
end;

MMouse(P.X, P.Y, 0, 0);
Wait(HowLong);
end;

~RM

Gu3st...

2010-09-23 08:28:29

From: Sir R. Magician
That still leaves you looping.


procedure LeaveMainScreen(HowLong : Integer);
var
ClientBox, B : TBox;
w, h, X, c : Integer;
P : TPoint;
begin
GetClientDimensions(w, h);
ClientBox := IntToBox(0, 0, w, h);
B := IntToBox(-30, -30, w+30, h+30);


case Random(4) of
0: P := Point(B.X1 - 30, RandomRange(B.Y1, B.Y2);
1: P := Point(B.X2 + 30, RandomRange(B.Y1, B.Y2);
2: P := Point(RandomRange(B.X1, B.X2), B.Y1 - random(30) -10);
3: P := Point(RandomRange(B.X1, B.X2, B.Y2 + random(30) + 10);
end;

MMouse(P.X, P.Y, 0, 0);
Wait(HowLong);
end;

~RM


Damn, I forgot the Break >_<
But yeah, that would work perfect :)

Runescape Pro

2010-09-23 09:06:59

Wow, I really like how in-depth you guys get about trying to make human-like scripts. When I usually write a script, I'll make a constant of how many loads to do before taking a break of say 5-10 minutes but this on a whole different level of greatness. Great job guys. :)

I haven't looked into msi at all because I only play on my main. I'll definitely make some accounts to see what all the buzz is about ;)

In my opinion, MSI could(or already) be better than anything any other bot has to offer. You people are amazing.

Gu3st...

2010-09-23 10:40:27

Oh, just you wait runescape pro :D
This will be so freakin' insane and amazing that you wouldn't need anything else ;)

Overtime

2010-09-23 10:44:55

MSI is the new era.

It's like when everyone were buying addidas and then Nike came out.

It's changing everything.

Runescape Pro

2010-09-23 10:53:18

I love how it's all in one. It will change the world! :)

Coh3n

2010-09-23 17:22:42

Glad you guys like it so much! :)

TRiLeZ

2010-09-23 17:47:57

From: Dr D. Dervish
How do you know ? pretty sure they can track outside the client aswell, aslong as you have it as focus .


When you move the mouse anywhere except the client, no event is dispatched to the client, so in order for Jagex to track mouse movement outside of the client, they would have to get your real mouse's position every few hundred ms and if the mouse position has changed, it would have to send that to the server, which would take a lot of resources, so Jagex probably doesn't do that.

NCDS

2010-09-23 21:26:58

From: Coh3n
Glad you guys like it so much! :)


Indeed, the kind words are greatly appreciated and make it all so worth it :)