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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
haiku
Wanderer


Joined: 19 Nov 2004
Posts: 70

PostPosted: Wed Nov 14, 2007 1:03 am   

tick timer not looping
 
couldn't find anything about it in this through a cursory search, but here's something I do frequently for all my cure triggers:
The trigger goes off and calls the alias.

Code:
#IF (@InCombat = 0) {gr
#TI 1 {gr}
#TS 1
#VAR InCombat 1} {}


the group command goes off. But the tick timer does not. I get the message tick timer enabled, but it stops at 0 and doesn't execute the commands, much less restart.

The same thing happens with or without braces, so
Code:
#TI 1 gr
has the same effect
Reply with quote
haiku
Wanderer


Joined: 19 Nov 2004
Posts: 70

PostPosted: Wed Nov 14, 2007 1:23 am   
 
soryr, that's 2.11 beta again.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Nov 14, 2007 1:53 am   
 
First off, Haiku, why are you using the tick timer for this? It was never meant for such a use and its usage is also completely outdated. You should be using an alarm for your particulars.

Second I am seeing a variation in #TIMER from the documentation that might indicate a compatibility issue. The specifics of which are from the untitled session enter at the command line
Code:
#TIMER 1 {gr}
The countdown will proceed to the 'margin' mentioned in the help(doesn't show in the flyout reference), then the 'tick in' message will display followed by the "gr" command. The documentation indicates that the command occurs at 0 instead of the 'margin' point.

Using Haiku's tests it would appear that when the timer is enabled with a remaining time of 0 or when when the timer is set with #TSET 1 or #TSET 0 the timer will never complete and restart. I think the last 2 there are fair indications that an alarm is required. The first, enabling the timer in the last second, while difficult is a problem.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
haiku
Wanderer


Joined: 19 Nov 2004
Posts: 70

PostPosted: Wed Nov 14, 2007 3:45 am   
 
Ok, well, when I'm in combat, I need to monitor my group's hit points since I'm the cleric. the group command gives output like this:
Code:

Leader: Vlad
                                          Hits    Energy     Moves          Exp
                                          ----    ------     -----          ---
[ 72 Cle Ogr   ] Vlad                  912/912 1176/1176   199/199     84965175


I then use that to calculate who needs cures. I'll take a look into the alarm function, or whatever it is.

The cure for the problem was to turn off the timeout margin in the tick timer dialog box (which, incidently, I think would be nice to be able to do from the command line).
Apparently that setting didn't import when I imported from xml.

Know of any good examples of ALARM?
Reply with quote
Tech
GURU


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

PostPosted: Wed Nov 14, 2007 4:01 am   
 
All you need can be found here. #ALARM

You probably want something like

Code:
#ALARM grpChk {+1} {gr}


It creates an alarm that will fire every second. You'll want to disable after you create.

Code:
#IF (@InCombat = 0) {gr
#T+  grpChk;
#VAR InCombat 1} {}


This will enable the alarm when you begin combat. And whenever you know your done with combat you do this.

Code:
#T- grpChk
_________________
Asati di tempari!
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed Nov 14, 2007 4:13 am   
 
#Alarm "example" *5 {#say I will fire every Five seconds} //This creates an Alarm that does not delete itself after it fires.
#Alarm "example" +5 {#say I will fire once in Five seconds} //This creates an Alarm that deletes itself after it fires.

#T- example //This turns off the Alarm without showing you anything on the screen.

#T+ example //This turns on the Alarm without showing you anything on the screen. When the Alarm is turned back on the time has been reset.


#suspend example //This pauses the Alarm. Time left on the Alarm is saved.

#resume example //This resumes the Alarm. Time starts off from the pause point.

Note that I NAMED these alarms you don't have to do this but it helps with management.

Heh, Ninja'd by Tech.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed Nov 14, 2007 4:15 am   
 
Note at some point that I missed suspend and resume were changed.
They USED to tell you that they were suspending or resuming the Alarm. I like the change. Smile
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Nov 14, 2007 10:36 am   
 
Tech wrote:
Code:
#ALARM grpChk {+1} {gr}

It creates an alarm that will fire every second.

Tech means
Code:
#ALARM grpChk {1} {gr}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Tech
GURU


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

PostPosted: Wed Nov 14, 2007 1:17 pm   
 
Yep, that's what I get for copy and pasting my examples.
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Nov 14, 2007 6:17 pm   
 
Quote:
The countdown will proceed to the 'margin' mentioned in the help(doesn't show in the flyout reference), then the 'tick in' message will display followed by the "gr" command. The documentation indicates that the command occurs at 0 instead of the 'margin' point.

If the documentation says that, then I'll update it. The Tick Timer command occurs at the "margin" and *not* at zero. This is how it worked in zMUD and is maintained for compatibility.

While I completely agree that haiku should be using an #alarm instead of the tick timer, I do not find any problem with the tick timer in v2.11.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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