/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Jan-02-2010 02:32:38pm
Filepath: scripts\_custom\items\misc\testserveronly\staffdeed.cs
Lines of code: 48
***********************************************************/


using System;
using Server.Items;

namespace Server.Items
{
	public class staffdeed : Item
	{
	
		public override string DefaultName
		{
			get { return "Staff Deed"; }
		}

		[Constructable]
		public staffdeed() : base( 5360 )
		{
			LootType = LootType.Blessed;
			Hue = 58;
		}

		public override void OnDoubleClick( Mobile from )
		{
		
			if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack
			{
				 from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			return;
			}
			
			if(!Core.Testcenter)
			{
				from.SendMessage("This only works on test center!");
				return;
			}
			
			
		from.AccessLevel = AccessLevel.Counselor;		
		from.AddToBackpack(new gmhat());
		
		this.Delete();
		}
		

		public staffdeed( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			
			this.Delete();
		}
	}
}