I can see you have done a good job, so here is my FindStoneColor fix:
SCAR Code:
function FindStoneColor: Integer;
var
GC, a, l, TestColor: integer;
var
P:array of Tpoint;
begin
GC := 866895;
Flag;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1,MMY1,MMX2,MMY2, 60);
l:=GetArrayLength(P);
for a:= 0 to l-1 do
begin
TestColor := GetColor(P[a].x,P[a].y);
if (GetColor(P[a].x+1,P[a].y)=TestColor-790819) then
begin
Result := TestColor;
WriteLn('Stone Color = ' + IntToStr(TestColor));
Exit;
end;
end;
WriteLn('Could not find Stone Color!');
Result := 0;
end;
Make a function with a different name(to avoid duplicate identifiers errors) and use it instead of FindStoneColor 
PS: I tested it and it work!