SRL Archive - SRL Suggestions

WaitHuman


rj

2013-02-02 15:57:44

When ever a human is mining or doing anything else, they usually hover the object, wait a little bit or click while the mouse is scrolling. This procedure waits like a human which is usally between 50-250 ms. But sometimes the person gets tired or just waits a little longer.
So here it is:
procedure WaitHuman;
begin
case random(60) of
1..40: Wait(RandomRange(50, 250));
40..52: Wait(RandomRange(50, 350));
52..56: Wait(RandomRange(200, 600));
56..60: Wait(RandomRange(400, 900));
end;
end;

Nothing special just adds a good amount of randomness to a script

The Killer

2013-02-02 16:07:07

Don't see the point, doesn't add that much more randomness than Wait(RandomRange(50, 900));

Le Jingle

2013-02-02 16:12:01

I wouldn't advise this, as it's not nearly generic enough for use in other scripts.

I'd personally advise in using Random() or RandomRange() in combination with Wait()/Sleep() and fitting it properly to the specific use/action within a script.

-Lj

rj

2013-02-02 16:35:54

From: The Killer
Don't see the point, doesn't add that much more randomness than Wait(RandomRange(50, 900));


It's better then just using 1 random wait though

Olly

2013-02-02 16:38:10

Wait(RandomRange(50, 250));
Wait(RandomRange(50, 350));
Wait(RandomRange(200, 600));
Wait(RandomRange(400, 900));

How is that different from Wait(RandomRange(50, 900) ?

e: you could wait between (50, 250) for 150 times, its random..

rj

2013-02-02 16:42:52

From: Ollybest
Wait(RandomRange(50, 250));
Wait(RandomRange(50, 350));
Wait(RandomRange(200, 600));
Wait(RandomRange(400, 900));

How is that different from Wait(RandomRange(50, 900) ?

e: you could wait between (50, 250) for 150 times, its random..


Exactly.. it's supposed to be random

Wait(RandomRange(50, 250)); - 66%
Wait(RandomRange(50, 350)); - 20%
Wait(RandomRange(200, 600)); - 6%
Wait(RandomRange(400, 900)); -6%

riwu

2013-02-02 20:32:48

I've actually used this a while back, in which i try to simulate a normal distribution of the wait time just like how our mouse movements are done. Not sure if that's suitable for the include though.

Also just a minor note:
Random(x) generates a value between 0 and x, including 0 but excluding x, much like how slice operations work ;)

DannyRS

2013-02-02 20:54:09

From: riwu
I've actually used this a while back, in which i try to simulate a normal distribution of the wait time just like how our mouse movements are done. Not sure if that's suitable for the include though.

Also just a minor note:
Random(x) generates a value between 0 and x, including 0 but excluding x, much like how slice operations work ;)


Always wondered if Random(X) included the X or not, all my cases have one needless integer then :p

But I always use X..X so doesn't really matter, thanks for the info riwu