Stuck on a trigger

Posted by B2007 on Fri 10 Apr 2015 12:32 PM — 5 posts, 19,528 views.

#0
Saw this on a earlier post by bonn and its exactly what im trying to do i copied and pasted into my triggers and its not firing. :/ ive tried to alter a little bit but just set it back how i found it still new to this



<triggers>
  <trigger
   enabled="y"
   lines_to_match="4"
   match="^You slide in your probe into (.*?) and feel out the inside\.\n[A-Z][a-z]+\: Attempts to probe (.*?) \(picks [+-](\d+), (\d+\.\d+)\+(\d+)=(\d+\.\d+), (\d+\.\d+) Target\)\n\*progress\*\n\.\.\. Clearly revealing its inner workings. '(.*?)' is your best option\.\Z"
   multi_line="y"
   regexp="y"
   sequence="100"
  >
  <send>pick %1 %8</send>
  </trigger>
</triggers>
Amended on Fri 10 Apr 2015 07:49 PM by Nick Gammon
#1
being based off


You slide in your probe into a cedar wood tattered case and feel out the inside.
Slimke: Attempts to probe a cedar wood tattered case (picks +20, 84.0+18=102.0, 0.0 Target) *progress*
  ... Clearly revealing its inner workings. 'skip' is your best option.
Amended on Fri 10 Apr 2015 07:48 PM by Nick Gammon
Australia Forum Administrator #2
Here's your problem:


 Target\)\n\*progress


There is no newline after "Target)".

The client has wrapped the line at column 80, but that is a soft wrap. In the regexp the line break just appears as a space (it indents that line by one space, so the space is actually visible).

This matches:


<triggers>
  <trigger
   enabled="y"
   lines_to_match="3"
   match="^You slide in your probe into (.*?) and feel out the inside\.\n[A-Z][a-z]+\: Attempts to probe (.*?) \(picks [+-](\d+), (\d+\.\d+)\+(\d+)=(\d+\.\d+), (\d+\.\d+) Target\) \*progress\*\n  \.\.\. Clearly revealing its inner workings. '(.*?)' is your best option\.\Z"
   multi_line="y"
   regexp="y"
   sequence="100"
  >
  <send>pick %1 %8</send>
  </trigger>
</triggers>


Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.
Amended on Fri 10 Apr 2015 08:15 PM by Nick Gammon
#3
ok that fixed it firing but now its not inserting the two wilds
its pulling them just not putting them into the command its just putting through pick



You slide in your probe into a cedar wood tattered case and feel out the inside.
Slimke: Attempts to probe a cedar wood tattered case (picks +20, 84.0+3=87.0, 0.0 Target) *progress*
... Clearly revealing its inner workings. 'twist' is your best option.
pick a cedar wood tattered case twist

figure it out the word cedar wood tattered case needs to be in "" to define it as the object in the statment. how would those be added.
Amended on Fri 10 Apr 2015 10:47 PM by B2007
#4
I got it....feel silly that last one was simple. Thank you very much for you r help :)