View Single Post
Old 06-18-2005, 02:14 AM   #4 (permalink)
Greystar
Forum Expert
 
Greystar's Avatar
 
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
Default

Quote:
Originally Posted by Jakob
I don't want to call this "fix" as the GM: prompt might show up to be something else than a thing for us to enter commands with.

Core
Network/PacketHandlers.cs
Add the line in red to the MessageType enum:
Code:
public enum MessageType
{
	Regular = 0x00,
	System = 0x01,
	Emote = 0x02,
	Label = 0x06,
	Focus = 0x07,
	Whisper = 0x08,
	Yell = 0x09,
	Spell = 0x0A,
	Encoded = 0xC0,
	GM = 0x0F,
}
Scripts
PlayerMobile.cs

Add the lines in red to the PlayerMobile class:
Code:
public class PlayerMobile : Mobile
{
	public override void DoSpeech( string text, int[] keywords, MessageType type, int hue )
	{
		if ( type == MessageType.GM ) // If the message is of type GM
			text = String.Format( "{0}{1}", Commands.CommandPrefix, text ); // then add the prefix to it
		base.DoSpeech( text, keywords, type, hue ); // Process the same way as always
	}

BTW thanks
__________________
Quote:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Killable Guards (GS Version)
Just a Simple Staff Tool
You can leave me messages.
Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else."
Greystar is offline   Reply With Quote