[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  status plugin issue

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

status plugin issue

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Lilbopeep   USA  (42 posts)  [Biography] bio
Date Thu 31 May 2012 09:02 AM (UTC)  quote  ]

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,.~`'~.,
[Go to top] top

Posted by Worstje   Netherlands  (867 posts)  [Biography] bio
Date Reply #1 on Thu 31 May 2012 10:06 AM (UTC)  quote  ]
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. :)

[Go to top] top

Posted by Lilbopeep   USA  (42 posts)  [Biography] bio
Date Reply #2 on Thu 31 May 2012 06:33 PM (UTC)  quote  ]
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,.~`'~.,
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Fri 01 Jun 2012 03:18 AM (UTC)  quote  ]
Message
What does function "chats" do?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Fri 01 Jun 2012 03:19 AM (UTC)  quote  ]
Message
Show the text you are trying to match on.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Lilbopeep   USA  (42 posts)  [Biography] bio
Date Reply #5 on Fri 01 Jun 2012 03:34 AM (UTC)  quote  ]
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,.~`'~.,
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Fri 01 Jun 2012 09:24 PM (UTC)  quote  ]
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
[Go to top] 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.


1,245 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]