SRL Archive - Help

GetSystemTime


Yago

2011-02-23 21:56:24

Ive seen it in many scripts… Just wondering what the heck it does or records.

I know its got something to do with time…

Thanks for helping :)

Train

2011-02-23 23:13:43

Get the amount of milliseconds the system has been online for. Used for benchmarking and time outs.

Wanted

2011-02-23 23:23:23

You'll see

var
T: Integer;

begin
T := GetSystemTime;
WriteLn(T);
end.

out puts

19962745

which is the number of milliseconds the system has been online for at any given time, this number increases 1 per a millisecond, so at any given time in the future it will be X amount greater than before and the difference between the current value and the old value will be the amount of milliseconds that have passed.

var
T: Integer;

begin
T := GetSystemTime;
Wait(1000);
WriteLn(GetSystemTime - T);
end.

Yago

2011-02-23 23:56:47

Is it refering to the system of runescape or of simba or of smart?

Wanted

2011-02-23 23:57:10

From: yago
Is it refering to the system of runescape or of simba or of smart?


Your computer.

Daniel

2011-02-24 03:21:20

Here's an example of its' use (in English):

I call GetSystemTime.
I then run my wood chopping procedure.
I then call GetSystemTime again and get the difference. I can then see how long it took to cut down those trees and if it has been cutting for more then 10 minutes then I know something is wrong (as it never takes 10 minutes to cut a tree!) and I can log that player out to prevent it from getting banned.

:)

marpis

2011-02-24 04:13:57

There's also GetTimeRunning: integer; which also results in milliseconds, but this time the time your script has been running.


begin
Wait(1000);
Writeln(GetTimeRunning);
end.

:)

You can turn milliseconds into minutes like this:
1000 = 1 second (just like 1000 millimeters is 1 meter)
60 seconds = 1 minute

–> 1000*60 = 1 minute
–> 1000*60*60 = 1 hour

Yago

2011-02-24 12:03:38

Ok thanks :). Ill use these tactics. Thanks alot. Btw, I have a lot more questions :)

anonymity

2011-02-24 12:29:02

A little while back, I had a lot of time related questions. If it helps you out at all you can read through this thread.

What other questions do you have?

Yago

2011-02-24 18:44:17

Edit: Found A Way around the bank thing.

Is there A way I can tell what floor my character is on?

Like 1rst 2nd or 3rd floor of lumby castle?

anonymity

2011-02-24 22:33:45

Right when you login? or when you are script navigating?

login:
- i dunno.

script navigating:
- well, you could add a simple floor counter.
- - it would add and subtract so you know which floor you are on. make floor zero the base, + would be up, and - would be basement.

Yago

2011-02-24 23:01:56

No, but I wanna do something as a failsafe to make sure I went up the lumby stairs. Ill use symbol finding but its innacurate so … Untill Somebody else knows a way then Im screwed.

KingKong

2011-02-25 00:00:04

I think this will tell you what level you're on: GetPlaneIndex

Yago

2011-02-25 21:58:46

Ok thank alot again for your help. Yes that was the correct function. As for now no more questions … Off To fix my lumbylobcooker