
Originally Posted by
tealc
which cts are you using
example of cts 2
Simba Code:
procedure
//vars
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(hue mod, sat mod);//these are found on ACA and these two are only for cts 2
begin
if FindColorTolerance(X, Y, KnightColor, 5, 3, 511, 329, 10) then
begin
WriteLn('Found Knight');
MMouse(x, y, 0, 0);
ClickMouse2(False);
wait(2000);
ChooseOption('Pickpocket Knight');
wait(250);
WriteLn('Picked Knight');
inc(PickPockets);
end
else
begin
WriteLn('Knight not found, rotating camera')
keydown(37);
wait(500);
keyup(37);
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
Full ACA:
Simba Code:
// ACA for Knight \\
function KnightColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.19, 0.78);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 11542895, MSX1, MSY1, MSX2, MSY2, 21);
if (Length(arP) = 0) then
begin
Writeln('Failed to find Knight, 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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 2.75) and (X <= 26.73) and (Y >= 1.72) and (Y <= 15.51) and (Z >= 7.95) and (Z <= 84.02) then
begin
Result := arC[i];
//Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('Failed to find the Knight');
end;
CTS 2 (I think...)
Simba Code:
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.19, 0.78);