Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
daemoan.vermillious
Apprentice


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

PostPosted: Sat Oct 24, 2009 7:12 am   

day counter?
 
If I have a Day counter... 30 ticks in a day - 1 tick = 15 seconds

can I do something like
#var daytimevar {30} {#wa 15000 {#add daytimervar -1}} {0=reset}

i know the wait timer wont work but what can I do with that?
where every 15 sec -1 to timer...? and reset when it hits 0

thanks
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Sat Oct 24, 2009 10:44 am   
 
This should do it:

#ALARM {-15} {#add daytimer -1;#IF (@daytimer = 0) {#var daytimer 0}}
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
daemoan.vermillious
Apprentice


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

PostPosted: Sat Oct 24, 2009 4:09 pm   
 
I was wanting to run the daytimer from 30 down to 0

it just seems to be counting negatives
somethngs fishy:P
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sat Oct 24, 2009 4:52 pm   
 
You need to initialize the daytimer to 30 before starting that alarm, and "#var daytimer 0" should be "#var daytimer 30"
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Sat Oct 24, 2009 4:54 pm   
 
Sorry, it seems my ability to pay attention to details had lapsed.

Code:
#VAR daytimer 30
#ALARM {-15} {#add daytimer -1;#IF (@daytimer = 0) {#var daytimer 30}}


See if that suits you better.
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
daemoan.vermillious
Apprentice


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

PostPosted: Sat Oct 24, 2009 7:35 pm   
 
Pattern:
~[Time~]~: It is now the day of &%wdayvar~!

Value:
#VAR daytimer 30
#ALARM {-15} {#add daytimer -1;#IF (@daytimer = 0)}

or even
#VAR daytimer 30
#ALARM {-15} {#add daytimer -1;#IF (@daytimer = 0) {#var daytimer 30}}

is not working....

triggers the day name and the 30 count but does not decrease or reset.....???

when it triggers the #var daytimer 30 should be the reset right???
Reply with quote
daemoan.vermillious
Apprentice


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

PostPosted: Sat Oct 24, 2009 7:59 pm   
 
i got it working sry
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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