In my game, server accepts 'n' as 'go north', and 's' as 'go south'.
In some rooms which no special direction, like 'north' will not be recognized, but 'n'.
So game return: "What? unknown command" for "north", not "there is no this direct." which I want, "n" can get this prompt.
For examplem: #2s3n
Mushclient will execute them as "south;south;north;north;north".
I want change them to "n;n;s;s;s".
The simplest thing is to install the plugin below. This looks for the problem words as a single command being sent to the MUD, and substitutes the correct one instead. Other text is left alone.
To save and install the Speedwalk_Fixer plugin do this:
Copy the code below (in the code box) to the Clipboard
Open a text editor (such as Notepad) and paste the plugin code into it
Save to disk on your PC, preferably in your plugins directory, as Speedwalk_Fixer.xml
The "plugins" directory is usually under the "worlds" directory inside where you installed MUSHclient.
Go to the MUSHclient File menu -> Plugins
Click "Add"
Choose the file Speedwalk_Fixer.xml (which you just saved in step 3) as a plugin
Click "Close"
Save your world file, so that the plugin loads next time you open it.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Thursday, October 23, 2008, 7:48 AM -->
<!-- MuClient version 4.37 -->
<!-- Plugin "Speedwalk_Fixer" generated by Plugin Wizard -->
<muclient>
<plugin
name="Speedwalk_Fixer"
author="Nick Gammon"
id="2fa39133624dd86581e3b846"
language="Lua"
purpose="Modifies 'north' to be 'n' and so on"
date_written="2008-10-23 07:44:13"
requires="4.00"
version="1.0"
>
<description trim="y">
<![CDATA[
This modifies any directions like "north", "south" sent to the MUD
and replaces then with "n", "s" and so on.
]]>
</description>
</plugin>
<!-- Script -->
<script>
<![CDATA[
local conversions = {
north = "n",
south = "s",
east = "e",
west = "w",
up = "u",
down = "d",
}
function OnPluginSend (sText)
-- lookup conversion
local fixed = conversions [sText]
if fixed then -- if found use that
Send (fixed)
return false -- do not send original text
end -- if
return true -- send original
end -- function
]]>
</script>
</muclient>