Hello,
I recently had an issue with a Trigger not firing on output from the MUD if a ColourNote was output right before the trigger text was received. One plugin was sending the ColourNote onbroadcast of char.status. This caused it to send the note quite frequently. Another plugin was starting a procedure based on another broadcast, and was sending commands to the mud to view info and echo a 'completed' message back to my plugin. This ended up showing the ColourNote output, immediately followed by my echoed 'completed' message, and the echoed message was in the same color as the note. Any time this happened, the trigger did not catch the echoed text/line. Here is an example of the mud output.. The first line is the colournote and the second line is the trigger text that was not caught.
You don't have any more mana potions!
{aoe_done}
This trigger had no problems when run without a ColourNote output previous to it. When I changed my code from ColourNote to ColourTell followed by a Simulate('\n') the issue cleared up and the trigger caught the completed message just fine. The trigger is enabled using EnableTriggerGroup before the commands/echo are sent.
MUD output example:
I recently had an issue with a Trigger not firing on output from the MUD if a ColourNote was output right before the trigger text was received. One plugin was sending the ColourNote onbroadcast of char.status. This caused it to send the note quite frequently. Another plugin was starting a procedure based on another broadcast, and was sending commands to the mud to view info and echo a 'completed' message back to my plugin. This ended up showing the ColourNote output, immediately followed by my echoed 'completed' message, and the echoed message was in the same color as the note. Any time this happened, the trigger did not catch the echoed text/line. Here is an example of the mud output.. The first line is the colournote and the second line is the trigger text that was not caught.
You don't have any more mana potions!
{aoe_done}
This trigger had no problems when run without a ColourNote output previous to it. When I changed my code from ColourNote to ColourTell followed by a Simulate('\n') the issue cleared up and the trigger caught the completed message just fine. The trigger is enabled using EnableTriggerGroup before the commands/echo are sent.
function do_check()
if checking then
return
end
checking = true
EnableTriggerGroup("spells", true)
skills = {}
spells = {}
aoe = {}
t = skills
SendNoEcho("skills combat")
SendNoEcho("echo {skills_done}")
SendNoEcho("spells area")
SendNoEcho("echo {aoe_done}")
SendNoEcho("spells combat")
end<trigger
enabled="n"
match="^\{aoe_done\}$"
regexp="y"
sequence="100"
group="spells"
omit_from_output="y"
script="set_table_spells"
>
</trigger>ColuorNote("yellow", "", " You don't have any more ", "cyan", "", name, "yellow", "", " potions!")MUD output example:
[ Fighting! ] Health: 1828/2804 65% Mana: 1774/2645 67% [ Enemy: 51% ]
qm
You don't have any more mana potions!
{aoe_done}
[ Fighting! ] Health: 1828/2804 65% Mana: 1774/2645 67% [ Enemy: 51% ]