SRL Archive - SRL Suggestions

WaitFindDTMEx ?


bg5

2012-03-08 11:20:32

I see there is new WaitFindDTM function added to SRL ,but it's limited only to inventory ,so i suggest:
function WaitFindDTMEx(DTM: integer; var x, y: integer; xs, ys, xe, ye, WaitPerLoop, MaxTime: integer): boolean;
var
t: integer;
begin
t := (getSystemTime + MaxTime);

while (getSystemTime < t) do
begin
if (findDTM(DTM, x, y, xs, ys, xe, ye)) then
begin
result := true;
break;
end;

wait(WaitPerLoop);
end;
end;

Coh3n

2012-03-08 18:12:09

Sounds reasonable enough. Will add this later. :)

Flight

2012-03-08 18:37:14

I say just replace the old WaitDTM function with this.

Coh3n

2012-03-08 22:38:32

From: Flight
I say just replace the old WaitDTM function with this.
Heh, I'd like to do that with about 100 SRL functions, but that would break any scripts that use WaitDTM (I know it was recently added, but still).

E: Our plan is to combine functions like that for SRL6.

Rezozo

2012-03-08 22:46:14

I like it. Might use it in my new script, after others test it of course :) TEEHEE

Coh3n

2012-03-08 23:28:00

Added for the next version.

Rezozo

2012-03-09 18:07:38

^That's Coh3n for you!