Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
gamblejay
Beginner


Joined: 13 Jun 2015
Posts: 15

PostPosted: Fri Jun 16, 2017 3:33 am   

GMCP
 
Ive been messing around in my MUD trying to get when people speak and tells into another window and with previous help I've gotten it to work, somewhat. Still a few issues with tells but I found out that my MUD has GMCP, how would I go about utilizing that for players speech and tells? I attempted to use:

Code:
#win Speech %gmcp. comm. channel. message


Both with and without the spacing, without nothing fired and with the spacing I was able to get something back but it instead captured all kinds of info from my name to levels, vitals and even some stuff in my inventory to the window.


This is whats posted in my Mud.


Comm Broadcasts
---------------
Comm.Channel

This will send all communications by and to the player. The following
information is passed for each message:

line - The line is the name of the communication channel or verb.
name - The name or description of the sender of the message as perceived
by the player. It will give "You" for communication emitting from
the player.

body - The message that is communicated (no newline).
message - The complete message as displayed in the game (no newline).

Example: { "line" : "say",
"name" : "You",
"body" : "How are you?",
"message" : "You say: How are you?" }
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Mon Jun 19, 2017 8:22 am   
 
This is how i would process the channel data:
Code:

<trigger name="gmcpchtrig" type="GMCP" param="201" priority="4" trigontrig="false" id="4">
  <pattern>comm.channel</pattern>
#IF (%gmcp.comm.channel.chan = "message")) { ***PROCESS CHANNEL DATA HERE*** }
;;
</trigger>

You can use some variation of this. You won't know if data has really arrived unless you work off a trigger.
_________________
Sic itur ad astra.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net