status plugin issue

Posted by Lilbopeep on Thu 31 May 2012 09:02 AM — 7 posts, 29,309 views.

USA #0
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?
Amended on Thu 31 May 2012 09:04 AM by Lilbopeep
Netherlands #1
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. :)

USA #2

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

Australia Forum Administrator #3
What does function "chats" do?
Australia Forum Administrator #4
Show the text you are trying to match on.
USA #5

%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
Australia Forum Administrator #6
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.