Log in

View Full Version : Making a TPA have a Min amount of Pixels?



Mat
02-08-2012, 06:23 PM
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
02-08-2012, 06:48 PM
if high(TPA) > x then
if high(TPA) < x then
etc

euphemism
02-08-2012, 06:49 PM
... Length(). For example,


if (Length(TPA) > 250) then

Mat
02-08-2012, 07:01 PM
if high(TPA) > x then
if high(TPA) < x then
etc
Thanks Man <3