I changed to this and it worked for me, only tried it on 1 screenshot though. My problems were that FindColorsTol in GetDoorPoints wasn't finding any points at all, and that FilterDropDots was filtering all points even with no dots at all.
{*******************************************************************************
function FilterDropDots(P: TPointArray): TPointArray;
By: lordsaturn
Description: Returns a TPointArray filtered of drop dots.
*******************************************************************************}
function FilterDropDots(P: TPointArray): TPointArray;
var
i, Hi, L: integer;
begin
Hi := High(P);
if Hi < 0 then Exit;
SetLength(Result, Hi+1);
for i := 0 to Hi do
begin
// if (not(IsDropDot(P[i]))) and rs_OnMinimap(P[i].x, P[i].y) and
// (InRange(GetColor(P[i].x, P[i].y), 200, 254))then
if not rs_OnMinimap(P[i].x, P[i].y) then
continue;
if InRange(GetColor(P[i].x, P[i].y), 200, 254) then
if IsDropDot(P[i]) then
continue;
Result[L] := P[i];
Inc(L);
end;
SetLength(Result, L);
end;
{*******************************************************************************
function GetDoorPoints: T2DPointArray;
By: lordsaturn
Description: Returns all door points on the minimap in a T2DPointArray.
*******************************************************************************}
function GetDoorPoints: T2DPointArray;
var
CTS: integer;
P: TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.1, 0.1);
FindColorsTolerance(P, 227, MMX1, MMY1, MMX2, MMY2, 25);
SetColorspeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);
if Length(P) < 1 then Exit;
Result := SplitTPA(FilterDropDots(P), 6);
SortATPAFrom(Result, Point(MMCX, MMCY));
end;
I'm still having problems with SortDoors but I just ended up copying the midpoints to a TPA and sorting that.