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
mj_cole
Wanderer


Joined: 19 Apr 2001
Posts: 59
Location: USA

PostPosted: Tue Jul 22, 2003 2:56 pm   

Multi-State trigger Question
 
I am trying to make a trigger to capture the equipment that I am wearing. I thought that a multi-state trigger would be the best method to capture the items. However, I could not quite figure it out.

I could make this using a class, enabling it on the "You are using:" pattern, and then dissabling on the first blank line. But wanted to know if you guys know a better way.

The main problem that I can't figure out how to handle, is that the number of worn items is not constant, so I cant use a loop on the second condition (with a set number of loops that is)

regards
Marts

Code:

H:253 M:250 V:262 T:5833 > eq

You are using:
<Worn on body>            Something.
<Worn on back>            Something.
<Worn on right arm>       A dark grey sleeve (brand new) (shadowy)
<Worn on left arm>        A dark grey sleeve (brand new) (shadowy)
<Worn on right wrist>     A dark grey bracer (brand new) (shadowy)
<Worn on left wrist>      A dark grey bracer (brand new) (shadowy)
<Worn on right hand>      A dark grey glove (like new) (shadowy)
<Worn on left hand>       A dark grey glove (excellent) (shadowy)
<Right ring finger>       A dark grey band (brand new) (shadowy)
<Left ring finger>        A dark grey band (like new) (shadowy)
<Worn around waist>       A small quiver (excellent)
<Held in right hand>      A large bag woven from grey moss (opened)
<Held in left hand>       An aluminum dart (brand new)

H:253 M:250 V:262 T:5833 > camp
You stop and set up a poorly made camp.                                         
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Jul 22, 2003 3:47 pm   
 
I'd do something similar to the reseting trigger example. Looping 99 lines and have a temporary trigger to set the state back to 0.

#TRIGGER InvTrig {You are using:} {#VAR Inv "";#TEMP {^$} {#STATE InvTrig 0}}
#COND {} {#ADDITEM Inv %line} {LoopLines|Param=99}

Format the "#ADDITEM Inv %line" to something meaningful to you.
Reply with quote
mj_cole
Wanderer


Joined: 19 Apr 2001
Posts: 59
Location: USA

PostPosted: Tue Jul 22, 2003 4:11 pm   
 
Looks like it's working, excelent.

I will have to do a full test tonight

Regards
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