|
blackmojo713 Newbie
Joined: 26 May 2012 Posts: 4
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Sat May 26, 2012 3:59 pm |
You need to provide more information. Open this trigger in the Package Editor, then click the XML tab at the bottom of the editor box. Copy and paste the XML code into your response, putting it inside [code]...[/code] tags. Also, give us a sample text from the mud which includes both the panics line and the direction line.
|
|
|
|
blackmojo713 Newbie
Joined: 26 May 2012 Posts: 4
|
Posted: Sun May 27, 2012 12:46 am |
A cat panics, and attempts to flee.
A cat leaves north.
<trigger type="Within Lines" param="1" priority="910" id="91">
<pattern>(*) panics, and attempts to flee.</pattern>
<trigger param="1">
<value>#psub {%ansi(red,bold)%2} {%x2}</value>
</trigger>
</trigger> |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Sun May 27, 2012 1:34 am |
There are several things wrong with that trigger.
1) The "panics" trigger state should be a normal trigger, i.e. "pattern" type, not a "within lines" trigger.
2) The second trigger state should be the "within lines" type.
3) The second trigger state has no pattern. It will match a null, which means it will match any line, but nothing is captured, so there is no %2 and nothing for the psub to work on. |
|
|
|
blackmojo713 Newbie
Joined: 26 May 2012 Posts: 4
|
Posted: Sun May 27, 2012 2:54 am |
im not great with triggers someone made it for me and maybe i set it up wrong
any chance you can walk me thew how to do it ? |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue May 29, 2012 1:20 pm |
I will assume that you only want the "north" part in red, rather than the entire "A cat leaves north". So:
Delete the existing trigger.
Cut and paste the following lines into the command line. You can paste the entire thing at once:
Code: |
#TRIGGER {* panics, and attempts to flee.} {}
#COND {* leaves (*).} {#psub {%ansi(red,bold)%1%ansi(default)} %x1} {Within|Param=1}
|
|
|
|
|
|
|