View Single Post
Old 06-19-2005, 08:00 PM   #12 (permalink)
Zippy
Administrator
 
Zippy's Avatar
 
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,870
Default

Here is a code snippet like the one above that does not require you to modify the core:

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 ( (int)type == 0x0F ) // 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
	}
__________________
Zippy, Razor Creator and RunUO Core Developer
The RunUO Software Team

"Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal."
~The Cryptonomicon

Zippy is offline   Reply With Quote