public RewardConfirmGump( Mobile from, RewardEntry entry )
            : base(0, 0)
        {
            m_From = from;
            m_Entry = entry;

            from.CloseGump( typeof( RewardConfirmGump ) );

            AddPage( 0 );

            AddBackground( 10, 10, 500, 300, 2600 );

            AddHtmlLocalized( 30, 55, 300, 35, 1006000, false, false ); // You have selected:

            if ( entry.NameString != null )
                AddHtml( 335, 55, 150, 35, entry.NameString, false, false );
            else
                AddHtmlLocalized( 335, 55, 150, 35, entry.Name, false, false );

            AddHtmlLocalized( 30, 95, 300, 35, 1006001, false, false ); // This will be assigned to this character:
            AddLabel( 335, 95, 0, from.Name );

            AddHtmlLocalized( 35, 160, 450, 90, 1006002, true, true ); // Are you sure you wish to select this reward for this character?  You will not be able to transfer this reward to another character on another shard.  Click 'ok' below to confirm your selection or 'cancel' to go back to the selection screen.

            AddButton( 60, 265, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 95, 266, 150, 35, 1006044, false, false ); // Ok

            AddButton( 295, 265, 4017, 4019, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 330, 266, 150, 35, 1006045, false, false ); // Cancel
        }
		public override void OnDoubleClick( Mobile from )
		{	
			if ( from.InRange( GetWorldLocation(), 2 ) )
			{
				if ( BlueMageControl.IsBlueMage( from ) )
				{
					if ( from.HasGump( typeof( BlueQuitGump ) ) )
						from.CloseGump( typeof( BlueQuitGump ) );

					from.SendGump( new BlueQuitGump( from ) );
				}
				else
				{
					if ( from.AccessLevel == AccessLevel.Player )
						from.SendMessage( "Please speak to Ben in New Haven" );
					else
					{
						if ( from.HasGump( typeof( BlueAcceptGump ) ) )
							from.CloseGump( typeof( BlueAcceptGump ) );
						
						from.SendGump( new BlueAcceptGump( from ) );
					}
				}
			}

		}
Example #3
0
        public static void Close( Mobile m, bool closeAll )
        {
            m.CloseGump( typeof( ChatGumpDisplay ) );

            if( closeAll )
                m.CloseGump( typeof( ChatGumpEntry ) );
        }
        public HousePlacementCategoryGump( Mobile from )
            : base(50, 50)
        {
            m_From = from;

            from.CloseGump( typeof( HousePlacementCategoryGump ) );
            from.CloseGump( typeof( HousePlacementListGump ) );

            AddPage( 0 );

            AddBackground( 0, 0, 270, 145, 5054 );

            AddImageTiled( 10, 10, 250, 125, 2624 );
            AddAlphaRegion( 10, 10, 250, 125 );

            AddHtmlLocalized( 10, 10, 250, 20, 1060239, LabelColor, false, false ); // <CENTER>HOUSE PLACEMENT TOOL</CENTER>

            AddButton( 10, 110, 4017, 4019, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 45, 110, 150, 20, 3000363, LabelColor, false, false ); // Close

            AddButton( 10, 40, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 45, 40, 200, 20, 1060390, LabelColor, false, false ); // Classic Houses

            AddButton( 10, 60, 4005, 4007, 2, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 45, 60, 200, 20, 1060391, LabelColor, false, false ); // 2-Story Customizable Houses

            AddButton( 10, 80, 4005, 4007, 3, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 45, 80, 200, 20, 1060392, LabelColor, false, false ); // 3-Story Customizable Houses
        }
		public HairstylistBuyGump( Mobile from, Mobile mercenary ) : base( 50, 50 )
		{
			m_From = from;
			m_Merc = mercenary;

			from.CloseGump( typeof( Xanthos.Evo.HairstylistBuyGump ) );
			from.CloseGump( typeof( ChangeHairHueGump ) );
			from.CloseGump( typeof( ChangeHairstyleGump ) );

			bool isFemale = ( m_Merc.Female || m_Merc.Body.IsFemale );

			int rows = 0;
			for ( int i = 0; i < m_SellList.Length; ++i )
			{
				if ( m_SellList[i].Layer != Layer.FacialHair || !isFemale )
					++rows;
			}

			AddPage( 0 );
			AddBackground( 50, 10, 450, 100 + (rows * 25), 2600 );
			AddHtmlLocalized( 100, 40, 350, 20, 1018356, false, false ); // Choose your hairstyle change:

			for ( int i = 0, index = 0; i < m_SellList.Length; ++i )
			{
				if ( m_SellList[i].Layer != Layer.FacialHair || !isFemale )
				{
					AddHtml( 140, 75 + (index * 25), 300, 20, m_SellList[i].TitleString, false, false );
					AddButton( 100, 75 + (index++ * 25), 4005, 4007, 1 + i, GumpButtonType.Reply, 0 );
				}
			}
		}
		//constructor
		public AddStashColumnGump( Mobile owner, StashEntry stashentry ) : base( 500, 20 )
		{
			_StashEntry = stashentry;
			
			_Owner = owner;
			
			//clear old gumps that are up
			_Owner.CloseGump( typeof( AddStashColumnGump ) );
			
			//set up the page
			AddPage(0);
            
			//determine page layout, sizes, and what gets displayed where
			DeterminePageLayout();

			//add the background			            
            AddBackground(0, 0, _Width, _Height, 9270);
            AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624);
            AddAlphaRegion(11, 10, _Width - 22, _Height - 20);
            
            AddTitle();
            
            //if there was a problem when adding the property listing
            if( !AddColumnEntries() )
            {
	            //clear old gumps that are up
				_Owner.CloseGump( typeof( AddStashColumnGump ) );
	            return;
            }
		}
		public override void OnDoubleClick( Mobile from )
		{
			Map map = from.Map;

			if ( map == null || map == Map.Internal )
				return;

			if ( from.AccessLevel >= AccessLevel.GameMaster )
			{
				from.CloseGump( typeof( HolidayTreeAddonChoiceGump ) );
				from.SendGump( new HolidayTreeAddonChoiceGump( from, this ) );
			}
			else
			{

				if ( !IsChildOf( from.Backpack ) )
					from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
				else if ( !from.InRange( this.GetWorldLocation(), 1 ) )
					from.SendLocalizedMessage( 500446 ); // That is too far away.
				else if ( DateTime.Now.Month != 12 )
					from.SendLocalizedMessage( 1005700 ); // You will have to wait till next December to put your tree back up for display.
				else
				{
					from.CloseGump( typeof( HolidayTreeAddonChoiceGump ) );
					from.SendGump( new HolidayTreeAddonChoiceGump( from, this ) );
				}
			}
		}
        public EventPrizeConfirmGump(Mobile mobile, PrizeDefinition prizeDefinition) : base(110, 100)
        {
            m_prizeDefinition = prizeDefinition;

            mobile.CloseGump(typeof(EventPrizeConfirmGump));
            mobile.CloseGump(typeof(EventPrizeGump));

            Closable = true;

            AddPage(0);

            AddBackground(0, 0, 420, 280, 5054);

            AddImageTiled(10, 10, 400, 20, 2624);
            AddAlphaRegion(10, 10, 400, 20);

            AddHtml(10, 10, 400, 20, "<BASEFONT COLOR=#FFFF00><CENTER>Event Prize Confirmation</CENTER></BASEFONT>", false, false);

            AddImageTiled(10, 40, 400, 200, 2624);
            AddAlphaRegion(10, 40, 400, 200);

            AddHtml(10, 40, 400, 200, String.Format(ms_confirmationString,m_prizeDefinition.Name, m_prizeDefinition.PriceString), false, true);

            AddImageTiled(10, 250, 400, 20, 2624);
            AddAlphaRegion(10, 250, 400, 20);

            AddButton(10, 250, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(40, 250, 170, 20, 1011036, 32767, false, false); // OKAY

            AddButton(210, 250, 4005, 4007, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(240, 250, 170, 20, 1011012, 32767, false, false); // CANCEL
        }
Example #9
0
		public RulesetGump( Mobile from, Ruleset ruleset, RulesetLayout page, DuelContext duelContext, bool readOnly ) : base( readOnly ? 310 : 50, 50 )
		{
			m_From = from;
			m_Ruleset = ruleset;
			m_Page = page;
			m_DuelContext = duelContext;
			m_ReadOnly = readOnly;

			Dragable = !readOnly;

			from.CloseGump( typeof( RulesetGump ) );
			from.CloseGump( typeof( DuelContextGump ) );
			from.CloseGump( typeof( ParticipantGump ) );

			RulesetLayout depthCounter = page;
			int depth = 0;

			while ( depthCounter != null )
			{
				++depth;
				depthCounter = depthCounter.Parent;
			}

			int count = page.Children.Length + page.Options.Length;

			AddPage( 0 );

			int height = 35 + 10 + 2 + (count * 22) + 2 + 30;

			AddBackground( 0, 0, 260, height, 9250 );
			AddBackground( 10, 10, 240, height - 20, 0xDAC );

			AddHtml( 35, 25, 190, 20, Center( page.Title ), false, false );

			int x = 35;
			int y = 47;

			for ( int i = 0; i < page.Children.Length; ++i )
			{
				AddGoldenButton( x, y, 1 + i );
				AddHtml( x + 25, y, 250, 22, page.Children[i].Title, false, false );

				y += 22;
			}

			for ( int i = 0; i < page.Options.Length; ++i )
			{
				bool enabled = ruleset.Options[page.Offset + i];

				if ( readOnly )
					AddImage( x, y, enabled ? 0xD3 : 0xD2 );
				else
					AddCheck( x, y, 0xD2, 0xD3, enabled, i );

				AddHtml( x + 25, y, 250, 22, page.Options[i], false, false );

				y += 22;
			}
		}
Example #10
0
		public static TimeSpan OnUse( Mobile m )
		{
			m.SendLocalizedMessage( 1011350 ); // What do you wish to track?

			m.CloseGump( typeof( TrackWhatGump ) );
			m.CloseGump( typeof( TrackWhoGump ) );
			m.SendGump( new TrackWhatGump( m ) );

			return TimeSpan.FromSeconds( 10.0 ); // 10 second delay before beign able to re-use a skill
		}
		public SmallMobileBODAcceptGump( Mobile from, SmallMobileBOD deed ) : base( 50, 50 )
		{
			m_From = from;
			m_Deed = deed;

			m_From.CloseGump( typeof( LargeBODAcceptGump ) );
			m_From.CloseGump( typeof( SmallMobileBODAcceptGump ) );

			AddPage( 0 );

			AddBackground( 25, 10, 430, 264, 5054 );

			AddImageTiled( 33, 20, 413, 245, 2624 );
			AddAlphaRegion( 33, 20, 413, 245 );

			AddImage( 20, 5, 10460 );
			AddImage( 430, 5, 10460 );
			AddImage( 20, 249, 10460 );
			AddImage( 430, 249, 10460 );

			AddHtmlLocalized( 190, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order
			AddHtmlLocalized( 40, 48, 350, 20, 1045135, 0x7FFF, false, false ); // Ah!  Thanks for the goods!  Would you help me out?

			AddLabel( 40, 72, 1152, @"Amount to tame:"); // Amount to make:
			AddLabel( 250, 72, 1152, deed.AmountMax.ToString() );

			AddHtmlLocalized( 40, 96, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:
			AddItem( 385, 96, deed.Graphic );

			string s = deed.AnimalName;

			int capsbreak = s.IndexOfAny("ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(),1);

			if( capsbreak > -1 )
			{
				string secondhalf = s.Substring( capsbreak );
 				string firsthalf = s.Substring(0, capsbreak );

				string newname = firsthalf + " " + secondhalf;

				AddLabel( 40, 120, 1152, newname.ToString() );
			}
			else
			{
				AddLabel( 40, 120, 1152, deed.AnimalName.ToString() );
			}

			AddHtmlLocalized( 40, 216, 350, 20, 1045139, 0x7FFF, false, false ); // Do you want to accept this order?

			AddButton( 100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 135, 240, 120, 20, 1006044, 0x7FFF, false, false ); // Ok

			AddButton( 275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 310, 240, 120, 20, 1011012, 0x7FFF, false, false ); // CANCEL
		}
		public SmallMobileBODGump( Mobile from, SmallMobileBOD deed ) : base( 25, 25 )
		{
			m_From = from;
			m_Deed = deed;

			m_From.CloseGump( typeof( LargeBODGump ) );
			m_From.CloseGump( typeof( SmallMobileBODGump ) );

			AddPage( 0 );

			AddBackground( 50, 10, 455, 260, 5054 );
			AddImageTiled( 58, 20, 438, 241, 2624 );
			AddAlphaRegion( 58, 20, 438, 241 );

			AddImage( 45, 5, 10460 );
			AddImage( 480, 5, 10460 );
			AddImage( 45, 245, 10460 );
			AddImage( 480, 245, 10460 );

			AddHtmlLocalized( 225, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order

			AddLabel( 75, 48, 0x480, @"Amount to tame:"); // Amount to make:
			AddLabel( 275, 48, 1152, deed.AmountMax.ToString() );

			AddHtmlLocalized( 275, 76, 200, 20, 1045153, 0x7FFF, false, false ); // Amount finished:
			AddHtmlLocalized( 75, 72, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:

			AddItem( 410, 72, deed.Graphic );

			string s = deed.AnimalName;

			int capsbreak = s.IndexOfAny("ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(),1);

			if( capsbreak > -1 )
			{
				string secondhalf = s.Substring( capsbreak );
 				string firsthalf = s.Substring(0, capsbreak );

				string newname = firsthalf + " " + secondhalf;

				AddLabel( 75, 96, 0x480, newname.ToString() );
			}
			else
			{
				AddLabel( 75, 96, 0x480, deed.AnimalName.ToString() );
			}
			AddLabel( 275, 96, 0x480, deed.AmountCur.ToString() );

			AddButton( 125, 192, 4005, 4007, 2, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 160, 192, 300, 20, 1045154, 0x7FFF, false, false ); // Combine this deed with the item requested.

			AddButton( 125, 216, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 160, 216, 120, 20, 1011441, 0x7FFF, false, false ); // EXIT
		}
Example #13
0
		public override void OnDoubleClick(Mobile from)
		{
			if(!IsChildOf(from.Backpack))
				from.SendLocalizedMessage(500325); // I am too far away to do that.
			else if(IsInPuzzleRoom(from))
			{
                from.CloseGump(typeof(PuzzleChest.PuzzleGump));
                from.CloseGump(typeof(PuzzleChest.StatusGump));
				from.CloseGump(typeof(MazePuzzleGump));
				from.SendGump(new MazePuzzleGump(from, this, m_Path, m_Progress));
			}
		}
        public SmallBODAcceptGump( Mobile from, SmallBOD deed )
            : base(50, 50)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump( typeof( LargeBODAcceptGump ) );
            m_From.CloseGump( typeof( SmallBODAcceptGump ) );

            AddPage( 0 );

            AddBackground(25, 10, 430, 264, 9270);

            AddImageTiled( 33, 20, 413, 245, 2624 );
            AddAlphaRegion( 33, 20, 413, 245 );

            AddImage( 20, 5, 10460 );
            AddImage( 430, 5, 10460 );
            AddImage( 20, 249, 10460 );
            AddImage( 430, 249, 10460 );

            AddHtmlLocalized( 190, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order
            AddHtmlLocalized( 40, 48, 350, 20, 1045135, 0x7FFF, false, false ); // Ah!  Thanks for the goods!  Would you help me out?

            AddHtmlLocalized( 40, 72, 210, 20, 1045138, 0x7FFF, false, false ); // Amount to make:
            AddLabel( 250, 72, 1152, deed.AmountMax.ToString() );

            AddHtmlLocalized( 40, 96, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:
            AddItem( 385, 96, deed.Graphic );
            AddHtmlLocalized( 40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false );

            if ( deed.RequireExceptional || deed.Material != BulkMaterialType.None )
            {
                AddHtmlLocalized( 40, 144, 210, 20, 1045140, 0x7FFF, false, false ); // Special requirements to meet:

                if ( deed.RequireExceptional )
                    AddHtmlLocalized( 40, 168, 350, 20, 1045141, 0x7FFF, false, false ); // All items must be exceptional.

                if ( deed.Material != BulkMaterialType.None )
                    AddHtmlLocalized( 40, deed.RequireExceptional ? 192 : 168, 350, 20, GetMaterialNumberFor( deed.Material ), 0x7FFF, false, false ); // All items must be made with x material.
            }

            AddHtmlLocalized( 40, 216, 350, 20, 1045139, 0x7FFF, false, false ); // Do you want to accept this order?

            AddButton( 100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 135, 240, 120, 20, 1006044, 0x7FFF, false, false ); // Ok

            AddButton( 275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 310, 240, 120, 20, 1011012, 0x7FFF, false, false ); // CANCEL
        }
		public override void OnDoubleClick( Mobile from )
		{
			if (!IsChildOf(from.Backpack))
			{
				from.SendLocalizedMessage(1042001);
			}
			else
			{
				from.CloseGump( typeof( dj_gump_ship1 ) );
				from.CloseGump( typeof( dj_gump_ship2 ) );
				from.CloseGump( typeof( dj_gump_ship3 ) );
				from.SendGump( new dj_gump_ship1( from ) );
			}
		}
Example #16
0
		public SmallBODGump( Mobile from, SmallBOD deed ) : base( 25, 25 )
		{
            if (from is BaseCreature) return;
            m_From = from;
			m_Deed = deed;

			m_From.CloseGump( typeof( LargeBODGump ) );
			m_From.CloseGump( typeof( SmallBODGump ) );

			AddPage( 0 );

			AddBackground( 50, 10, 455, 260, 5054 );
			AddImageTiled( 58, 20, 438, 241, 2624 );
			AddAlphaRegion( 58, 20, 438, 241 );

			AddImage( 45, 5, 10460 );
			AddImage( 480, 5, 10460 );
			AddImage( 45, 245, 10460 );
			AddImage( 480, 245, 10460 );

			AddHtmlLocalized( 225, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order

			AddHtmlLocalized( 75, 48, 250, 20, 1045138, 0x7FFF, false, false ); // Amount to make:
			AddLabel( 275, 48, 1152, deed.AmountMax.ToString() );

			AddHtmlLocalized( 275, 76, 200, 20, 1045153, 0x7FFF, false, false ); // Amount finished:
			AddHtmlLocalized( 75, 72, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:

			AddItem( 410, 72, deed.Graphic );

			AddHtmlLocalized( 75, 96, 210, 20, deed.Number, 0x7FFF, false, false );
			AddLabel( 275, 96, 0x480, deed.AmountCur.ToString() );

			if ( deed.RequireExceptional || deed.Material != BulkMaterialType.None )
				AddHtmlLocalized( 75, 120, 200, 20, 1045140, 0x7FFF, false, false ); // Special requirements to meet:

			if ( deed.RequireExceptional )
				AddHtmlLocalized( 75, 144, 300, 20, 1045141, 0x7FFF, false, false ); // All items must be exceptional.

			if ( deed.Material != BulkMaterialType.None )
				AddHtmlLocalized( 75, deed.RequireExceptional ? 168 : 144, 300, 20, GetMaterialNumberFor( deed.Material ), 0x7FFF, false, false ); // All items must be made with x material.

			AddButton( 125, 192, 4005, 4007, 2, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 160, 192, 300, 20, 1045154, 0x7FFF, false, false ); // Combine this deed with the item requested.

			AddButton( 125, 216, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 160, 216, 120, 20, 1011441, 0x7FFF, false, false ); // EXIT
		}
		public LichContractGump( Mobile from, LichContract parentMC ) : base( 0, 0 )
		{
			from.CloseGump( typeof( LichContractGump ) );
			
			this.Closable=true;
			this.Disposable=true;
			this.Dragable=true;
			this.Resizable=false;
			this.AddPage(0);
			this.AddBackground(125, 130, 300, 170, 5170);
			this.AddLabel(165, 165, 0, @"A Contract for: " + parentMC.AmountToKill + " " + parentMC.Monster);
			this.AddLabel(165, 185, 0, @"Amount Killed: " + parentMC.AmountKilled);
			this.AddLabel(165, 205, 0, @"Reward: A clue!" );
			if ( parentMC.AmountKilled != parentMC.AmountToKill )
			{
				this.AddButton(215, 235, 2061, 2062, 1, GumpButtonType.Reply, 0);
				this.AddLabel(229, 233, 0, @"Claim Corpse");
			}
			else
			{
				this.AddButton(215, 235, 2061, 2062, 2, GumpButtonType.Reply, 0);
				this.AddLabel(229, 233, 0, @"Claim Reward");
			}

			MCparent = parentMC;
		}
Example #18
0
			public ClaimListGump( AnimalTrainer trainer, Mobile from, List<BaseCreature> list ) : base( 50, 50 )
			{
				m_Trainer = trainer;
				m_From = from;
				m_List = list;

				from.CloseGump( typeof( ClaimListGump ) );

				AddPage( 0 );

				AddBackground( 0, 0, 325, 50 + (list.Count * 20), 9250 );
				AddAlphaRegion( 5, 5, 315, 40 + (list.Count * 20) );

				AddHtml( 15, 15, 275, 20, "<BASEFONT COLOR=#FFFFFF>Select a pet to retrieve from the stables:</BASEFONT>", false, false );

				for ( int i = 0; i < list.Count; ++i )
				{
					BaseCreature pet = list[i];

					if ( pet == null || pet.Deleted )
						continue;

					AddButton( 15, 39 + (i * 20), 10006, 10006, i + 1, GumpButtonType.Reply, 0 );
					AddHtml( 32, 35 + (i * 20), 275, 18, String.Format( "<BASEFONT COLOR=#C0C0EE>{0}</BASEFONT>", pet.Name ), false, false );
				}
			}
		//default first page constructor
		public ObjectPropertyListGump( Mobile owner, Object o ) : base( 10, 10 )
		{
			_Owner = owner;
			_Object = o;
			
			//clear old gumps that are up
			_Owner.CloseGump( typeof( ObjectPropertyListGump ) );
			
			//set up the page
			AddPage(0);
            
			//determine page layout, sizes, and what gets displayed where
			DeterminePageLayout();

			//add the background			            
            AddBackground(0, 0, _Width, _Height, 9270);
            AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624);
            AddAlphaRegion(11, 10, _Width - 22, _Height - 20);
            
            AddTitle();
            
            AddArtwork();
            
            //if there was a problem when adding the property listing
            if( !AddPropsListing() )
            {
	            //clear old gumps that are up
				_Owner.CloseGump( typeof( ObjectPropertyListGump ) );
	            return;
            }
            
            AddControlButtons();
		}
Example #20
0
		public ScoreGump( Mobile m, ChessGame game, int[] white, int[] black, int totwhite, int totblack ) : base( 0, 25 )
		{
			m.CloseGump( typeof( ScoreGump ) );
			m_Game = game;

			MakeGump( white, black, totwhite, totblack );
		}
		public MonsterContractGump( Mobile from, MonsterContract parentMC ) : base( 0, 0 )
		{
			from.CloseGump( typeof( MonsterContractGump ) );
			
			this.Closable=true;
			this.Disposable=true;
			this.Dragable=true;
			this.Resizable=false;

			this.AddPage(0);
			this.AddBackground(0, 0, 300, 170, 5170);
			this.AddLabel(40, 40, 0, @"A Contract for: " + parentMC.AmountToKill + " " + parentMC.Monster);
			this.AddLabel(40, 60, 0, @"Amount Killed: " + parentMC.AmountKilled);
			this.AddLabel(40, 80, 0, @"Reward: " + parentMC.Reward);
			if ( parentMC.AmountKilled != parentMC.AmountToKill )
			{
				this.AddButton(90, 110, 2061, 2062, 1, GumpButtonType.Reply, 0);
				this.AddLabel(104, 108, 0, @"Claim Corpse");
			}
			else
			{
				this.AddButton(90, 110, 2061, 2062, 2, GumpButtonType.Reply, 0);
				this.AddLabel(104, 108, 0, @"Claim Reward");
			}

			MCparent = parentMC;
		}
        public ErrorsGump( Mobile m )
            : base(m, 100, 100)
        {
            Errors.Checked.Add(m);

            m.CloseGump( typeof( ErrorsGump ) );
        }
Example #23
0
        public ListGump20(Mobile m)
            : this(m, null)
        {
            m.CloseGump(typeof(ListGump20));

            Override = true;
        }
        public SelectStyleGump( Mobile owner, BoardGameControlItem controlitem )
            : base(450, 80)
        {
            Closable = false;

            owner.CloseGump( typeof( SelectStyleGump ) );

            _ControlItem = controlitem;

            if( _ControlItem.Players.IndexOf( owner ) == -1 )
            {
                return;
            }

            AddPage( 0 );
            AddBackground( 0, 0, Width, Height, 0x1400 );

            AddLabel( 20, 60, 1152, "# of players (" + _ControlItem.MinPlayers.ToString() + "-" + _ControlItem.MaxPlayers.ToString() + "):" );

            int minplayers = Math.Max( _ControlItem.MinPlayers, _ControlItem.Players.Count );

            if( _ControlItem.MaxPlayers != _ControlItem.MinPlayers && !_ControlItem.SettingsReady )
            {
                AddLabel( 20, 40, 1172, "Pick the number of players" );
                AddTextField( 150, 60, 30, 20, 0, _ControlItem.CurrentMaxPlayers.ToString() );
                AddButton( 182, 62, 0x4B9, 0x4BA, 500, GumpButtonType.Reply, 0 );
            }
            else
            {
                AddLabel( 150, 60, 1152, _ControlItem.CurrentMaxPlayers.ToString() );
            }

            //AddButton( Width - 15, 0, 3, 4, 0, GumpButtonType.Reply, 0 );
        }
Example #25
0
        public ColorsGump(Mobile m, Mobile targ)
            : base(m, 100, 100)
        {
            m.CloseGump(typeof(ColorsGump));

            c_Target = targ;
        }
Example #26
0
 public override void OnDoubleClick(Mobile from)
 {
     if ((!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this)) && from.AccessLevel == AccessLevel.Player)
     {
         from.SendLocalizedMessage(500446); // That is too far away.
         return;
     }
     m_TimeOut = DateTime.UtcNow - m_LastBuild;
     if (m_UpdateTimer < m_TimeOut || itemarray == null)
         BuildArrayList(from);
     else if (turboslotsarray != null)
     {
         foreach (TurboSlot t in turboslotsarray)
         {
             if ((t == null || t.Deleted) )
             {
                 BuildArrayList(from);
                 break;
             }
         }
     }
     if (turboslotsarray != null)
     {
         from.CloseGump(typeof(TurboSlotsStatGump));
         from.SendGump(new TurboSlotsStatGump(from, turboslotsarray));
     }
 }
Example #27
0
		public bool UseGate( Mobile m )
		{
			if ( m.Criminal )
			{
				m.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
				return false;
			}
			else if ( SpellHelper.CheckCombat( m ) )
			{
				m.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
				return false;
			}
			else if ( m.Spell != null )
			{
				m.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment.
				return false;
			}
			else
			{
				m.CloseGump( typeof( MoongateGump ) );
				m.SendGump( new MoongateGump( m, this ) );

				if ( !m.Hidden || m.AccessLevel == AccessLevel.Player )
					Effects.PlaySound( m.Location, m.Map, 0x20E );

				return true;
			}
		}
Example #28
0
        	public override void OnDoubleClick( Mobile from )
        	{
			if ( IsChildOf( from.Backpack ) )
			{

				PlayerMobile pm = (PlayerMobile)from;
				if ( from.Skills[SkillName.AnimalTaming].Base < 100.0 && from.Skills[SkillName.Tinkering].Base < 100.0 )
				{
					from.SendMessage( "You have no clue how to use this." );
				}
				else if ( FSATS.EnableBioEngineer == false )
				{
					from.SendMessage( "Bio-Engineering has been disabled on this server, Please contact your server administrator for more information." );
				}
				//else if ( pm.Bioenginer == false )
				//{
				//	from.SendMessage( "You have no clue how to use this." );
				//}
				else
				{
					from.CloseGump( typeof( SampleDNAGump ) );
					from.SendGump( new SampleDNAGump( this ) );
				}
			}
			else
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
		}
		public static void SendToolbar(Mobile m)
		{
			ToolbarModule module = m.GetModule(typeof(ToolbarModule)) as ToolbarModule ?? new ToolbarModule(m);

			m.CloseGump(typeof(ToolbarGump));
            m.SendGump(new ToolbarGump(module.ToolbarInfo, m));
		}
        public QueryMakersMarkGump( int quality, Mobile from, CraftItem craftItem, CraftSystem craftSystem, Type typeRes, BaseTool tool )
            : base(100, 200)
        {
            from.CloseGump( typeof( QueryMakersMarkGump ) );

            m_Quality = quality;
            m_From = from;
            m_CraftItem = craftItem;
            m_CraftSystem = craftSystem;
            m_TypeRes = typeRes;
            m_Tool = tool;

            AddPage( 0 );

            AddBackground( 0, 0, 220, 170, 5054 );
            AddBackground( 10, 10, 200, 150, 3000 );

            AddHtmlLocalized( 20, 20, 180, 80, 1018317, false, false ); // Do you wish to place your maker's mark on this item?

            AddHtmlLocalized( 55, 100, 140, 25, 1011011, false, false ); // CONTINUE
            AddButton( 20, 100, 4005, 4007, 1, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 55, 125, 140, 25, 1011012, false, false ); // CANCEL
            AddButton( 20, 125, 4005, 4007, 0, GumpButtonType.Reply, 0 );
        }