|
radboi22 Novice
Joined: 19 Jan 2008 Posts: 30
|
Posted: Wed May 05, 2010 10:08 pm
How to check for a word in a String of words. |
Example. You hold a Red Flute.
You hold a Flute that is Red.
You touch a Flute.
Hey there's a flute in your hand!
How do I make a trigger that looks for the Word Flute in these lines.
Basically, I hold something, and I want to trigger a trigger if it contains flute in it, but the line of words Vary's.
THANKS SO MUCH! |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Wed May 05, 2010 10:40 pm |
You could make a trigger to fire on all those outputs like so:
#TR {{You hold a Red Flute.|You hold a Flute that is Red.|You touch a Flute.|Hey there's a flute in your hand!}} {do something}
P.S. Questions should go into the general zMUD or CMUD forums, the 'Finished MUD Scripts' section is for completed scripts to be shared with others, not for asking questions. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu May 06, 2010 2:28 am |
If you are interested in nothing but the word Flute, you can use %qFlute%q as your pattern. The %q will force the trigger to not match on bigger words that contain Flute.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
radboi22 Novice
Joined: 19 Jan 2008 Posts: 30
|
Posted: Thu May 06, 2010 5:29 am |
Thank you that's what I was looking for =D
|
|
|
|
|
|