Thank you, that's exactly what I was looking for. Still had to modify a few things to get it to compile, but I got it to.
My problem now is that it doesn't find the color. I noticed that if I click "mark color" it doesn't find anything in ACA, but if I click "mark best color" it highlights a bunch of stuff, so how do I make the script find the best color?
I'm just using the basic .findObject() function for now. Mostly trying to get the feel for everything, I'm still a mega noob at this.
Here's the code, all I want it to do is find the tree and click it. I also commented what I changed in the function that ACA created, so if I did anything wrong please let me know 
Simba Code:
{$i srl-6/srl.simba}
var
x, y: integer;
function tree : Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetToleranceSpeed(); //changed from GetColorToleranceSpeed
SetColorToleranceSpeed(3); //changed from ColorToleranceSpeed(3)
SetToleranceSpeed3Modifier(1); //changed from SetColorSpeed3Modifier(1)
//changed the x/y coords to mainscreen.x1/2 and mainscreen.y1/2
FindColorsSpiralTolerance(720, 450, arP, 2636876, mainscreen.x1, mainscreen.y1, mainscreen.x2, mainscreen.y2, 10);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
SetColorToleranceSpeed(tmpCTS); //changed from ColorToleranceSpeed(tmpCTS)
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 8.80) and (H <= 9.64) and (S >= 30.75) and (S <= 31.77) and (L >= 16.06) and (L <= 29.82) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 2.57) and (X <= 8.62) and (Y >= 2.58) and (Y <= 8.43) and (Z >= 1.44) and (Z <= 4.44) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
SetColorToleranceSpeed(tmpCTS); //changed from ColorToleranceSpeed(tmpCTS)
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
begin
if (mainscreen.findObject(x, y, tree, 10, ['Tree'])) then
writeln('Clicked object!');
end.
Here's the debug info after running the script
Simba Code:
Compiled successfully in 3000 ms.
Failed to find the color, no result.
-- TRSMainscreen.findObject()
---- No colors found
-- TRSMainscreen.findObject(): False
-- Freeing the minimap mask
Successfully executed.