View Single Post
Old 06-17-2005, 12:52 AM   #1 (permalink)
Serp
The noob formerly known as Jakob
 
Serp's Avatar
 
Join Date: Jan 2005
Posts: 316
Default Work-around to make RunUO accept commands from the GM: prompt

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
	}
Serp is offline   Reply With Quote