From: Rules of Joe
I have a new Procedure idea!
procedure Rope;
Var
tmpCTS:Integer;
begin
P07_MakeCameraAngleHigh;
P07_MakeCompassSouth;
ropecol := 5536408 Writeln('Walk Rope');
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.04, 0.31);
if P07_FindObjCustom(x, y, ['Walk', 'lk-on'], [ropecol], 6) then
begin
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
wait(1000);
ClickMouse2(mouse_left);
end;
end;
Will this work?
Yes and no. What if it doesn't find the correct object? Then it won't change the CTS back to 1 which affects other functions and possibly messes them up, you also would've set wrong modifiers when it would've found it, usually sat and hue modifiers are set to 0.2 when setting CTS back to 1.
Also remember to first set modifiers then change CTS. Altough I'm not sure if there is no harm doing it like you had.
Secondly, you haven't set tmpCTS or any other necessary variables (x, y, ropecol) anywhere, but other than that it'll work codewise.
I fixed the standards and declared the necessary variables:
procedure Rope;
var
tmpCTS, ropecol, x, y : Integer;
begin
P07_MakeCameraAngleHigh;
P07_MakeCompassSouth;
tmpCTS := GetToleranceSpeed;
ropecol := 5536408;
Writeln('Walk Rope');
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.04, 0.31);
if P07_FindObjCustom(x, y, ['Walk', 'lk-on'], [ropecol], 6) then
begin
wait(1000);
ClickMouse2(mouse_left);
end;
SetToleranceSpeed2Modifiers(0.2, 0.2);
SetColorToleranceSpeed(tmpCTS);
end;