RunUO/Scripts/Regions/TownRegion.cs

29 lines
761 B
C#

using System;
using System.Xml;
using Server;
namespace Server.Regions
{
public class TownRegion : GuardedRegion
{
public TownRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent )
{
}
public override void OnEnter( Mobile m )
{
base.OnEnter( m );
if (m != null && m.Player )
{
m.SendMessage( "You have entered <BASEFONT COLOR='#3BB143'>{0}</BASEFONT>", this.Name );
}
}
public override void OnExit( Mobile m )
{
if (m != null && m.Player )
{
m.SendMessage( "You have left <BASEFONT COLOR='#3BB143'>{0}</BASEFONT>", this.Name );
}
}
}
}