Alright im making a clay softener tha has a few problems and i think i am going about it wrong so if you can help with this please do.
This is what i have that finds the well and uses the bucket with the well.
SCAR Code:
procedure FindColors; //Dont Touch this.
begin
MyColor := 13811373;
FindColorsSpiralTolerance(MSCX, MSCY, ColorsTPA, MyColor, MMX1, MMY1, MMX2, MMY2, 60);
C1 := GetColors(ColorsTPA);
C2 := High(C1);
for i := 0 to C2 do
begin
if RS_OnMinimap(ColorsTPA[i].X, ColorsTPA[i].Y) then
begin
TestColor := GetColor(ColorsTPA[i].X, ColorsTPA[i].Y);
if SimilarColors(TestColor, 13811373, 50) then
begin
ColorToRGB(TestColor, R, G, B);
ColorToHSL(TestColor, H, S, L);
ColorToXYZ(TestColor, X, Y, Z);
if InRange(R - G, 17, 30) then
if InRange(R - B, 37, 50) then
if InRange(G - B, 30, 50) then
if InRange(Round(S) - Round(H), 28, 48) then
if InRange(Round(L) - Round(H), -4, 14) then
if InRange(Round(S) - Round(L), 23, 47) then
if InRange(Round(X) - Round(Y), -8, 9) then
if InRange(Round(Y) - Round(Z), -7, 9) then
if GetColor(ColorsTPA[i].X + 2, ColorsTPA[i].Y + 2) = TestColor then
if GetColor(ColorsTPA[i].X + 1, ColorsTPA[i].Y + 1) = TestColor then
begin
Writeln('MyColor = '+Inttostr(TestColor));
Flag;
Exit;
end;
end;
end;
end;
Writeln('Couldnt find My Color!');
end;
SCAR Code:
procedure usebucket;
begin
if FindColorSpiralTolerance(var x, y:Integer; 138113735, xs, ys, xe, ye, 50) then
1: Mouse(x, y, 4, 4,false);
ChooseOption('se_bucket');
if 2: Mouse(x, y, 4, 4, True); then
usebucket=true
end;
procedure BucketToWell;
begin
if usebucket=true then
FindColorSpiralTolerance(var x, y:Integer; 2703438, xs, ys, xe, ye, 50)
1: Mouse(x, y, 4, 4, True)
end;