I'm kinda stuck with finding color or clicking it. I viewed some giudes but half of them had functions that don't even exist in Simba anymore.
I used auto color aid v2 to generate the color function.
Here is the code
Simba Code:
function Color: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.00, 0.30);
if not (FindColorsTolerance(arP, 1316117, MSX1, MSY1, MSX2, MSY2, 2)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure Click;
var
x, y : Integer;
begin
if FindColor(x, y, Color, MMX1, MMY1, MMX2, MMY2) then
MMouse(x, y, 4, 4)
end;
All it does is write "AutoColor = 1447703" in the debug but no clicking or mouse movement. I tried Mouse instead of MMouse but it didn't work. (and yes its added to the main loop)