|
rtatum Novice
Joined: 19 Sep 2004 Posts: 45 Location: Houston
|
Posted: 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... |
|
|
|
rtatum Novice
Joined: 19 Sep 2004 Posts: 45 Location: Houston
|
Posted: 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
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
|
|