Results 1 to 7 of 7

Thread: MouseMM

  1. #1
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default MouseMM

    SCAR Code:
    procedure MouseMM(x, y, randX, randY: Integer);
    var
      p: TPoint;
    begin
      if not rs_OnMinimap(x, y) then
        exit;

      p := RotatePoint(Point(x, y), 2 * pi - rs_GetCompassAngleRadians, MMCX, MMCY);
      Mouse(p.x, p.y, randX, randY, True);
    end;
    It wouldn't work before, does now...

  2. #2
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Tested and confirmed. Bad Boy's version is much more accurate

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

    Default

    It was supposed to be (0 - rs_GetCompassAngleRadians) which would have the same effect as ((2 * pi) - rs_GetCompassAngleRadians) as per this post by RM on the original thread but it seems it was lost when actually adding it to the include. Either way, WizzyPlugin auto increments things below 0, so either 0 - or 2*pi - would be the same, but should be added.
    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.

  4. #4
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I was just thinking, perhaps we should take into account clicking in the area (ie RandX, RanY)
    ie
    SCAR Code:
    procedure MouseMM(x, y, randX, randY: Integer);
    var
      p, p2: TPoint;
    begin
      if not rs_OnMinimap(x, y) then
        exit;

      p := RotatePoint(Point(x, y), 2 * pi - rs_GetCompassAngleRadians, MMCX, MMCY);
      p2 := RotatePoint(Point(x+RandX, y+RandY), 2 * pi - rs_GetCompassAngleRadians, MMCX, MMCY);
      Mouse(RandomRange(P.x, P2.x), RandomRange(p.y, P2.y), 0, 0, True);
    end;
    Last edited by Bad Boy JH; 02-23-2010 at 01:51 AM.

  5. #5
    Join Date
    Jul 2008
    Location
    England
    Posts
    763
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I remember sending a PM to Rasta Magician about this but he said it was fine.
    lol

  6. #6
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    heh?

  7. #7
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Sorry for the bump, but the MouseMM in SRL doesn't even work. It goes the opposite way.

    SCAR Code:
    procedure MouseMM(x, y, randX, randY: Integer);
    var
      p: TPoint;
    begin
      if not rs_OnMinimap(x, y) then
        Exit;

      p := RotatePoint(Point(x, y), 2 * pi - rs_GetCompassAngleRadians, MMCX, MMCY);
      Mouse(p.x, p.y, randX, randY, True);
    end;

    Works the best.

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
  •