So, I found a plugin here that I liked called: Generic_Chat_Miniwindow by Fiendish.
I decided to incorporate it into the Utility Plugin I am creating so that I can stop explaining to people how to set it up.
I have added the chattrigger script directly to the plugin and am trying to use:
as the trigger to send to the script.
The ChatTrigger function I have edited to be
so that the Plugin was not calling the plugin. I just skipped the callplugin line and went straight to the source. When I attempted to use Check(display.....) it gave me an error of:
However, after i remove the check() it works fine for the triggers inside of the plugin. However, the triggers that I made outside of the plugin e.g. the example above, it gives me
I'm open to any help that you may be able to provide so that I can finish this utility plugin.
Thanks,
I decided to incorporate it into the Utility Plugin I am creating so that I can stop explaining to people how to set it up.
I have added the chattrigger script directly to the plugin and am trying to use:
<triggers>
<trigger
enabled="y"
group="CommunicationTest"
keep_evaluating="y"
match="^You are a member of the (.+) race\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>CallPlugin ("f6812fbbea7ca2d1a7476970", "chattrigger", "%0")</send>
</trigger>
</triggers>
as the trigger to send to the script.
The ChatTrigger function I have edited to be
function chattrigger (name, line, wildcards, styles)
require "serialize"
-- check (CallPlugin ("f6812fbbea7ca2d1a7476970",
-- "display", serialize.save_simple (styles)))
display (serialize.save_simple(styles))
end -- chattrigger
so that the Plugin was not calling the plugin. I just skipped the callplugin line and went straight to the source. When I attempted to use Check(display.....) it gave me an error of:
Error number: 0
Event: Run-time error
Description: C:\Program Files (x86)\MUSHclient\lua\check.lua:24: bad argument #2 to 'format' (number expected, got nil)
stack traceback:
[C]: in function 'format'
C:\Program Files (x86)\MUSHclient\lua\check.lua:24: in function 'check'
[string "Plugin: Dead_of_Night_Basic"]:7: in function <[string "Plugin: Dead_of_Night_Basic"]:1>
Called by: Function/Sub: chattrigger called by trigger
Reason: processing trigger "" when matching line: "You gossips (ooc) 'test'"
However, after i remove the check() it works fine for the triggers inside of the plugin. However, the triggers that I made outside of the plugin e.g. the example above, it gives me
Error number: 0
Event: Run-time error
Description: C:\Program Files (x86)\MUSHclient\lua\serialize.lua:233: Cannot serialize nil
stack traceback:
[C]: in function 'error'
C:\Program Files (x86)\MUSHclient\lua\serialize.lua:233: in function 'save_item_simple'
C:\Program Files (x86)\MUSHclient\lua\serialize.lua:90: in function 'save_simple'
[string "Plugin: Dead_of_Night_Basic"]:7: in function <[string "Plugin: Dead_of_Night_Basic"]:1>
Called by: Function/Sub: chattrigger called by Plugin Dead_of_Night_Basic
Reason: Executing plugin Dead_of_Night_Basic sub chattrigger
I'm open to any help that you may be able to provide so that I can finish this utility plugin.
Thanks,