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

Joined: 21 Jan 2005
Posts: 99
Location: Solvang, CA

PostPosted: Fri Jan 21, 2005 5:57 am   

Countdown Timer / Status bar
Hi, I'm hoping someone can help me with this... I want to set up two seperate triggers that both activate a coundown timer in the status bar at the top of my screen.. unfortunately, I cannot find the command to display the timer, and really have no idea where to even start to have it display the timers (especially to have it differentiate between two timers, so they don't overlap or float)... for simplicities sake let's say this is the scenario:

#TRIGGER {Timer 1 Start for (%d) minutes.} {setup to start timer here}
#TRIGGER {Timer 2 start for (%d) minutes.} {setup here}

they will of course trigger off of different messages, but that's not the issue here... the %d portion IS somewhat accurate tho; there will be a number in the triggering prompt that will state in minutes the duration necessary for the timer... the #math function for 60 * %1 is easy enough, just mention it so all information is present...

Help is this matter will be *greatly* appreciated!!

Also, if it is not possible to run the two (or if nobody out there can or wants to help with that) one of the triggers is much more important than the other... so just the setup for the triggered countdown timer for one would be a great help!

Reply with quote

Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jan 21, 2005 12:35 pm   
Make a button, any type will do since it's only there to provide a display. For the caption put @timer1, along with any other text you might want so you can tell what it is. Use #ALARM to decrement the variable.
#ALA Alarm1 -1 {#IF (@timer1 > 0) {#ADD timer1 -1} {#T- Alarm1}} {} {disable}
#TR {Timer 1 Start for (%d) minutes.} {#MATH timer1 {60 * %1};#T+ Alarm1}

NOTE: 1 sec alarms are frequently delayed by other processing, so the countdown might be too long.
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote

Joined: 19 Nov 2005
Posts: 53

PostPosted: Wed Sep 17, 2008 7:02 pm   
I know this thread is really old, but I came across it during a search for something.

The function to display an alarm is %alarm().
Instead of doing what LightBulb suggested (maybe the function didn't exist then? I don't know. I kind of doubt it.), you should just put %format("&2.0f",%eval(%alarm( alarm_name)/1000)) into your status bar. And then create a named alarm for each of those patterns.

I'm sure you've figured this out by now. But I'm posting for the benefit of the forum.
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