Results 1 to 7 of 7

Thread: SleepAndMoveMouse;

  1. #1
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default SleepAndMoveMouse;

    In Mouse.scar.
    SCAR Code:
    {*******************************************************************************
    procedure SleepAndMoveMouse(Time: Integer);
    By: RSN
    Description: Waits for specified time and moves mouse around like bored human would.
    *******************************************************************************}


    procedure SleepAndMoveMouse(Time: Integer);
    var
      Moving: Boolean;
      mx, my: Integer;
      x, y, xv, yv: Extended;
      gx, gy: Extended;
      T: Integer;
    begin
      GetMousePos(mx, my);
      x := mx;
      y := my;
      if (Random(2) = 0) then
        Moving := False
      else
        Moving := True;
      gx := 130 + Random(500);
      gy := 130 + Random(300);
      T := GetTickCount;
      repeat
        Sleep(10);
        if (Moving) then
        begin
          if (gx > x) then
            xv := xv + 0.1
          else
            xv := xv - 0.1;
          if (gy > y) then
            yv := yv + 0.1
          else
            yv := yv - 0.1;
          x := x + xv;
          y := y + yv;
          MoveMouse(Round(x), Round(y));
        end;
        if (Random(100) = 0) then
          Moving := not Moving;
        if (Random(30) = 0) then
        begin
          gx := 130 + Random(500);
          gy := 130 + Random(300);
        end;
      until (Abs(GetTickCount - T) >= Time);  
    end;
    Shouldn't the MoveMouses be replaces with something less detecable by Jagex? Unless I am just a nub and don't see something.... :S


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  2. #2
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    You're nub.

    As you can see, it clearly calculates coordinates to move to, it doesnt move to a random spot.
    I made a new script, check it out!.

  3. #3
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by Markus View Post
    You're nub.

    As you can see, it clearly calculates coordinates to move to, it doesnt move to a random spot.
    Meh, but it still uses MoveMouse?


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  4. #4
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So Does MMouse --> Uses WindMouse.. Uses MoveMouse

    SCAR Code:
    {*******************************************************************************
    procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
    By: Benland100
    Description:
    *******************************************************************************}

    procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
    var
      veloX, veloY, windX, windY, veloMag, dist, randomDist, lastDist, step: extended;
      lastX, lastY: integer;
      sqrt2, sqrt3, sqrt5: extended;
    begin
      sqrt2:= sqrt(2);
      sqrt3:= sqrt(3);
      sqrt5:= sqrt(5);
      while hypot(xs - xe, ys - ye) > 1 do
      begin
        dist:= hypot(xs - xe, ys - ye);
        wind:= minE(wind, dist);
        if dist >= targetArea then
        begin
          windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
          windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
        end else
        begin
          windX:= windX / sqrt2;
          windY:= windY / sqrt2;
          if (maxStep < 3) then
          begin
            maxStep:= random(3) + 3.0;
          end else
          begin
            maxStep:= maxStep / sqrt5;
          end;
        end;
        veloX:= veloX + windX;
        veloY:= veloY + windY;
        veloX:= veloX + gravity * (xe - xs) / dist;
        veloY:= veloY + gravity * (ye - ys) / dist;
        if hypot(veloX, veloY) > maxStep then
        begin
          randomDist:= maxStep / 2.0 + random(round(maxStep) / 2);
          veloMag:= sqrt(veloX * veloX + veloY * veloY);
          veloX:= (veloX / veloMag) * randomDist;
          veloY:= (veloY / veloMag) * randomDist;
        end;
        lastX:= Round(xs);
        lastY:= Round(ys);
        xs:= xs + veloX;
        ys:= ys + veloY;
        if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
          MoveMouse(Round(xs), Round(ys));
        step:= hypot(xs - lastX, ys - lastY);
        wait(round((maxWait - minWait) * (step / maxStep) + minWait));
        lastdist:= dist;
      end;
      if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
        MoveMouse(Round(xe), Round(ye));
    end;


    it moves with movemouse. then waits a caculate from Mouse Speed. Then Moves Again...

  5. #5
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, in real, you move you're mouse, pixel by pixel, so does the function.
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  6. #6
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What I Meant :-p

    Move 1 pixel. Calcute the mouse speed to a wait time. and wait. Move Mouse 1 More pixel.

  7. #7
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Hy71194 View Post
    Meh, but it still uses MoveMouse?
    Becfause that's kinda of the "basic" mouse movement?

    The way of depending the coordinates the mouse has to move to, makes it less detectable

    -Tsn.
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

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
  •