Results 1 to 10 of 10

Thread: Clicking MM Dots?

  1. #1
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default Clicking MM Dots?

    Hey guys,

    Once again I create another thread of me being Stoopid. However! [J]ustin was stumped too :P

    So I'm trying to make it so that my mouse clicks on Yellow or White dots. Regardless of position Etc (It's a confined area).

    I've looked at the following:

    Simba Code:
    while (Length(GetMMDotsOnMS('npc')) < 1) and (GetSystemTime < TimeCheck) do
       begin
         Wait(100);
         FindNormalRandoms;
       end;

    Simba Code:
    count := Length(GetMiniMapDotsIn('green', MMX1, MMY1, MMX2, MMY2)));
        WriteLn(ToStr(count) + ' friends on the map!');

    I'm still stumped :P

    Any help?

    I came up with the Idea of TPA's In the MM area. But I'm pretty sure theres a short hand method
    Last edited by xtrapsp; 04-28-2012 at 11:45 AM.

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    How about this?
    Simba Code:
    function GetMiniMapDots(WhatDot: String): TPointArray;

    That will give you a TPA of all the dots (by what you choose) on the MM. From there, you can click on one of those points (dots).

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    How about this?
    Simba Code:
    function GetMiniMapDots(WhatDot: String): TPointArray;

    That will give you a TPA of all the dots (by what you choose) on the MM. From there, you can click on one of those points (dots).
    So it would be
    Simba Code:
    begin
    GetMiniMapDots('Npc'));
    Mouse(x, y, 2, 1, True);
    end;

    Something along those lines?

    Thanks by the way
    Last edited by xtrapsp; 04-28-2012 at 12:04 PM.

  4. #4
    Join Date
    Feb 2012
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by xtrapsp View Post
    So it would be
    Simba Code:
    begin
    GetMiniMapDots('Npc'));
    Mouse(x, y, 2, 1, True);
    end;

    Something along those lines?

    Thanks by the way
    I don't think so, since x and y would be put into a TPA, there'd be no defined x and y, and you'd have to use a loop to cycle through each MM dot. (I might be wrong though)

  5. #5
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Derp. Nvm.
    Last edited by Total; 04-28-2012 at 12:42 PM.

  6. #6
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    Quote Originally Posted by TotalKillz View Post
    Derp. Nvm.
    What?

    Simba Code:
    var
      TPA : TPointArray;
    begin
      TPA := GetMiniMapDots('Npc'));
      Mouse(TPA.X, TPA.Y, 2, 1, True);
    end;

    That wont work? :P

  7. #7
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Oh I'm tired. Just remove the 2nd closing parentheses after GetMiniMapDots and see if it works. I just took it out cuz I couldn't get it to compile lols. I think you would have to loop through it still though, never done this before.

    Simba Code:
    procedure MainLoop;
    var
     TPA : TPointArray;
    begin
      TPA := GetMiniMapDots('Npc');
      Mouse(TPA[0].X, TPA[0].Y, 2, 2, true);
    end;

    I think this would be correct, but would only use it if you are sure that its the only dot.
    Last edited by Total; 04-28-2012 at 12:50 PM.

  8. #8
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    will click all dots:
    var
    TPA : TPointArray;
    h : integer;
    begin
    TPA := GetMiniMapDots('Npc'));
    h := high(TPA);
    for a := 0 to h do
    Mouse(TPA[a].X, TPA[a].Y, 0, 0, True);
    end;

  9. #9
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Simba Code:
    function FindNearestNPC(var x,y: Integer; Click,DoWait: Boolean):Boolean;
    var
      NPC:TPoint;
    begin
      Result := False;  //This should always be false by default
      if FindColorSpiralTolerance(NPC.x,NPC.y,65536,558,6,690,153,4) then
      begin
        Result := True;
        X := NPC.x;     //Now, X & Y actually return something...
        Y := NPC.y;
        if (Click and Result) then   //No need for (Boolean = True)
        begin
          Mouse(NPC.x,NPC.y,1,1,True);
          if DoWait then
          begin
            FFlag(1);
            Wait(750+random(250));
          end;
        end;
      end;
    end;

  10. #10
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Simba Code:
    function FindNearestNPC(var X, Y :Integer) :Boolean;
    var
      TPA :TPointArray;
    begin
      TPA := GetMiniMapDots('NPC');
      If Length(TPA) = 0 then Exit;
      SortTPAFrom(TPA, Point(MMCX, MMCY));
      X := TPA[0].X;
      Y := TPA[0].Y;
      Result := True;
    end;


    ~Home

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
  •