Results 1 to 7 of 7

Thread: My Other MMouse Function XD

  1. #1
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default My Other MMouse Function XD

    lol i made another one this has more curve and ect...
    i like it

    SCAR Code:
    program New;

    const
     MouseSpeed = 6;  // leave between 4 - 8


    procedure MMouse(dx, dy, rx, ry : Integer);
    var
      x, y, step, Angle, r, b1, b2 : Extended;
      cx, cy, mx, my, Speed, Slow, xx, yy : integer;
      Ctrls : array [0..2] of TPoint;
    begin
     dx := dx + Random(rx);
     dy := dy + Random(ry);
     GetMousePos(mx, my);
     Angle := Random(360) + 1;
     r :=  Random(Distance(mx, my, dx, dy)) + 10;
     cx := Trunc(r * Sin((Pi/180) * Angle) + dx - mx);
     cy := Trunc(-r * Cos((Pi/180) * Angle) + dy - my);
     Ctrls[1] := Point(cx, cy);
     Ctrls[2] := Point(dx - mx, dy - my);
     Speed := (MouseSpeed mod 6) + 1
     repeat
        Step := Step + (Speed * 0.01);
        b1 := Pow(Step, 3);
        b2 := 3 * b1 * (1 - step);
        x := Ctrls[0].x * b1 + Ctrls[1].x * b2 + Ctrls[2].x * b1 + mx;
        y := Ctrls[0].y * b1 + Ctrls[1].y * b2 + Ctrls[2].y * b1 + my;
        xx := Round(x);
        yy := Round(y);
        MoveMouse(xx, yy);
        if (Distance(xx, yy, dx, dy) < 100) and (Distance(xx, yy, dx, dy) <> 0) then
        Slow := Slow + ((Speed * MouseSpeed) / Distance(xx, yy, dx, dy)) + 2;
        if (Slow > 20) then Slow := 20;
        wait(((Speed * MouseSpeed) + Slow) + random(2));
     until (Step >= 1);
    end;


    var
     i : integer;
    begin
       for i := 1 to 4 do
       begin
        MMouse(0, 0, 700, 500);
        wait(100);
       end;
    end.

  2. #2
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Hehe! Damn, that looks nice!
    Very cool!

  3. #3
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    Hehe! Damn, that looks nice!
    Very cool!
    Thanks.

  4. #4
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Its kinda cool at far distances, but at small distances it is acting strange. The mouse moves really slow. But at large distances i like it!
    Also i noticed it sometimes skips a part of the curve, not really human :P
    Verrekte Koekwous

  5. #5
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I just realised the same thing. Seems pretty good though.
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

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

    Default

    Nice!


    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!

  7. #7
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    same comments as mastaraymond
    kind of skippy.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mmouse Function Not Working
    By pianoman933 in forum OSR Help
    Replies: 3
    Last Post: 05-12-2008, 11:19 PM
  2. MMouse help
    By rogue poser in forum OSR Help
    Replies: 9
    Last Post: 12-02-2007, 06:13 PM
  3. MMouse ???
    By saurkulsh in forum OSR Help
    Replies: 2
    Last Post: 10-25-2007, 05:04 PM
  4. MMouse Help!
    By MacroHawk in forum OSR Help
    Replies: 2
    Last Post: 05-13-2007, 09:56 AM

Posting Permissions

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