|
Acidic Newbie
Joined: 12 Sep 2004 Posts: 5
|
Posted: Mon Jun 13, 2005 7:00 am
Substitution and wildcards |
I want to substitute text for a shorter message, but I'm having difficulty with the wildcards in parenthesis:
Code: |
#tr {^{Letting * droop, (%w) suddenly heaves it up at you|With a focused look, (%w) strikes at you with *|With a heavy overhand stroke, (%w) slams * down upon you|With a powerful lunge, (%w) strikes at you with *}. Your ({left|right}) leg is elegantly %w and swept out from under you, knocking you to the ground.$} {#sub {%ansi(gray)%1 strikes you, hitting your %2 leg.} |
Using this, the %1 will only work if the first message (Letting * droop, (%2) suddenly heaves it up at you) is displayed from the MUD, whereas %2 will only work for the second message displayed.
Can someone please tell me how I can substitute this successfully? I've tried a few combinations, and all have failed because of the differing messages that can appear. Using &attacker in place of the (%w) in the trigger also doesn't seem to work, since it creates the variable, but doesn't assign a value to it. |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Mon Jun 13, 2005 7:58 am |
Create four triggers? I believe four triggers in this case would even improve the speed of your session, since three of them wouldn't need to be checked before firing.
|
|
|
|
Acidic Newbie
Joined: 12 Sep 2004 Posts: 5
|
Posted: Mon Jun 13, 2005 8:11 am |
Ah, thank you =) I was unsure which would be faster.
|
|
|
|
GaidinBDJ Wanderer
Joined: 15 Nov 2002 Posts: 52 Location: Las Vegas, Nevada
|
Posted: Mon Jun 13, 2005 12:38 pm |
The help file says you can't use patterns inside of the {|} thingy. That could be why none of the rest are firing.
|
|
_________________ Barry
Gaidin @ 3k.org |
|
|
|
|
|
|
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
|
|