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
rtatum
Novice


Joined: 19 Sep 2004
Posts: 45
Location: Houston

PostPosted: Mon Feb 06, 2006 11:23 pm   

Trigger help
 
I want to set up a trigger to fire on "You reveal <Stuff here>" But the problem is the stuff can be anywhere from one to three words, possibly more... I don't know the best way to get this done... I want it to send the command get <stuff>, but only one word of stuff, otherwise I'd just use (*)... for example...

Trigger: You reveal Dracolich Bone
->Get dracolich
Trigger: You reveal pure iron
->Get pure

Another problem is that some of the items begin with an A, so I don't know how to phase that out of the equasion either...
trigger: You reveal a rare bloodflower
->Get rare

any insight would be helpful...
Reply with quote
rtatum
Novice


Joined: 19 Sep 2004
Posts: 45
Location: Houston

PostPosted: Tue Feb 07, 2006 3:20 am   
 
I know this is a seemlingly simple problem, but I've been searching help files, and I can't figure out a way to check if the first "word" is a, and if it is, to ignore it
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Feb 07, 2006 4:45 am   
 
To remove the issue with articles you can use a stringlist like so:

You reveal {|a |an |some }

The issue then boils down to (*) or ([%w%s]) and figuring out which is the keyword. I'm assuming it's not always the first word like you show in your examples? If that's the case and you are trying to identify the items programmatically without preforming a master list you will have to use the %word() in a loop (#LOOP would probably be your best choice here).
_________________
EDIT: I didn't like my old signature
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