[Warning!] Double Post..
[/Warning]////////////////////
// [Part Two!] //
///////////////////~tImIng Is EvErythIng~
Basically, I took the stuffs provided above, gargled, and vomited it back up. Thanks go to Wizzup? and Narcle.
i luffs yeww was helpful, just not what I needed.Procedure TimeOfDay;
var
H, M, S, MS: Word;
begin
DecodeTime(Now, H, M, S, MS);
Case H of
0..9: Writeln('0' + inttostr(h) + ':' + inttostr(m) + '(' + inttostr(s) + ')');
10..23: Writeln(inttostr(h) + ':' + inttostr(m) + '(' + inttostr(s) + ')');
end;
end;
^ Just to add the beginning zero to the time (I need it for my purpose..).
Procedure DateOfYear;
var
y, m, d : Word;
begin
DecodeDate(date, y, m, d);
case m of
1: Writeln('Jan/' + inttostr(d) + '/' + inttostr(y));
2: Writeln('Feb/' + inttostr(d) + '/' + inttostr(y));
3: Writeln('Mar/' + inttostr(d) + '/' + inttostr(y));
4: Writeln('Apr/' + inttostr(d) + '/' + inttostr(y));
5: Writeln('May/' + inttostr(d) + '/' + inttostr(y));
6: Writeln('June/' + inttostr(d) + '/' + inttostr(y));
7: Writeln('July/' + inttostr(d) + '/' + inttostr(y));
8: Writeln('Aug/' + inttostr(d) + '/' + inttostr(y));
9: Writeln('Sep/' + inttostr(d) + '/' + inttostr(y));
10: Writeln('Oct/' + inttostr(d) + '/' + inttostr(y));
11: Writeln('Nov/' + inttostr(d) + '/' + inttostr(y));
12: Writeln('Dec/' + inttostr(d) + '/' + inttostr(y));
end;
end;
^ I like the way this looks in the debug box best so far.
This next part I wasn't sure if both worked 100% because I haven't had scripts running for more than 20 hours since I started this thread…
v
Procedure ScriptRunTime1;
var
S, M, H, H2, D : integer;
begin
if GetTimeRunning < 86400000 then
begin
ConvertTime(GetTimeRunning, H, M, S);
Writeln('ran for ' + IntToStr(H) + ' hours, ' + IntToStr(M) + ' minutes, ' + IntToStr(S) + ' seconds');
end else;
if GetTimeRunning > 86399999 then
begin
ConvertTime(GetTimeRunning, H, M, S);
D:= 0;
repeat
H2:= H-24;
D:= D + 1;
until(H2 < 24);
Writeln('ran for ' + IntToStr(D) + ' days, ' + IntToStr(H2) + ' hours, ' + IntToStr(M) + ' minutes, ' + IntToStr(S) + ' seconds');
end;
end;
Procedure ScriptRunTime2;
var
S, M, H, D : integer;
begin
if GetTimeRunning < 86400000 then
begin
ConvertTime(GetTimeRunning, H, M, S);
Writeln('ran for ' + IntToStr(H) + ' hours, ' + IntToStr(M) + ' minutes, ' + IntToStr(S) + ' seconds');
end else;
if GetTimeRunning > 86399999 then
begin
ConvertTime(GetTimeRunning, H, M, S);
Writeln('ran for ' + IntToStr(D) + ' days, ' + IntToStr(H) + ' hours, ' + IntToStr(M) + ' minutes, ' + IntToStr(S) + ' seconds');
end;
end;
And now….
v
//Just examples of use..
Begin
SetupSRL;
Writeln('... ... ... ...');
Writeln('anonymous script started:');
DateOfYear;
TimeOfDay;
Writeln('... ... ... ...');
{
start my stuff;
check for stuffs;
begin pwning jagex;
oh no error..
DateOfYear;
TimeOfDay;
ScriptRunTime;
et cetera..
}
end;
So, that is that. Thanks again Wizzup? and Narcle for the timely response(s). Any suggestions would be welcomed; unless of course, I decide otherwise, and in that case I reserve full right to shoot down thoughts, ideas, and morale…