|
nutsnbolts Apprentice
Joined: 01 May 2002 Posts: 188 Location: USA
|
Posted: Thu May 16, 2002 6:46 pm
%ctime question. |
%ctime is the time from when connected. Any other variables available that I can use to just count how many minutes it has passed.
Say when I start an xp counter, it'll start the time. When I report how much xp we have gained lets say in 2 minutes, it'll say automatically I have gained 13313 xp in 2 minutes. Myself not defining the amount of minutes but systematically is captured?
Sup |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu May 16, 2002 8:13 pm |
You can use %secs, which is the number of miliseconds since midnight. Example:
#ALIAS xpstart {#VAR start %secs;#VAR xp 0;}
#ALIAS xpstop {#SH You have gained @xp xp in %eval((%secs - @start)/60000) minutes.
Kjata |
|
|
|
nutsnbolts Apprentice
Joined: 01 May 2002 Posts: 188 Location: USA
|
Posted: Thu May 16, 2002 9:17 pm |
I see that you have a variable @start
What is that variable for?
Sup |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu May 16, 2002 9:35 pm |
Since %secs will have a different value every time you check it, you must save the value it has when you start the xp counter, and the substract it from the value it has when you stop the xp counter. The difference is the time spent gaining the xp.
Kjata |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu May 16, 2002 9:35 pm |
Is there any reason this isn't part of your other question?
The only way to know when you started is for you to make a note of the time. The most convenient method for doing so is to store the time (from %ctime or %secs or %time() or some other source) in a variable.
@start is the time when Kjata started counting.
LightBulb
Vague questions get vague answers |
|
|
|
|
|