Results 1 to 8 of 8

Thread: Random Mouse Movement?

  1. #1
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Random Mouse Movement?

    SCAR Code:
    function Kill(colors: TIntegerArray): boolean;
    var
      CowTPA: TPointArray;
      k: integer;
    begin
      if not LoggedIn or FindDead then Exit;
      for k := 0 to High(colors) do
      if FindColorsTolerance(CowTPA, colors[k], MSX1, MSY1, MSX2, MSY2, 10) then
      begin
        repeat
          MMouse(CowTPA[k].x, CowTPA[k].y, 5, 5);
          Wait(1000 + random(500));
        until IsUpText('ow');
        if IsUpText('ow') then
        begin
          GetMousePos(x, y);
          case random(2) of
            0, 1: begin
                    Mouse(x, y, 5, 5, true);
                    Flag;
                  end;
            2: begin
                 Mouse(x, y, 5, 5, false);
                 ChooseOption('ttack');
                 Flag;
               end;
          end;
          Result := True;
        end;
      end;
    end;

    when i run this it clicks the cow and then the mouse just twitches on the grass. how can i get rid of that?

  2. #2
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function Kill(colors: TIntegerArray): boolean;
    var
      CowTPA: TPointArray;
      k: integer;
    begin
      if not LoggedIn or FindDead then Exit;
      for k := 0 to High(colors) do
      if FindColorsTolerance(CowTPA, colors[k], MSX1, MSY1, MSX2, MSY2, 10) then
      begin
         MyPoint := MiddleTPA(CowTPA); // Not sure about this..
         MMouse(MyPoint.x, MyPoint.y, 5, 5);
         Wait(150 + random(70));
         if IsUpText('ow') then
         begin
           GetMousePos(x, y);
           case random(2) of
             0, 1: begin
               Mouse(x, y, 0, 0, true); // 0 randomness. Aleardy did GetMousePos.
               FFlag(0);
            end;
            2: begin
              Mouse(x, y, 0, 0, false);
              ChooseOption('ttack');
              FFlag(0);
           end;
           Result := True;
           Break;
        end;
      end;
    end;


    Not sure if it compiles, on a Mac atm, but here you go. ^_^

  3. #3
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks, but it still twitches the mouse

  4. #4
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    I updated the function.. Do you use the one with "break" at the end?

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

    Default

    Mouse has a -1 on the x varable in Mouse.scar. I never understood why... but it has it in it. Is that the twitch you are talking about?


    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!

  6. #6
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no, after it clicks the cow and the cow is dead, it just twitches the mouse.

  7. #7
    Join Date
    Jun 2007
    Posts
    1,312
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Have you tried replacing FFlag/Flag with a set wait period? That could be the cause. I don't know how much SRL has changed in 4 months.
    Active only during the Summer...

  8. #8
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    No using TPA's makes it twitch, It's the same with wizzup?'s FishingSpotFinder.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need some help with mouse movement.
    By 0wnedYU in forum OSR Help
    Replies: 6
    Last Post: 04-19-2007, 11:43 PM
  2. Making a mouse movement
    By Infantry001 in forum OSR Help
    Replies: 23
    Last Post: 11-09-2006, 02:26 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
  •