 |
crycry Apprentice

Joined: 24 Jun 2006 Posts: 169 Location: UK - South Coast
|
Posted: 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 |
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: 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? |
|
|
|
 |
|
|
|