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
Shezmu
Wanderer


Joined: 23 Apr 2010
Posts: 53

PostPosted: Sat Jun 26, 2010 5:36 am   

Deleting multiple alarms
 
I have a quest that I run in my mud, where I set up three alarms using the #ALARM function, one at the end of the 30 minute time limit, another at 5 minutes prior and one at 10 minutes prior. It runs something like this:

Code:
#ALARM {+30:00} {udtimeout}
#ALARM {+20:00} {#echo 10 minutes left. Send player a tell or yell.}
#ALARM {+25:00} {#echo 5 minutes left. Send player a tell or yell.}


And creates alarms named randomly:

Code:
_Alarm5: +30:00
_Alarm6: +25:00
_Alarm7: +20:00


I noticed the last character of the alarm names is somewhat random (based on previous alarms set this session). I want to set up an alias to delete all of these alarms, should the player complete the quest before the time limit. I figured out #UNTRIG, but how do I have it delete the three alarms with different names? Something like:

Code:
#LOOP 3 #UNDELETE _Alarm*

(doesn't work, btw).
Reply with quote
shalimar
GURU


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

PostPosted: Sat Jun 26, 2010 6:50 am   
 
the trick is to give them an ID at creation:
Code:
#ALARM "questEnd" +30:00 {udtimeout}
#ALARM "questTenMinWarning" +20:00 {#echo 10 minutes left. Send player a tell or yell.}
#ALARM "questFiveMinWarning" +25:00 {#echo 5 minutes left. Send player a tell or yell.}


This will ensure that there is only one of each alarm type any any given moment.
furthermore you can #UNTRIGGER them by ID name.
_________________
Discord: Shalimarwildcat
Reply with quote
Shezmu
Wanderer


Joined: 23 Apr 2010
Posts: 53

PostPosted: Sat Jun 26, 2010 12:58 pm   
 
Thanks, Shalimar. That's embarrassing. This one was simple enough I should have found it. Embarassed
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