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
gasolin
Novice


Joined: 17 Aug 2002
Posts: 31
Location: Denmark

PostPosted: Tue Jun 29, 2004 10:38 pm   

Help on Condition
 
Hi

When I type exa bag the output is this:
Code:

A Bag of Aardwolf holds:
( 6) (Humming) Jade Elixir [60]
     (K) (Humming) Sacramental Carafe [1]
(14) (Glowing) (Humming) Taboo's Energy Bar [100]
( 2) (K) (Glowing) (Humming) <*]AMAZON[*> Bracers [1]
( 9) a pot pie [0]
     (K) (Glowing) (Humming) a Rhythmically Organised Sequence [1]
     (K) (Invis) (Glowing) (Humming) Enchanted Dreams [75]
     (K) A Cloak skinned from a mountain goat kid [1]
     (K) (Glowing) (Humming) Passport to Knossos. [60]


I have a VARIABLE @namehealpotion that holds Jade Elixir

My trigger pattern is:
A Bag of Aardwolf holds:

and Value is:
#CONDITION {^~(%s(%d)~) (*) @namehealpotion} {#SHOW DOES IT WORK??} {Within|Param=10}

But nothing happens, but this works:
#TRIGGER {A Bag of Aardwolf holds:} {#SHOW Bag works!!}
#TRIGGER {{^~(%s(%d)~) (*) @namehealpotion} {#SHOW DOES IT WORK??}

So I must be doing something worng with the #COND but I dont know what
and I 100% sure that the trigger works
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jun 30, 2004 4:15 am   
 
I'm sorry your multistate trigger doesn't work for you. There's nothing wrong with it.

#TR {A Bag of Aardwolf holds:} {#SHOW Bag works!!}
#COND {^~(%s(%d)~) (*) @namehealpotion} {#SHOW DOES IT WORK??} {Within|Param=10}
#VAR namehealpotion {Jade Elixir}
#SHOW {A Bag of Aardwolf holds:};#SHOW {~( 6~) ~(Humming~) Jade Elixir ~[60~]}

Output:
A Bag of Aardwolf holds:
Bag works!!
( 6) (Humming) Jade Elixir [60]
DOES IT WORK??
Reply with quote
gasolin
Novice


Joined: 17 Aug 2002
Posts: 31
Location: Denmark

PostPosted: Wed Jun 30, 2004 3:22 pm   
 
Thanks

A good night sleep and a little dream of #condition did the work.
I just copy/pasta:
#TR {A Bag of Aardwolf holds:} {#SHOW Bag works!!}
#COND {^~(%s(%d)~) (*) @namehealpotion} {#SHOW DOES IT WORK??} {Within|Param=10}

and find out that the cond line put it self in state 1, that was new to me.

But how do I make my #cond catch both:
( 6) (Humming) Jade Elixir [60] - there is a space before 6
and if there is more than 9
(16) (Humming) Jade Elixir [60]
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jun 30, 2004 6:19 pm   
 
Simple. Just start your pattern at the number.
#TR {A Bag of Aardwolf holds:} {#SHOW Bag works!!}
#COND {(%d)~) (*) @namehealpotion} {#SHOW DOES IT WORK??} {Within|Param=10}
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Wed Jun 30, 2004 6:24 pm   
 
Try this - it should capture whether there's 1 space there, or nothing there.

#COND {^~({ |}(%d)~) (*) @namehealpotion} {#SHOW DOES IT WORK??} {Within|Param=10}
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