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
tomcat025
Wanderer


Joined: 30 Dec 2001
Posts: 66
Location: USA

PostPosted: 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" ;)
Reply with quote
JQuilici
Adept


Joined: 21 Sep 2005
Posts: 250
Location: Austin, TX

PostPosted: 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!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
tomcat025
Wanderer


Joined: 30 Dec 2001
Posts: 66
Location: USA

PostPosted: 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.. Embarassed
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