|
gasolin Novice
Joined: 17 Aug 2002 Posts: 31 Location: Denmark
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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?? |
|
|
|
gasolin Novice
Joined: 17 Aug 2002 Posts: 31 Location: Denmark
|
Posted: 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] |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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} |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: 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} |
|
|
|
|
|