Twinki
2015-01-15 03:12:19
I've been using The Mayors sub-tutorial on ATPA's and TPA's. I've ran into some trouble as banker i'm trying to find correctly has the same colors as the surrounds.
This is what i'm using for testing
The spot:
I'm trying to find that Gnome Banker, but the problem is I keep picking up all these TP's with the same color, and the ATPA is drawing a box over it and hovering. Is there some way to stop from creating a ATPA if it doesn't have enough TP's?
Also, is there any way to visually see how many TP's are in a ATPA box? Like how smartImage.debugTPA(TPA, false); also tells you how many TP's were found, is there a way to make that show up in the individual ATPA's?
This is what i'm using for testing
const
COLOR = 6522777;
TOL = 2;
HUE = 0.21;
SAT = 0.62;
procedure ColorTesting;
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
findColorsSpiralTolerance(x, y, TPA, COLOR, mainScreen.getBounds(), TOL, colorSetting(2, HUE, SAT));
if length(TPA) < 1 then
exit;
ATPA := TPA.toATPA(30, 30);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['anker','ank','ooth'], 500) then
begin
fastClick(MOUSE_LEFT);
break;
end;
end;
end;
The spot:
I'm trying to find that Gnome Banker, but the problem is I keep picking up all these TP's with the same color, and the ATPA is drawing a box over it and hovering. Is there some way to stop from creating a ATPA if it doesn't have enough TP's?Also, is there any way to visually see how many TP's are in a ATPA box? Like how smartImage.debugTPA(TPA, false); also tells you how many TP's were found, is there a way to make that show up in the individual ATPA's?