Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Triggers not firing anymore

Triggers not firing anymore

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Shadoweave   (42 posts)  Bio
Date Tue 27 Nov 2007 12:14 AM (UTC)
Message
Hello, I have this weird problem with my triggers, they don't fire anymore when I use the test trigger window, and they used. If I remove the start new line character ("^"), they seem to fire. The weirdest one is by far this one:

<trigger
   enabled="y"
   group="Cond"
   match="^You are carried off to the (up|down|in|out|east|west|north|south|northeast|nortwest|southeast|southwest)\.$"
   name="charge_carried"
   omit_from_output="y"
   regexp="y"
   send_to="14"
   sequence="100"
  >
  <send>syswarn ("charged to the %1")
</send>
  </trigger>

It triggers on the line "You are carried off to the up." (For the simmulate input window). If I use another direction, it doesn't fire. If I remove the "^" character it fires. What is the problem? I've tried reinstalling MUSH, but it doesn't work. Any ideas?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 27 Nov 2007 01:24 AM (UTC)
Message
It works for me. I suggest you try turning on Game menu -> Trace.

Another trigger with the words east/west/north etc. in it may be firing first.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Tue 27 Nov 2007 01:30 AM (UTC)

Amended on Tue 27 Nov 2007 01:32 AM (UTC) by Nick Gammon

Message
However note that if you have "omit from output" set you will also omit the trace output.

If you make a small plugin as shown below, and install it, then trace output will go to a notepad window, and still appear, even if "omit from output" is active:


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Tuesday, November 27, 2007, 1:29 PM -->
<!-- MuClient version 4.15 -->

<!-- Plugin "Trace_To_Notepad" generated by Plugin Wizard -->

<muclient>
<plugin
   name="Trace_To_Notepad"
   author="Nick Gammon"
   id="85d6ec52237496bd38df9e49"
   language="Lua"
   purpose="Outputs trace information to a notepad window"
   date_written="2007-11-27 13:27:23"
   requires="3.68"
   version="1.0"
   >
</plugin>

<!--  Script  -->

<script>
function OnPluginTrace (line)
  AppendToNotepad ("Trace", line .. "\r\n")
end
</script>

</muclient>



Copy between the lines, save as Trace_To_Notepad.xml, and then use the File menu -> Plugins to install that file as a plugin.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shadoweave   (42 posts)  Bio
Date Reply #3 on Tue 27 Nov 2007 08:16 AM (UTC)

Amended on Tue 27 Nov 2007 12:34 PM (UTC) by Shadoweave

Message
Thank you very much, you were right, I had other triggers with the directions that triggered, and now is fixed. Is this normal? I mean, the only resemblance between the pattern was the direction, why did they match anyway?
Ah, and Trace is great, I will get to using the plugin as soon as I can.

EDIT: It works great, just what I was needing, thank you again.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #4 on Tue 27 Nov 2007 08:00 PM (UTC)
Message
Quote:

I had other triggers with the directions that triggered, and now is fixed. Is this normal?


Yes, it is normal to do that. MUSHclient matches the first trigger (based on sequence number of the trigger) and if it matches stops processing further ones. This is intentional, so you can make one trigger match in preference to another one.

However if you check "keep evaluating" then the first trigger match does not stop further evaluating, so you have control over it.

If two triggers have the same sequence number then the order of evaluation is not defined, so if the order is important, make sure you use different sequence numbers.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,775 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.