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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Sun Mar 01, 2015 6:31 am   

Naming #ALARMS.
 
Last question of the day!

I use alarms to reset the values in certain variables. Is there a way to name #ALARMS so I can check to see how long is left on them?

eg:

Code:
#ALARM 900 {gates = open}


Using that alarm as an example, I want to be able to check how long until the gates open? (I know I can type the #ALARM command to bring up all my #ALARMs, but that is a long list, I want to be able to isolate them).
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Sun Mar 01, 2015 6:39 am   
 
I've read that I can give them an ID using:
Code:

#ALARM "gates" 900 {gates = open}


But see no way of calling that up to see how long is remaining.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sun Mar 01, 2015 2:19 pm   
 
Use the %alarm function.
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Sun Mar 01, 2015 10:47 pm   
 
Sweet, that returns the result in milliseconds, so I made this little script to convert it into real time (forgive my poor maths).

Code:

#ALARM "tester" 1000 {}
#MATH alarmmins (%alarm(tester)/1000)/60
#MATH alarmsecs (%alarm(tester)/1000)
#IF (@alarmmins < 1) {#SHOW Seconds until alarm: @alarmsecs} {#SHOW Minutes until alarm: @alarmmins}


Works nicely, thanks for the help.
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Mon Mar 02, 2015 6:14 pm   
 
Is there a way to delete an alarm from the command line?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: Mon Mar 02, 2015 10:39 pm   
 
you can use the #UNTRIGGER command
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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