Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: 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!
Reply with quote
Torin
Novice


Joined: 16 Apr 2008
Posts: 37

PostPosted: 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.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue May 24, 2011 5:47 pm   
 
An easier pattern would be:
Code:
<pattern>{a |an |the |}(*) attacking you!</pattern>
Reply with quote
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Wed May 25, 2011 4:37 pm   
 
Thanks, works great! Didn't think it could be that simple
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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