Results 1 to 7 of 7

Thread: store pos???err look

  1. #1
    Join Date
    Oct 2007
    Posts
    678
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default store pos???err look

    i wanted to make a quick ghost mouse in scar, and then i kinda stumped myself, im sure it wouldnt be that hard, anyway, so all it would do after clicking play is wait say 5 seconds, then it gets mousepos (evry say 100 ms) stores it, and the replays movemouse to it....how would i do this??? err store or somthing??

    edit: mixter got it thnx for looking tho.

    SCAR Code:
    program GhostMouse;
    //by Mixster
    var
      x, y: Integer;
      pts: array of TPoint;
     
    procedure ScriptTerminate;
    var
      i: Integer;
    begin
      for i := 0 to High(pts) do
      begin
        Writeln('MMouse(' + IntToStr(pts[i].x) + ', ' + IntToStr(pts[i].y) + ', 2, 2);');
      end;
    end;
     
    begin
      repeat
        Wait(100);
        GetMousePos(x, y);
        SetArrayLength(pts, High(pts) + 2);
        pts[High(pts)].x := x;
        pts[High(pts)].y := y;
      until IsKeyDown('q');
    end.

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Var
      X,Y:Integer;

    GetMousePos(X,Y);
    Mouse(X,Y,5,5,true);
    ~Hermen

  3. #3
    Join Date
    Oct 2007
    Posts
    678
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Hermpie View Post
    SCAR Code:
    Var
      X,Y:Integer;

    GetMousePos(X,Y);
    Mouse(X,Y,5,5,true);
    ....lol okay...perhaps i made myself unclear...

    it would get the mouse pos evry 100 ms for as long as i want, a path if you will, and then replay... say i draw in pain with a pen a star of david, it will store all those mouse pos and replay it. if i just play after thats 1 mouse pos and it doesnt really work....kinda hope that clears it up
    ps this isnt really for rs, so random unneeded

  4. #4
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    program GhostMouse;
    var
      x, y: Integer;
      pts: array of TPoint;

    procedure ScriptTerminate;
    var
      i: Integer;
    begin
      for i := 0 to High(pts) do
      begin
        Writeln('MMouse(' + IntToStr(pts[i].x) + ', ' + IntToStr(pts[i].y) + ', 2, 2);');
      end;
    end;

    begin
      repeat
        Wait(100);
        GetMousePos(x, y);
        SetArrayLength(pts, High(pts) + 2);
        pts[High(pts)].x := x;
        pts[High(pts)].y := y;
      until IsKeyDown('q');
    end;

    Run that then press q to stop or terminate via button or shortcut and it'll spit out the MMouse's and you just have to copy and paste them into a script.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  5. #5
    Join Date
    Oct 2007
    Posts
    678
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mixster View Post
    SCAR Code:
    program GhostMouse;
    var
      x, y: Integer;
      pts: array of TPoint;

    procedure ScriptTerminate;
    var
      i: Integer;
    begin
      for i := 0 to High(pts) do
      begin
        Writeln('MMouse(' + IntToStr(pts[i].x) + ', ' + IntToStr(pts[i].y) + ', 2, 2);');
      end;
    end;

    begin
      repeat
        Wait(100);
        GetMousePos(x, y);
        SetArrayLength(pts, High(pts) + 2);
        pts[High(pts)].x := x;
        pts[High(pts)].y := y;
      until IsKeyDown('q');
    end;

    Run that then press q to stop or terminate via button or shortcut and it'll spit out the MMouse's and you just have to copy and paste them into a script.
    WOW. way to steal my glory, i actualy was hoping to learn somthing from this than just geting it done for me.

    edit:nvm got it. thnx im gona see if i can improve it

  6. #6
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Sorry, next time I'll give vague answers that point towards religion.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  7. #7
    Join Date
    Oct 2007
    Posts
    678
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mixster View Post
    Sorry, next time I'll give vague answers that point towards religion.
    i dont know what that means but ok
    edit:for got to ad dot in ur script

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Store Coordinates?
    By Putnam in forum OSR Help
    Replies: 5
    Last Post: 04-21-2008, 03:57 PM
  2. The Moparisthebest store
    By Bebe in forum News and General
    Replies: 20
    Last Post: 08-03-2007, 04:47 PM
  3. Sell At Store HELP!
    By steth1010 in forum OSR Help
    Replies: 7
    Last Post: 05-22-2007, 08:14 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
  •