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
crycry
Apprentice


Joined: 24 Jun 2006
Posts: 169
Location: UK - South Coast

PostPosted: Sat Jun 24, 2006 5:32 pm   

alarm resetting on logout/in
 
Hi folks,

I have an alarm being set up, which set the contents of a variable after 4 hours. This works perfectly fine. Trouble is, every time i log out and log back in again, it resets itself back to 4 hours every time. Id like it to remember its time on logout. is the only way to do this to dump the remaining time using %alarm into a var, then reinitialising it on login?

#TRIGGER {text patern$} {
#ALARM lottery -4:00:00 {
#var lotto_update "due"
#SUSPEND lottery
}

Thanks for reading.

Crycry
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jun 24, 2006 8:15 pm   
 
No, but it's probably the easiest if you don't want to have it firing when logged off.
_________________
EDIT: I didn't like my old signature
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Sun Jun 25, 2006 3:08 pm   
 
I seem to recall once being able to the timer from a var:
#ALARM lottery -@lotto_time
or something like that.
but don't think it decreased.
So, maybe something like a dual counter?
counts down each second, and in your on_disconnect make it set one for the other?
And set a once it hits 0 to reset?
_________________
http://www.Aardwolf.com
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