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


Joined: 05 Oct 2003
Posts: 5
Location: Australia

PostPosted: Sun May 23, 2004 1:44 pm   

Simple Condition Trigger problem
 
I'm having trouble with the most basic of triggers, it just doesn't seem to work...


#TRIGGER {You eat a goldenseal root.} {#noop}
#COND {(%d)h, (%d)m *} {GoldensealReset} {within|param=1}

Also tried {{Y|*}ou...
Goldenseal just resets a bunch variables to 0...
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun May 23, 2004 5:39 pm   
 
Your trigger uses "GoldensealReset". Your explanation uses "Goldenseal" (no Reset). Of course that might be just a typo, but it also might be the actual problem.

Another possible problem is the CONDITION's pattern. Because you have a space between the m and the *, the pattern won't match if you get just the two numbers followed by h and m.

I can't see anything else that would be a problem unless you expect the trigger to do something that it's not written to do. You didn't say what you expect the trigger to do or how you know it's not working, so I can't tell.

The trigger has two commands: #NOOP and GoldensealReset. #NOOP does nothing (fills space), so you won't see anything happen when you get, "You eat a goldenseal root."

The next line is a Within CONDITION, so it will only check the next Param lines. Param = 1, so it will only check the next line. If the next line contains a number followed by h and a comma, then a space and then another number followed by m and another space then the ALIAS, GoldensealReset, will be called and will change a bunch of variables. Variable changes aren't shown, so you also won't see anything happen here, unless you actually check the variables.

After the next line, the trigger will reset whether the CONDITION was matched or not.

Possible problems:
1. Either pattern doesn't match the actual MUD output
2. The second pattern doesn't occur within one line of the first pattern
3. The aliasname used in the trigger isn't correct
4. The alias isn't scripted correctly
Reply with quote
Planirten
Newbie


Joined: 05 Oct 2003
Posts: 5
Location: Australia

PostPosted: Mon May 24, 2004 12:29 pm   
 
I've run the checks you told me to run, and sadly i've come up blank.

1. Used the "Test" feature in Zmud to run both lines through to check that the trigger matches, it does.
2. The reason there was a space after the "m" in the #cond was because following 1151h, 1241m there is another few letters indicating balance.
3. The alias, "Goldensealreset" works fine anywhere outside the trigger.
4. I only want to check the next line, so what I want to happen is this:

Line recieved: You eat goldenseal root, Action: nothing
Next line: 1535h, 1235m ex-, Action: Goldensealreset

My only thought is that maybe the speed just isn't fast enough to cope with the "withinline" condition in the middle of a spammy combat...
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Mon May 24, 2004 1:41 pm   
 
Try this instead:

#TRIGGER {You eat a goldenseal root.} {}
#COND {%dh, %dm *} {GoldensealReset} {within|param=1|nocr|prompt}

I think that should fix your problem, since you're trying to trigger it off the prompt.

You can test it offline with this:

#SHOW {You eat a goldenseal root.}
#SHOWPROMPT {1151h, 1241m ex-}
Reply with quote
Planirten
Newbie


Joined: 05 Oct 2003
Posts: 5
Location: Australia

PostPosted: Tue May 25, 2004 9:06 am   
 
Thanks all, used a combination of both your soloutions to make it work... Thanks for all the help! ?
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