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
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: 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?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: 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!
Reply with quote
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: Sat Oct 10, 2009 5:09 pm   
 
how is it that you make the counter varible decrese?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: 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
Reply with quote
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: 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
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: 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!
Reply with quote
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: 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
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Oct 23, 2009 3:11 pm   
 
You should look into using the Tick Timer commands and the onTick Event.
_________________
Asati di tempari!
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