After playing a bit of Avalon recently I thought I’d use it to experiment with MUSHclient’s miniwindow system by creating a simple plugin to replace the prompt.
It’s a fixed miniwindow at the bottom of the main display with gauges for health and mana followed by a list of prompt letters, current exits and finally the name of your location.
The gauges display current values in numbers as well as the last change. The exits are colour coded for open or closed doors and clickable to move in the given direction.
The miniwindow itself isn’t that interesting and could certainly be jazzed up with icons taking the place of the prompt letters and a compass in place of the exits list for example, but it’ll do for a first attempt. I also think it works nicely as a prompt replacement by keeping things simple and on a single line .
The plugin makes use of the additional data Avalon sends for their Java client which is sent in band using a ### prefix. It’s a little funky and primitive when compared with the likes ATCP, GMCP or MSDP but I guess it gets the job done. It was also a lot easier than trying to parse the regular mud exits output!
The other advantage with using this data is that the health and mana numbers are sent immediately on any change so you don’t have the issue of having to wait for a prompt to refresh them.
I originally tried using the OnPluginLineReceived callback to parse this information but it wasn’t possible to gag it completely. Often the line would flash on and off at the bottom of the screen. This is due to the way MUSHclient draws the screen before processing triggers.
The solution was to use the OnPluginPacketReceived callback and split the packet manually into lines for processing, discarding the prompt and ### lines before they are drawn to the display. You have to be careful when using OnPluginPacketReceived as lines may be split across packets, so if a packet isn’t terminated with a newline I save the last line and prepend it to the next packet.
You can get the plugin from the downloads page. Right click and save the XML file to your plugins folder and install it within MUSHclient from the plugins menu with CTRL+SHFT+P.

