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
EnigmafromRI
Newbie


Joined: 17 Feb 2004
Posts: 7
Location: USA

PostPosted: Wed Feb 18, 2004 6:10 am   

Timer
 
Curiousity struck me again today. We have a quest system. I wanted to look into having a timer count down to the next quest in the status bar. Is that possible? If not would the status window serve better for this task? As for the triggers and such I can do those alone for the actual quest time. Just wanted to know if it is at all possible??
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Feb 18, 2004 3:35 pm   
 
Sure, just create an alarm that fires every second (*1 will do) and have this alarm decrement a counter variable each time. Then, initialize the counter variable with whatever you need and put it in the status bar.
Reply with quote
EnigmafromRI
Newbie


Joined: 17 Feb 2004
Posts: 7
Location: USA

PostPosted: Thu Feb 19, 2004 7:50 am   
 
Its changing the numbers way too fast.
Here is what I have so far
#trigger You may quest in (%w) minutes
#variable questtimer %1
#alarm *1 {#math questtimer {questtimer-1}}

Its prolly typed out all wrong and I tried
but again the numbers are counting down way
too fast.

While I have you ear. Would #alarm mm {THE CORRECT ANSWER}
display the timer in the status bar in minutes?[?]
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Feb 19, 2004 8:23 pm   
 
Well yes. If you are trying to count down MINUTES, a one-SECOND alarm will be way too fast. Also, you're looking for a number so you should probably be using %d rather than %w in your pattern.
#ST Next quest: @qtime min
#TR {You may quest in (%d) minute} {
#VAR qtimer %1
#ALA qclock *60 {#ADD qtimer -1;#IF (@qtimer < 0) {#VAR qtimer 0}}}
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