MUSH trigger help

by Rika

Back to Mechanic's Corner.

Rika2008-11-04 04:11:26
So, I'm trying to create a debating echo trigger script. I'm a complete noob when it comes to MUSH scripting, and here's what I managed to do.

CODE
   bold="y"
   enabled="y"
   group="Debating"
   lines_to_match="2"
   match="After a dramatic pause\\, (.*?) exposes your argument as nothing more than a baseless form of emotional

blackmail\\.$
   multi_line="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  ColourNote ("limegreen","","Defended with CAUTIOUS. Debate with PONTIFICATION")
  


For some reason I keep getting two echoes, so I think the trigger is firing twice. Help please?
Esano2008-11-04 05:37:55
QUOTE(rika @ Nov 4 2008, 03:11 PM) 578831
So, I'm trying to create a debating echo trigger script. I'm a complete noob when it comes to MUSH scripting, and here's what I managed to do.

CODE
   bold="y"
   enabled="y"
   group="Debating"
   lines_to_match="2"
   match="After a dramatic pause\\, (.*?) exposes your argument as nothing more than a baseless form of emotional

blackmail\\.$
   multi_line="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  ColourNote ("limegreen","","Defended with CAUTIOUS. Debate with PONTIFICATION")
  


For some reason I keep getting two echoes, so I think the trigger is firing twice. Help please?

Check that you don't have two instances of the trigger running?

Also, double-check that "keep evaluating" is off. If you're just using the script above, it is - and that should prevent the earlier problem, too.

As it's set to non-greedy the (.*?) shouldn't be a problem.

It also might be a problem with matching double lines. A moment while I work out how it goes.

EDIT: Try:

match = "After a dramatic pause\\, (.*?) exposes your argument as nothing more than a baseless form of emotional(\\s*?)\\n(\\s*?)blackmail\\.$\\z"
Rika2008-11-04 06:18:04
Only one trigger. Keep evaluating is off. Your line doesn't trigger it at all.
Unknown2008-11-04 11:53:25
Rika, you're using my combat system, which means you should have wrapwidth 0 on, which means you shouldn't need to make multiline triggers for messages that appear on a single line, which means you're doing it wrong. tongue.gif