|
tomcat025 Wanderer
Joined: 30 Dec 2001 Posts: 66 Location: USA
|
Posted: Wed Mar 01, 2006 7:30 pm
trigger matching within Dragonrealms |
I play Dragonrealms and have created a class that is activated by a macro. This class is responsible for searching a creature I kill and skin. This part works fine.
The part that is giving me an issue is the collection of treasure boxes. I have a trigger set up to pick these boxes up but once in a while I come accross an oddball box description.
You also find a salt-stained steel trunk
You also find a poorly made copper trunk
I can match this fine without the hyphen but it is the hyphen that is throwing me off on some of these boxes.
Thanks for any help.
/em pokes Zugg and says "Get my Cmud workin" ;) |
|
|
|
JQuilici Adept
Joined: 21 Sep 2005 Posts: 250 Location: Austin, TX
|
Posted: Wed Mar 01, 2006 9:37 pm |
What is your current trigger pattern and action?
|
|
_________________ Come visit Mozart Mud...and tell an imm that Aerith sent you! |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Mar 01, 2006 11:04 pm |
My guess is that he's using something like [%w%s] to capture "poorly made copper". * would do the same thing, but it wouldn't have problems with hyphens unless that happened to be used as a special character. In keeping with the former assumption, just use either of the following:
[%w%s-] -- specifically only matches (or should, based on my knowledge of ZMud) the letters, spaces, and hyphens
[%x%s] -- matches letters, punctuation symbols like hyphens, commas, and quotes (ie, gor'tog), numbers, and spaces |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
tomcat025 Wanderer
Joined: 30 Dec 2001 Posts: 66 Location: USA
|
Posted: Thu Mar 02, 2006 3:19 am |
Thanks Matt. [%w%s-] did the trick.
I don't know why I keep trying to do this stuff when I am half asleep.. |
|
|
|
|
|