this is my tree finding procedure so far:
SCAR Code:
Function FindTree: Boolean;
var
xtree, ytree, tries, I, FTtol: integer;
begin
FTtol:= 9
MakeCompass('N');
wait(250 + random(500))
HighestAngle;
tries:= 0;
repeat
Wait(500 + random(250));
for I:= 1 to 10 do
begin
if I = 1 then
FTtol:= FTtol+1
if (FindColorSpiralTolerance(x, y, TreeColors[I], MSX1, MSY1, MSX2, MSY2, FTtol)) then
begin
getmousepos(x, y);
if confirm then
begin
result:= true;
xtree:= x;
ytree:= y;
wait(50)
TreeColors[I]:= getcolor(x, y)
Exit;
end else
tries:= tries + 1;
end;
end;
until(tries = 50)
Writeln('We couldnt find the tree so we exited....')
TerminateScript;
end;
confirm just makes sure that it is the right kind of tree.. and TreeColors[] is an array of 10 colors.
also im not totally sure if it works or not, because i cant test it(the update)
but i am wondering some sort of way that i can make it more reliable then it is... and if you know a better way to do something let me know
thanks