|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Wed Jan 21, 2009 2:00 am
Display time since I've last seen this line? |
I've been digging over all kinds of time variables and the docs trying to figure out how to show how much time has passed since I last saw a certain line. Is it possible? I know I've seen it on someone else client in the past.
|
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Wed Jan 21, 2009 3:01 am |
#tr {line you want to capture} {#lua {zs.var.currenttime=os.time(t)};$dtime=(@currenttime-@lasttime);#print Delta time: $dtime;#lua {zs.var.lasttime=os.time(t)}}
|
|
|
|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Wed Jan 21, 2009 3:10 am |
Was looking for more of a way to put it into the statusbar to show how long it has been since that.
Like this line.
[centre of the encampment] |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Jan 21, 2009 5:01 am |
Just put the result of the local variable $dtime into a regular variable and put that in your status bar. If you want a running count you can look in to using the #TIMER or use a 1 second repeating #ALARM and have that alarm keep updating the variable you place in the status bar.
|
|
_________________ Asati di tempari! |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Jan 21, 2009 8:44 am |
Like so:
#trig {line I want to track} {time=%secs}
#alarm 1 {lastseen=%secs-@time}
Then you put @lastseen in the status bar. The alarm can be set to update at any frequency and it'll still work, if you're finding one-second updates to be too resource-intensive. %secs, by the way, contains the number of seconds since January 1st 1970, and it's a good way to check this sort of thing. |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Wed Jan 21, 2009 9:50 am |
You can also use Options > General > Session > Scrollback (along the top), and check both "Show timestamps" and "Show delta time".
|
|
|
|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Wed Jan 21, 2009 10:05 pm |
Wow thanks guys :) I setup a timer to add 1 to the counters every 60 seconds as I don't really care about how many seconds it has been :)
Now I have another question which hopefully you'll will be able to answer.
I'm looking for a way to change
Quote: |
You count four troll left eyes, four human left eyes, four troll right eyes, four human right eyes, four cured human right eyes, six cured human left eyes, three cured crab right eyes, two cured bird left eyes, three cured crab left eyes and one cured bird right eye with a total of thirty-five items. |
That word number to an actual number I can use in a gauge. Any ideas? |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Wed Jan 21, 2009 10:35 pm |
There's a script in Finished ZMud Scripts section that does just that.
|
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Wed Jan 21, 2009 11:35 pm |
Mind linking to it? I spent sometime searching the forums and couldn't find it.
|
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Thu Jan 22, 2009 1:16 am |
I must have been completely blind then.
|
|
|
|
|
|