Mush Client GMCP Handler Plugin

Order Of Chaos Alliance Wiki | RecentChanges | Visiting as a guest. Login for full access.
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:

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

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


To uninstall

Save World Details once you've finished uninstalling.


Please report bugs to Ruthgul.


Order Of Chaos Alliance Wiki | RecentChanges | Visiting as a guest. Login for full access.
This page is read-only.
Last edited May 3, 2024 10:27 am by Kethra (diff)
Search: