Difference between revisions of "IS MTC"

From LFS Manual
Jump to navigationJump to search
(Created page with "== Introduction == The '''MS'''g '''T'''o '''C'''onnection packet is used to send messages to a specific player, using their UCID or PLID. {| class="wiki...")
 
m
 
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
  
The '''MS'''g '''T'''o '''C'''onnection packet is used to send messages to a specific player, using their [[#UCID|UCID]] or [[#PLID|PLID]].
+
The '''M'''sg '''T'''o '''C'''onnection packet is used to send messages to a specific player, using their [[#UCID|UCID]] or [[#PLID|PLID]].
  
 
{| class="wikitable"
 
{| class="wikitable"

Latest revision as of 19:32, 9 February 2026

Introduction

The Msg To Connection packet is used to send messages to a specific player, using their UCID or PLID.

IS_MTC packet properties
Type Name Description
byte Size 8 + TEXT_SIZE (TEXT_SIZE = 4, 8, 12... 128)
byte Type ISP_MTC
byte ReqI 0
byte Sound sound effect (see Message Sounds below)
byte UCID connection's unique id (0 = host / 255 = all)
byte PLID player's unique id (if zero, use UCID)
byte Sp2
byte Sp3
char Text[TEXT_SIZE] up to 128 characters of text - last byte must be zero

Packet Details

Size

The packet has a base size of 8 bytes, and an additional 4-128 bytes for the message.

Type

The packet type from the ISP_ enumeration, always ISP_MTC.

ReqI

ReqI is always equal to zero.

Sound

The message can play a sound when displayed in LFS. It should be one of the values in the SND_ enumeration.

UCID

The unique connection ID of the message recipient. If zero, the message is sent to the host. If 255, the message is sent to every connected player.

This value is ignored if PLID is not zero.

PLID

The player ID of the message recipient. If zero, UCID is used instead.

Text

The bytes representing the message. The message is padded with zeros. The last byte is always zero.