|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Tue May 24, 2011 3:46 pm
complicated trigger (at least for me) |
Hello fellow CMud users, I need help again, please.
CMud Pro 3.34
Windows 7-64
I'm trying to create a trigger that will remove {a|A|an|An|the....} you get the point, from the beginning of random monsters names.
example:
when I walk into a room and see
crazy monster attacking you!.
my trigger is currently
Code: |
<trigger priority="59160" id="5916">
<pattern>(*)~ attacking you~!</pattern>
<value>#var attacker %lower(%1)
lk @attacker</value>
</trigger>
|
however if it sees
a crazy monster attacking you!.
it tries to look at a crazy monster
How do I remove a, or an, or the, or whatever I choose from the beginning?
I realize I have to use %ismember, but I'm nto sure how to remove those after I've found them?
Any help is always appreciated! Thanks in advance! |
|
|
|
Torin Novice
Joined: 16 Apr 2008 Posts: 37
|
Posted: Tue May 24, 2011 4:10 pm |
Code: |
<pattern>{a|an|the|}{ |}(*) attacking you!</pattern> |
You don't need each capitalization of each, i.e. "A" and "a"... "An and "an", etc. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue May 24, 2011 5:47 pm |
An easier pattern would be:
Code: |
<pattern>{a |an |the |}(*) attacking you!</pattern> |
|
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Wed May 25, 2011 4:37 pm |
Thanks, works great! Didn't think it could be that simple
|
|
|
|
|
|