SRL Archive - RS3 Outdated / Broken Scripts

function waituntil


jhildy

2007-05-23 22:45:49

function waituntil(what: boolean;milliseconds: integer): boolean;
var i: integer;
begin
i:=0;
repeat
i:=i+1;
begin
wait(1);
end;
until(what = true) or (i=milliseconds);
result:=true;
end;


ok this will wait until something happens for example
begin
waituntil(findcolor(x,y,23423,1,1,700,700),1000)

the second part of it is how many milliseconds to wait in total before giving up

Bobarkinator

2007-05-23 23:21:33

This won't qualify because you never declared what repeated is.

jhildy

2007-05-23 23:26:11

whoops sorry made last minute changes editing right now