Sir R. M8gic1an
2009-06-22 18:56:55
A lot of new functions have been added to Timing.scar
All of these are designed to make your scripts more efficient and here is how they would be used:
What it does is wait in cycles until the Uptext is found rather than waiting a set amount of time. It exits after MaxTime.
So usually, you would wait 300 ms for the uptext.
By using this new function, it will wait in cycles, and you would end up perhaps only waiting 180 or 120 ms, making it less detectable as a player wouldn't really wait for the uptext and making your script faster because it waits around less.
Lots o' Love
SRL Development Team
// * Function WaitOptionMulti(S: TStringArray; Time: Integer): Boolean; // By Marpis & N1ke! & Rasta Magician
// * Function WaitOption(S: String; Time: Integer): Boolean; // By Marpis edited by N1ke!
// * Function WaitUptextMulti(S: TStringArray; Time: integer): Boolean; // By Marpis & N1ke!
// * Function WaitUptext(S: String; Time: Integer): Boolean; // By Marpis edited 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 WaitColorCount(x1, y1, x2, y2, Color, Tol, MinCount, MaxCount, MaxTime: integer):boolean; // By Rasta Magician
All of these are designed to make your scripts more efficient and here is how they would be used:
{this is how it is done at the present time}
MMouse(x, y, 3, 3);
wait(300);
if IsUpText('ank') then
begin
//...
end;
{here is how you would do it now}
MMouse(x, y, 3, 3);
if WaitUpText('ank', 300) then
begin
//...
end;
What it does is wait in cycles until the Uptext is found rather than waiting a set amount of time. It exits after MaxTime.
So usually, you would wait 300 ms for the uptext.
By using this new function, it will wait in cycles, and you would end up perhaps only waiting 180 or 120 ms, making it less detectable as a player wouldn't really wait for the uptext and making your script faster because it waits around less.
Lots o' Love
SRL Development Team