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.
 Entire forum ➜ MUSHclient ➜ Plugins ➜ status plugin issue

status plugin issue

Posting of new messages is disabled at present.

Refresh page


Posted by Lilbopeep   USA  (42 posts)  Bio
Date Thu 31 May 2012 09:02 AM (UTC)

Amended on Thu 31 May 2012 09:04 AM (UTC) by Lilbopeep

Message
So I have what I thought would be an easy task mostly just frustrating me to death so hopefully someone will be kind enough to point me in the right direction here...

I took the chat capture miniwindow plugin and wanted to use it to capture some data between two tags.


 <trigger
    enabled="y"
    match="\%MAP\_START\%$"
    regexp="y"
    send_to="12"
    omit_from_output="y"
    sequence="100"
	>
	EnableTrigger("status", true)
	</trigger>

<trigger
    enabled="n"
    name="status"
    match="*"
    script="chats"
    omit_from_output="y"
    sequence="10"
    ></trigger>

 <trigger
    enabled="y"
    match="\%MAP\_END\%$"
    regexp="y"
    send_to="12"
    omit_from_output="y"
    sequence="5"
    >
	EnableTriggerGroup("status", false)
	</trigger>


Now, sure enough MAP_START and MAP_END are ommited, but not sent to the miniwindow. What should be captured is never sent to the miniwindow either, however if I just go in and set it from enable="n" to "y" it is sent to the miniwindow exactly how I want it. What am I missing here?

,.~`'~.,Dance Magic Dance,.~`'~.,
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #1 on Thu 31 May 2012 10:06 AM (UTC)
Message
You are enabling and disabling a triggergroup. The trigger in question however has the status name and twice. (Which sorta breaks a rule; triggers should have unique names.)

Change the name="status" in your triggers to group="status" and enjoy your plugin. :)

Top

Posted by Lilbopeep   USA  (42 posts)  Bio
Date Reply #2 on Thu 31 May 2012 06:33 PM (UTC)
Message

<triggers>
    <trigger
    enabled="y"
    match="(.*?)PLUGINATOR\_START(.*?)"
    regexp="y"
    send_to="12"
    omit_from_output="y"
    sequence="100"
	>
	EnableTriggerGroup("status", true)
	</trigger>

<trigger
    enabled="n"
    group="status"
    match="*"
    script="chats"
    omit_from_output="y"
    sequence="10"
    ></trigger>

 <trigger
    enabled="y"
    match="^(.*?)PLUGINATOR\_END(.*?)$"
    regexp="y"
    send_to="12"
    omit_from_output="y"
    sequence="5"
    >
	EnableTriggerGroup("status", false)
	</trigger>


I wasn't sure if the % signs were causing a problem matching, but this still doesn't do anything different like this. I've tried so many different things trying to just make it work but no dice.


,.~`'~.,Dance Magic Dance,.~`'~.,
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #3 on Fri 01 Jun 2012 03:18 AM (UTC)
Message
What does function "chats" do?

- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #4 on Fri 01 Jun 2012 03:19 AM (UTC)
Message
Show the text you are trying to match on.

- Nick Gammon

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

Posted by Lilbopeep   USA  (42 posts)  Bio
Date Reply #5 on Fri 01 Jun 2012 03:34 AM (UTC)
Message

%PLUGINATOR_START%
Riln: 143
Fully Rested - Content
P-avoid, T-none, A-random
Standing
You are suffering no significant wounds.
%PLUGINATOR_END%

Basically, turning on the option spams me information between the two %PLUGINATOR_START/END% tags. So I try to match the first one to turn on the capture to everything, then turn it off once I hit the last flag.

Chats is the script Fiendish wrote to move chats to a miniwindow, im just using it to do this instead and like I said before, if I enable the middle trigger, to capture everything, it goes right to my miniwindow as expected, I just dont seem to be getting it to turn on and off correctly

,.~`'~.,Dance Magic Dance,.~`'~.,
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #6 on Fri 01 Jun 2012 09:24 PM (UTC)
Message
How did you make those triggers? Not in the GUI interface I bet, because the script is not inside <send> tags.


<triggers>

  <trigger
   enabled="y"
   match="%PLUGINATOR_END%"
   omit_from_output="y"
   send_to="12"
   sequence="5"
  >
  <send>EnableTriggerGroup("status", false)</send>
  </trigger>

  <trigger
   enabled="y"
   match="%PLUGINATOR_START%"
   omit_from_output="y"
   send_to="12"
   sequence="100"
  >
  <send>EnableTriggerGroup("status", true)</send>
  </trigger>

  <trigger
   enabled="y"
   group="status"
   match="*"
   omit_from_output="y"
   script="chats"
   sequence="10"
  >
  </trigger>

</triggers>


This matches, at least.

- 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.


21,225 views.

Posting of new messages is disabled at present.

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.