SCAR Code:
{*******************************************************************************
function Finddot(x,y,dots,dist:integer):boolean;
By: LeeLokHin
Description: x and y for the point where you want to check whether or not it has
enough points of the color, dist is the distance from the point it will search
for the color, dots for the minimum number of dots that should be
in there, and color...
*******************************************************************************}
function Finddot(x,y,dots,dist,color:integer):boolean;//The npc color = 16711422
var
Whitedot,Whitedot2:Tpointarray;
i:integer;
begin
result:=true;
result:=findcolorstolerance(whitedot,color,x - dist,y - dist,x + dist,y + dist,2);
if result=false then
begin
writeln('Could not find any color dots in dist, Exiting');
Exit;
end;
whitedot2:=ReArrangeandShortenArray(whitedot,2);
for i:=0 to high(whitedot2) do
inc(i);
if i < dots then
begin
writeln('This does not have enough dots Result = false, Exiting');
result:= false;
exit;
end else
begin
result:= true;
end;
end;
I was really bored, and I mean really bored, so I just whipped that up.