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