Multi Line trigger Help in SWR

Posted by Neoshain on Tue 12 Mar 2013 05:21 PM — 8 posts, 26,687 views.

#0
Scripting Language - Lua
MUSHclient Version - 4.84

Here is what I have now:

<triggers>
  <trigger
   enabled="y"
   lines_to_match="4"
   match="Through the transparisteel windows you see\: \n Inside the Eastern Docking bay "
   multi_line="y"
   regexp="y"
   sequence="100"
  >
  <send>s
d
d
d
s
open hatch
leave
close lance
unloadcargo lance
loadcargo lance gems
open lance
enter lance
close hatch
n
u
u
u
n
launch</send>
  </trigger>
</triggers>



It is not firing.

I would like my trigger to be set to go off on the following:

Quote:

Through the transparisteel windows you see:


-={ Inside the Eastern Docking bay }=-


I have the trigger set to

Through the transparisteel windows you see\: \nInside the Eastern Docking bay 


I have Regular Expression Checked. I have muli-line trigger checked to 4.

I have not anchored the regexp to account for the -={ }=- around the words. I have tried this code too,


Through the transparisteel windows you see\: \n\-\=\{ Inside the Eastern Docking bay \}\=\-


I am new to this, please help.
Amended on Tue 12 Mar 2013 05:26 PM by Neoshain
#1
I THINK I may have found a solution.
#2
Nope. Still need help.
Australia Forum Administrator #3
Did you use the option to make you a multi-line trigger? I did, and this works:


<triggers>
  <trigger
   enabled="y"
   group="Multi Line"
   lines_to_match="6"
   keep_evaluating="y"
   match="Through the transparisteel windows you see\:\n\n\n\-\=\{ Inside the Eastern Docking bay \}\=\-\n\n\Z"
   multi_line="y"
   regexp="y"
   send_to="2"
   sequence="100"
  >
  <send>

whatever

</send>
  </trigger>
</triggers>

Australia Forum Administrator #4
Can you put the exact MUD output into "code" tags? Even a solitary extra space can throw a trigger out.
#5
Sure:

Through the transparisteel windows you see:


-={ Inside the Eastern Docking bay }=- 


I don't think so, but if it will help, I've expanded the area I've copied, it will always show up like this.


Obvious exits:

South - A Durasteel Hatchway
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Through the transparisteel windows you see:


-={ Inside the Eastern Docking bay }=- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Thank you for you help.

Australia Forum Administrator #6
I did spot one trailing space there (select the message and you'll see it). This matches on what you posted:


<triggers>
  <trigger
   enabled="y"
   group="Multi Line"
   lines_to_match="5"
   keep_evaluating="y"
   match="Through the transparisteel windows you see\:\n\n\n\-\=\{ Inside the Eastern Docking bay \}\=\- \n\Z"
   multi_line="y"
   regexp="y"
   send_to="2"
   sequence="100"
  >
  <send>

whatever

</send>
  </trigger>
</triggers>

#7
Thank you! I got it. Due to possible variances with in it, I've had to expand the trigger to include more before and after. I've got it working now. Thank you