 |
Shezmu Wanderer
Joined: 23 Apr 2010 Posts: 53
|
Posted: 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). |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4772 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
 |
Shezmu Wanderer
Joined: 23 Apr 2010 Posts: 53
|
Posted: Sat Jun 26, 2010 12:58 pm |
Thanks, Shalimar. That's embarrassing. This one was simple enough I should have found it. 
|
|
|
 |
|
|