So today I set myself the task of learning about TPA's and what you can do with them and after hours of reading and tweaking (Massive thanks to Naum for his A low down on WizzyPlugin and TPA's) I have produced a function! 
For all who are interested this locates lobster fishing spots on the dock on karamja.
Simba Code:
program TPATest;
{$i SRL/SRL.simba}
{$i SRL/srl/misc/debug.simba}
var
x, y: Integer;
function FindSpot: Boolean;
var
TPA: TPointArray;
ATPA: Array of TPointArray;
tmpCTS, i: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.30, 0.66);
if FindColorsSpiralTolerance(MSCX, MSCY, TPA, 11379612, MSX1, MSY1, MSX2, MSY2, 7) then
begin
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAToATPAEx(TPA, 25, 25);
//ATPA := SplitTPAEx(TPA, 15, 15);
SortATPASize(ATPA, True);
For i := 0 To High(ATPA) Do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 5, 5);
if WaitUpTextMulti(['Cage', 'ge Fi'], 250) then
begin
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;
//DebugATPA(ATPA,'');
//DebugATPABounds(ATPA);
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
begin
SetUpSRL;
ActivateClient;
if FindSpot then
writeln('spot found at: ' + IntToStr(x) + '.' + IntToStr(y));
end.
My problem is that im not entirely sure if i've missed something or put something in the wrong place or if it is working as intended as it doesnt always sorts by closest point properly but other than that it seems to work!
Other suggestions how this can be improved are welcome!