From c201c18678e73a94d204a6ddfc079bf5f7b616f7 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 10 Sep 2021 11:52:41 -0500 Subject: [PATCH] Update EnemyPercentReporter.xml Updated commands, added a simple help on plugin install --- EnemyPercentReporter.xml | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/EnemyPercentReporter.xml b/EnemyPercentReporter.xml index a017eae..c63b9da 100644 --- a/EnemyPercentReporter.xml +++ b/EnemyPercentReporter.xml @@ -20,7 +20,17 @@ + + 40 then @@ -158,7 +174,10 @@ function announceMobPercent() Send(("%s %s @D[@WRoom %d@D]@w %s is at @R%s%%@w"):format(getChannel(), getPrepend(), getRoomID(), getEnemyName(), mpmsg)) end end - +function toggleMobPercent() + toggleEnabled() + cnote(("%s @Wis now %s@w"):format(getPrepend(), isEnabled() and "@Genabled@w" or "@Rdisabled@w")) +end --[[ Mushclient Plugin Functions ]]-- --[[ -- OnPluginLineReceived(s) is not in use for this plugin, commented out for now.... @@ -168,13 +187,19 @@ end function OnPluginBroadcast(msg, id, name, text) if isGMCP(id) and isGMCPCommChannel(text) then local comm_chan = gmcp('comm.channel.chan') - if isValidChannel(comm_chan) then + if isValidChannel(comm_chan) and isEnabled() then local chan_msg = strip_colours(gmcp('comm.channel.msg')) processMobPercentRequest(chan_msg) end end end function OnPluginEnable() + cnote(("@GEnemyPercentReporter Plugin")) + cnote(("@W----------------------------------------")) + cnote(("@RCommands:@w")) + cnote(("@W eprep@w -- Manual report")) + cnote(("@W eptoggle@w -- toggles script on/off")) + Note() end function OnPluginInstall() OnPluginEnable()