MedHelp - Medievia Help System
Movement | Information | Communication | Newbie | Object
Combat | General | Clans | Socials | Spells | Special | FAQs

GMCP

Generic MUD Communication Protocol

GMCP is a protocol that allows communication of game data to the client
behind the scenes. Medievia currently implements two GMCP modules,
Char.Vitals and Room.Info. What this means to the user is these arrays
will be automatically populated by the game without the need to use
triggers to extract data from a prompt, or use script logic to extract
the room name that youre currently in.

GMCP is available in Mudlet which is our preferred client. The examples
below assume that someone is using Mudlet. Other clients such as
TinTin++ and MUSHClient also support GMCP and the data may be made
available in those clients in some other form.

Typing in Mudlet, lua gmcp, will show you the entire GMCP array that
contains data from the game server. Below are listings of the mentioned
Char.Vitals and Room.Info data:

Char.Vitals Module:
Typing lua gmcp.Char.Vitals will show you the data currently in the
Char.Vitals module. A full set of vitals are sent upon login, and each
minute. An updated value is provided when it changes, immediately.

You will see something like this:
{
br = 100,
hp = 359,
mana = 574,
maxHp = 359,
maxMana = 574,
maxMv = 660,
mv = 660
}

These values are then available to the user for use in scripting, just
use the variable as listed with the gmcp.Char.Vitals prefix.
Example:
gmcp.Char.Vitals.hp     -- This is your current HP
gmcp.Char.Vitals.maxHp  -- This is your max HP

Room.Info Module:
Typing lua gmcp.Room.Info will show you the data currently in the
Room.Info module. New data is provided each new room you visit.

You will see something like this:
{
exits = {
s = A Prismatic Hallway
},
name = Office of Kymbahl
}

These values are then available to the user with the gmcp.Room.Info
prefix.
Example:
gmcp.Room.Info.name     -- This is your current room name
gmcp.Room.Info.exits.s  -- This is the room name of the room to the
South