hoku Newbie
Joined: 21 Dec 2001 Posts: 7 Location: USA
|
Posted: Sat Dec 22, 2001 11:18 am
pattern matching |
Ok. I'm trying to create a trigger so it catches a piece of text and saves it to a variable, but my mud is a little complicated. I can walk into a room and it'll say something like:
A tall slimy blob.
Now all i have to do is type: 'kill blob'. But when I fight him, it'll say something like: 'Slimy blob hits you' instead of 'A tall slimy blob hits you'. I'm trying to capture the 'Slimy blob' in 'Slimy blob hits you' and save it to a variable. I have a trigger set up like this:
#TRIGGER {(*) {bites|constricts|cleaves|slashes|bashes|pierces|claws|punches|kicks|hits} your} {#var targ %1}
But all it captures to the variable is the first word, 'Slimy'. I need to capture both words. So in the string:
Slimy blob hits your head.
I need to capture 'Slimy blob' and save it to a variable. Can you help please? |
|