/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\items\misc\mysteriousorb.cs
Lines of code: 81
***********************************************************/


using System;
using Server;
using Server.Spells;
using Server.Items;
using Server.Network;
using Server.Misc;
using Server.Mobiles;
using Server.Prompts;


namespace Server.Items
{
	public class mysteriousorb : Item
	{
		private string m_answer;
		private bool m_solved=false;


		[CommandProperty( AccessLevel.GameMaster )] 
		public string answer
		{
			get { return m_answer; }
			set 
			{ 
				m_answer = value;Modify();
				
			}
		}
		
		[CommandProperty( AccessLevel.GameMaster )] 
		public bool solved
		{
			get { return m_solved; }
			set 
			{ 
				m_solved = value;Modify();
				
			}
		}
		
		
		public override string DefaultName
		{
			get { return "a Mysterious Orb"; }
		}


		[Constructable]
		public mysteriousorb() :  base(3631)
		{
		Hue=1287;
		}



		
		public override void OnDoubleClick( Mobile from )
		{
			if(solved)
			{
			from.SendMessage("The orb has already been solved!");
			return;
			}
		
		
		
		from.SendMessage("......../... ./..__......./.__.. .._..__\t\n. . . . . . . ./_.... . .../.... ..../........\t\n..../. ......./..__../.__...____\t\nSecond in Aqua, but reverse.\nJust like each word except the last\ncharacter.\nJust like end without the fifth.\n........?:");

		from.Prompt = new orbprompt();
		}
		

		private class orbprompt : Prompt
		{
			private PlayerVendor m_Vendor;

			public orbprompt()
			{
				//m_Vendor = vendor;
			}

			public override void OnResponse( Mobile from, string text )
			{

			/*	if(text==m_answer)
				{
				from.SendMessage("You solved the orb!");
				solved=true;
				}
				else*/	from.SendMessage("....");		
			
			}
			
	/*		public override void OnCancel( Mobile from )
			{
				if ( !m_Vendor.CanInteractWith( from, true ) )
					return;

			}*/

		}
		
		
		




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

		public override void Serialize( GenericWriter writer )
		{
					base.Serialize( writer );
					writer.Write( (int) 0 ); // version
					writer.Write( m_solved);
					writer.Write(m_answer);
		}

		public override void Deserialize( GenericReader reader )
		{
							base.Deserialize( reader );
							int version = reader.ReadInt();
							
		m_solved = reader.ReadBool();
		m_answer = reader.ReadString();
		}
	}
}
