/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\quests\kill quests\Tokuno Quest\Part 2 Alchemy Woes\AlchemyWoesKillQuest.cs
Lines of code: 69
***********************************************************/


using System;
using Server;
using Server.Mobiles;
using Server.Items;

namespace Server.Engines.Quests.AlchemyWoesKillQuest
{

	public class AlchemyWoesKillQuest : QuestSystem
	{
		private static Type[] m_TypeReferenceTable = new Type[]
			{
				typeof( DontOfferConversation ),
				typeof( AcceptConversation ),
				typeof( EndConversation )				
			};

		public override Type[] TypeReferenceTable{ get{ return m_TypeReferenceTable; } }		
		
		private static RequiredItem[] m_RequiredItems = new RequiredItem[]
		{
			new RequiredItem(typeof(DesertHerb),1)
		};
		
		public override RequiredItem[] RequiredItems { get{return m_RequiredItems;}	}		
		
		public override string RequiredItemsMessage{get{return "I need a desert herb. If you find one, please bring it to me";}}
		
		public override object Name
		{
			get
			{
				return "Alchemy Woes";
			}
		}

		public override object OfferMessage
		{
			get
			{
				return "Oh! I see you have a desert herb. It's just what I've been looking for! Perhaps you can help me out with something else, being so kind as to bring me a desert herb. I need to get back to my house which resides passed the Hotaka Plains. Unfortunately, a bunch of elite ninjas have been roaming the plains lately and last time I got attacked. Can you go to the plains and kill them off? If you don't kill them off, I'll have to wait for a friend to escort me. I can pay you for your services. Will you help me? ";
			}
		}

		public override TimeSpan RestartDelay{ get{ return TimeSpan.Zero; } }
		public override bool IsTutorial{ get{ return false; } }

		public override int Picture{ get{ return 0x15CA; } }

		public AlchemyWoesKillQuest( PlayerMobile from,Mobile questgiver) : base( from )
		{
		}
		
		// Serialization
		public AlchemyWoesKillQuest()
		{
		}

		public override void ChildDeserialize( GenericReader reader )
		{
			int version = reader.ReadEncodedInt();
		}

		public override void ChildSerialize( GenericWriter writer )
		{
			writer.WriteEncodedInt( (int) 0 ); // version
		}

		public override void Accept()
		{
			base.Accept();
			
			//from.SendMessage("Can access.");

			AddConversation( new AcceptConversation() );
		}

		public static void GiveRewardTo( PlayerMobile from)
		{
			AlchemyWoesKillQuest qs = from.Quest as AlchemyWoesKillQuest;
			
			Item reward = new SmallBagOfTreasure();
			Item continuationtoken = new JurosWhip();

			from.SendMessage("Thanks again for your help!");
			from.PlaceInBackpack( reward );
			from.PlaceInBackpack( continuationtoken );
			
			qs.Complete();			
		}
	}	
}