Displaying messagesThere are several keywords that allow you to display messages in various ways. These messages can be displayed over particular objects (MSG or SAY keywords), they can be sent to individual players (SENDMSG keyword), or they can be broadcast to the entire shard (BCAST keyword).
Using the MSG keyword to display messages over objectsThe MSG keyword can be used to display messages over mobs or items when they are spawned.
The syntax is
MSG[,probability][,hue]/textthe ASCIIMSG keyword is like MSG but uses ascii instead of unicode and supports an optional hue and font argument.
ASCIIMSG[,probability][,hue][,font]/textSo, for example, to spawn a lich that occasionally taunted you, you could use the spawn entry
lich/MSG,.5/All hope is lost/MSG,0.2/you feeble mortal/MSG/hahahahaato give you random combinations of messages such as "All hope is lost hahahahaa", or "feeble mortal hahahaha", or just "hahahahaa".
Or the spawn entry
ham/MSG/a tasty morselwould place the message "a tasty morsel" above the ham when it was spawned.
Note, that because the switch/lever objects also use the same syntax for specifying properties on target items, you can use this keyword in conjunction with those items.
So, for example, you could have a lever that opened a door, and also displayed a message over the door indicating it had opened using the target item property string "/locked/false/MSG/the door magically opens".
You can also use the MSG keyword together with the SET series of keywords such as SETONTRIGMOB, to display messages over specific target objects.
For example, to display a message over the head of a player that triggered a spawner you could use a spawn entry like
SETONTRIGMOB/MSG/You have set off the trap!To display a message over an object that was already spawned you could use a spawn entry like
SETONSPAWN,1/MSG/Now I'm really angry...that would display the message over all of the existing spawns in subgroup 1 of the spawner.
To display a message over a specific named item, you could use something like
SET,Mystic Sword,longsword/MSG/The sword begins to glow....that would display the message over the longsword named "Mystic Sword"
or
SETONMOB,Mr Friendly,Balron/MSG/Ah, lunch is served...that would display the message over the balron named "Mr Friendly"
Using the SAY keyword to display messages over creaturesThe SAY keyword is very similar to the MSG keyword and can be used to display messages over mobs when they are spawned.
The syntax is
SAY[,probability]/textThe difference between the MSG and SAY keywords is that MSG displays ascii, while SAY displays unicode.
Using the SENDMSG keywordThe SENDMSG keyword sends a message to the triggering mob.
The syntax is
SENDASCIIMSG[,hue][,font]/textThis keyword can be used as a standalone keyword (it can be the first and only thing in a spawn entry)
the SENDASCIIMSG keyword that is like SENDMSG but uses ascii instead of unicode and supports an optional hue and font argument.
SENDASCIIMSG[,hue][,font]/textThe image below shows the msgspawner.xml example included in xmlextras.
Using the BCAST keywordthe BCAST keyword sends shardwide messages to all players. The syntax is
BCAST/messageThis keyword can be used as a standalone keyword (it can be the first and only thing in a spawn entry)