Table of Contents
GMCP in Mudlet
Enabling GMCP
Accessing GMCP
Once enabled, Mudlet will automatically share with DuneMUD that it can receive GMCP data. You can check that you are receiving data by entering lua gmcp in your command line.
You'll probably be shown a LOT of data, more than a screen's worth. The GMCP data is organized like a Lua table with gmcp.Section.Subsection.key structure. Some of the sections are:
Charwhich contains all information about your character.Char.Namewhich is your name and full title.Char.Statswhich is your stats, sogmcp.Char.Stats.stris your strength, for example.Char.Vitalswhich is your hp and cp (though it's called “sp” for now).Char.Statuswhich contains most of the other stuff you'd see onscore. For example,gmcp.Char.Status.xpis your exp.Char.StatusVarsare string-type descriptors of the entries inStatus. For example,gmcp.Char.StatusVars.xpis the string “Experience”.Char.Guildcontains data particular to your guild. This usually has sub-subsections. For example, on Atreidesgmcp.Char.Guild.Shieldbelt.Levelis your shieldbelt's level.
Roomwhich contains data about your current room.Room.nameis it's name.Room.numis a unique identifier code.Room.Infocontains area (planet) info, indoor/outdoor info, and (visible) exit info.
Externalwhich is Discord information that you could have Mudlet use.
Using GMCP
You can use the raw GMCP data table in your scripts/triggers/aliases just like you would variables you defined yourself.
You can also use “event handlers” to execute scripts when new GMCP data is received. See the “Triggering on GMCP” section (page 5) of https://www.mudlet.org/wp-content/uploads/2013/02/GMCPtutorial.pdf

