Results 1 to 3 of 3

Thread: Sorting TPA's on the minimap

  1. #1
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Sorting TPA's on the minimap

    Ok so im trying to map walk with tpa's, i have a greenish color which is on the ground a lot there. So I want to know how to sort it so it will click the color the first time it finds it but as far to the bottom left of mm it can be while still being on the mini map.

    I know i have sortTPAFrom but im not sure if im doing it right.
    Here my code its not much

    Simba Code:
    Function MapPoint(I:Integer):TPointArray;
    Begin
      Case I Of

      1: MapWalkingTPA(3706752,6,0.38,1.36);


      End;
    End;
    Function MapWalkingTPA(Colour,Tol:Integer; Hue,Sat:Extended):TPointArray;
    Var MyTPA:TPointArray;
        X,Y  :Integer;
    Begin
      If Not LoggedIn Then Exit;

      SetColorToleranceSpeed(2);
      SetColorspeed2Modifiers(Hue,Sat);
      FindColorsSpiralTolerance(x,y,MyTPA,Colour,MMX1,MMY1,MMX2,MMY2,Tol);

      If ( Length(MyTPA) =< 1 ) Then
      Begin
        writeln('Walking has not worked :( the colour and stuff was -Color '+ IntToStr(Color) +' -Tol '+ IntToStr(Tol));
        Result := False
      End;



    End;

    Function WalkToGuy:Boolean;
    Begin
      If Not LoggedIn Then Exit;

      SortTPAFrom(MapPoint(1),Point(MMX1,MMY1));
      RadialWalkEx(

    Thanks guys

    Edit: Also how do i check if x,y are in a Tbox (i thinks a tbox which is formed when you use IntToBox)

    Thanks
    Last edited by Troll; 01-03-2011 at 05:48 PM.
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Sort from MMX1 MMY2. Then do a for loop through the array and click and break at the first one that is RSOnMinimap or something.

    Also:
    SomeTPA := FunctionThatReturnsTPA();
    FunctionThatSortsTPA(SomeTPA);

    And I think you want PointInBox for the edit question.

  3. #3
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok thanks that is great boreas
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

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
  •