|
daemoan.vermillious Apprentice
Joined: 28 Feb 2009 Posts: 135 Location: Chico, Ca
|
Posted: Fri Oct 09, 2009 3:31 pm
#ALARM |
Is There A Way To Make A ALARM COUNTER IN THe Status Bar?
like #alarm 600 {cleanup}
Some Kinda Counter I can Make maybe In A Variable? Like
#var ALARM2 #alarm 600 {CLEANUP}
@ALARM2 would be counter? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sat Oct 10, 2009 4:30 am |
No there's not. What you can do is create a variable with a value of 600. Then have a 1 second repeating alarm decrement. Finally you can have an expression trigger (to match when the variable equals 0) to disable the 1 second alarm and do any other clean up work you'd need to do.
|
|
_________________ Asati di tempari! |
|
|
|
daemoan.vermillious Apprentice
Joined: 28 Feb 2009 Posts: 135 Location: Chico, Ca
|
Posted: Sat Oct 10, 2009 5:09 pm |
how is it that you make the counter varible decrese?
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Oct 10, 2009 9:06 pm |
use the #ADD command.
#ADD varname -x
varname = name of variable without the @
x = the number you want to apply to the variable value (ie, 1 to decrement by 1) |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
daemoan.vermillious Apprentice
Joined: 28 Feb 2009 Posts: 135 Location: Chico, Ca
|
Posted: Sun Oct 11, 2009 1:35 am |
So This Is What I Have So Far...
Status Bar: (@cleantimer)
Variable: #var cleantimer 200
Then #add cleantimer -1?
dont understand really kinda winging it |
|
|
|
daemoan.vermillious Apprentice
Joined: 28 Feb 2009 Posts: 135 Location: Chico, Ca
|
Posted: Sun Oct 11, 2009 6:16 am |
in fact when I do the #add cleantimer -1 it one minus 1 out do you make it so it repeats down to 0 and then trigger clean and then reset over again
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Oct 11, 2009 3:51 pm |
Here's some code that should do what you want
Code: |
#CLASS {timer}
#ALIAS reset {
CleanTimer=5
#T+ CleanCounter
}
#VAR cleantimer {0}
#TRIGGER (@cleantimer = 0) {
#echo Now do the clean up
#T- CleanCounter
}
#ALARM "CleanCounter" {1} {#ADD CleanTimer -1} "" {disable}
#STAT {Timer: @CleanTimer}
#CLASS 0 |
You set the variable CleanTimer to be what you want. In your case it would be 200. You do this be editing the reset alias, this will also start the countdown. When the timer reaches zero the alarm gets disabled. When you want to start up again you run the 'reset' alias. |
|
_________________ Asati di tempari! |
|
|
|
daemoan.vermillious Apprentice
Joined: 28 Feb 2009 Posts: 135 Location: Chico, Ca
|
Posted: Fri Oct 23, 2009 3:49 am |
Iam useing cmud now, but, if I wanted to make a day counter to count down the ticks in the day how would I do this?
is there a way to sync a tick with mud tick or something? if 1 mud tick = 15 sec and 1 mud day is 30 ticks |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
|
_________________ Asati di tempari! |
|
|
|
|
|