I'm trying to make it myself, I setup the triggers in mushclient, exported them to the plugin file, and now I'm writing the script that I want it to use in the xml file.
In the plugin area, I have
language="PerlScript"
In the trigger area:
<trigger
enabled="y"
group="ticktimer"
name="prompt"
match="^(.*?)hp (.*?)mv (.*?)xp (.*?)$"
omit_from_output="y"
regexp="y"
script="handle_prompt"
sequence="100"
>
In the script area I have:
<script>
<![CDATA[
def handle_prompt()
{
$args = shift;
$world->Note("DEBUG: $args");
}
]]>
</script>
When I load (try to load) the plugin, I get:
syntax error at (eval 2) line 2, near ")
{"
syntax error
Line in error:
followed by another popup saying:
You have not specified a script file name:
The trigger (prompt) subroutine named "handle_prompt" could not be found.
Why can't the subroutine be found? IT'S RIGHT THERE. I explicitly define it right there!!!
Someone please explain how to get plugins to work with scripts?
In the plugin area, I have
language="PerlScript"
In the trigger area:
<trigger
enabled="y"
group="ticktimer"
name="prompt"
match="^(.*?)hp (.*?)mv (.*?)xp (.*?)$"
omit_from_output="y"
regexp="y"
script="handle_prompt"
sequence="100"
>
In the script area I have:
<script>
<![CDATA[
def handle_prompt()
{
$args = shift;
$world->Note("DEBUG: $args");
}
]]>
</script>
When I load (try to load) the plugin, I get:
syntax error at (eval 2) line 2, near ")
{"
syntax error
Line in error:
followed by another popup saying:
You have not specified a script file name:
The trigger (prompt) subroutine named "handle_prompt" could not be found.
Why can't the subroutine be found? IT'S RIGHT THERE. I explicitly define it right there!!!
Someone please explain how to get plugins to work with scripts?