Ok, so can someone help me understand/fix my tpa find tree function? It just finds every color on the screen by moving the mouse to it and it auto logs before it is even done... can someone help me out here?
SCAR Code:
function Findtree:Boolean;
var
i, mx, my : Integer;
c : TpointArray;
begin
FindColorsSpiralTolerance(MSCX, MSCY, c, TreeColor, MSX1, MSY1, MSX2, MSY2, 15);
ReArrangeandShortenArray(c, 20);
if length(c)>0 then
begin
for i := 0 to high(c) do
begin
MMouse(c[i].x, c[i].y, 1, 1)
wait(500 + random(250));
if isuptext(treename) and not(findent(x, y, true)) then
begin
GetMousePos(mx, my);
Mouse(mx, my, 0, 0, true);
anti;
inc(Clicks);
ReportVars[1] := ReportVars[1] + 1;
fflag(0);
ftwait(2);
Result := True;
Exit;
end;
end;
Result := False
end;
end;
Thanks in advanced
~MikeVSkater