Eduard
2013-01-01 10:35:47
I seem to be unable to autocolor minimap TPA's.
Even using the ACA autocolor function, it won't work.
Here's my source:
Where it works perfectly the first couple of minutes, after a while RS updates and it shuts down(finds the wrong TPAs).
How do I autocolor effectively?
Thanks,
Eduard
Even using the ACA autocolor function, it won't work.
Here's my source:
procedure WalkToLogs;
var
WillowMMTPA: TPointArray; //TPA var
WillowMMATPA: T2DPointArray; //ATPA var
AllTreesTBox, WillowMMTBox: Tbox; //Tbox's of trees
tmpCTS2: integer; //CTS2 storage var
begin
tmpCTS2 := GetColorToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(WillowMMHue, WillowMMSat);
if (FindColorsTolerance(WillowMMTPA,WillowMMCol, MMX1, MMY1, MMX2, MMY2, WillowMMTol)) then
begin
//Smart_DrawDots(WillowMMTPA);
//SMART_DebugTPA(false, WILLOWMMTPA);
SplitTpaExWrap(WillowMMTPA, 20, 20, WillowMMATPA);
SortATPAFromMidPoint(WillowMMATPA, (MiddleTPA(WillowMMTPA)));
WillowMMTBox := GetTPABounds(WillowMMATPA[0]);
AllTreesTBox := GetATPABounds(WillowMMATPA);
{SMART_DRAWBOXex(false, false, WIllowMMTBOX, clgreen);
//SMART_DRAWBOXex(false, false, AllTreesTBox, clpurple);
//MouseTBox(WillowMMTBox, 1);
//Smart_StatusDebug('walking to willow trees', clYellow);
while (FlagPresent) do
begin
Smart_StatusDebug('walking to willow trees', clyellow);
wait(100);
end;
Smart_StatusDebug('Arrived at willow trees', clgreen);
}
end;
SetColorToleranceSpeed(tmpCTS2);
SetToleranceSpeed2Modifiers(0.2, 0.2);
end;
Where it works perfectly the first couple of minutes, after a while RS updates and it shuts down(finds the wrong TPAs).
How do I autocolor effectively?
Thanks,
Eduard