Sign in to follow this  
Followers 0
bf2forlife

about random

6 posts in this topic

1.check this out

$s = random(10, 15)
sleep($s)
sleep(?)

So how i can put the second sleep in same sleep time as the first one? Like if the first is 13, the second would be 13 too?

2. How can you put random offset in mouse clicks?

Thanks.

Share this post


Link to post
Share on other sites



1.check this out

$s = random(10, 15)
sleep($s)
sleep(?)

So how i can put the second sleep in same sleep time as the first one? Like if the first is 13, the second would be 13 too?

2. How can you put random offset in mouse clicks?

Thanks.

1.) Unless I totally missed what you are asking:

$s = random(10, 15)
sleep($s)
sleep($s)

2.) MouseClickDelay(Random(#, #)) should work.. try it out and let me know.

Share this post


Link to post
Share on other sites

ok i explain the first bit better. If i go with ur code, the first might be 12 and second 14. But we dont want that. We want that the second sleep time is same as the first.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

$s = random(10, 15)
sleep($s)
sleep($s)

With this code you are:

1) Declaring a variable named '$s'

2) Finding a Random number between 10-15 miliseconds

3) Assigning the value of the Random number to the $s variable

4) Sleeping for a amount of time based on the value found in the '$s' variable

5) AGAIN sleeping for a amount of time based on the value found in the '$s' variable

**Note: '$s' does not change unless you reassign the value in the variable.

Hope this helps.. :)

Edited by Shalm

Share this post


Link to post
Share on other sites

Oh thanks! I thought that the $s changes every time

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Oh thanks! I thought that the $s changes every time

Nope, variables only do as they are told.. Unlike me. :)

Edited by Shalm

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0