SRL Archive - Help

Making a TPA have a Min amount of Pixels?


Mat

2012-02-08 13:23:04

Title says it all :P
Heres the TPA
function SqFinder(x, y: Integer): Boolean;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.08, 0.16);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2765664, MSX1, MSY1, MSX2, MSY2, 2);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);

MMouse(x, y, 2, 2);
Wait(500+Random(50));
If(IsUpTextMultiCustom(['Gap'])) then
begin
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;
See it works but it finds abyssal Creatures, so I was wondering if anyone knew how I can add a Pixel Count?
Thanks
Mat

Killerdou

2012-02-08 13:48:05

if high(TPA) > x then
if high(TPA) < x then
etc

euphemism

2012-02-08 13:49:21

… Length(). For example,


if (Length(TPA) > 250) then

Mat

2012-02-08 14:01:57

From: Killerdou
if high(TPA) > x then
if high(TPA) < x then
etc

Thanks Man <3