So I would like to end certain loops after 30 sec, 60 sec, and 120 seconds. I was wondering how to set this up. I think this can be done using the system time functions but I cant quite figure it out.
Thanks for any input.
So I would like to end certain loops after 30 sec, 60 sec, and 120 seconds. I was wondering how to set this up. I think this can be done using the system time functions but I cant quite figure it out.
Thanks for any input.
AKA http://i105.photobucket.com/albums/m...uceSigcopy.jpg
I am a SCAR//SRL newb and i am willing to become better =) reading my tut's day by day.
Simba Code:T := GetsystemTime;
repeat
wait(1);
until ((GetSystemTime - T) >= 30000);
Edit:
Or break loop
Simba Code:repeat
wait(1);
if ((GetSystemTime - T) >= 30000) then
Break;
until false;
(Scripts outdated until I update for new SRL changes)
AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
Summer = me busy, won't be around much.
From the other thread..Quite simple, you see?Simba Code:procedure DoForTime;
var
t: Integer;
begin
t := GetSystemTime + 30000; //Set 't' equal to 30 seconds from now
while t > GetSystemTime do
begin
ThisIsA;
30SecondLoop;
end;
end;
Also, stick with one thread next time please.
Much appreciated. Thank you so much, once again I apologize for the double post.
AKA http://i105.photobucket.com/albums/m...uceSigcopy.jpg
I am a SCAR//SRL newb and i am willing to become better =) reading my tut's day by day.
another way
SCAR Code:T := GetSystemTime;
while ((GetSystemTime - T) < 10000) do
begin
//stuff;
end;
Or you can use Stupid3ooo's Marktime and TimeFromMark... still in SRL![]()
SRL is a Library of routines made by the SRL community written for the Program Simba.We produce Scripts for the game Runescape.
There are currently 1 users browsing this thread. (0 members and 1 guests)