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
shakey
Novice


Joined: 07 Jul 2007
Posts: 40

PostPosted: Wed Feb 20, 2008 12:27 am   

alarms
 
Anyway to make an alarm that doesn't delete itself after if fires?

I'm trying to make one that will fire every 1800000. Without using the tick timer.
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Wed Feb 20, 2008 12:37 am   
 
Code:


#alarm "PermAlarm" {*1800000} {#say Fired.}



* means that its a permanent alarm that doesn't disappear after being activated once. You can turn it off though, using either some name (used PermAlarm here) or just the number part. #t-/+ PermAlarm. #t-/+ *1800000.


Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Wed Feb 20, 2008 2:07 am   
 
Every 1800000 what? By my calculations a 1800000 second alarm takes almost 21 days to fire twice - how do you know it's not working? If you meant 1800000ms as is common with other systems, you should use a value of 1800.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
shakey
Novice


Joined: 07 Jul 2007
Posts: 40

PostPosted: Wed Feb 20, 2008 11:46 pm   
 
well even 1800000 would be a viable time on my mud because of certain rarities and what not, but you are correct 1800 is the right one.

So if I want a button to enable/disable it, it would go like this?


#BUTTON 24 {PermAlarm OFF} {#Class PermAlarm 1} {PermAlarm ON} {#class PermAlarm 0} {} {1} {} {Size} {75} {23} {} {} {} {14} {12} {} {} "" {} {} {}

#class PermAlarm

#alarm "PermAlarm" {*1800000} {execute a long list of annoying commands that no one cares to read}
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Thu Feb 21, 2008 12:06 am   
 
Use the #suspend and #resume commands, or #t+ and #t- with the ID of the alarm.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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