Results 1 to 18 of 18

Thread: Circling/Spiraling Mouse

  1. #1
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Circling/Spiraling Mouse

    O.k I want to make the mouse click and hold (the script is not for RuneScape so there's no need for special anti-detection mouse procedures) and go around in a circle.

    I know how to move the mouse, hold the mouse down and release it (yes I know its all the noob stuff) but how do I move the mouse in a circle??

    I want to do either 1 of 2 things:

    1)Move the mouse in a circle with it gradually getting faster(the mouse speed);

    2)Move the mouse in a spiral getting smaller and smaller.

    I have tried putting in co-ordinates all around the circle but this isn't smooth enough and gets very messy in the script.

    If anyone could help me, thanks in advance, it would be very much appreciated.
    TOTAL N00B at Scar. I once had a script that cut, strung and fletched 10,000 + yew bows, but those days are now gone, and I'm trying to re unite my knowledge of scripting again.

  2. #2
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by 503075000868 View Post
    O.k I want to make the mouse click and hold (the script is not for RuneScape so there's no need for special anti-detection mouse procedures) and go around in a circle.

    I know how to move the mouse, hold the mouse down and release it (yes I know its all the noob stuff) but how do I move the mouse in a circle??

    I want to do either 1 of 2 things:

    1)Move the mouse in a circle with it gradually getting faster(the mouse speed);

    2)Move the mouse in a spiral getting smaller and smaller.

    I have tried putting in co-ordinates all around the circle but this isn't smooth enough and gets very messy in the script.

    If anyone could help me, thanks in advance, it would be very much appreciated.
    look at the source code for some of the mouse moevemnets. Then with yours, just put it through a sin function.

    to view the source code, just open up you includes folder (of scar) go to srl/srl and i think the mouse movements are in core.scar
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  3. #3
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I can't find the source for mouse movements (I do have SRL) and what is a sin function?
    TOTAL N00B at Scar. I once had a script that cut, strung and fletched 10,000 + yew bows, but those days are now gone, and I'm trying to re unite my knowledge of scripting again.

  4. #4
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by 503075000868 View Post
    I can't find the source for mouse movements (I do have SRL) and what is a sin function?
    ill find out exatly where it is for you in a second...

    sin, as in sine, the trig function . http://en.wikipedia.org/wiki/Trigonometric_function
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  5. #5
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    C:\Program Files\SCAR 3.11\includes\SRL\SRL\core its around there somewhere i think

  6. #6
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    C:\Program Files\SCAR x.xx\includes\SRL\SRL\core\MouseFlag.scar

  7. #7
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    O.k I have found the SRL mouse things and I know about sine (the trigonometry thing) but none of the mouse functions seem to be what I'm looking for, and I have no idea about putting one of them THROUGH A SINE FUNCTION?!?!?!
    TOTAL N00B at Scar. I once had a script that cut, strung and fletched 10,000 + yew bows, but those days are now gone, and I'm trying to re unite my knowledge of scripting again.

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

    Default

    hope this helps.

    SCAR Code:
    program New;

    procedure MoveMouseRadius(centerx, centery : integer; startradius, endradius, skipradius : integer; speed : integer);
    var
      i, a, x1, y1 : integer;
    begin
      if startradius <= endradius then
      begin
        for a := startradius to endradius do
        begin
          for i := 1 to 360 do
          begin
            x1 := Round(a * Sin(i * pi / 180)) + centerx;
            y1 := Round(-a * Cos(i * pi / 180)) + centery;
            MoveMouseSmooth(x1, y1);
            i := i + speed;
            Wait(1);
          end;
          a := a + skipradius;
        end;
      end else
      begin
        for a := startradius downto endradius do
        begin
          for i := 1 to 360 do
          begin
            x1 := Round(a * Sin(i * pi / 180)) + centerx;
            y1 := Round(-a * Cos(i * pi / 180)) + centery;
            MoveMouseSmooth(x1, y1);
            i := i + speed;
            Wait(1);
          end;
          a := a - skipradius;
        end;
      end;
    end;

    begin
      MoveMouseRadius(500, 450, 130, 10, 3, 1);
    end.

    heres a pic to explain the function.


  9. #9
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by The_Rs_Monkey View Post
    hope this helps.

    SCAR Code:
    program New;

    procedure MoveMouseRadius(centerx, centery : integer; startradius, endradius, skipradius : integer; speed : integer);
    var
      i, a, x1, y1 : integer;
    begin
      if startradius <= endradius then
      begin
        for a := startradius to endradius do
        begin
          for i := 1 to 360 do
          begin
            x1 := Round(a * Sin(i * pi / 180)) + centerx;
            y1 := Round(-a * Cos(i * pi / 180)) + centery;
            MoveMouseSmooth(x1, y1);
            i := i + speed;
            Wait(1);
          end;
          a := a + skipradius;
        end;
      end else
      begin
        for a := startradius downto endradius do
        begin
          for i := 1 to 360 do
          begin
            x1 := Round(a * Sin(i * pi / 180)) + centerx;
            y1 := Round(-a * Cos(i * pi / 180)) + centery;
            MoveMouseSmooth(x1, y1);
            i := i + speed;
            Wait(1);
          end;
          a := a - skipradius;
        end;
      end;
    end;

    begin
      MoveMouseRadius(500, 450, 130, 10, 3, 1);
    end.

    heres a pic to explain the function.

    exacltly! Has this already been made before?> or did you just bust that out?
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  10. #10
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think a couple of people have made it, but I think RS_Monkey "busted that one out" himself.

  11. #11
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks people! I almost have it all done, the only thing I am trippping up on is the speed of the mouse, even 'speed:=1' is too fast, can anyone help me in getting the speed to slower than 1?
    TOTAL N00B at Scar. I once had a script that cut, strung and fletched 10,000 + yew bows, but those days are now gone, and I'm trying to re unite my knowledge of scripting again.

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

    Default

    try speed 0, else change the wait(1) 's in the function higher.
    yes i busted that out myself. even the pic.

  13. #13
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    mouse speed slowes down the higher number you use. ex. mousespeed 1 is fast as can be. mousespeed 8 is much slower.

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

    Default

    in my function 0 is the highest, but everything else you said is correct.

  15. #15
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ive never tried 0. but he wants it to be slower and you said to use 0?? thats faster.

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

    Default

    Oh sorry canada. Thanks for correcting me Overlooked that.

  17. #17
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Eh? The script only slows down if I adjust the waits to a bigger amount, or the mousespeed is set to smaller. Mousespeed 1 is faster than mousespeed 0, how can it go slower the bigger the number?
    TOTAL N00B at Scar. I once had a script that cut, strung and fletched 10,000 + yew bows, but those days are now gone, and I'm trying to re unite my knowledge of scripting again.

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

    Default

    SCAR Code:
    procedure MoveMouseRadius(centerx, centery : integer; startradius, endradius, skipradius : integer; speed : integer);
    var
      i, a, x1, y1 : integer;
    begin
      if startradius <= endradius then
      begin
        for a := startradius to endradius do
        begin
          for i := 1 to 360 do
          begin
            x1 := Round(a * Sin(i * pi / 180)) + centerx;
            y1 := Round(-a * Cos(i * pi / 180)) + centery;
            MoveMouseSmooth(x1, y1);
            Wait(speed);
          end;
          a := a + skipradius;
        end;
      end else
      begin
        for a := startradius downto endradius do
        begin
          for i := 1 to 360 do
          begin
            x1 := Round(a * Sin(i * pi / 180)) + centerx;
            y1 := Round(-a * Cos(i * pi / 180)) + centery;
            MoveMouseSmooth(x1, y1);
            Wait(speed);
          end;
          a := a - skipradius;
        end;
      end;
    end;

    higher the speed, lower it goes.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mouse Box
    By decide in forum OSR Help
    Replies: 5
    Last Post: 12-16-2007, 08:55 PM
  2. mouse help.
    By Junior in forum OSR Help
    Replies: 9
    Last Post: 02-04-2007, 09:24 PM

Posting Permissions

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