Claymore
2008-10-19 14:24:49
function FindTree: Integer;
var
GC, A, L, TestColor: Integer;
P: TPointArray;
R1, G1, B1, R2, G2, B2: Integer;
H1, S1, L1, H2, S2, L2: Extended;
begin
GC := 279098;
Flag;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 60);
L := GetArrayLength(P);
for A := 0 to L-1 do
begin
if rs_OnMinimap(P[A].X, P[A].Y) then
begin
TestColor := GetColor(P[A].X, P[A].Y);
ColorToRGB(TestColor, R1, G1, B1);
ColorToRGB(GetColor(P[A].X-1, P[A].Y), R2, G2, B2);
if (R1 - R2 >= 28) and (R1 - R2 <= 34) and (G1 - G2 >= -6) and (G1 - G2 <= 0) and (B1 - B2 >= -1) and (B1 - B2 <= 1) then
begin
ColorToHSL(TestColor, H1, S1, L1);
ColorToHSL(GetColor(P[A].X-1, P[A].Y), H2, S2, L2);
if (Round(H1 - H2) >= -12) and (Round(H1 - H2) <= -8) and (Round(L1 - L2) >= -1) and (Round(L1 - L2) <= 1) then
begin
Result := TestColor;
WriteLn('Tree Color = ' + IntToStr(TestColor));
Exit;
end;
end;
end;
end;
WriteLn('Could not find Tree Color.');
Result := 0;
end;
It is in development and i need peoples help to collect colors of the tree. It's going to be hard to specifically tell you what color, but I'll try my best.
Image created by tarajunky
Collect the collor on the small red box and the OTHER color on the RECTANGLE side.
Well anyways, if you guys can help that would be great! Thanks people, happy autoing.