using System;
using Server;
using Server.Network;

namespace Server.Items
{	
	[Flipable( 0xFBD, 0xFBE )]
	public class SherryTheMouseQuotes : BaseStatuette
	{	
		public override int LabelNumber{ get{ return 1073300; } } // Library Friends - Quotes from the pen of Sherry the Mouse
		
		[Constructable]
		public SherryTheMouseQuotes() : base( 0xFBD )
		{
			LootType = LootType.Blessed;
			Weight = 5.0;			
		}

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

		public override void OnMovement( Mobile m, Point3D oldLocation )
		{
			if ( TurnedOn && IsLockedDown && (!m.Hidden || m.AccessLevel == AccessLevel.Player) && Utility.InRange( m.Location, this.Location, 2 ) && !Utility.InRange( oldLocation, this.Location, 2 ) )
			{
				PublicOverheadMessage( MessageType.Regular, 0x3B2, Utility.RandomMinMax( 1073301, 1073309 ) );
				
				if ( Utility.RandomBool() )
					Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x30A, 0x313 ) );
				else
					Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x419, 0x422 ) );
					
			}
				
			base.OnMovement( m, oldLocation );
		}

		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();
		}
	}
	
	[Flipable( 0xFBD, 0xFBE )]
	public class WyrdBeastmasterQuotes : BaseStatuette
	{	
		public override int LabelNumber{ get{ return 1073310; } } // Library Friends - Quotes from the pen of Wyrd Beastmaster
		
		[Constructable]
		public WyrdBeastmasterQuotes() : base( 0xFBD )
		{
			LootType = LootType.Blessed;
			Weight = 5.0;			
		}

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

		public override void OnMovement( Mobile m, Point3D oldLocation )
		{
			if ( TurnedOn && IsLockedDown && (!m.Hidden || m.AccessLevel == AccessLevel.Player) && Utility.InRange( m.Location, this.Location, 2 ) && !Utility.InRange( oldLocation, this.Location, 2 ) )
			{
				PublicOverheadMessage( MessageType.Regular, 0x3B2, Utility.RandomMinMax( 1073311, 1073316 ) );
				
				if ( Utility.RandomBool() )
					Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x30A, 0x313 ) );
				else
					Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x419, 0x422 ) );
					
			}
				
			base.OnMovement( m, oldLocation );
		}

		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();
		}
	}
	
	[Flipable( 0xFBD, 0xFBE )]
	public class MercenaryJustinQuotes : BaseStatuette
	{	
		public override int LabelNumber{ get{ return 1073317; } } // Library Friends - Quotes from the pen of Mercenary Justin
		
		[Constructable]
		public MercenaryJustinQuotes() : base( 0xFBD )
		{
			LootType = LootType.Blessed;
			Weight = 5.0;			
		}

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

		public override void OnMovement( Mobile m, Point3D oldLocation )
		{
			if ( TurnedOn && IsLockedDown && (!m.Hidden || m.AccessLevel == AccessLevel.Player) && Utility.InRange( m.Location, this.Location, 2 ) && !Utility.InRange( oldLocation, this.Location, 2 ) )
			{
				PublicOverheadMessage( MessageType.Regular, 0x3B2, Utility.RandomMinMax( 1073318, 1073325 ) );
				
				if ( Utility.RandomBool() )
					Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x30A, 0x313 ) );
				else
					Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x419, 0x422 ) );
					
			}
				
			base.OnMovement( m, oldLocation );
		}

		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();
		}
	}
	
	[Flipable( 0xFBD, 0xFBE )]
	public class HeigelOfMoonglowQuotes : BaseStatuette
	{	
		public override int LabelNumber{ get{ return 1073327; } } // Library Friends - Quotes from the pen of Heigel of Moonglow
		
		[Constructable]
		public HeigelOfMoonglowQuotes() : base( 0xFBD )
		{
			LootType = LootType.Blessed;
			Weight = 5.0;			
		}

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

		public override void OnMovement( Mobile m, Point3D oldLocation )
		{
			if ( TurnedOn && IsLockedDown && (!m.Hidden || m.AccessLevel == AccessLevel.Player) && Utility.InRange( m.Location, this.Location, 2 ) && !Utility.InRange( oldLocation, this.Location, 2 ) )
			{
				PublicOverheadMessage( MessageType.Regular, 0x3B2, Utility.RandomList( 1073326, 1073328, 1073329, 1073330, 1073331 ) );
				
				if ( Utility.RandomBool() )
					Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x30A, 0x313 ) );
				else
					Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x419, 0x422 ) );
					
			}
				
			base.OnMovement( m, oldLocation );
		}

		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();
		}
	}
	
	[Flipable( 0xFBD, 0xFBE )]
	public class TraderHoraceQuotes : BaseStatuette
	{	
		public override int LabelNumber{ get{ return 1073338; } } // Library Friends - Quotes from the pen of Horace, Trader
		
		[Constructable]
		public TraderHoraceQuotes() : base( 0xFBD )
		{
			LootType = LootType.Blessed;
			Weight = 5.0;			
		}

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

		public override void OnMovement( Mobile m, Point3D oldLocation )
		{
			if ( TurnedOn && IsLockedDown && (!m.Hidden || m.AccessLevel == AccessLevel.Player) && Utility.InRange( m.Location, this.Location, 2 ) && !Utility.InRange( oldLocation, this.Location, 2 ) )
			{
				PublicOverheadMessage( MessageType.Regular, 0x3B2, Utility.RandomMinMax( 1073332, 1073337 ) );
				
				if ( Utility.RandomBool() )
					Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x30A, 0x313 ) );
				else
					Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x419, 0x422 ) );
					
			}
				
			base.OnMovement( m, oldLocation );
		}

		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();
		}
	}
}