From: [PRO]metheus
Thanks, but I'm gonna avoid gates from now on :p
but.. but..
program GateForWheatFieldOboveCookingCuildOpener;
{$DEFINE SMART}
{$i srl/srl.simba}
function OpenGate:Boolean;
var
tmpCTS, i, N, r, Counter:Integer;
GateTPA:TPointArray;
begin
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.06, 0.11);
FindColorsTolerance(GateTPA, 5077901, MSX1, MSY1, MSX2, 180, 5);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
N := High(GateTPA);
if (N < 1) then
begin
WriteLn('Cannot Find Gate!');
Logout;
TerminateScript;
end;
MarkTime(Counter);
for i := 0 to N do
begin
r := random(N);
Wait(RandomRange(100, 250));
MMouse(GateTPA[r].x, GateTPA[r].y, 0, 5);
Wait(RandomRange(100, 175));
if WaitUpText('en G', 500) then
begin
Break;
end;
if WaitUpText('se G', 500) then
begin
WriteLn('Gate is already open');
Result := True;
Exit;
end;
if (TimeFromMark(Counter) > 3000) then
begin
WriteLn('Failed to find the Gate!');
Logout;
TerminateScript;
end;
end;
ClickMouse2(True);
Flag;
Result := True;
end;
begin
SetupSRL;
if OpenGate then
WriteLn('Wohoo, opened the gate!');
end.