Results 1 to 8 of 8

Thread: WaitHuman

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default WaitHuman

    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:
    Simba Code:
    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

  2. #2
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

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

  3. #3
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    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

  4. #4
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by The Killer View Post
    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

  5. #5
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    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..

  6. #6
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    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

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

  7. #7
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    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

  8. #8
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    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

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


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •