Stopping In Game Beeps

Posted by Lilac on Thu 12 Nov 2020 02:46 AM — 5 posts, 19,445 views.

#0
Is there any way to stop a beep from happening game-side? An action happens, it displays text, and then a beep sounds.

Unfortunately that beep is super annoying (extended period of time spent in the area) in and I need to make it stop.

I've searched and only found ways to MAKE things beep, not the opposite!

Thanks in advance!
USA Global Moderator #1
Go to Game -> Configure -> Output and then uncheck "Enable Beeps" at the top of the dialogue.
#2
That would disable all game-side beeps, though, right? I don't want that. I just want to disable this one, annoying one.

It may not even be possible. :(
USA Global Moderator #3
I suppose technically you could make a plugin that uses OnPluginPacketReceived to selectively strip the "\7" bell character on some specific condition.


mute_beeps = false

function OnPluginPacketReceived(sText)
   if mute_beeps == true then
      return sText:gsub("\7", "")
   end
end


And then you have a trigger or something toggle mute_beeps between true and false.
Amended on Thu 12 Nov 2020 05:25 PM by Fiendish
Australia Forum Administrator #4
If the beep is always part of a fixed message then you could make Fiendish's suggestion more targetted.

For example:


function OnPluginPacketReceived(sText)
   return sText:gsub("\7Too long spent in area", "Too long spent in area")
end


You would need to find where the beep is in the message (start, end, middle?) - you can use "Debug Packets" to find that out.

That would replace those words with the beep with those words without the beep.

The entire plugin could look like below.

Template:saveplugin=Remove_Annoying_Beep
To save and install the Remove_Annoying_Beep plugin do this:
  1. Copy the code below (in the code box) to the Clipboard
  2. Open a text editor (such as Notepad) and paste the plugin code into it
  3. Save to disk on your PC, preferably in your plugins directory, as Remove_Annoying_Beep.xml
    • The "plugins" directory is usually under the "worlds" directory inside where you installed MUSHclient.
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file Remove_Annoying_Beep.xml (which you just saved in step 3) as a plugin
  7. Click "Close"
  8. Save your world file, so that the plugin loads next time you open it.




<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
   name="Remove_Annoying_Beep"
   author="Nick Gammon"
   id="e458b7050f078dfb85705a98"
   language="Lua"
   purpose="Removes an annoying beep"
   date_written="2020-11-13 07:17:31"
   requires="5.00"
   version="1.0"
   >

</plugin>

<!--  Script  -->

<script>
<![CDATA[

function OnPluginPacketReceived(sText)
   return sText:gsub("\7Too long spent in area", "Too long spent in area")
end

]]>
</script>
</muclient>