Quote:
// * Function WaitOptionMulti(S: TStringArray; Time: Integer): Boolean; // By Marpis, N1ke! & Rasta Magician
// * Function WaitOption(S: String; Time: Integer): Boolean; // By N1ke!
// * Function WaitUptextMulti(S: TStringArray; Time: integer): Boolean; // By Marpis & N1ke!
// * Function WaitUptext(S: String; Time: Integer): Boolean; // By N1ke!
// * Function WaitColor(x, y, Color, Tol, MaxTime: integer): Boolean; // By Rasta Magician
// * Function WaitFindColor(var x, y: integer; x1, y1, x2, y2, Color, Tol, MaxTime: integer): boolean; // By Rasta Magician
// * Function WaitFindColorSpiral(var x, y: integer; x1, y1, x2, y2, Color, Tol, MaxTime: integer): boolean; // By Rasta Magician
// * Function WaitColorCount(x1, y1, x2, y2, Color, Tol, MinCount, MaxCount, MaxTime: integer):boolean; // By Rasta Magician
// * Function WaitFunc(Func: Function: boolean; MaxTime: integer): boolean; // By Rasta Magician
SCAR Code:
{*******************************************************************************
Function WaitColor(x, y, Color, Tol, MaxTime: integer): Boolean;
By: Rasta Magician
Description: Waits for a color at (x, y) with tolerance Tol, returns true if found
*******************************************************************************}
Function WaitColor(x, y, Color, Tol, MaxTime: integer): Boolean;
var
Time: integer;
begin
Result := False;
Time := GetSystemTime + MaxTime;
while Time < GetSystemTime do
if SimilarColors(GetColor(x, y), Color, Tol) then
begin
Result := true;
exit;
end;
end;
{*******************************************************************************
Function WaitFindColor(var x, y: integer; Color, Tol, x1, y1, x2, y2, MaxTime: integer): Boolean;
By: Rasta Magician
Description: Waits for a color at (x1, y1, x2, y2) with tolerance Tol, returns true if found, coords returned to (x, y)
*******************************************************************************}
Function WaitFindColor(var x, y: integer; Color, x1, y1, x2, y2, Tol, MaxTime: integer): Boolean;
var
Time: integer;
begin
Result := False;
Time := GetSystemTime + MaxTime;
While GetSystemTime < Time do
if FindColorTolerance(x, y, Color, x1, y1, x2, y2, Tol) then
begin
Result := true;
exit;
end;
end;