Ok, wouldn't you want to click THEN wait? You have this:
PHP Code:
function Gas: Boolean;
begin
GC[0] := 23454;
GC[1] := 23454;
GC[2] := 23454;
if (not (LoggedIn)) then Exit;
for i := 0 to 2 do
if (FindColorSpiralTolerance(tx, ty, GC[i], 3, 3, 515, 336, 10)) then
begin
WriteLn('Gas found!!');
repeat
Wait(4000 + Random(2000));
Mouse(450, 12, 0, 0, True);
until (AxeBroke) or (not (FindColorSpiralTolerance(tx, ty, GC[i], 3, 3, 515, 336, 10)))
if (not (FindColorSpiralTolerance(tx, ty, GC[i], 3, 3, 515, 336, 10))) then
Result := False; // No gas found..
if (AxeBroke) then
begin
WriteLn('Axe has been broken!!');
Result := False;
end else
begin
WriteLn('Gas found and handled.');
Result := True;
end;
end;
end;
Don't you want this:
PHP Code:
function Gas: Boolean;
begin
GC[0] := 23454;
GC[1] := 23454;
GC[2] := 23454;
if (not (LoggedIn)) then Exit;
for i := 0 to 2 do
if (FindColorSpiralTolerance(tx, ty, GC[i], 3, 3, 515, 336, 10)) then
begin
WriteLn('Gas found!!');
repeat
Mouse(450, 12, 0, 0, True);
Wait(4000 + Random(2000));
until (AxeBroke) or (not (FindColorSpiralTolerance(tx, ty, GC[i], 3, 3, 515, 336, 10)))
if (not (FindColorSpiralTolerance(tx, ty, GC[i], 3, 3, 515, 336, 10))) then
Result := False; // No gas found..
if (AxeBroke) then
begin
WriteLn('Axe has been broken!!');
Result := False;
end else
begin
WriteLn('Gas found and handled.');
Result := True;
end;
end;
end;