Results 1 to 5 of 5

Thread: What does this part of the code do?

  1. #1
    Join Date
    Dec 2011
    Location
    -bash
    Posts
    515
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Post What does this part of the code do?

    Can someone explain what the numbers in the HumanMMouse() does and also for the Wait(RandomRange()).


    Simba Code:
    if (Seq < 4) then
        begin
          if FindAltar(X, Y) then
          begin
            ClickMouse2(True);
            Inc(AC);
            if not DidRedClick then
              goto ClickAltar;

            While IsMoving_F do
              Wait(1);

            if (Seq < 3) then
            begin
              HumanMMouse(640, 220, 15, 15);
              Wait(RandomRange(625, 900));

              While IsMoving_F do
                Wait(1);

              Wait(RandomRange(100, 150));
            end else if (Seq = 3) then
              GameTab(tab_Magic);

    I just want to tweak the script a bit to make it faster, I already did some tweaking in the wait function but I want to make sure I am actually messing with the right thing.

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

    Default

    Pretty sure HumanMMouse is a human like moving mouse procedure designed by Flight.

    Using this,
    Code:
    Wait(RandomRange(5000,6000);
    You would wait any random number of integers inbetween 5000 ms and 6000 ms (5 and 6 seconds)

  3. #3
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Many different users have created their own variations of human like mouse functions, myself included. However, the majority you see will have four parameters (the numbers), or five if the function clicks as well. The first two are the coordinates to move the mouse to, and the second two numbers are the amount of randomness to add to the coordinates. The standard SRL procedures (Mouse and MMouse) are the same. Changing any of that wouldn't speed the script up but would more than likely mess it up.

    As for the waiting, the guy about has got it spot on.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  4. #4
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    HumanMMouse(640, 220, 15, 15);
    640: the x coordinate where to click.

    HumanMMouse(640, 220, 15, 15);
    220: the y coordinate where to click

    HumanMMouse(640, 220, 15, 15);
    15: the amount of pixels it may be off on the x-axis. So somewhere between 640 - 15 and 640 + 15 it will click

    HumanMMouse(640, 220, 15, 15);
    15: Same as with the previous parameter, but on the y - axis

    Wait(RandomRange(625, 900));
    625: The minimum amount of time the script will wait.

    Wait(RandomRange(625, 900));
    900: The maximum amount of time the script will wait.

    You might think why we use these randoms, that is because a human will not wait exactly 800 ms every time and won't click on the same pixel every time.

    edit:
    super ninja'd. Had the tab waiting to long.
    Working on: Tithe Farmer

  5. #5
    Join Date
    Dec 2011
    Location
    -bash
    Posts
    515
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    HumanMMouse(640, 220, 15, 15);
    640: the x coordinate where to click.

    HumanMMouse(640, 220, 15, 15);
    220: the y coordinate where to click

    HumanMMouse(640, 220, 15, 15);
    15: the amount of pixels it may be off on the x-axis. So somewhere between 640 - 15 and 640 + 15 it will click

    HumanMMouse(640, 220, 15, 15);
    15: Same as with the previous parameter, but on the y - axis

    Wait(RandomRange(625, 900));
    625: The minimum amount of time the script will wait.

    Wait(RandomRange(625, 900));
    900: The maximum amount of time the script will wait.

    You might think why we use these randoms, that is because a human will not wait exactly 800 ms every time and won't click on the same pixel every time.

    edit:
    super ninja'd. Had the tab waiting to long.
    Thank you

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
  •