Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
McDeathue
Newbie


Joined: 16 Feb 2007
Posts: 7
Location: UK

PostPosted: Sun Feb 18, 2007 1:03 pm   

Online time tracker
 
I am still quite new to ZMUD programming, and am having some success with the easier triggers, alias's etc. However I am now showing my failings

I want to create a timer, that tracks how long I am online and playing, that remembers how long between shut downs as well.. Ie.. if I play for 3 hours, then come back the next day.. I want it to remember the 3 hours and carry on incrementing from there

I want to be able to stop / start it with a command (TimerOn, TimerOff)

I figure the way to do it is a variable which increments in seconds (or even minutes) when the timer is running.

The reason for this, is after 24 hours of playing time, I want to make an alert appear in my Alerts window, and then for the variable to reset.

Anyone up to getting me started?

Thank you in advance
Reply with quote
McDeathue
Newbie


Joined: 16 Feb 2007
Posts: 7
Location: UK

PostPosted: Sun Feb 18, 2007 1:25 pm   
 
Sorry.. wrong forum.. appologies to admin
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Feb 18, 2007 1:47 pm   
 
Seems like the right forum to me.

You'll want something like this:

#var OnlineTime ""
#alarm 60 {#add OnlineTime 1;#if (@OnlineTime>=1440) {OnlineTime="";#say GO OUT AND GET A LIFE!}}

;)
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
McDeathue
Newbie


Joined: 16 Feb 2007
Posts: 7
Location: UK

PostPosted: Sun Feb 18, 2007 3:44 pm   
 
works -perfect-
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net