/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: http://www.uovalor.com
Last modified by Death on Jan-25-2011 08:34:26pm
Filepath: scripts\_custom\events and scenarios\Slime Event 2011\Quest Giver\LydiaTheSlimeResearcherGump.cs
Lines of code: 155
***********************************************************/


using System;
using Server;
using Server.ContextMenus;
using Server.Accounting;
using Server.Gumps;
using Server.Items;
using Server.Menus;
using Server.Menus.Questions;
using Server.Mobiles;
using Server.Network;
using Server.Prompts;
using Server.Regions;
using Server.Misc;
using System.Collections;

namespace Server.Gumps
{
	public class LydiaTheSlimeResearcherQuestGump : Gump
	{
		public LydiaTheSlimeResearcherQuestGump( Mobile m): base( 0, 0 )
		{
			this.Closable=false;
			this.Disposable=true;
			this.Dragable=true;
			this.Resizable=false;
			this.AddPage(0);
			this.AddBackground(126, 131, 398, 389, 9270);
			this.AddAlphaRegion(130, 132, 391, 389);
			this.AddImage(110, 460, 10464);
			this.AddImage(536, 214, 9265);
			this.AddImage(507, 460, 10464);
			this.AddImage(507, 408, 10464);
			this.AddImage(110, 193, 10464);
			this.AddImage(110, 247, 10464);
			this.AddImage(110, 301, 10464);
			this.AddImage(110, 354, 10464);
			this.AddImage(110, 408, 10464);
			this.AddImage(110, 139, 10464);
			this.AddImage(93, 197, 9263);
			this.AddImage(59, 124, 10421);
			this.AddImage(88, 110, 10420);
			this.AddImage(107, 246, 10411);
			this.AddImage(43, 399, 10402);
			this.AddImage(93, 513, 10103);
			this.AddImage(109, 513, 10100);
			this.AddImage(234, 513, 10100);
			this.AddImage(218, 513, 10100);
			this.AddImage(202, 513, 10100);
			this.AddImage(124, 513, 10100);
			this.AddImage(172, 513, 10100);
			this.AddImage(156, 513, 10100);
			this.AddImage(140, 513, 10100);
			this.AddImage(188, 513, 10100);
			this.AddImage(234, 513, 10100);
			this.AddImage(234, 513, 10100);
			this.AddImage(249, 513, 10100);
			this.AddImage(264, 513, 10100);
			this.AddImage(218, 513, 10100);
			this.AddImage(308, 513, 10100);
			this.AddImage(172, 513, 10100);
			this.AddImage(292, 513, 10100);
			this.AddImage(188, 513, 10100);
			this.AddImage(277, 513, 10100);
			this.AddImage(339, 513, 10100);
			this.AddImage(324, 513, 10100);
			this.AddImage(415, 513, 10100);
			this.AddImage(399, 513, 10100);
			this.AddImage(354, 513, 10100);
			this.AddImage(368, 123, 10100);
			this.AddImage(385, 513, 10100);
			this.AddImage(445, 513, 10100);
			this.AddImage(430, 513, 10100);
			this.AddImage(521, 513, 10100);
			this.AddImage(505, 513, 10100);
			this.AddImage(460, 513, 10100);
			this.AddImage(476, 513, 10100);
			this.AddImage(491, 513, 10100);
			this.AddImage(156, 123, 10100);
			this.AddImage(140, 123, 10100);
			this.AddImage(232, 123, 10100);
			this.AddImage(216, 123, 10100);
			this.AddImage(171, 123, 10100);
			this.AddImage(187, 123, 10100);
			this.AddImage(202, 123, 10100);
			this.AddImage(339, 513, 10100);
			this.AddImage(324, 513, 10100);
			this.AddImage(415, 513, 10100);
			this.AddImage(399, 513, 10100);
			this.AddImage(353, 123, 10100);
			this.AddImage(369, 513, 10100);
			this.AddImage(385, 513, 10100);
			this.AddImage(263, 123, 10100);
			this.AddImage(248, 123, 10100);
			this.AddImage(339, 123, 10100);
			this.AddImage(323, 123, 10100);
			this.AddImage(278, 123, 10100);
			this.AddImage(294, 123, 10100);
			this.AddImage(309, 123, 10100);
			this.AddImage(398, 123, 10100);
			this.AddImage(383, 123, 10100);
			this.AddImage(474, 123, 10100);
			this.AddImage(458, 123, 10100);
			this.AddImage(413, 123, 10100);
			this.AddImage(429, 123, 10100);
			this.AddImage(444, 123, 10100);
			this.AddImage(505, 123, 10100);
			this.AddImage(489, 123, 10100);
			this.AddImage(521, 123, 10100);
			this.AddImage(507, 193, 10464);
			this.AddImage(507, 139, 10464);
			this.AddImage(507, 354, 10464);
			this.AddImage(507, 299, 10464);
			this.AddImage(507, 247, 10464);
			this.AddImage(523, 254, 10411);
			this.AddImage(532, 130, 10431);
			this.AddImage(500, 112, 10430);
			this.AddImage(535, 513, 10105);
			this.AddImage(520, 417, 10412);
			this.AddLabel(250, 151, 1153, @"A Fine Time for Slime"); //282
			this.AddButton(226, 469, 247, 248, 0, GumpButtonType.Reply, 0);
			this.AddButton(351, 469, 241, 242,  1, GumpButtonType.Reply, 0);
			this.AddHtml( 157, 181, 345, 279, "Oh, I beg your pardon! I am Lydia, researcher of all things slimy. I am searching for samples from the acidic family of slimes - such an amazing species! They are very fascinating to me, as they contain a pigmented blood. Unfortunately, I have not been able to collect many samples as I am wrapped up with research.<br><br>Could you collect some samples and deliver them back to me? You can use this basin - it can hold the slime safely. You will need to kill the slime, much to my dismay, as it is the only way to extract pigment. You could do enough damage to penetrate the membrane, exposing the slime's pigmented blood but damaging the membrane long enough to gather the blood is difficult as they can regenerate their wounds quickly.<br><br>Be that as it may, it is very important to research this species and I would be very grateful if you could provide me with a filled basin. I have recently discovered how to turn the pigmented blood into dye so if you help me out, I can give you some dye as a reward.<br><br>A pretty good deal, I say! Will you help me out?", false, true);
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{
			Mobile from = state.Mobile;

			switch( info.ButtonID )
			{
				case 0:
				{
					Item am = new EmptySlimeBasin();						
					Container pack = from.Backpack;

					Item basin = from.Backpack.FindItemByType(typeof(EmptySlimeBasin));
					
					if (basin != null)
					{
						from.SendMessage("One basin should be enough to gather the slime. Come back once you've filled it");	
					}
					else if ( pack == null || !pack.TryDropItem( from, am, false ) ) {
						from.SendMessage("There is no room in your pack! Clean it out so I can hand you this basin!");						
					}
					else {
						from.SendMessage("Great! Fill this basin up once you kill an acid slime, then report back to me." );
					}
					
					from.CloseGump( typeof( LydiaTheSlimeResearcherQuestGump ) );
					break;
				}
				case 1:
				{
					from.SendMessage( "That's okay. I can do it myself when I get a chance to venture away from all this researching!" );
					from.CloseGump( typeof( LydiaTheSlimeResearcherQuestGump ) );
					break;
				}
			}
		}
	}
}