Beispiel #1
0
		public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target
		{
			if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack
			{
				 from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
			else if ( (from.Followers + 3) < from.FollowersMax + 1 )
			{
				this.Delete();

				from.SendMessage( "You use the contract." );

				EvoMerc merc = new EvoMerc();

         			merc.Map = from.Map; 
         			merc.Location = from.Location; 

				merc.Controlled = true;

				merc.ControlMaster = from;

				merc.IsBonded = true;

			}
			else
			{
				from.SendMessage( "You have too many followers to hire your Mercenary." );			
			}
		}	
			public MountTarget( EvoMerc merc ) : base( 1, false, TargetFlags.None )
			{
				m_Merc = merc;
			}
		public MercLoyaltyTimer( EvoMerc owner, TimeSpan duration ) : base( duration ) 
		{ 
			Priority = TimerPriority.OneSecond;
			ed = owner;
		}
			public BreatheTimer( Mobile m, EvoMerc owner, Mobile from, TimeSpan duration ) : base( duration ) 
			{
				ed = owner;
				m_Mobile = m;
				m_From = from;
				Priority = TimerPriority.TwoFiftyMS;
			}
Beispiel #5
0
		public ChangeHairstylGump(Mobile from, EvoMerc vendor, int price, Layer layer, ChangeHairstyleEnt[] entries)
			: base(50, 50)
		{
			m_From = from;
			m_Vendor = vendor;
			m_Price = price;
			m_Layer = layer;
			m_Entries = entries;

			from.CloseGump(typeof(EvoMercBuyGump));
			from.CloseGump(typeof(ChangeHairHuGump));
			from.CloseGump(typeof(ChangeHairstylGump));

			const int offsetWidth = 123;

			int tableWidth = layer == Layer.Hair ? 3 : 2;
			int tableHeight = (entries.Length + tableWidth - (layer == Layer.Hair ? 2 : 1)) / tableWidth;
			int offsetHeight = layer == Layer.Hair ? 65 : 70;

			AddPage(0);

			AddBackground(0, 0, 81 + (tableWidth * offsetWidth), 105 + (tableHeight * offsetHeight), 2600);

			AddButton(45, 45 + (tableHeight * offsetHeight), 4005, 4007, 1, GumpButtonType.Reply, 0);
			AddHtmlLocalized(77, 45 + (tableHeight * offsetHeight), 90, 35, 1006044, false, false); // Ok

			AddButton(
				81 + (tableWidth * offsetWidth) - 180, 45 + (tableHeight * offsetHeight), 4005, 4007, 0, GumpButtonType.Reply, 0);
			AddHtmlLocalized(
				81 + (tableWidth * offsetWidth) - 148, 45 + (tableHeight * offsetHeight), 90, 35, 1006045, false, false); // Cancel

			if (layer == Layer.Hair)
			{
				AddHtmlLocalized(50, 15, 350, 20, 1018353, false, false); // <center>New Hairstyle</center>
			}
			else
			{
				AddHtmlLocalized(55, 15, 200, 20, 1018354, false, false); // <center>New Beard</center>
			}

			for (int i = 0; i < entries.Length; ++i)
			{
				int xTable = i % tableWidth;
				int yTable = i / tableWidth;

				if (entries[i].GumpID != 0)
				{
					AddRadio(40 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 208, 209, false, i);
					AddBackground(87 + (xTable * offsetWidth), 50 + (yTable * offsetHeight), 50, 50, 2620);
					AddImage(
						87 + (xTable * offsetWidth) + entries[i].X, 50 + (yTable * offsetHeight) + entries[i].Y, entries[i].GumpID);
				}
				else if (layer == Layer.Hair)
				{
					AddRadio(40 + ((xTable + 1) * offsetWidth), 240, 208, 209, false, i);
					AddHtmlLocalized(60 + ((xTable + 1) * offsetWidth), 240, 85, 35, 1011064, false, false); // Bald
				}
				else
				{
					AddRadio(40 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 208, 209, false, i);
					AddHtmlLocalized(60 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 85, 35, 1011064, false, false); // Bald
				}
			}
		}
Beispiel #6
0
		public ChangeHairHuGump(Mobile from, EvoMerc vendor, int price, Layer[] layers, ChangeHairHueEnt[] entries)
			: base(50, 50)
		{
			m_From = from;
			m_Vendor = vendor;
			m_Price = price;
			m_Layers = layers;
			m_Entries = entries;

			from.CloseGump(typeof(EvoMercBuyGump));
			from.CloseGump(typeof(ChangeHairHuGump));
			from.CloseGump(typeof(ChangeHairstylGump));

			AddPage(0);

			AddBackground(100, 10, 350, 370, 2600);
			AddBackground(120, 54, 110, 270, 5100);

			AddHtmlLocalized(155, 25, 240, 30, 1011013, false, false); // <center>Hair Color Selection Menu</center>

			AddHtmlLocalized(150, 330, 220, 35, 1011014, false, false); // Dye my hair this color!
			AddButton(380, 330, 4005, 4007, 1, GumpButtonType.Reply, 0);

			for (int i = 0; i < entries.Length; ++i)
			{
				ChangeHairHueEnt entry = entries[i];

				AddLabel(130, 59 + (i * 22), entry.Hues[0] - 1, entry.Name);
				AddButton(207, 60 + (i * 22), 5224, 5224, 0, GumpButtonType.Page, 1 + i);
			}

			for (int i = 0; i < entries.Length; ++i)
			{
				ChangeHairHueEnt entry = entries[i];
				int[] hues = entry.Hues;
				string name = entry.Name;

				AddPage(1 + i);

				for (int j = 0; j < hues.Length; ++j)
				{
					AddLabel(278 + ((j / 16) * 80), 52 + ((j % 16) * 17), hues[j] - 1, name);
					AddRadio(260 + ((j / 16) * 80), 52 + ((j % 16) * 17), 210, 211, false, (j * entries.Length) + i);
				}
			}
		}
Beispiel #7
0
		public EvoMercBuyGump(Mobile from, EvoMerc vendor, EvoMercBuyInfo[] sellList)
			: base(50, 50)
		{
			m_From = from;
			m_Vendor = vendor;
			m_SellList = sellList;

			from.CloseGump(typeof(EvoMercBuyGump));
			from.CloseGump(typeof(ChangeHairHuGump));
			from.CloseGump(typeof(ChangeHairstylGump));

			bool isFemale = m_Vendor.Body.IsFemale;

			int balance = Banker.GetBalance(from, m_Vendor.TypeOfCurrency);
			int canAfford = sellList.Count(t => balance >= t.Price && (t.Layer != Layer.FacialHair || !isFemale));

			AddPage(0);

			AddBackground(50, 10, 450, 100 + (canAfford * 25), 2600);

			AddHtmlLocalized(100, 40, 350, 20, 1018356, false, false); // Choose your hairstyle change:

			int index = 0;

			for (int i = 0; i < sellList.Length; ++i)
			{
				if (balance < sellList[i].Price || (sellList[i].Layer == Layer.FacialHair && isFemale))
				{
					continue;
				}

				if (sellList[i].TitleString != null)
				{
					AddHtml(140, 75 + (index * 25), 300, 20, sellList[i].TitleString, false, false);
				}
				else
				{
					AddHtmlLocalized(140, 75 + (index * 25), 300, 20, sellList[i].Title, false, false);
				}

				AddButton(100, 75 + (index++ * 25), 4005, 4007, 1 + i, GumpButtonType.Reply, 0);
			}
		}