@tabstop 8
 
PROTOCOL MESSAGES
-------------------------------------------------------------------------------
DCM4		"INSP"		Inspect Player

Sent to users when you target them.
Expect TRAIT and STATUS messages as response. If nothing is received, then
your data is up to date, or they don't have DiceMaster4 installed.

Data:
	ts	Trait serial numbers.
		Table of the serial numbers you have saved for someone.
		If one isn't present, or if the table isn't present, traits
		will not be requested.
		e.g. ts[3] = xyz means that you're requesting trait 3 with
		your old serial xyz. Pass 0 if you don't have a serial yet.
		If any of these mismatch the serials on the receiving side, 
		then they respond with that corresponding trait data.
	ss	Status serial number.

-------------------------------------------------------------------------------
DCM4		"TRAIT"		Trait Data

Sent over channels when sending a link to a private channel.
Sent over whisper when requested by INSPECT, if the trait serial 
received is out of date.

If this message is received while viewing a tooltip of a trait or viewing a
chat link, the tooltip text should be updated.

Data:	
	i	int	Index of this trait.
	s	int	Serial number for this trait.
	n	string	Trait name.
	u	string	Trait usage.
	d	string	Trait description.
	e	string	Trait enchantment.
	t	string	Trait icon texture.

-------------------------------------------------------------------------------
DCM4		"STATUS"	Status Data

Sent as a response to INSPECT, if the trait serial received is out of date.
Also sent to raid/party when your health/charges are changed.

Data:
	s	int	Serial. (statusSerial)
	h	int	Health.
	hm	int	Health max.
	c	int	Charges.
	cm	int	Charges max.
	cn	string	Charges name.
	cc	string	Charges color. (RRGGBB)

-------------------------------------------------------------------------------
DCM4		"R"/"ROLL"	Roll Data

This message is sent when a user makes a roll. 

The general protocol for this message is:
	Create and send a ROLL message.
	Issue /roll commands that match the message's parameter.
	Clients buffer /roll commands and apply them to ROLL messages.
	If a /roll message takes too long to be associated with a ROLL message,
	  the operation times out and its treated as if the source doesn't have
	  Dice Master. The roll is printed normally.
	If the person is using /roll directly, a ROLL message should also
	  be generated for it.
	To keep things robust, the system should also have timeouts when
	  matching the roll messages together, so in the event that there's
	  some sort of network issue, it will automatically fix itself.
 
Data:
	c	int	Number of dice that are being rolled. (nil=1)
	a	int	Lower range. (nil=1)
	b	int	Higher range. (nil=100)
	m	int	Signed modifier. (nil=0)
	v	bool	Vanilla: this roll was done directly with 
	                  the /roll command.
			  