This plugin adds support for GMCP.
It's an adaptation of the Aardwolf GMCP Handler, by Lasher, to work on Materia Magica.
2024 Instructions
If you are using the MUSHclient package available on the Materia Magica website, you should already have all the necessary files referenced in the original instructions below. All you should need to do is:
- In MUSHclient go to File -> Global Preferences
- Click Add and select sandbox.dune.net.MCL
- Restart MUSHclient and log in.
From now on, you will see an additional world window open for sandbox.dune.net. You just need to leave it open and ignore it.
Note: These updated instructions were added on 2024-05-03. After we get more folks up and running we can come back and remove some of the old instructions that aren't relevant anymore. I just don't want to remove anything until we're sure we don't need it - Kethra
To install
- Right click MM_GMCP_handler.zip.
- Select "Save link as...".
- Save the file somewhere in your computer.
- Unzip the files in your MUSHclient folder. (There's 2 files, that should be automatically located like this: gmcphelper.lua in MUSHclient/lua, MM_GMCP_handler.xml in MUSHclient/worlds/plugins. If your unzipper fails, please relocate them manually to the right subfolders.)(*)
- Go to MUSHclient.
- File -> Plugins...
- Click Add...
Save World Details once you've finished installing.
Once it's installed, you need to re-login to Materia Magica (quit + login again), for the plugin to be initialized properly.
Important
(*) Though the plugin file (MM_GMCP_handler.xml) can be located anywhere, the helper file (gmcphelper.lua) must be in your MUSHclient/lua folder, or the plugin won't work.
To test that it's working properly
Once you've installed this plugin, and re-logged in to Materia Magica...
1) Type protocols. It should show something like this:
Protocol Code Description Status
---------- ----- ----------------------------------------------- ---------
(...)
GMCP 201 GMCP/ATCP2 Generic Mud Protocol (Alpha) ON
(...) )
|
If it isn't marked as ON, it won't work.
2) Type protocols gmcp. It should show something like this:
GMCP support is UNDER DEVELOPMENT. Features may not yet work as described.
Package Description Status
----------------- ----------------------------------------------- ------
Char Receive character status updates ON
(...)
Comm Receive communication channel updates ON
Core Core GMCP options ON
(...)
Room Receive room and map updates ON
|
If Char and Room aren't marked as ON, you won't receive those packages, and hence any scripts that use them won't work.
3) Type look, and then showgmcpval room. You should see blue on black text showing information about the current room. (See examples under Usage.)
4) Type protocols gmcp sendchar, and then showgmcpval char. You should see blue on black text showing information about your character. (See examples under Usage.)
Usage
This plugin adds support for GMCP. So it's generally used indirectly, through other scripts or plugins that call it.
However, there's 1 alias that you can use to see GMCP items:
- showgmcpval <gmcp_item> shows the value of a gmcp item.
For example, showgmcpval room, shows gmcp info about the current room, like this:
room.info: {
num = "305834",
zone = "New Rigel Gardens",
terraininfo = "diggable hard",
plane = "1",
coord = {
id = "1",
x = "801",
name = "Alyria",
y = "545",
},
name = "Steadman Plaza",
exits = {
w = "305837",
s = "305835",
n = "62177",
},
terrain = "paved road",
shape = "open",
size = "open",
}
|
And protocols gmcp sendchar, followed by showgmcpval char, shows gmcp info about your char, like this:
char: {
vitals = {
sp = "571",
hp = "1192",
st = "984",
},
stats = {
savingrod = "0",
savingspell = "1",
savingparalysis = "0",
sanity = "14",
strength = "20",
knowledge = "10",
courage = "17",
agility = "12",
luck = "19",
savingpetri = "0",
wisdom = "12",
vitality = "22",
personality = "8",
savingbreath = "0",
},
worth = {
ru = "0",
pracs = "132",
gold = "53262",
bp = "80",
gems = "44",
bank = "885455",
qp = "2239",
},
clan = {
clanhonorific = "_empty",
clanalliancemembersince = "0",
clannum = "0",
clanalliancenum = "0",
clangolddepositedtotal = "0",
clanmembersince = "0",
clanalliancename = "_empty",
clanname = "_empty",
clansecurity = "_empty",
clangemdepositedtotal = "0",
clangemdepositedmonth = "0",
clangolddepositedmonth = "0",
},
status = {
thirst = "76",
wimpy = "0",
align = "-13",
totallevel = "90",
enemy = "_empty",
state = "playing",
drunk = "0",
enemypct = "-1",
position = "standing",
tnl = "1488415",
level = "30",
hunger = "76",
indigestion = "0",
},
form = {
},
maxstats = {
maxst = "984",
sanity = "17",
strength = "24",
knowledge = "17",
courage = "21",
agility = "17",
luck = "19",
personality = "17",
wisdom = "17",
vitality = "24",
maxsp = "571",
maxhp = "1192",
},
base = {
classfour = "_empty",
hoursplayed = "286",
classone = "valkyrie",
classtwo = "bard",
name = "Courtney",
currentclass = "bard",
sex = "female",
race = "ogre",
classthree = "_empty",
},
}
|
How to use GMCP from a script
You'll mainly want to use the function gmcpval. For example:
-- protocols gmcp sendroom is _not_ necessary ('room' package is auto-sent)
res, roomname = CallPlugin("f67c4339ed0591a5b010d05b", "gmcpval", "room.info.name")
-- if res == 0, it means the gmcp handler plugin is installed
-- in that case, 'roomname' will contain the name of the current room
Send("protocols gmcp sendbase")
res, myname = CallPlugin("f67c4339ed0591a5b010d05b", "gmcpval", "char.base.name")
-- if res == 0, then 'myname' will contain the character's name
(Read the plugin for other available functions.)
Notes about 'protocols GMCP' on Materia Magica
- help gmcp, or http://www.materiamagica.com/help/protocols, for a list of available packages.
- Of all the available packages, only room is auto-sent (when you look at, or enter a room - it works with walk/blink/recall/teleport/etc.)
- All the other packages work on request. For example, you first need to use protocols gmcp sendvitals to request your character's vitals, and only then you can use the showgmcpval alias, or the gmcpval function, to see the contents.
- If you don't send protocols gmcp <package_name> first, for on-request packages, you'll either get outdated data (if you've requested that same package earlier), or nothing.
To uninstall
- Go to MUSHclient
- File -> Plugins...
- Select the plugin (MM_GMCP_handler)
- Click Remove.
Save World Details once you've finished uninstalling.
Please report bugs to Ruthgul.