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


Joined: 12 May 2002
Posts: 0
Location: USA

PostPosted: Thu Apr 11, 2002 11:01 pm   

Problem with Alarms/Counters
 

Hi all. I'm trying to set up a series of alarm triggers that will count variables down from a captured number to zero. In addition to doing that I'm trying to display the results in the status window.

This is the sample line of text to trigger from:

wisdom : yes wisdom time : 260

My basic trigger looks like this:

wisdom(*): yes(*)wisdom time(*): (%d)

#VARIABLE vWISDOMTIME %4
#IF {@vWISDOMTIME > 0} {
#ALARM +2
#ADD vWISDOMTIME -1
} {#VARIABLE vWISDOMTIME ---}

And then in the status window it calls the @vWISDOMTIME variable to automatically update the counter. By itself as a #WAIT delay, it works great. But if I try to add any other spells (Dex, sta, str, etc), wierd stuff tends to happen, 1 will count down, then another will count down, or 1 will count down, and the others lock at their initial values. I've been trying various versions of using the #ALARM command but I think I'm doing something wrong. (Not even sure if I should be using an #IF command)

I'm just wondering if there is something I am missing to keep multiple alarm triggers running at the same time, or if it is even possible. My zMUD Version is 6.16. If any more info is needed, let me know. :)

Thanks,

-Brak
Reply with quote
SHASCO
Novice


Joined: 29 May 2001
Posts: 48
Location: USA

PostPosted: Thu Apr 11, 2002 11:36 pm   
 
Please do a cut and paste of the text from your mudd here so that we can see the sytax and special characters involved.
Reply with quote
optimus101
Newbie


Joined: 12 May 2002
Posts: 0
Location: USA

PostPosted: Thu Apr 11, 2002 11:45 pm   
 
The sample line of text in the first note is a cut and paste. The board setup removed the spaces, but you can see where the spaces are from the (*)'s in the trigger line.

-Brak
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Apr 12, 2002 2:26 am   
 
It looks to me like your ALARM syntax might be the cause of the problem. Copied is your script with the proper syntax added.

#VARIABLE vWISDOMTIME %4
#IF {@vWISDOMTIME > 0} {
#ALARM {+2} {#ADD vWISDOMTIME -1}
} {#VARIABLE vWISDOMTIME ---}


Note that each argument of the ALARM command is encapsulated in braces. This ensures that the parser does not become confused as to what it is to put into a given field of the created alarm trigger.
Reply with quote
optimus101
Newbie


Joined: 12 May 2002
Posts: 0
Location: USA

PostPosted: Fri Apr 12, 2002 5:56 am   
 
No good. I think I'm taking the wrong approach to it though. re-thinking it, I think I'm gonna try to just have a trigger to capture the variables and create an alarm based on which variables were captured. In the alarm would be the if statement to count down or not, and when completed, remove itself. will try to get it going.

-Brak
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