<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.legendmud.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stolve</id>
	<title>LegendMUD - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.legendmud.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stolve"/>
	<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php/Special:Contributions/Stolve"/>
	<updated>2026-06-07T21:50:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_Packages&amp;diff=770</id>
		<title>GMCP Packages</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_Packages&amp;diff=770"/>
		<updated>2021-01-18T18:37:36Z</updated>

		<summary type="html">&lt;p&gt;Stolve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following packages are available via [[GMCP]]. Some packages may only be requested from the MUD, others may only be broadcast from the MUD, and others may be requested or broadcast.&lt;br /&gt;
&lt;br /&gt;
== Char ==&lt;br /&gt;
=== char.prompt ===&lt;br /&gt;
'''''Request and broadcast'''''&lt;br /&gt;
&lt;br /&gt;
The char.prompt message includes all values available in the prompt.&lt;br /&gt;
This list can be seen in the PROMPT CODES help file.&lt;br /&gt;
&lt;br /&gt;
The char.prompt package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status message includes all values visible from the STATUS&lt;br /&gt;
command. This includes conditions, affects, and timers. If only one of&lt;br /&gt;
these sets of values is needed, consider using one of the char.status&lt;br /&gt;
sub packages.&lt;br /&gt;
&lt;br /&gt;
The char.status package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.conditions ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.conditions message includes all of the conditions&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.conditions package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.affectedby ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.affectedby message includes all of the affects&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.affectedby package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.timers ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.timers message includes all of the timers&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.timers package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.offer ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.offer message includes a list of all items as they would appear&lt;br /&gt;
in the OFFER command. This list includes the name of each item, as well as&lt;br /&gt;
their weight and rent.&lt;br /&gt;
&lt;br /&gt;
In addition to the list of items, the message will also include the&lt;br /&gt;
total count, the total weight, and the total rent of items.&lt;br /&gt;
&lt;br /&gt;
The char.offer package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Room ==&lt;br /&gt;
=== room.info ===&lt;br /&gt;
'''''Request and broadcast'''''&lt;br /&gt;
&lt;br /&gt;
The room.info messsage includes the name and description of the character's&lt;br /&gt;
current room. If the character is in the dark or can otherwise not see the&lt;br /&gt;
room name and description, the message will not contain the accurate name&lt;br /&gt;
and description. This message also includes the name of the area for the&lt;br /&gt;
current room.&lt;br /&gt;
&lt;br /&gt;
The room.info package does not require any parameters and can be sent&lt;br /&gt;
an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Group ==&lt;br /&gt;
=== group.info ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The group.info message includes the information as seen in the GROUP&lt;br /&gt;
command. If the character is not in a group, it will not include any&lt;br /&gt;
information.&lt;br /&gt;
&lt;br /&gt;
The group.info package does not require any parameters and can be sent&lt;br /&gt;
an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Logging ==&lt;br /&gt;
=== logging.error ===&lt;br /&gt;
'''''Broadcast only'''''&lt;br /&gt;
&lt;br /&gt;
The logging.error message includes information about the error that was&lt;br /&gt;
encountered while processing the GMCP request or broadcast.&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP&amp;diff=769</id>
		<title>GMCP</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP&amp;diff=769"/>
		<updated>2021-01-18T18:36:39Z</updated>

		<summary type="html">&lt;p&gt;Stolve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is GMCP? ==&lt;br /&gt;
LegendMUD supports the Generic Mud Communication Protocol, or GMCP, to pass easily parsable information to your mudclient. GMCP gives clients and servers the ability to send messages that are invisible to the player. This allows for easy access to certain data from within scripts without the use of cumbersome or unreliable triggers.&lt;br /&gt;
&lt;br /&gt;
While GMCP provides a quality of life improvement for players writing scripts, it will not provide players with any distinct advantage. Any information provided through GMCP will have the same precision and visibility as through the normal interface.&lt;br /&gt;
&lt;br /&gt;
== Which Clients Support GMCP? ==&lt;br /&gt;
At the moment of writing, the following clients support GMCP:&lt;br /&gt;
* CMUD v3.22 and higher&lt;br /&gt;
* Mudlet v2.0 and higher&lt;br /&gt;
* TinTin++ v2.00.3 and higher&lt;br /&gt;
* Mushclient v4.59 and higher&lt;br /&gt;
* Tinyfugue - when compiled with --enable-gmcp flag&lt;br /&gt;
&lt;br /&gt;
There may be other clients that support GMCP.&lt;br /&gt;
&lt;br /&gt;
== How do I use GMCP? ==&lt;br /&gt;
The clients only provide the ability to ''use'' GMCP messaging. It is up to the player, however, to add triggers and other scripts to consume and request the information.&lt;br /&gt;
&lt;br /&gt;
GMCP messages are formed of a package name and an optional JSON payload separated by a space. A list of the available packages can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
Normally, the mud client will handle the parsing and will provide the information in its native format to the scripts.&lt;br /&gt;
For exact details, you will need to look into the documentation of your mud client.&lt;br /&gt;
&lt;br /&gt;
The following tutorials have been written for popular MUD clients:&lt;br /&gt;
* [[GMCP CMUD Tutorial]]&lt;br /&gt;
* [[GMCP Mudlet Tutorial]]&lt;br /&gt;
* [[GMCP TinTin++ Tutorial]]&lt;br /&gt;
&lt;br /&gt;
These tutorials give examples specific to LegendMUD, if you are using a client that is not listed here, it might still be beneficial to view one or more of these tutorials to gain an understanding of how Legend sends GMCP messages.&lt;br /&gt;
&lt;br /&gt;
== What GMCP Packages Does Legend Support? ==&lt;br /&gt;
The list of all available GMCP packages can be [[GMCP Packages|found here]].&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_Packages&amp;diff=768</id>
		<title>GMCP Packages</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_Packages&amp;diff=768"/>
		<updated>2021-01-08T15:43:59Z</updated>

		<summary type="html">&lt;p&gt;Stolve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following packages are available via [[GMCP]]. Some packages may only be requested from the MUD, others may only be broadcast from the MUD, and others may be requested or broadcast.&lt;br /&gt;
&lt;br /&gt;
== Char ==&lt;br /&gt;
=== char.prompt ===&lt;br /&gt;
'''''Request and broadcast'''''&lt;br /&gt;
&lt;br /&gt;
The char.prompt message includes all values available in the prompt.&lt;br /&gt;
This list can be seen in the PROMPT CODES help file.&lt;br /&gt;
&lt;br /&gt;
The char.prompt package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status message includes all values visible from the STATUS&lt;br /&gt;
command. This includes conditions, affects, and timers. If only one of&lt;br /&gt;
these sets of values is needed, consider using one of the char.status&lt;br /&gt;
sub packages.&lt;br /&gt;
&lt;br /&gt;
The char.status package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.conditions ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.conditions message includes all of the conditions&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.conditions package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.affectedby ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.affectedby message includes all of the affects&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.affectedby package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.timers ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.timers message includes all of the timers&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.timers package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Room ==&lt;br /&gt;
=== room.info ===&lt;br /&gt;
'''''Request and broadcast'''''&lt;br /&gt;
&lt;br /&gt;
The room.info messsage includes the name and description of the character's&lt;br /&gt;
current room. If the character is in the dark or can otherwise not see the&lt;br /&gt;
room name and description, the message will not contain the accurate name&lt;br /&gt;
and description. This message also includes the name of the area for the&lt;br /&gt;
current room.&lt;br /&gt;
&lt;br /&gt;
The room.info package does not require any parameters and can be sent&lt;br /&gt;
an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Group ==&lt;br /&gt;
=== group.info ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The group.info message includes the information as seen in the GROUP&lt;br /&gt;
command. If the character is not in a group, it will not include any&lt;br /&gt;
information.&lt;br /&gt;
&lt;br /&gt;
The group.info package does not require any parameters and can be sent&lt;br /&gt;
an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Logging ==&lt;br /&gt;
=== logging.error ===&lt;br /&gt;
'''''Broadcast only'''''&lt;br /&gt;
&lt;br /&gt;
The logging.error message includes information about the error that was&lt;br /&gt;
encountered while processing the GMCP request or broadcast.&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_CMUD_Tutorial&amp;diff=767</id>
		<title>GMCP CMUD Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_CMUD_Tutorial&amp;diff=767"/>
		<updated>2021-01-07T15:59:45Z</updated>

		<summary type="html">&lt;p&gt;Stolve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling GMCP ==&lt;br /&gt;
In CMUD you can enable [[GMCP]] via the preferences for your session.&lt;br /&gt;
Once a session is opened, open the preferences:&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-open-prefs.jpg|How to open preferences]] &lt;br /&gt;
&lt;br /&gt;
In the preferences, open the Protocols tab and ensure the &amp;lt;code&amp;gt;GMCP Emulation&amp;lt;/code&amp;gt; checkbox is checked. Additionally, list the LegendMUD packages you want to receive in the textbox below. A list of packages can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-enable.jpg|How to enable GMCP]]&lt;br /&gt;
&lt;br /&gt;
== Receiving a GMCP message ==&lt;br /&gt;
Once GMCP is enabled, the MUD will begin sending GMCP messages.&lt;br /&gt;
&lt;br /&gt;
There are two types of GMCP messages, broadcasts and requested messages.&lt;br /&gt;
Broadcast messages will happen automatically, while requested messages will only be sent by the MUD if the client requests them.&lt;br /&gt;
The full list of packages and their message types can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
CMUD automatically saves all data from GMCP messages in a global &amp;lt;code&amp;gt;%gmcp&amp;lt;/code&amp;gt; variable.&lt;br /&gt;
For example, if you wanted to read the area name from the prompt, you can do this at any time, from anywhere via the following zScript:&lt;br /&gt;
 %gmcp.char.prompt.an&lt;br /&gt;
&lt;br /&gt;
Sometimes you need to be able to trigger off of a GMCP message. This can be done by creating a GMCP trigger.&lt;br /&gt;
&lt;br /&gt;
Create a new trigger and use the package name in the pattern field. &lt;br /&gt;
Additionally, change the trigger type (noted in the screenshot below) to GMCP. The number field to the right of this dropdown can be ignored.&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-trigger.jpg|Creating a GMCP trigger in CMUD]]&lt;br /&gt;
&lt;br /&gt;
You can also use pattern matching to trigger on multiple GMCP messages.&lt;br /&gt;
For example, you can set the pattern to &amp;lt;code&amp;gt;char.*&amp;lt;/code&amp;gt; to trigger on ''any'' character related GMCP message.&lt;br /&gt;
&lt;br /&gt;
== Sending a GMCP message ==&lt;br /&gt;
The MUD will not broadcast every message that is available. Some messages must be manually requested. Additionally, some broadcasted messages can also be requested if you need to refresh the data before the MUD would broadcast again.&lt;br /&gt;
&lt;br /&gt;
The following script can be used to send a request to the MUD:&lt;br /&gt;
 #SENDGMCP &amp;quot;Package.Subpackage&amp;quot; @Table&lt;br /&gt;
&lt;br /&gt;
Where @Table is a normal CMUD database variable or string list with the data you want to send. &lt;br /&gt;
 // As a database variable&lt;br /&gt;
 $response = &amp;quot; &amp;quot;&lt;br /&gt;
 #addkey $response client &amp;quot;CMUD&amp;quot;&lt;br /&gt;
 #addkey $response version &amp;quot;3.22&amp;quot;&lt;br /&gt;
 #SENDGMCP &amp;quot;core.hello&amp;quot; $response&lt;br /&gt;
&lt;br /&gt;
 // As a string list&lt;br /&gt;
 $list = {core 1|char 1|room 1|comm 1}&lt;br /&gt;
 #SENDGMCP &amp;quot;core.supports.set&amp;quot; $list&lt;br /&gt;
&lt;br /&gt;
 // With no data&lt;br /&gt;
 #SENDGMCP &amp;quot;char.status&amp;quot; &amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_Mudlet_Tutorial&amp;diff=766</id>
		<title>GMCP Mudlet Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_Mudlet_Tutorial&amp;diff=766"/>
		<updated>2021-01-07T15:59:43Z</updated>

		<summary type="html">&lt;p&gt;Stolve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling GMCP ==&lt;br /&gt;
In Mudlet you can enable [[GMCP]] via the Settings for your session.&lt;br /&gt;
Once a session is opened, open the Settings:&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-mudlet-open-prefs.jpg|How to open settings]]&lt;br /&gt;
&lt;br /&gt;
In the settings, under the &amp;lt;code&amp;gt;Game Protocols&amp;lt;/code&amp;gt; section, ensure the &amp;lt;code&amp;gt;Enable GMCP&amp;lt;/code&amp;gt; checkbox is checked.&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-mudlet-enable.jpg|How to enable GMCP]]&lt;br /&gt;
&lt;br /&gt;
== Receiving a GMCP message ==&lt;br /&gt;
Once GMCP is enabled, the MUD will begin sending GMCP messages.&lt;br /&gt;
&lt;br /&gt;
There are two types of GMCP messages, broadcasts and requested messages.&lt;br /&gt;
Broadcast messages will happen automatically, while requested messages will only be sent by the MUD if the client requests them.&lt;br /&gt;
The full list of packages and their message types can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
Mudlet automatically saves all data from GMCP messages in a global &amp;lt;code&amp;gt;gmcp&amp;lt;/code&amp;gt; variable.&lt;br /&gt;
For example, if you wanted to read the area name from the prompt, you can do this at any time, from anywhere via the following variable:&lt;br /&gt;
 gmcp.char.prompt.an&lt;br /&gt;
&lt;br /&gt;
For debugging purposes, please note that the ''echo'' function will not work with objects, only strings. If you try to ''echo(gmcp.char.prompt.an)'', it will work because that is a string for the Area Name.&lt;br /&gt;
If you try to ''echo(gmcp.char.prompt)'' however, it will not work because that is an object containing all of the prompt code values.&lt;br /&gt;
Instead, it is recommended to use the ''display'' function to print objects to the screen.&lt;br /&gt;
&lt;br /&gt;
Sometimes you need to be able to trigger off of a GMCP message. This can be done by creating a GMCP script.&lt;br /&gt;
&lt;br /&gt;
Create a new script (not a trigger) and give it a name. Enter the package name in the &amp;lt;code&amp;gt;Add User Defined Event Handler&amp;lt;/code&amp;gt; field and hit the &amp;quot;plus&amp;quot; sign to add it. This package name must be prepended by &amp;lt;code&amp;gt;gmcp.&amp;lt;/code&amp;gt;. For example, the &amp;lt;code&amp;gt;char.status&amp;lt;/code&amp;gt; package would be added to the event handlers as &amp;lt;code&amp;gt;gmcp.char.status&amp;lt;/code&amp;gt;. A full list of available packages can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-mudlet-trigger.jpg|Creating a GMCP trigger in Mudlet]]&lt;br /&gt;
&lt;br /&gt;
You can also match partial packages to trigger on multiple GMCP messages.&lt;br /&gt;
For example, you can set the pattern to &amp;lt;code&amp;gt;gmcp.char&amp;lt;/code&amp;gt; to trigger on ''any'' character related GMCP message.&lt;br /&gt;
&lt;br /&gt;
== Sending a GMCP message ==&lt;br /&gt;
The MUD will not broadcast every message that is available. Some messages must be manually requested. Additionally, some broadcasted messages can also be requested if you need to refresh the data before the MUD would broadcast again.&lt;br /&gt;
&lt;br /&gt;
The following script can be used to send a request to the MUD:&lt;br /&gt;
 sendGMCP(&amp;quot;char.prompt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
If you need to send additional parameters for the requested package, you can do so:&lt;br /&gt;
 sendGMCP([[char.prompt {&amp;quot;additional&amp;quot;: 1, &amp;quot;parameters&amp;quot;: &amp;quot;hello&amp;quot;}]])&lt;br /&gt;
&lt;br /&gt;
You can also use the following syntax:&lt;br /&gt;
 sendGMCP(&amp;quot;char.prompt&amp;quot;..yajl.to_string({&amp;quot;additional&amp;quot;: 1, &amp;quot;parameters&amp;quot;: &amp;quot;hello&amp;quot;})&lt;br /&gt;
&lt;br /&gt;
Note that as of writing, none of the Legend packages take any parameters, required or optional.&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_TinTin%2B%2B_Tutorial&amp;diff=765</id>
		<title>GMCP TinTin++ Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_TinTin%2B%2B_Tutorial&amp;diff=765"/>
		<updated>2021-01-07T15:59:41Z</updated>

		<summary type="html">&lt;p&gt;Stolve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling GMCP ==&lt;br /&gt;
In order to enable [[GMCP]], you need to send a message to the MUD to let it know that the client supports it.&lt;br /&gt;
This is done by sending an &amp;lt;code&amp;gt;IAC DO GMCP&amp;lt;/code&amp;gt; message when the MUD sends &amp;lt;code&amp;gt;IAC WILL GMCP&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In TinTin++, this is done via the following script:&lt;br /&gt;
 #EVENT {IAC WILL GMCP}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {\xFF\xFD\xC9};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Alternatively, it can be useful to store the hex codes as variables:&lt;br /&gt;
 #VAR telnet[iac] \xFF;&lt;br /&gt;
 #VAR telnet[do] \xFD;&lt;br /&gt;
 #VAR telnet[sb] \xFA;&lt;br /&gt;
 #VAR telnet[se] \xF0;&lt;br /&gt;
 #VAR telnet[gmcp] \xC9;&lt;br /&gt;
&lt;br /&gt;
 #EVENT {IAC WILL GMCP}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$gmcp[iac]$telnet[do]$telnet[gmcp]};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The other scripts in this tutorial will use those variables. Note that anywhere these variables are used, you can replace them with the hex code instead.&lt;br /&gt;
&lt;br /&gt;
== Receiving a GMCP message ==&lt;br /&gt;
Once GMCP is enabled, the MUD will begin broadcasting GMCP messages.&lt;br /&gt;
&lt;br /&gt;
There are two types of GMCP messages, broadcasts and requested messages.&lt;br /&gt;
Broadcast messages will happen automatically, while requested messages will only be sent by the MUD if the client requests them.&lt;br /&gt;
The full list of packages and their message types can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
To receive these messages, you must subscribe to GMCP events. This must be done for each package you want to receive messages for. A list of available packages can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to receive the &amp;lt;code&amp;gt;room.info&amp;lt;/code&amp;gt; messages, you would use the following script:&lt;br /&gt;
 #EVENT {IAC SB GMCP room.info IAC SE}&lt;br /&gt;
 {&lt;br /&gt;
     #VAR roominfo {%0};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;%0&amp;lt;/code&amp;gt; parameter contains the data sent by the MUD. For convenience, it is recommended that you save this data in a &amp;lt;code&amp;gt;#VARIABLE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;#LOCAL&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Sending a GMCP message ==&lt;br /&gt;
The MUD will not broadcast every message that is available. Some messages must be manually requested. Additionally, some broadcasted messages can also be requested if you need to refresh the data before the MUD would broadcast again.&lt;br /&gt;
&lt;br /&gt;
The following script can be used to send a request to the MUD:&lt;br /&gt;
 #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]&amp;lt;package_name&amp;gt; &amp;lt;message_data&amp;gt;$telnet[iac]$telnet[se]};&lt;br /&gt;
&lt;br /&gt;
It may be easier to create an alias to make this task easier. Aliases can later be used from the input line as well as from other scripts.&lt;br /&gt;
 #ALIAS {gmcp %1 %*}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]%1 %2$telnet[iac]$telnet[se];};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Usage: &amp;lt;code&amp;gt;gmcp room.info {}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following alias might also be useful if the package does not need any parameters provided:&lt;br /&gt;
 #ALIAS {gmcp %1}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]%1$telnet[iac]$telnet[se];};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Usage: &amp;lt;code&amp;gt;gmcp room.info&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_Mudlet_Tutorial&amp;diff=764</id>
		<title>GMCP Mudlet Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_Mudlet_Tutorial&amp;diff=764"/>
		<updated>2021-01-06T16:09:23Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Created page with &amp;quot;== Enabling GMCP == In Mudlet you can enable GMCP via the Settings for your session. Once a session is opened, open the Settings:  File:Gmcp-mudlet-open-prefs.jpg|How to...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling GMCP ==&lt;br /&gt;
In Mudlet you can enable [[GMCP]] via the Settings for your session.&lt;br /&gt;
Once a session is opened, open the Settings:&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-mudlet-open-prefs.jpg|How to open settings]]&lt;br /&gt;
&lt;br /&gt;
In the settings, under the &amp;lt;code&amp;gt;Game Protocols&amp;lt;/code&amp;gt; section, ensure the &amp;lt;code&amp;gt;Enable GMCP&amp;lt;/code&amp;gt; checkbox is checked.&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-mudlet-enable.jpg|How to enable GMCP]]&lt;br /&gt;
&lt;br /&gt;
== Receiving a GMCP message ==&lt;br /&gt;
Once GMCP is enabled, the MUD will begin broadcasting GMCP messages.&lt;br /&gt;
Mudlet automatically saves all data from GMCP messages in a global &amp;lt;code&amp;gt;gmcp&amp;lt;/code&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to read the area name from the prompt, you can do this at any time, from anywhere via the following variable:&lt;br /&gt;
 gmcp.char.prompt.an&lt;br /&gt;
&lt;br /&gt;
Sometimes you need to be able to trigger off of a GMCP message. This can be done by creating a GMCP script.&lt;br /&gt;
&lt;br /&gt;
Create a new script (not a trigger) and give it a name. Enter the package name in the &amp;lt;code&amp;gt;Add User Defined Event Handler&amp;lt;/code&amp;gt; field and hit the &amp;quot;plus&amp;quot; sign to add it. This package name must be prepended by &amp;lt;code&amp;gt;gmcp.&amp;lt;/code&amp;gt;. For example, the &amp;lt;code&amp;gt;char.status&amp;lt;/code&amp;gt; package would be added to the event handlers as &amp;lt;code&amp;gt;gmcp.char.status&amp;lt;/code&amp;gt;. A full list of available packages can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-mudlet-trigger.jpg|Creating a GMCP trigger in Mudlet]]&lt;br /&gt;
&lt;br /&gt;
You can also match partial packages to trigger on multiple GMCP messages.&lt;br /&gt;
For example, you can set the pattern to &amp;lt;code&amp;gt;gmcp.char&amp;lt;/code&amp;gt; to trigger on ''any'' character related GMCP message.&lt;br /&gt;
&lt;br /&gt;
== Sending a GMCP message ==&lt;br /&gt;
The MUD will not broadcast every message that is available. Some messages must be manually requested. Additionally, some broadcasted messages can also be requested if you need to refresh the data before the MUD would broadcast again.&lt;br /&gt;
&lt;br /&gt;
The following script can be used to send a request to the MUD:&lt;br /&gt;
 SendGMCP(&amp;quot;char.prompt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
If you need to send additional parameters for the requested package, you can do so:&lt;br /&gt;
 SendGMCP([[char.prompt {&amp;quot;additional&amp;quot;: 1, &amp;quot;parameters&amp;quot;: &amp;quot;hello&amp;quot;}]])&lt;br /&gt;
&lt;br /&gt;
You can also use the following syntax:&lt;br /&gt;
 SendGMCP(&amp;quot;char.prompt&amp;quot;..yajl.to_string({&amp;quot;additional&amp;quot;: 1, &amp;quot;parameters&amp;quot;: &amp;quot;hello&amp;quot;})&lt;br /&gt;
&lt;br /&gt;
Note that as of writing, none of the Legend packages take any parameters, required or optional.&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=File:Gmcp-mudlet-trigger.jpg&amp;diff=763</id>
		<title>File:Gmcp-mudlet-trigger.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=File:Gmcp-mudlet-trigger.jpg&amp;diff=763"/>
		<updated>2021-01-06T16:02:23Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Screenshot showing how to create a GMCP trigger in Mudlet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot showing how to create a GMCP trigger in Mudlet&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=File:Gmcp-mudlet-open-prefs.jpg&amp;diff=762</id>
		<title>File:Gmcp-mudlet-open-prefs.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=File:Gmcp-mudlet-open-prefs.jpg&amp;diff=762"/>
		<updated>2021-01-06T16:01:57Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Screenshot showing how to open settings in Mudlet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot showing how to open settings in Mudlet&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=File:Gmcp-mudlet-enable.jpg&amp;diff=761</id>
		<title>File:Gmcp-mudlet-enable.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=File:Gmcp-mudlet-enable.jpg&amp;diff=761"/>
		<updated>2021-01-06T16:01:24Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Screenshot showing how to enable GMCP in Mudlet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot showing how to enable GMCP in Mudlet&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP&amp;diff=760</id>
		<title>GMCP</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP&amp;diff=760"/>
		<updated>2021-01-06T15:34:31Z</updated>

		<summary type="html">&lt;p&gt;Stolve: /* How do I use GMCP? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is GMCP? ==&lt;br /&gt;
LegendMUD supports the Generic Mud Communication Protocol, or GMCP, to pass easily parsable information to your mudclient. GMCP gives clients and servers the ability to send messages that are invisible to the player. This allows for easy access to certain data from within scripts without the use of cumbersome or unreliable triggers.&lt;br /&gt;
&lt;br /&gt;
While GMCP provides a quality of life improvement for players writing scripts, it will not provide players with any distinct advantage. Any information provided through GMCP will have the same precision and visibility as through the normal interface.&lt;br /&gt;
&lt;br /&gt;
== Which Clients Support GMCP? ==&lt;br /&gt;
At the moment of writing, the following clients support GMCP:&lt;br /&gt;
* CMUD v3.22 and higher&lt;br /&gt;
* Mudlet v2.0 and higher&lt;br /&gt;
* TinTin++ v2.00.3 and higher&lt;br /&gt;
* Mushclient v4.59 and higher&lt;br /&gt;
* Tinyfugue - when compiled with --enable-gmcp flag&lt;br /&gt;
&lt;br /&gt;
There may be other clients that support GMCP.&lt;br /&gt;
&lt;br /&gt;
== How do I use GMCP? ==&lt;br /&gt;
The clients only provide the ability to ''use'' GMCP messaging. It is up to the player, however, to add triggers and other scripts to consume and request the information.&lt;br /&gt;
&lt;br /&gt;
GMCP messages are formed of a package name and an optional JSON payload separated by a space. A list of the available packages can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
Normally, the mud client will handle the parsing and will provide the information in its native format to the scripts.&lt;br /&gt;
For exact details, you will need to look into the documentation of your mud client.&lt;br /&gt;
&lt;br /&gt;
The following tutorials have been written for popular MUD clients:&lt;br /&gt;
* [[GMCP CMUD Tutorial]]&lt;br /&gt;
* [[GMCP Mudlet Tutorial]]&lt;br /&gt;
* [[GMCP TinTin++ Tutorial]]&lt;br /&gt;
&lt;br /&gt;
These tutorials give examples specific to LegendMUD, if you are using a client that is not listed here, it might still be beneficial to view one or more of these tutorials to gain an understanding of how Legend sends GMCP messages.&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_Packages&amp;diff=759</id>
		<title>GMCP Packages</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_Packages&amp;diff=759"/>
		<updated>2021-01-06T15:33:10Z</updated>

		<summary type="html">&lt;p&gt;Stolve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following packages are available via [[GMCP]]. Some packages may only be requested from the MUD, others may only be broadcast from the MUD, and others may be requested or broadcast.&lt;br /&gt;
&lt;br /&gt;
== Char ==&lt;br /&gt;
=== char.prompt ===&lt;br /&gt;
'''''Request and broadcast'''''&lt;br /&gt;
&lt;br /&gt;
The char.prompt message includes all values available in the prompt.&lt;br /&gt;
This list can be seen in the PROMPT CODES help file.&lt;br /&gt;
&lt;br /&gt;
The char.prompt package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.offer ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.offer message includes a list of all items as they would appear&lt;br /&gt;
in the OFFER command. This list includes the name of each item, as well as&lt;br /&gt;
their weight and rent.&lt;br /&gt;
&lt;br /&gt;
In addition to the list of items, the message will also include the&lt;br /&gt;
total count, the total weight, and the total rent of items.&lt;br /&gt;
&lt;br /&gt;
The char.offer package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
=== char.status ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status message includes all values visible from the STATUS&lt;br /&gt;
command. This includes conditions, affects, and timers. If only one of&lt;br /&gt;
these sets of values is needed, consider using one of the char.status&lt;br /&gt;
sub packages.&lt;br /&gt;
&lt;br /&gt;
The char.status package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.conditions ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.conditions message includes all of the conditions&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.conditions package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.affectedby ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.affectedby message includes all of the affects&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.affectedby package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.timers ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.timers message includes all of the timers&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.timers package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Room ==&lt;br /&gt;
=== room.info ===&lt;br /&gt;
'''''Request and broadcast'''''&lt;br /&gt;
&lt;br /&gt;
The room.info messsage includes the name and description of the character's&lt;br /&gt;
current room. If the character is in the dark or can otherwise not see the&lt;br /&gt;
room name and description, the message will not contain the accurate name&lt;br /&gt;
and description. This message also includes the name of the area for the&lt;br /&gt;
current room.&lt;br /&gt;
&lt;br /&gt;
The room.info package does not require any parameters and can be sent&lt;br /&gt;
an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Group ==&lt;br /&gt;
=== group.info ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The group.info message includes the information as seen in the GROUP&lt;br /&gt;
command. If the character is not in a group, it will not include any&lt;br /&gt;
information.&lt;br /&gt;
&lt;br /&gt;
The group.info package does not require any parameters and can be sent&lt;br /&gt;
an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Logging ==&lt;br /&gt;
=== logging.error ===&lt;br /&gt;
'''''Broadcast only'''''&lt;br /&gt;
&lt;br /&gt;
The logging.error message includes information about the error that was&lt;br /&gt;
encountered while processing the GMCP request or broadcast.&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_Packages&amp;diff=758</id>
		<title>GMCP Packages</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_Packages&amp;diff=758"/>
		<updated>2021-01-06T15:32:25Z</updated>

		<summary type="html">&lt;p&gt;Stolve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following packages are available via GMCP. Some packages may only be requested from the MUD, others may only be broadcast from the MUD, and others may be requested or broadcast.&lt;br /&gt;
&lt;br /&gt;
== Char ==&lt;br /&gt;
=== char.prompt ===&lt;br /&gt;
'''''Request and broadcast'''''&lt;br /&gt;
&lt;br /&gt;
The char.prompt message includes all values available in the prompt.&lt;br /&gt;
This list can be seen in the PROMPT CODES help file.&lt;br /&gt;
&lt;br /&gt;
The char.prompt package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.offer ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.offer message includes a list of all items as they would appear&lt;br /&gt;
in the OFFER command. This list includes the name of each item, as well as&lt;br /&gt;
their weight and rent.&lt;br /&gt;
&lt;br /&gt;
In addition to the list of items, the message will also include the&lt;br /&gt;
total count, the total weight, and the total rent of items.&lt;br /&gt;
&lt;br /&gt;
The char.offer package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
=== char.status ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status message includes all values visible from the STATUS&lt;br /&gt;
command. This includes conditions, affects, and timers. If only one of&lt;br /&gt;
these sets of values is needed, consider using one of the char.status&lt;br /&gt;
sub packages.&lt;br /&gt;
&lt;br /&gt;
The char.status package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.conditions ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.conditions message includes all of the conditions&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.conditions package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.affectedby ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.affectedby message includes all of the affects&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.affectedby package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== char.status.timers ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The char.status.timers message includes all of the timers&lt;br /&gt;
as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
The char.status.timers package does not require any parameters and can&lt;br /&gt;
be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Room ==&lt;br /&gt;
=== room.info ===&lt;br /&gt;
'''''Request and broadcast'''''&lt;br /&gt;
&lt;br /&gt;
The room.info messsage includes the name and description of the character's&lt;br /&gt;
current room. If the character is in the dark or can otherwise not see the&lt;br /&gt;
room name and description, the message will not contain the accurate name&lt;br /&gt;
and description. This message also includes the name of the area for the&lt;br /&gt;
current room.&lt;br /&gt;
&lt;br /&gt;
The room.info package does not require any parameters and can be sent&lt;br /&gt;
an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Group ==&lt;br /&gt;
=== group.info ===&lt;br /&gt;
'''''Request only'''''&lt;br /&gt;
&lt;br /&gt;
The group.info message includes the information as seen in the GROUP&lt;br /&gt;
command. If the character is not in a group, it will not include any&lt;br /&gt;
information.&lt;br /&gt;
&lt;br /&gt;
The group.info package does not require any parameters and can be sent&lt;br /&gt;
an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Logging ==&lt;br /&gt;
=== logging.error ===&lt;br /&gt;
'''''Broadcast only'''''&lt;br /&gt;
&lt;br /&gt;
The logging.error message includes information about the error that was&lt;br /&gt;
encountered while processing the GMCP request or broadcast.&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_TinTin%2B%2B_Tutorial&amp;diff=757</id>
		<title>GMCP TinTin++ Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_TinTin%2B%2B_Tutorial&amp;diff=757"/>
		<updated>2021-01-06T15:20:39Z</updated>

		<summary type="html">&lt;p&gt;Stolve: /* Receiving a GMCP message */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling GMCP ==&lt;br /&gt;
In order to enable [[GMCP]], you need to send a message to the MUD to let it know that the client supports it.&lt;br /&gt;
This is done by sending an &amp;lt;code&amp;gt;IAC DO GMCP&amp;lt;/code&amp;gt; message when the MUD sends &amp;lt;code&amp;gt;IAC WILL GMCP&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In TinTin++, this is done via the following script:&lt;br /&gt;
 #EVENT {IAC WILL GMCP}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {\xFF\xFD\xC9};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Alternatively, it can be useful to store the hex codes as variables:&lt;br /&gt;
 #VAR telnet[iac] \xFF;&lt;br /&gt;
 #VAR telnet[do] \xFD;&lt;br /&gt;
 #VAR telnet[sb] \xFA;&lt;br /&gt;
 #VAR telnet[se] \xF0;&lt;br /&gt;
 #VAR telnet[gmcp] \xC9;&lt;br /&gt;
&lt;br /&gt;
 #EVENT {IAC WILL GMCP}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$gmcp[iac]$telnet[do]$telnet[gmcp]};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The other scripts in this tutorial will use those variables. Note that anywhere these variables are used, you can replace them with the hex code instead.&lt;br /&gt;
&lt;br /&gt;
== Receiving a GMCP message ==&lt;br /&gt;
Once GMCP is enabled, the MUD will begin broadcasting GMCP messages. To receive these messages, you must subscribe to GMCP events. This must be done for each package you want to receive messages for. A list of available packages can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to receive the &amp;lt;code&amp;gt;room.info&amp;lt;/code&amp;gt; messages, you would use the following script:&lt;br /&gt;
 #EVENT {IAC SB GMCP room.info IAC SE}&lt;br /&gt;
 {&lt;br /&gt;
     #VAR roominfo {%0};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;%0&amp;lt;/code&amp;gt; parameter contains the data sent by the MUD. For convenience, it is recommended that you save this data in a &amp;lt;code&amp;gt;#VARIABLE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;#LOCAL&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Sending a GMCP message ==&lt;br /&gt;
The MUD will not broadcast every message that is available. Some messages must be manually requested. Additionally, some broadcasted messages can also be requested if you need to refresh the data before the MUD would broadcast again.&lt;br /&gt;
&lt;br /&gt;
The following script can be used to send a request to the MUD:&lt;br /&gt;
 #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]&amp;lt;package_name&amp;gt; &amp;lt;message_data&amp;gt;$telnet[iac]$telnet[se]};&lt;br /&gt;
&lt;br /&gt;
It may be easier to create an alias to make this task easier. Aliases can later be used from the input line as well as from other scripts.&lt;br /&gt;
 #ALIAS {gmcp %1 %*}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]%1 %2$telnet[iac]$telnet[se];};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Usage: &amp;lt;code&amp;gt;gmcp room.info {}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following alias might also be useful if the package does not need any parameters provided:&lt;br /&gt;
 #ALIAS {gmcp %1}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]%1$telnet[iac]$telnet[se];};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Usage: &amp;lt;code&amp;gt;gmcp room.info&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_TinTin%2B%2B_Tutorial&amp;diff=756</id>
		<title>GMCP TinTin++ Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_TinTin%2B%2B_Tutorial&amp;diff=756"/>
		<updated>2021-01-06T15:20:07Z</updated>

		<summary type="html">&lt;p&gt;Stolve: /* Enabling GMCP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling GMCP ==&lt;br /&gt;
In order to enable [[GMCP]], you need to send a message to the MUD to let it know that the client supports it.&lt;br /&gt;
This is done by sending an &amp;lt;code&amp;gt;IAC DO GMCP&amp;lt;/code&amp;gt; message when the MUD sends &amp;lt;code&amp;gt;IAC WILL GMCP&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In TinTin++, this is done via the following script:&lt;br /&gt;
 #EVENT {IAC WILL GMCP}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {\xFF\xFD\xC9};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Alternatively, it can be useful to store the hex codes as variables:&lt;br /&gt;
 #VAR telnet[iac] \xFF;&lt;br /&gt;
 #VAR telnet[do] \xFD;&lt;br /&gt;
 #VAR telnet[sb] \xFA;&lt;br /&gt;
 #VAR telnet[se] \xF0;&lt;br /&gt;
 #VAR telnet[gmcp] \xC9;&lt;br /&gt;
&lt;br /&gt;
 #EVENT {IAC WILL GMCP}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$gmcp[iac]$telnet[do]$telnet[gmcp]};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The other scripts in this tutorial will use those variables. Note that anywhere these variables are used, you can replace them with the hex code instead.&lt;br /&gt;
&lt;br /&gt;
== Receiving a GMCP message ==&lt;br /&gt;
Once GMCP is enabled, the MUD will begin broadcasting GMCP messages. To receive these messages, you must subscribe to GMCP events. This must be done for each package you want to receive messages for.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to receive the &amp;lt;code&amp;gt;room.info&amp;lt;/code&amp;gt; messages, you would use the following script:&lt;br /&gt;
 #EVENT {IAC SB GMCP room.info IAC SE}&lt;br /&gt;
 {&lt;br /&gt;
     #VAR roominfo {%0};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;%0&amp;lt;/code&amp;gt; parameter contains the data sent by the MUD. For convenience, it is recommended that you save this data in a &amp;lt;code&amp;gt;#VARIABLE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;#LOCAL&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Sending a GMCP message ==&lt;br /&gt;
The MUD will not broadcast every message that is available. Some messages must be manually requested. Additionally, some broadcasted messages can also be requested if you need to refresh the data before the MUD would broadcast again.&lt;br /&gt;
&lt;br /&gt;
The following script can be used to send a request to the MUD:&lt;br /&gt;
 #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]&amp;lt;package_name&amp;gt; &amp;lt;message_data&amp;gt;$telnet[iac]$telnet[se]};&lt;br /&gt;
&lt;br /&gt;
It may be easier to create an alias to make this task easier. Aliases can later be used from the input line as well as from other scripts.&lt;br /&gt;
 #ALIAS {gmcp %1 %*}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]%1 %2$telnet[iac]$telnet[se];};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Usage: &amp;lt;code&amp;gt;gmcp room.info {}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following alias might also be useful if the package does not need any parameters provided:&lt;br /&gt;
 #ALIAS {gmcp %1}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]%1$telnet[iac]$telnet[se];};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Usage: &amp;lt;code&amp;gt;gmcp room.info&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_CMUD_Tutorial&amp;diff=755</id>
		<title>GMCP CMUD Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_CMUD_Tutorial&amp;diff=755"/>
		<updated>2021-01-06T15:19:35Z</updated>

		<summary type="html">&lt;p&gt;Stolve: /* Enabling GMCP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling GMCP ==&lt;br /&gt;
In CMUD you can enable [[GMCP]] via the preferences for your session.&lt;br /&gt;
Once a session is opened, open the preferences:&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-open-prefs.jpg|How to open preferences]] &lt;br /&gt;
&lt;br /&gt;
In the preferences, open the Protocols tab and ensure the &amp;lt;code&amp;gt;GMCP Emulation&amp;lt;/code&amp;gt; checkbox is checked. Additionally, list the LegendMUD packages you want to receive in the textbox below. A list of packages can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-enable.jpg|How to enable GMCP]]&lt;br /&gt;
&lt;br /&gt;
== Receiving a GMCP message ==&lt;br /&gt;
Once GMCP is enabled, the MUD will begin broadcasting GMCP messages.&lt;br /&gt;
CMUD automatically saves all data from GMCP messages in a global &amp;lt;code&amp;gt;%gmcp&amp;lt;/code&amp;gt; variable. &lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to read the area name from the prompt, you can do this at any time, from anywhere via the following zScript:&lt;br /&gt;
 %gmcp.char.prompt.an&lt;br /&gt;
&lt;br /&gt;
Sometimes you need to be able to trigger off of a GMCP message. This can be done by creating a GMCP trigger.&lt;br /&gt;
&lt;br /&gt;
Create a new trigger and use the package name in the pattern field. &lt;br /&gt;
Additionally, change the trigger type (noted in the screenshot below) to GMCP. The number field to the right of this dropdown can be ignored.&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-trigger.jpg|Creating a GMCP trigger in CMUD]]&lt;br /&gt;
&lt;br /&gt;
You can also use pattern matching to trigger on multiple GMCP messages.&lt;br /&gt;
For example, you can set the pattern to &amp;lt;code&amp;gt;char.*&amp;lt;/code&amp;gt; to trigger on ''any'' character related GMCP message.&lt;br /&gt;
&lt;br /&gt;
== Sending a GMCP message ==&lt;br /&gt;
The MUD will not broadcast every message that is available. Some messages must be manually requested. Additionally, some broadcasted messages can also be requested if you need to refresh the data before the MUD would broadcast again.&lt;br /&gt;
&lt;br /&gt;
The following script can be used to send a request to the MUD:&lt;br /&gt;
 #SENDGMCP &amp;quot;Package.Subpackage&amp;quot; @Table&lt;br /&gt;
&lt;br /&gt;
Where @Table is a normal CMUD database variable or string list with the data you want to send. &lt;br /&gt;
 // As a database variable&lt;br /&gt;
 $response = &amp;quot; &amp;quot;&lt;br /&gt;
 #addkey $response client &amp;quot;CMUD&amp;quot;&lt;br /&gt;
 #addkey $response version &amp;quot;3.22&amp;quot;&lt;br /&gt;
 #SENDGMCP &amp;quot;core.hello&amp;quot; $response&lt;br /&gt;
&lt;br /&gt;
 // As a string list&lt;br /&gt;
 $list = {core 1|char 1|room 1|comm 1}&lt;br /&gt;
 #SENDGMCP &amp;quot;core.supports.set&amp;quot; $list&lt;br /&gt;
&lt;br /&gt;
 // With no data&lt;br /&gt;
 #SENDGMCP &amp;quot;char.status&amp;quot; &amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_CMUD_Tutorial&amp;diff=754</id>
		<title>GMCP CMUD Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_CMUD_Tutorial&amp;diff=754"/>
		<updated>2021-01-06T15:19:13Z</updated>

		<summary type="html">&lt;p&gt;Stolve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling GMCP ==&lt;br /&gt;
In CMUD you can enable GMCP via the preferences for your session.&lt;br /&gt;
Once a session is opened, open the preferences:&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-open-prefs.jpg|How to open preferences]] &lt;br /&gt;
&lt;br /&gt;
In the preferences, open the Protocols tab and ensure the &amp;lt;code&amp;gt;GMCP Emulation&amp;lt;/code&amp;gt; checkbox is checked. Additionally, list the LegendMUD packages you want to receive in the textbox below. A list of packages can be found [[GMCP Packages|here]].&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-enable.jpg|How to enable GMCP]]&lt;br /&gt;
&lt;br /&gt;
== Receiving a GMCP message ==&lt;br /&gt;
Once GMCP is enabled, the MUD will begin broadcasting GMCP messages.&lt;br /&gt;
CMUD automatically saves all data from GMCP messages in a global &amp;lt;code&amp;gt;%gmcp&amp;lt;/code&amp;gt; variable. &lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to read the area name from the prompt, you can do this at any time, from anywhere via the following zScript:&lt;br /&gt;
 %gmcp.char.prompt.an&lt;br /&gt;
&lt;br /&gt;
Sometimes you need to be able to trigger off of a GMCP message. This can be done by creating a GMCP trigger.&lt;br /&gt;
&lt;br /&gt;
Create a new trigger and use the package name in the pattern field. &lt;br /&gt;
Additionally, change the trigger type (noted in the screenshot below) to GMCP. The number field to the right of this dropdown can be ignored.&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-trigger.jpg|Creating a GMCP trigger in CMUD]]&lt;br /&gt;
&lt;br /&gt;
You can also use pattern matching to trigger on multiple GMCP messages.&lt;br /&gt;
For example, you can set the pattern to &amp;lt;code&amp;gt;char.*&amp;lt;/code&amp;gt; to trigger on ''any'' character related GMCP message.&lt;br /&gt;
&lt;br /&gt;
== Sending a GMCP message ==&lt;br /&gt;
The MUD will not broadcast every message that is available. Some messages must be manually requested. Additionally, some broadcasted messages can also be requested if you need to refresh the data before the MUD would broadcast again.&lt;br /&gt;
&lt;br /&gt;
The following script can be used to send a request to the MUD:&lt;br /&gt;
 #SENDGMCP &amp;quot;Package.Subpackage&amp;quot; @Table&lt;br /&gt;
&lt;br /&gt;
Where @Table is a normal CMUD database variable or string list with the data you want to send. &lt;br /&gt;
 // As a database variable&lt;br /&gt;
 $response = &amp;quot; &amp;quot;&lt;br /&gt;
 #addkey $response client &amp;quot;CMUD&amp;quot;&lt;br /&gt;
 #addkey $response version &amp;quot;3.22&amp;quot;&lt;br /&gt;
 #SENDGMCP &amp;quot;core.hello&amp;quot; $response&lt;br /&gt;
&lt;br /&gt;
 // As a string list&lt;br /&gt;
 $list = {core 1|char 1|room 1|comm 1}&lt;br /&gt;
 #SENDGMCP &amp;quot;core.supports.set&amp;quot; $list&lt;br /&gt;
&lt;br /&gt;
 // With no data&lt;br /&gt;
 #SENDGMCP &amp;quot;char.status&amp;quot; &amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_Packages&amp;diff=753</id>
		<title>GMCP Packages</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_Packages&amp;diff=753"/>
		<updated>2021-01-06T15:17:53Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Created page with &amp;quot;The following packages are available via GMCP. Some packages may only be requested from the MUD, others may only be broadcast from the MUD, and others may be requested or broa...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following packages are available via GMCP. Some packages may only be&lt;br /&gt;
requested from the MUD, others may only be broadcast from the MUD, and&lt;br /&gt;
others may be requested or broadcast.&lt;br /&gt;
&lt;br /&gt;
char.prompt - request and broadcast&lt;br /&gt;
&lt;br /&gt;
    The char.prompt message includes all values available in the prompt.&lt;br /&gt;
    This list can be seen in the PROMPT CODES help file.&lt;br /&gt;
&lt;br /&gt;
    The char.prompt package does not require any parameters and can&lt;br /&gt;
    be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
    Example: {}&lt;br /&gt;
&lt;br /&gt;
char.offer - request only&lt;br /&gt;
&lt;br /&gt;
    The char.offer message includes a list of all items as they would appear&lt;br /&gt;
    in the OFFER command. This list includes the name of each item, as well as&lt;br /&gt;
    their weight and rent.&lt;br /&gt;
&lt;br /&gt;
    In addition to the list of items, the message will also include the&lt;br /&gt;
    total count, the total weight, and the total rent of items.&lt;br /&gt;
&lt;br /&gt;
    The char.offer package does not require any parameters and can&lt;br /&gt;
    be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
    Example: {}&lt;br /&gt;
    &lt;br /&gt;
char.status - request only&lt;br /&gt;
&lt;br /&gt;
    The char.status message includes all values visible from the STATUS&lt;br /&gt;
    command. This includes conditions, affects, and timers. If only one of&lt;br /&gt;
    these sets of values is needed, consider using one of the char.status&lt;br /&gt;
    sub packages.&lt;br /&gt;
&lt;br /&gt;
    The char.status package does not require any parameters and can&lt;br /&gt;
    be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
    Example: {}&lt;br /&gt;
&lt;br /&gt;
char.status.conditions - request only&lt;br /&gt;
&lt;br /&gt;
    The char.status.conditions message includes all of the conditions&lt;br /&gt;
    as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
    The char.status.conditions package does not require any parameters and can&lt;br /&gt;
    be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
    Example: {}&lt;br /&gt;
&lt;br /&gt;
char.status.affectedby - request only&lt;br /&gt;
&lt;br /&gt;
    The char.status.affectedby message includes all of the affects&lt;br /&gt;
    as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
    The char.status.affectedby package does not require any parameters and can&lt;br /&gt;
    be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
    Example: {}&lt;br /&gt;
&lt;br /&gt;
char.status.timers - request only&lt;br /&gt;
&lt;br /&gt;
    The char.status.timers message includes all of the timers&lt;br /&gt;
    as seen in the STATUS command.&lt;br /&gt;
&lt;br /&gt;
    The char.status.timers package does not require any parameters and can&lt;br /&gt;
    be sent an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
    Example: {}&lt;br /&gt;
&lt;br /&gt;
room.info - request and broadcast&lt;br /&gt;
&lt;br /&gt;
    The room.info messsage includes the name and description of the character's&lt;br /&gt;
    current room. If the character is in the dark or can otherwise not see the&lt;br /&gt;
    room name and description, the message will not contain the accurate name&lt;br /&gt;
    and description. This message also includes the name of the area for the&lt;br /&gt;
    current room.&lt;br /&gt;
&lt;br /&gt;
    The room.info package does not require any parameters and can be sent&lt;br /&gt;
    an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
    Example: {}&lt;br /&gt;
&lt;br /&gt;
group.info - request only&lt;br /&gt;
&lt;br /&gt;
    The group.info message includes the information as seen in the GROUP&lt;br /&gt;
    command. If the character is not in a group, it will not include any&lt;br /&gt;
    information.&lt;br /&gt;
&lt;br /&gt;
    The group.info package does not require any parameters and can be sent&lt;br /&gt;
    an empty object as the request message.&lt;br /&gt;
&lt;br /&gt;
    Example: {}&lt;br /&gt;
&lt;br /&gt;
logging.error - broadcast only&lt;br /&gt;
&lt;br /&gt;
    The logging.error message includes information about the error that was&lt;br /&gt;
    encountered while processing the GMCP request or broadcast.&lt;br /&gt;
&lt;br /&gt;
See also: HELP GMCP, HELP PROMPT CODES&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_CMUD_Tutorial&amp;diff=752</id>
		<title>GMCP CMUD Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_CMUD_Tutorial&amp;diff=752"/>
		<updated>2021-01-06T15:10:56Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Created page with &amp;quot;== Enabling GMCP == In CMUD you can enable GMCP via the preferences for your session. Once a session is opened, open the preferences:  File:Gmcp-cmud-open-prefs.jpg|How to o...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling GMCP ==&lt;br /&gt;
In CMUD you can enable GMCP via the preferences for your session.&lt;br /&gt;
Once a session is opened, open the preferences:&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-open-prefs.jpg|How to open preferences]] &lt;br /&gt;
&lt;br /&gt;
In the preferences, open the Protocols tab and ensure the &amp;lt;code&amp;gt;GMCP Emulation&amp;lt;/code&amp;gt; checkbox is checked. Additionally, list the LegendMUD packages you want to receive in the textbox below.&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-enable.jpg|How to enable GMCP]]&lt;br /&gt;
&lt;br /&gt;
== Receiving a GMCP message ==&lt;br /&gt;
Once GMCP is enabled, the MUD will begin broadcasting GMCP messages.&lt;br /&gt;
CMUD automatically saves all data from GMCP messages in a global &amp;lt;code&amp;gt;%gmcp&amp;lt;/code&amp;gt; variable. &lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to read the area name from the prompt, you can do this at any time, from anywhere via the following zScript:&lt;br /&gt;
 %gmcp.char.prompt.an&lt;br /&gt;
&lt;br /&gt;
Sometimes you need to be able to trigger off of a GMCP message. This can be done by creating a GMCP trigger.&lt;br /&gt;
&lt;br /&gt;
Create a new trigger and use the package name in the pattern field. &lt;br /&gt;
Additionally, change the trigger type (noted in the screenshot below) to GMCP. The number field to the right of this dropdown can be ignored.&lt;br /&gt;
&lt;br /&gt;
[[File:Gmcp-cmud-trigger.jpg|Creating a GMCP trigger in CMUD]]&lt;br /&gt;
&lt;br /&gt;
You can also use pattern matching to trigger on multiple GMCP messages.&lt;br /&gt;
For example, you can set the pattern to &amp;lt;code&amp;gt;char.*&amp;lt;/code&amp;gt; to trigger on ''any'' character related GMCP message.&lt;br /&gt;
&lt;br /&gt;
== Sending a GMCP message ==&lt;br /&gt;
The MUD will not broadcast every message that is available. Some messages must be manually requested. Additionally, some broadcasted messages can also be requested if you need to refresh the data before the MUD would broadcast again.&lt;br /&gt;
&lt;br /&gt;
The following script can be used to send a request to the MUD:&lt;br /&gt;
 #SENDGMCP &amp;quot;Package.Subpackage&amp;quot; @Table&lt;br /&gt;
&lt;br /&gt;
Where @Table is a normal CMUD database variable or string list with the data you want to send. &lt;br /&gt;
 // As a database variable&lt;br /&gt;
 $response = &amp;quot; &amp;quot;&lt;br /&gt;
 #addkey $response client &amp;quot;CMUD&amp;quot;&lt;br /&gt;
 #addkey $response version &amp;quot;3.22&amp;quot;&lt;br /&gt;
 #SENDGMCP &amp;quot;core.hello&amp;quot; $response&lt;br /&gt;
&lt;br /&gt;
 // As a string list&lt;br /&gt;
 $list = {core 1|char 1|room 1|comm 1}&lt;br /&gt;
 #SENDGMCP &amp;quot;core.supports.set&amp;quot; $list&lt;br /&gt;
&lt;br /&gt;
 // With no data&lt;br /&gt;
 #SENDGMCP &amp;quot;char.status&amp;quot; &amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=File:Gmcp-cmud-trigger.jpg&amp;diff=751</id>
		<title>File:Gmcp-cmud-trigger.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=File:Gmcp-cmud-trigger.jpg&amp;diff=751"/>
		<updated>2021-01-06T14:53:39Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Screenshot for setting up a GMCP trigger in CMUD&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot for setting up a GMCP trigger in CMUD&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=File:Gmcp-cmud-open-prefs.jpg&amp;diff=750</id>
		<title>File:Gmcp-cmud-open-prefs.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=File:Gmcp-cmud-open-prefs.jpg&amp;diff=750"/>
		<updated>2021-01-06T14:53:01Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Screenshot for opening preferences in CMUD&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot for opening preferences in CMUD&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=File:Gmcp-cmud-enable.jpg&amp;diff=749</id>
		<title>File:Gmcp-cmud-enable.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=File:Gmcp-cmud-enable.jpg&amp;diff=749"/>
		<updated>2021-01-06T14:52:23Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Screenshot for enabling GMCP in CMUD&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot for enabling GMCP in CMUD&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP_TinTin%2B%2B_Tutorial&amp;diff=748</id>
		<title>GMCP TinTin++ Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP_TinTin%2B%2B_Tutorial&amp;diff=748"/>
		<updated>2021-01-06T14:28:17Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Added TinTin++ GMCP tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling GMCP ==&lt;br /&gt;
In order to enable GMCP, you need to send a message to the MUD to let it know that the client supports it.&lt;br /&gt;
This is done by sending an &amp;lt;code&amp;gt;IAC DO GMCP&amp;lt;/code&amp;gt; message when the MUD sends &amp;lt;code&amp;gt;IAC WILL GMCP&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In TinTin++, this is done via the following script:&lt;br /&gt;
 #EVENT {IAC WILL GMCP}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {\xFF\xFD\xC9};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Alternatively, it can be useful to store the hex codes as variables:&lt;br /&gt;
 #VAR telnet[iac] \xFF;&lt;br /&gt;
 #VAR telnet[do] \xFD;&lt;br /&gt;
 #VAR telnet[sb] \xFA;&lt;br /&gt;
 #VAR telnet[se] \xF0;&lt;br /&gt;
 #VAR telnet[gmcp] \xC9;&lt;br /&gt;
&lt;br /&gt;
 #EVENT {IAC WILL GMCP}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$gmcp[iac]$telnet[do]$telnet[gmcp]};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The other scripts in this tutorial will use those variables. Note that anywhere these variables are used, you can replace them with the hex code instead.&lt;br /&gt;
&lt;br /&gt;
== Receiving a GMCP message ==&lt;br /&gt;
Once GMCP is enabled, the MUD will begin broadcasting GMCP messages. To receive these messages, you must subscribe to GMCP events. This must be done for each package you want to receive messages for.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to receive the &amp;lt;code&amp;gt;room.info&amp;lt;/code&amp;gt; messages, you would use the following script:&lt;br /&gt;
 #EVENT {IAC SB GMCP room.info IAC SE}&lt;br /&gt;
 {&lt;br /&gt;
     #VAR roominfo {%0};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;%0&amp;lt;/code&amp;gt; parameter contains the data sent by the MUD. For convenience, it is recommended that you save this data in a &amp;lt;code&amp;gt;#VARIABLE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;#LOCAL&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Sending a GMCP message ==&lt;br /&gt;
The MUD will not broadcast every message that is available. Some messages must be manually requested. Additionally, some broadcasted messages can also be requested if you need to refresh the data before the MUD would broadcast again.&lt;br /&gt;
&lt;br /&gt;
The following script can be used to send a request to the MUD:&lt;br /&gt;
 #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]&amp;lt;package_name&amp;gt; &amp;lt;message_data&amp;gt;$telnet[iac]$telnet[se]};&lt;br /&gt;
&lt;br /&gt;
It may be easier to create an alias to make this task easier. Aliases can later be used from the input line as well as from other scripts.&lt;br /&gt;
 #ALIAS {gmcp %1 %*}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]%1 %2$telnet[iac]$telnet[se];};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Usage: &amp;lt;code&amp;gt;gmcp room.info {}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following alias might also be useful if the package does not need any parameters provided:&lt;br /&gt;
 #ALIAS {gmcp %1}&lt;br /&gt;
 {&lt;br /&gt;
     #SEND {$telnet[iac]$telnet[sb]$telnet[gmcp]%1$telnet[iac]$telnet[se];};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Usage: &amp;lt;code&amp;gt;gmcp room.info&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
	<entry>
		<id>https://www.legendmud.org/index.php?title=GMCP&amp;diff=747</id>
		<title>GMCP</title>
		<link rel="alternate" type="text/html" href="https://www.legendmud.org/index.php?title=GMCP&amp;diff=747"/>
		<updated>2021-01-06T14:00:51Z</updated>

		<summary type="html">&lt;p&gt;Stolve: Added basic GMCP summary&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is GMCP? ==&lt;br /&gt;
LegendMUD supports the Generic Mud Communication Protocol, or GMCP, to pass easily parsable information to your mudclient. GMCP gives clients and servers the ability to send messages that are invisible to the player. This allows for easy access to certain data from within scripts without the use of cumbersome or unreliable triggers.&lt;br /&gt;
&lt;br /&gt;
While GMCP provides a quality of life improvement for players writing scripts, it will not provide players with any distinct advantage. Any information provided through GMCP will have the same precision and visibility as through the normal interface.&lt;br /&gt;
&lt;br /&gt;
== Which Clients Support GMCP? ==&lt;br /&gt;
At the moment of writing, the following clients support GMCP:&lt;br /&gt;
* CMUD v3.22 and higher&lt;br /&gt;
* Mudlet v2.0 and higher&lt;br /&gt;
* TinTin++ v2.00.3 and higher&lt;br /&gt;
* Mushclient v4.59 and higher&lt;br /&gt;
* Tinyfugue - when compiled with --enable-gmcp flag&lt;br /&gt;
&lt;br /&gt;
There may be other clients that support GMCP.&lt;br /&gt;
&lt;br /&gt;
== How do I use GMCP? ==&lt;br /&gt;
The clients only provide the ability to ''use'' GMCP messaging. It is up to the player, however, to add triggers and other scripts to consume and request the information.&lt;br /&gt;
&lt;br /&gt;
GMCP messages are formed of a package name and an optional JSON payload separated by a space.&lt;br /&gt;
Normally, the mud client will handle the parsing and will provide the information in its native format to the scripts.&lt;br /&gt;
For exact details, you will need to look into the documentation of your mud client.&lt;br /&gt;
&lt;br /&gt;
The following tutorials have been written for popular MUD clients:&lt;br /&gt;
* [[GMCP CMUD Tutorial]]&lt;br /&gt;
* [[GMCP Mudlet Tutorial]]&lt;br /&gt;
* [[GMCP TinTin++ Tutorial]]&lt;br /&gt;
&lt;br /&gt;
These tutorials give examples specific to LegendMUD, if you are using a client that is not listed here, it might still be beneficial to view one or more of these tutorials to gain an understanding of how Legend sends GMCP messages.&lt;/div&gt;</summary>
		<author><name>Stolve</name></author>
	</entry>
</feed>