IsFriend() public method

public IsFriend ( Mobile m ) : bool
m Mobile
return bool
Ejemplo n.º 1
0
        public void ShowSign(Mobile m)
        {
            if (m_Owner != null)
            {
                if (m_Owner.IsFriend(m) && m.AccessLevel < AccessLevel.GameMaster)
                {
                    m_Owner.RefreshDecay();
                    m.SendLocalizedMessage(501293);                       // Welcome back to the house, friend!
                }

                //if ( m_Owner.IsAosRules || m_Owner is HouseFoundation )
                m.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Information, m, m_Owner));
                //else
                //	m.SendGump( new HouseGump( m, m_Owner ) );
            }
        }
Ejemplo n.º 2
0
        public override void OnDoubleClick(Mobile m)
        {
            // housing inheritance - from one character to the next (of kin)
            if (Core.UOMO)
            {
                BaseHouse house = m_Structure;
                if (house != null && (house.Owner == null || house.Owner.Deleted))
                {                       // a new character on this account gets the house
                    if (house.CheckInheritance(m))
                    {
                        // final sanity
                        if (house.Deleted || !m.CheckAlive())
                        {
                            return;
                        }

                        house.Owner = m;
                        if (house.Public == false)
                        {
                            house.ChangeLocks(m);
                        }
                    }
                }
                /* fall through */
            }

            if (m_Structure != null)
            {
                if (m_Structure.IsFriend(m))
                {
                    m.SendLocalizedMessage(501293);    // Welcome back to the house, friend!

                    if (Core.UOSP)                     //refresh house
                    {
                        double dms = m_Structure.DecayMinutesStored;
                        m_Structure.Refresh();

                        //if we're more than one day (less than 14 days) from the max stored (15 days),
                        //then tell the friend that the house is refreshed
                        if (dms < TimeSpan.FromDays(14.0).TotalMinutes)
                        {
                            m.SendMessage("You refresh the house.");
                        }
                    }
                }

                if (m_Structure.IsAosRules)
                {
                    m.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Information, m, m_Structure));
                }
                else
                {
                    m.SendGump(new HouseGump(m, m_Structure));
                }
            }
        }
Ejemplo n.º 3
0
        public void ShowSign(Mobile m)
        {
            if (m_Owner != null)
            {
                if (m_Owner.IsFriend(m) && m.AccessLevel < AccessLevel.GameMaster)
                {
                    m_Owner.RefreshDecay();
                    m.SendLocalizedMessage(501293);   // Welcome back to the house, friend!
                }

                m.SendGump(new HouseGump(m, m_Owner));
            }
        }
Ejemplo n.º 4
0
        public void ClaimGump_Callback(Mobile from, bool okay, object state)
        {
            if (okay && m_Owner != null && m_Owner.Owner == null && m_Owner.DecayLevel != DecayLevel.DemolitionPending)
            {
                bool canClaim = false;

                if (m_Owner.CoOwners == null || m_Owner.CoOwners.Count == 0)
                {
                    canClaim = m_Owner.IsFriend(from);
                }
                else
                {
                    canClaim = m_Owner.IsCoOwner(from);
                }

                if (canClaim && !BaseHouse.HasAccountHouse(from))
                {
                    m_Owner.Owner      = from;
                    m_Owner.LastTraded = DateTime.Now;
                }
            }

            ShowSign(from);
        }
Ejemplo n.º 5
0
        public void ShowSign(Mobile m)
        {
            if (m_Owner != null && m.AccessLevel == AccessLevel.Player)
            {
                if ((Core.ML && m_Owner.IsFriend(m)) || !Core.ML)
                {
                    m_Owner.RefreshDecay();
                }

                if (!Core.AOS && m_Owner.IsFriend(m))
                {
                    m.SendLocalizedMessage(501293); // Welcome back to the house, friend!
                }
            }

            if (m_Owner.IsAosRules)
            {
                m.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Information, m, m_Owner));
            }
            else
            {
                m.SendGump(new HouseGump(m, m_Owner));
            }
        }
Ejemplo n.º 6
0
        public void ShowSign(Mobile m)
        {
            if (m_Owner != null)
            {
                if (m_Owner.IsFriend(m) && m.AccessLevel < AccessLevel.GameMaster)
                {
                    #region Mondain's Legacy
                    if ((Core.ML && m_Owner.IsOwner(m)) || !Core.ML)
                    {
                        m_Owner.RefreshDecay();
                    }
                    #endregion
                    if (!Core.AOS)
                    {
                        m.SendLocalizedMessage(501293);                           // Welcome back to the house, friend!
                    }
                }

                //if ( m_Owner.IsAosRules )
                //	m.SendGump( new HouseGumpAOS( HouseGumpPageAOS.Information, m, m_Owner ) );
                //else
                m.SendGump(new HouseGump(m, m_Owner));
            }
        }
Ejemplo n.º 7
0
 public override void OnDoubleClick(Mobile m)
 {
     if (m_Owner != null)
     {
         if (m_Owner.IsFriend(m))
         {
             m.SendLocalizedMessage(501293);                       // Welcome back to the house, friend!
         }
         if (m_Owner.IsAosRules)
         {
             m.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Information, m, m_Owner));
         }
         else
         {
             m.SendGump(new HouseGump(m, m_Owner));
         }
     }
 }
Ejemplo n.º 8
0
        public override void Delete()
        {
            if (m_ParentHouse == null)
            {
                base.Delete();
                return;
            }

            if (!Owned && !m_ParentHouse.IsFriend(m_RentalClient))
            {
                if (m_RentalClient != null && m_RentalMaster != null)
                {
                    m_RentalMaster.SendMessage("{0} has ended your rental agreement.  Because you revoked their access, their last payment will be refunded.", m_RentalMaster.Name);
                    m_RentalClient.SendMessage("You have ended your rental agreement with {0}.  Because your access was revoked, your last payment is refunded.", m_RentalClient.Name);
                }

                DepositTo(m_RentalClient);
            }
            else if (Owned)
            {
                if (m_RentalClient != null && m_RentalMaster != null)
                {
                    m_RentalClient.SendMessage("{0} has ended your rental agreement.  Since they broke the contract, your are refunded the last payment.", m_RentalMaster.Name);
                    m_RentalMaster.SendMessage("You have ended your rental agreement with {0}.  They will be refunded their last payment.", m_RentalClient.Name);
                }

                DepositTo(m_RentalClient);

                PackUpHouse();
            }
            else
            {
                if (m_RentalClient != null && m_RentalMaster != null)
                {
                    m_RentalMaster.SendMessage("{0} has ended your rental agreement.", m_RentalClient.Name);
                    m_RentalClient.SendMessage("You have ended your rental agreement with {0}.", m_RentalMaster.Name);
                }

                DepositTo(m_RentalMaster);
            }

            ClearRentTimer();
            base.Delete();
        }
Ejemplo n.º 9
0
		public HouseGumpAOS( HouseGumpPageAOS page, Mobile from, BaseHouse house ) : base( 50, 40 )
		{
			m_House = house;
			m_Page = page;

			from.CloseGump( typeof( HouseGumpAOS ) );
			//from.CloseGump( typeof( HouseListGump ) );
			//from.CloseGump( typeof( HouseRemoveGump ) );

			bool isCombatRestricted = house.IsCombatRestricted( from );

			bool isOwner = house.IsOwner( from );
			bool isCoOwner = isOwner || house.IsCoOwner( from );
			bool isFriend = isCoOwner || house.IsFriend( from );

			if ( isCombatRestricted )
				isFriend = isCoOwner = isOwner = false;

			AddPage( 0 );

			if ( isFriend || page == HouseGumpPageAOS.Vendors )
			{
				AddBackground( 0, 0, 420, page != HouseGumpPageAOS.Vendors ? 440 : 420, 5054 );

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

				AddImageTiled( 10, 120, 400, 260, 2624 );
				AddAlphaRegion( 10, 120, 400, 260 );

				AddImageTiled( 10, 390, 400, page != HouseGumpPageAOS.Vendors ? 40 : 20, 2624 );
				AddAlphaRegion( 10, 390, 400, page != HouseGumpPageAOS.Vendors ? 40 : 20 );

				AddButtonLabeled( 250, page != HouseGumpPageAOS.Vendors ? 410 : 390, 0, 1060675 ); // CLOSE
			}

			AddImage( 10, 10, 100 );

			if ( m_House.Sign != null )
			{
				ArrayList lines = Wrap( m_House.Sign.GetName() );

				if ( lines != null )
				{
					for ( int i = 0, y = (114 - (lines.Count * 14)) / 2; i < lines.Count; ++i, y += 14 )
					{
						string s = (string)lines[i];

						AddLabel( 10 + ((160 - (s.Length * 8)) / 2), y, 0, s );
					}
				}
			}

			if ( page == HouseGumpPageAOS.Vendors )
			{
				AddHtmlLocalized( 10, 120, 400, 20, 1062428, LabelColor, false, false ); // <CENTER>SHOPS</CENTER>

				AddList( house.AvailableVendorsFor( from ), 1, false, false, from );
				return;
			}

			if ( !isFriend )
				return;

			if ( house != null )
			{
				AddButtonLabeled( 10, 390, GetButtonID( 0, 0 ), 1060674 ); // Banish
				AddButtonLabeled( 10, 410, GetButtonID( 0, 1 ), 1011261 ); // Lift a Ban
			}
/*Zycron
			else
			{
				AddButtonLabeled( 10, 390, GetButtonID( 0, 2 ), 1060676 ); // Grant Access
				AddButtonLabeled( 10, 410, GetButtonID( 0, 3 ), 1060677 ); // Revoke Access
			}
Zycron*/
			AddPageButton( 150, 10, GetButtonID( 1, 0 ), 1060668, HouseGumpPageAOS.Information );
			AddPageButton( 150, 30, GetButtonID( 1, 1 ), 1060669, HouseGumpPageAOS.Security );
			AddPageButton( 150, 50, GetButtonID( 1, 2 ), 1060670, HouseGumpPageAOS.Storage );
			AddPageButton( 150, 70, GetButtonID( 1, 3 ), 1060671, HouseGumpPageAOS.Customize );
			AddPageButton( 150, 90, GetButtonID( 1, 4 ), 1060672, HouseGumpPageAOS.Ownership );

			switch ( page )
			{
				case HouseGumpPageAOS.Information:
				{
					AddHtmlLocalized( 20, 130, 200, 20, 1011242, LabelColor, false, false ); // Owned By: 
					AddLabel( 210, 130, LabelHue, GetOwnerName() );

					AddHtmlLocalized( 20, 170, 380, 20, 1018032, SelectedColor, false, false ); // This house is properly placed.
					AddHtmlLocalized( 20, 190, 380, 20, 1018035, SelectedColor, false, false ); // This house is of modern design.
					AddHtmlLocalized( 20, 210, 380, 20, (house is HouseFoundation) ? 1060681 : 1060680, SelectedColor, false, false ); // This is a (pre | custom)-built house.
					AddHtmlLocalized( 20, 230, 380, 20, house.Public ? 1060678 : 1060679, SelectedColor, false, false ); // This house is (private | open to the public).

					switch ( house.DecayType )
					{
						case DecayType.Ageless:
						case DecayType.AutoRefresh:
						{
							AddHtmlLocalized( 20, 250, 380, 20, 1062209, SelectedColor, false, false ); // This house is <a href = "?ForceTopic97">Automatically</a> refreshed.
							break;
						}
						case DecayType.ManualRefresh:
						{
							AddHtmlLocalized( 20, 250, 380, 20, 1062208, SelectedColor, false, false ); // This house is <a href = "?ForceTopic97">Grandfathered</a>.
							break;
						}
						case DecayType.Condemned:
						{
							AddHtmlLocalized( 20, 250, 380, 20, 1062207, WarningColor, false, false ); // This house is <a href = "?ForceTopic97">Condemned</a>.
							break;
						}
					}

					AddHtmlLocalized( 20, 290, 200, 20, 1060692, SelectedColor, false, false ); // Built On:
					AddLabel( 250, 290, LabelHue, GetDateTime( house.BuiltOn ) );

					AddHtmlLocalized( 20, 310, 200, 20, 1060693, SelectedColor, false, false ); // Last Traded:
					AddLabel( 250, 310, LabelHue, GetDateTime( house.LastTraded ) );

					AddHtmlLocalized( 20, 330, 200, 20, 1061793, SelectedColor, false, false ); // House Value
					AddLabel( 250, 330, LabelHue, house.Price.ToString() );

					AddHtmlLocalized( 20, 360, 300, 20, 1011241, SelectedColor, false, false ); // Number of visits this building has had: 
					AddLabel( 350, 360, LabelHue, house.Visits.ToString() );

					break;
				}
				case HouseGumpPageAOS.Security:
				{
					AddButtonLabeled( 10, 130, GetButtonID( 3, 0 ), 1011266, isCoOwner ); // View Co-Owner List
					AddButtonLabeled( 10, 150, GetButtonID( 3, 1 ), 1011267, isOwner ); // Add a Co-Owner
					AddButtonLabeled( 10, 170, GetButtonID( 3, 2 ), 1018036, isOwner ); // Remove a Co-Owner
					AddButtonLabeled( 10, 190, GetButtonID( 3, 3 ), 1011268, isOwner ); // Clear Co-Owner List

					AddButtonLabeled( 10, 220, GetButtonID( 3, 4 ), 1011243 ); // View Friends List
					AddButtonLabeled( 10, 240, GetButtonID( 3, 5 ), 1011244, isCoOwner ); // Add a Friend
					AddButtonLabeled( 10, 260, GetButtonID( 3, 6 ), 1018037, isCoOwner ); // Remove a Friend
					AddButtonLabeled( 10, 280, GetButtonID( 3, 7 ), 1011245, isCoOwner ); // Clear Friend List

					if ( house.Public )
					{
						AddButtonLabeled( 10, 310, GetButtonID( 3, 8 ), 1011260 ); // View Ban List
						AddButtonLabeled( 10, 330, GetButtonID( 3, 9 ), 1060698 ); // Clear Ban List

						AddButtonLabeled( 210, 130, GetButtonID( 3, 12 ), 1060695, isOwner ); // Change to Private

						AddHtmlLocalized( 245, 150, 240, 20, 1060694, SelectedColor, false, false ); // Change to Public
					}
					else
					{
						AddButtonLabeled( 10, 310, GetButtonID( 3, 8 ), 1011260 ); // View Ban List
						AddButtonLabeled( 10, 330, GetButtonID( 3, 9 ), 1060698 ); // Clear Ban List
						
						AddButtonLabeled(210, 170, GetButtonID(3, 14), 1011247); // Change the house locks

						AddHtmlLocalized( 245, 130, 240, 20, 1060695, SelectedColor, false, false ); // Change to Private

						AddButtonLabeled( 210, 150, GetButtonID( 3, 13 ), 1060694, isOwner ); // Change to Public
					}

					break;
				}
				case HouseGumpPageAOS.Storage:
				{
					AddHtmlLocalized( 10, 130, 400, 20, 1060682, LabelColor, false, false ); // <CENTER>HOUSE STORAGE SUMMARY</CENTER>

					// This is not as OSI; storage changes not yet implemented

					/*AddHtmlLocalized( 10, 170, 275, 20, 1011237, LabelColor, false, false ); // Number of locked down items:
					AddLabel( 310, 170, LabelHue, m_House.LockDownCount.ToString() );

					AddHtmlLocalized( 10, 190, 275, 20, 1011238, LabelColor, false, false ); // Maximum locked down items:
					AddLabel( 310, 190, LabelHue, m_House.MaxLockDowns.ToString() );

					AddHtmlLocalized( 10, 210, 275, 20, 1011239, LabelColor, false, false ); // Number of secure containers:
					AddLabel( 310, 210, LabelHue, m_House.SecureCount.ToString() );

					AddHtmlLocalized( 10, 230, 275, 20, 1011240, LabelColor, false, false ); // Maximum number of secure containers:
					AddLabel( 310, 230, LabelHue, m_House.MaxSecures.ToString() );*/

					int fromSecures, fromVendors, fromLockdowns, fromMovingCrate;

					int maxSecures = house.GetAosMaxSecures();
					int curSecures = house.GetAosCurSecures( out fromSecures, out fromVendors, out fromLockdowns, out fromMovingCrate );

					int maxLockdowns = house.GetAosMaxLockdowns();
					int curLockdowns = house.GetAosCurLockdowns();

					int bonusStorage = (int)((house.BonusStorageScalar * 100)-100);

					if( bonusStorage > 0 )
					{
						AddHtmlLocalized( 10, 150, 300, 20, 1072519, LabelColor, false, false ); // Increased Storage
						AddLabel( 310, 150, LabelHue, String.Format( "{0}%", bonusStorage ) );
					}

					AddHtmlLocalized( 10, 170, 300, 20, 1060683, LabelColor, false, false ); // Maximum Secure Storage
					AddLabel( 310, 170, LabelHue, maxSecures.ToString() );

					AddHtmlLocalized( 10, 190, 300, 20, 1060685, LabelColor, false, false ); // Used by Moving Crate
					AddLabel( 310, 190, LabelHue, fromMovingCrate.ToString() );

					AddHtmlLocalized( 10, 210, 300, 20, 1060686, LabelColor, false, false ); // Used by Lockdowns
					AddLabel( 310, 210, LabelHue, fromLockdowns.ToString() );

					if ( BaseHouse.NewVendorSystem )
					{
						AddHtmlLocalized( 10, 230, 300, 20, 1060688, LabelColor, false, false ); // Used by Secure Containers
						AddLabel( 310, 230, LabelHue, fromSecures.ToString() );

						AddHtmlLocalized( 10, 250, 300, 20, 1060689, LabelColor, false, false ); // Available Storage
						AddLabel( 310, 250, LabelHue, Math.Max( maxSecures - curSecures, 0 ).ToString() );

						AddHtmlLocalized( 10, 290, 300, 20, 1060690, LabelColor, false, false ); // Maximum Lockdowns
						AddLabel( 310, 290, LabelHue, maxLockdowns.ToString() );

						AddHtmlLocalized( 10, 310, 300, 20, 1060691, LabelColor, false, false ); // Available Lockdowns
						AddLabel( 310, 310, LabelHue, Math.Max( maxLockdowns - curLockdowns, 0 ).ToString() );

						int maxVendors = house.GetNewVendorSystemMaxVendors();
						int vendors = house.PlayerVendors.Count + house.VendorRentalContracts.Count;

						AddHtmlLocalized( 10, 350, 300, 20, 1062391, LabelColor, false, false ); // Vendor Count
						AddLabel( 310, 350, LabelHue, vendors.ToString() + " / " + maxVendors.ToString() );
					}
					else
					{
						AddHtmlLocalized( 10, 230, 300, 20, 1060687, LabelColor, false, false ); // Used by Vendors
						AddLabel( 310, 230, LabelHue, fromVendors.ToString() );

						AddHtmlLocalized( 10, 250, 300, 20, 1060688, LabelColor, false, false ); // Used by Secure Containers
						AddLabel( 310, 250, LabelHue, fromSecures.ToString() );

						AddHtmlLocalized( 10, 270, 300, 20, 1060689, LabelColor, false, false ); // Available Storage
						AddLabel( 310, 270, LabelHue, Math.Max( maxSecures - curSecures, 0 ).ToString() );

						AddHtmlLocalized( 10, 330, 300, 20, 1060690, LabelColor, false, false ); // Maximum Lockdowns
						AddLabel( 310, 330, LabelHue, maxLockdowns.ToString() );

						AddHtmlLocalized( 10, 350, 300, 20, 1060691, LabelColor, false, false ); // Available Lockdowns
						AddLabel( 310, 350, LabelHue, Math.Max( maxLockdowns - curLockdowns, 0 ).ToString() );
					}

					break;
				}
				case HouseGumpPageAOS.Customize:
				{
					bool isCustomizable = isOwner && ( house is HouseFoundation );

					AddButtonLabeled( 10, 120, GetButtonID( 5, 0 ), 1060759, isOwner && !isCustomizable && ( house.ConvertEntry != null ) ); // Convert Into Customizable House
					AddButtonLabeled( 10, 160, GetButtonID( 5, 1 ), 1060765, isOwner && isCustomizable ); // Customize This House
					AddButtonLabeled( 10, 180, GetButtonID( 5, 2 ), 1060760, isOwner && house.MovingCrate != null ); // Relocate Moving Crate
					AddButtonLabeled( 10, 210, GetButtonID( 5, 3 ), 1060761, isOwner && house.Public ); // Change House Sign
					AddButtonLabeled( 10, 230, GetButtonID( 5, 4 ), 1060762, isOwner && isCustomizable ); // Change House Sign Hanger
					AddButtonLabeled( 10, 250, GetButtonID( 5, 5 ), 1060763, isOwner && isCustomizable && ( ((HouseFoundation)house).Signpost != null ) ); // Change Signpost
					AddButtonLabeled( 10, 280, GetButtonID( 5, 6 ), 1062004, isOwner && isCustomizable ); // Change Foundation Style
					AddButtonLabeled( 10, 310, GetButtonID( 5, 7 ), 1060764, isCoOwner ); // Rename House

					break;
				}
				case HouseGumpPageAOS.Ownership:
				{
					AddButtonLabeled( 10, 130, GetButtonID( 6, 0 ), 1061794, isOwner && house.MovingCrate == null && house.InternalizedVendors.Count == 0 ); // Demolish House
					AddButtonLabeled( 10, 150, GetButtonID( 6, 1 ), 1061797, isOwner ); // Trade House
					AddButtonLabeled( 10, 190, GetButtonID( 6, 2 ), 1061798, false ); // Make Primary

					break;
				}
				case HouseGumpPageAOS.ChangeHanger:
				{
					for ( int i = 0; i < m_HangerNumbers.Length; ++i )
					{
						int x = 50 + ((i % 3) * 100);
						int y = 180 + ((i / 3) * 80);

						AddButton( x, y, 4005, 4007, GetButtonID( 7, i ), GumpButtonType.Reply, 0 );
						AddItem( x + 20, y, m_HangerNumbers[i] );
					}

					break;
				}
				case HouseGumpPageAOS.ChangeFoundation:
				{
					for ( int i = 0; i < m_FoundationNumbers.Length; ++i )
					{
						int x = 15 + ((i % 5) * 80);
						int y = 180 + ((i / 5) * 100);

						AddButton( x, y, 4005, 4007, GetButtonID( 8, i ), GumpButtonType.Reply, 0 );
						AddItem( x + 25, y, m_FoundationNumbers[i] );
					}

					break;
				}
				case HouseGumpPageAOS.ChangeSign:
				{
					int index = 0;
					
					if ( _HouseSigns.Count == 0 )
					{
						// Add standard signs
						for ( int i = 0; i < 54; ++i )
						{
							_HouseSigns.Add( 2980 + ( i * 2 ) );
						}

						// Add library and beekeeper signs ( ML )
						_HouseSigns.Add( 2966 );
						_HouseSigns.Add( 3140 );
					}
					
					int signsPerPage = Core.ML ? 24 : 18;
					int totalSigns = Core.ML ? 56 : 54;
					int pages = (int) Math.Ceiling( (double) totalSigns / signsPerPage );

					for ( int i = 0; i < pages; ++i )
					{
						AddPage( i + 1 );

						AddButton( 10, 360, 4005, 4007, 0, GumpButtonType.Page, ((i + 1) % pages ) + 1 );

						for ( int j = 0; j < signsPerPage && totalSigns - ( signsPerPage * i ) - j > 0; ++j )
						{
							int x = 30 + ((j % 6) * 60);
							int y = 130 + ((j / 6) * 60);

							AddButton( x, y, 4005, 4007, GetButtonID( 9, index ), GumpButtonType.Reply, 0 );
							AddItem( x + 20, y, _HouseSigns[index++] );
						}
					}

					break;
				}
				case HouseGumpPageAOS.RemoveCoOwner:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060730, LabelColor, false, false ); // <CENTER>CO-OWNER LIST</CENTER>
					AddList( house.CoOwners, 10, false, true, from );
					break;
				}
				case HouseGumpPageAOS.ListCoOwner:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060730, LabelColor, false, false ); // <CENTER>CO-OWNER LIST</CENTER>
					AddList( house.CoOwners, -1, false, true, from );
					break;
				}
				case HouseGumpPageAOS.RemoveFriend:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060731, LabelColor, false, false ); // <CENTER>FRIENDS LIST</CENTER>
					AddList( house.Friends, 11, false, true, from );
					break;
				}
				case HouseGumpPageAOS.ListFriend:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060731, LabelColor, false, false ); // <CENTER>FRIENDS LIST</CENTER>
					AddList( house.Friends, -1, false, true, from );
					break;
				}
				case HouseGumpPageAOS.RemoveBan:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060733, LabelColor, false, false ); // <CENTER>BAN LIST</CENTER>
					AddList( house.Bans, 12, true, true, from );
					break;
				}
				case HouseGumpPageAOS.ListBan:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060733, LabelColor, false, false ); // <CENTER>BAN LIST</CENTER>
					AddList( house.Bans, -1, true, true, from );
					break;
				}
/*Zycron
				case HouseGumpPageAOS.RemoveAccess:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060732, LabelColor, false, false ); // <CENTER>ACCESS LIST</CENTER>
					AddList( house.Access, 13, false, true, from );
					break;
				}
				case HouseGumpPageAOS.ListAccess:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060732, LabelColor, false, false ); // <CENTER>ACCESS LIST</CENTER>
					AddList( house.Access, -1, false, true, from );
					break;
				}
Zycron*/				
				case HouseGumpPageAOS.ChangePost:
				{
					int index = 0;

					for ( int i = 0; i < 2; ++i )
					{
						AddPage( i + 1 );

						AddButton( 10, 360, 4005, 4007, 0, GumpButtonType.Page, ((i + 1) % 2) + 1 );

						for ( int j = 0; j < 16 && index < m_PostNumbers.Length; ++j )
						{
							int x = 15 + ((j % 8) * 50);
							int y = 130 + ((j / 8) * 110);

							AddButton( x, y, 4005, 4007, GetButtonID( 14, index ), GumpButtonType.Reply, 0 );
							AddItem( x + 10, y, m_PostNumbers[index++] );
						}
					}

					break;
				}
			}
		}
Ejemplo n.º 10
0
        public HouseGump( Mobile from, BaseHouse house )
            : base(20, 30)
        {
            if ( house.Deleted )
                return;

            m_House = house;

            from.CloseGump( typeof( HouseGump ) );
            from.CloseGump( typeof( HouseListGump ) );
            from.CloseGump( typeof( HouseRemoveGump ) );

            bool isCombatRestricted = house.IsCombatRestricted( from );

            bool isOwner = m_House.IsOwner( from );
            bool isCoOwner = isOwner || m_House.IsCoOwner( from );
            bool isFriend = isCoOwner || m_House.IsFriend( from );

            if ( isCombatRestricted )
                isFriend = isCoOwner = isOwner = false;

            AddPage( 0 );

            if ( isFriend )
            {
                AddBackground( 0, 0, 420, 430, 5054 );
                AddBackground( 10, 10, 400,410, 3000 );
            }

            AddImage( 130, 0, 100 );

            if ( m_House.Sign != null )
            {
                ArrayList lines = Wrap( m_House.Sign.Name );

                if ( lines != null )
                {
                    for ( int i = 0, y = (101 - (lines.Count * 14)) / 2; i < lines.Count; ++i, y += 14 )
                    {
                        string s = (string)lines[i];

                        AddLabel( 130 + ((143 - (s.Length * 8)) / 2), y, 0, s );
                    }
                }
            }

            if ( !isFriend )
                return;

            AddHtmlLocalized( 55, 103, 75, 20, 1011233, false, false ); // INFO
            AddButton( 20, 103, 4005, 4007, 0, GumpButtonType.Page, 1 );

            AddHtmlLocalized( 170, 103, 75, 20, 1011234, false, false ); // FRIENDS
            AddButton( 135, 103, 4005, 4007, 0, GumpButtonType.Page, 2 );

            AddHtmlLocalized( 295, 103, 75, 20, 1011235, false, false ); // OPTIONS
            AddButton( 260, 103, 4005, 4007, 0, GumpButtonType.Page, 3 );

            AddHtmlLocalized( 295, 390, 75, 20, 1011441, false, false );  // EXIT
            AddButton( 260, 390, 4005, 4007, 0, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 55, 390, 200, 20, 1011236, false, false ); // Change this house's name!
            AddButton( 20, 390, 4005, 4007, 1, GumpButtonType.Reply, 0 );

            // Info page
            AddPage( 1 );

            AddHtmlLocalized( 20, 135, 100, 20, 1011242, false, false ); // Owned by:
            AddHtml( 120, 135, 100, 20, GetOwnerName(), false, false );

            AddHtmlLocalized( 20, 170, 275, 20, 1011237, false, false ); // Number of locked down items:
            AddHtml( 320, 170, 50, 20, m_House.LockDownCount.ToString(), false, false );

            AddHtmlLocalized( 20, 190, 275, 20, 1011238, false, false ); // Maximum locked down items:
            AddHtml( 320, 190, 50, 20, m_House.MaxLockDowns.ToString(), false, false );

            AddHtmlLocalized( 20, 210, 275, 20, 1011239, false, false ); // Number of secure containers:
            AddHtml( 320, 210, 50, 20, m_House.SecureCount.ToString(), false, false );

            AddHtmlLocalized( 20, 230, 275, 20, 1011240, false, false ); // Maximum number of secure containers:
            AddHtml( 320, 230, 50, 20, m_House.MaxSecures.ToString(), false, false );

            AddHtmlLocalized( 20, 260, 400, 20, 1018032, false, false ); // This house is properly placed.
            AddHtmlLocalized( 20, 280, 400, 20, 1018035, false, false ); // This house is of modern design.

            if ( m_House.Public )
            {
                // TODO: Validate exact placement
                AddHtmlLocalized( 20, 305, 275, 20, 1011241, false, false ); // Number of visits this building has had
                AddHtml( 320, 305, 50, 20, m_House.Visits.ToString(), false, false );
            }

            // Friends page
            AddPage( 2 );

            AddHtmlLocalized( 45, 130, 150, 20, 1011266, false, false ); // List of co-owners
            AddButton( 20, 130, 2714, 2715, 2, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 45, 150, 150, 20, 1011267, false, false ); // Add a co-owner
            AddButton( 20, 150, 2714, 2715, 3, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 45, 170, 150, 20, 1018036, false, false ); // Remove a co-owner
            AddButton( 20, 170, 2714, 2715, 4, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 45, 190, 150, 20, 1011268, false, false ); // Clear co-owner list
            AddButton( 20, 190, 2714, 2715, 5, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 225, 130, 155, 20, 1011243, false, false ); // List of Friends
            AddButton( 200, 130, 2714, 2715, 6, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 225, 150, 155, 20, 1011244, false, false ); // Add a Friend
            AddButton( 200, 150, 2714, 2715, 7, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 225, 170, 155, 20, 1018037, false, false ); // Remove a Friend
            AddButton( 200, 170, 2714, 2715, 8, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 225, 190, 155, 20, 1011245, false, false ); // Clear Friends list
            AddButton( 200, 190, 2714, 2715, 9, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 120, 215, 280, 20, 1011258, false, false ); // Ban someone from the house
            AddButton( 95, 215, 2714, 2715, 10, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 120, 235, 280, 20, 1011259, false, false ); // Eject someone from the house
            AddButton( 95, 235, 2714, 2715, 11, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 120, 255, 280, 20, 1011260, false, false ); // View a list of banned people
            AddButton( 95, 255, 2714, 2715, 12, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 120, 275, 280, 20, 1011261, false, false ); // Lift a ban
            AddButton( 95, 275, 2714, 2715, 13, GumpButtonType.Reply, 0 );

            // Options page
            AddPage( 3 );

            AddHtmlLocalized( 45, 150, 355, 30, 1011248, false, false ); // Transfer ownership of the house
            AddButton( 20, 150, 2714, 2715, 14, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 45, 180, 355, 30, 1011249, false, false ); // Demolish house and get deed back
            AddButton( 20, 180, 2714, 2715, 15, GumpButtonType.Reply, 0 );

            if ( !m_House.Public )
            {
                AddHtmlLocalized( 45, 210, 355, 30, 1011247, false, false ); // Change the house locks
                AddButton( 20, 210, 2714, 2715, 16, GumpButtonType.Reply, 0 );

                AddHtmlLocalized( 45, 240, 350, 90, 1011253, false, false ); // Declare this building to be public. This will make your front door unlockable.
                AddButton( 20, 240, 2714, 2715, 17, GumpButtonType.Reply, 0 );
            }
            else
            {
                //AddHtmlLocalized( 45, 280, 350, 30, 1011250, false, false ); // Change the sign type
                AddHtmlLocalized( 45, 210, 350, 30, 1011250, false, false ); // Change the sign type
                AddButton( 20, 210, 2714, 2715, 0, GumpButtonType.Page, 4 );

                AddHtmlLocalized( 45, 240, 350, 30, 1011252, false, false ); // Declare this building to be private.
                AddButton( 20, 240, 2714, 2715, 17, GumpButtonType.Reply, 0 );

                // Change the sign type
                AddPage( 4 );

                for ( int i = 0; i < 24; ++i )
                {
                    AddRadio( 53 + ((i / 4) * 50), 137 + ((i % 4) * 35), 210, 211, false, i + 1 );
                    AddItem( 60 + ((i / 4) * 50), 130 + ((i % 4) * 35), 2980 + (i * 2) );
                }

                AddHtmlLocalized( 200, 305, 129, 20, 1011254, false, false ); // Guild sign choices
                AddButton( 350, 305, 252, 253, 0, GumpButtonType.Page, 5 );

                AddHtmlLocalized( 200, 340, 355, 30, 1011277, false, false ); // Okay that is fine.
                AddButton( 350, 340, 4005, 4007, 18, GumpButtonType.Reply, 0 );

                AddPage( 5 );

                for ( int i = 0; i < 29; ++i )
                {
                    AddRadio( 53 + ((i / 5) * 50), 137 + ((i % 5) * 35), 210, 211, false, i + 25 );
                    AddItem( 60 + ((i / 5) * 50), 130 + ((i % 5) * 35), 3028 + (i * 2) );
                }

                AddHtmlLocalized( 200, 305, 129, 20, 1011255, false, false ); // Shop sign choices
                AddButton( 350, 305, 250, 251, 0, GumpButtonType.Page, 4 );

                AddHtmlLocalized( 200, 340, 355, 30, 1011277, false, false ); // Okay that is fine.
                AddButton( 350, 340, 4005, 4007, 18, GumpButtonType.Reply, 0 );
            }
        }
Ejemplo n.º 11
0
    public HouseGump(Mobile from, BaseHouse house) : base(20, 30)
    {
        if (house.Deleted)
            return;

        m_House = house;

        from.CloseGump(typeof(HouseGump));
        from.CloseGump(typeof(HouseListGump));
        from.CloseGump(typeof(HouseRemoveGump));

        bool isOwner = m_House.IsOwner(from);
        bool isCoOwner = isOwner || m_House.IsCoOwner(from);
        bool isFriend = isCoOwner || m_House.IsFriend(from);

        AddPage(0);

        if (isFriend)
        {
            AddBackground(0, 40, 380, 285, 0xA28);
            AddBackground(15, 100, 350, 25, 0x13EC);
        }

        AddImage(120, 0, 100);

        if (m_House.Sign != null)
        {
            ArrayList lines = Wrap(m_House.Sign.GetName());

            if (lines != null)
            {
                for (int i = 0, y = (101 - (lines.Count * 14)) / 2; i < lines.Count; ++i, y += 14)
                {
                    string s = (string)lines[i];
                    AddLabel(130 + ((143 - (s.Length * 8)) / 2), y, 0x455, (string)lines[i]);
                }
            }
        }

        if (!isFriend)
            return;

        AddLabel(30, 102, 0x0, "INFO");
        AddButton(80, 104, 0x1459, 0x1459, 0, GumpButtonType.Page, 1);

        AddLabel(120, 102, 0x0, "FRIENDS");
        AddButton(210, 104, 0x1459, 0x1459, 0, GumpButtonType.Page, 2);

        AddLabel(245, 102, 0x0, "OPTIONS");
        AddButton(335, 103, 0x1459, 0x1459, 0, GumpButtonType.Page, 3);

        AddButton(50, 290, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);

        // Info page
        AddPage(1);

        AddLabel(100, 140, 0x0, "Owned by");
        AddLabel(180, 140, 0x455, GetOwnerName());

        AddLabel(30, 170, 0x0, "Number of locked down items:");
        AddLabel(250, 170, 0x0, m_House.LockDownCount.ToString() + " out of " + m_House.MaxLockDowns.ToString());

        AddLabel(30, 190, 0x0, "Number of secure containers:");
        AddLabel(250, 190, 0x0, m_House.SecureCount.ToString() + " out of " + m_House.MaxSecures.ToString());

        AddLabel(30, 240, 0x0, "This house is of modern design");

        if (m_House.Public)
        {
            AddHtmlLocalized(30, 260, 275, 20, 1011241, false, false);
            AddHtml(320, 260, 50, 20, m_House.Visits.ToString(), false, false);
        }

        AddLabel(130, 290, 0x0, "Change the house's name!");
        AddButton(310, 290, 0xA9A, 0xA9B, 1, GumpButtonType.Reply, 0);

        // Friends page
        AddPage(2);

        AddLabel(55, 127, 0x0, "List of Co-Owners");
        AddButton(30, 127, 0xA9A, 0xA9B, 2, GumpButtonType.Reply, 0);

        AddLabel(55, 147, 0x0, "Add a Co-Owner");
        AddButton(30, 147, 0xA9A, 0xA9B, 3, GumpButtonType.Reply, 0);

        AddLabel(55, 167, 0x0, "Remove a Co-Owner");
        AddButton(30, 167, 0xA9A, 0xA9B, 4, GumpButtonType.Reply, 0);

        AddLabel(200, 127, 0x0, "List of Friends");
        AddButton(175, 127, 0xA9A, 0xA9B, 6, GumpButtonType.Reply, 0);

        AddLabel(200, 147, 0x0, "Add a Friend");
        AddButton(175, 147, 0xA9A, 0xA9B, 7, GumpButtonType.Reply, 0);

        AddLabel(200, 167, 0x0, "Remove a Friend");
        AddButton(175, 167, 0xA9A, 0xA9B, 8, GumpButtonType.Reply, 0);

        AddLabel(200, 187, 0x0, "Clear Friend List");
        AddButton(175, 187, 0xA9A, 0xA9B, 9, GumpButtonType.Reply, 0);

        AddLabel(100, 207, 0x0, "Ban someone from the house");
        AddButton(75, 207, 0xA9A, 0xA9B, 10, GumpButtonType.Reply, 0);

        AddLabel(100, 227, 0x0, "Eject someone from the house");
        AddButton(75, 227, 0xA9A, 0xA9B, 11, GumpButtonType.Reply, 0);

        AddLabel(100, 247, 0x0, "View list of banned people");
        AddButton(75, 247, 0xA9A, 0xA9B, 12, GumpButtonType.Reply, 0);

        AddLabel(100, 267, 0x0, "Lift a Ban");
        AddButton(75, 267, 0xA9A, 0xA9B, 13, GumpButtonType.Reply, 0);

        // Options page
        AddPage(3);

        AddLabel(55, 140, 0x0, "Transfer ownership of the house");
        AddButton(30, 140, 0xA9A, 0xA9B, 14, GumpButtonType.Reply, 0);

        AddLabel(55, 170, 0x0, "Demolish the house and get a deed back");
        AddButton(30, 170, 0xA9A, 0xA9B, 15, GumpButtonType.Reply, 0);

        if (!m_House.Public)
        {
            AddLabel(55, 200, 0x0, "Change the house locks");
            AddButton(30, 200, 0xA9A, 0xA9B, 16, GumpButtonType.Reply, 0);

            AddLabel(55, 230, 0x0, "Declare this building to be public. This will make your front door unlockable.");
            AddButton(30, 230, 0xA9A, 0xA9B, 17, GumpButtonType.Reply, 0);
        }
        else
        {
            AddLabel(55, 200, 0x0, "Change the sign type");
            AddButton(30, 200, 2714, 2715, 0, GumpButtonType.Page, 4);

            AddLabel(55, 230, 0x0, "Declare this building to be private.");
            AddButton(30, 230, 2714, 2715, 17, GumpButtonType.Reply, 0);

            // Change the sign type
            AddPage(4);

            for (int i = 0; i < 24; ++i)
            {
                AddRadio(53 + ((i / 4) * 50), 137 + ((i % 4) * 35), 210, 211, false, i + 1);
                AddItem(60 + ((i / 4) * 50), 130 + ((i % 4) * 35), 2980 + (i * 2));
            }

            AddLabel(200, 305, 0x0, "Guild sign choices");
            AddButton(350, 305, 252, 253, 0, GumpButtonType.Page, 5);

            AddLabel(200, 340, 0x0, "Okay that is fine.");
            AddButton(350, 340, 4005, 4007, 18, GumpButtonType.Reply, 0);

            AddPage(5);

            for (int i = 0; i < 29; ++i)
            {
                AddRadio(53 + ((i / 5) * 50), 137 + ((i % 5) * 35), 210, 211, false, i + 25);
                AddItem(60 + ((i / 5) * 50), 130 + ((i % 5) * 35), 3028 + (i * 2));
            }

            AddLabel(200, 260, 0x0, "Shop sign choices");
            AddButton(350, 260, 250, 251, 0, GumpButtonType.Page, 4);

            AddLabel(200, 290, 0x0, "Okay that is fine.");
            AddButton(350, 290, 4005, 4007, 18, GumpButtonType.Reply, 0);
        }
        AddPage(6); // Demolish House Menu ??
    }
Ejemplo n.º 12
0
			public static bool ISHOUSEFRIEND(TriggerObject trigObject, Mobile mob, BaseHouse house)
			{
				return mob != null && house != null && house.IsFriend(mob);
			}
Ejemplo n.º 13
0
        public HouseGump(Mobile from, BaseHouse house)
            : base(100, 50)
        {
            if (house.Deleted)
                return;

            bool isTent = house is Tent;

            m_House = house;

            from.CloseGump(typeof(HouseGump));
            from.CloseGump(typeof(HouseListGump));
            from.CloseGump(typeof(HouseRemoveGump));

            bool isCombatRestricted = house.IsCombatRestricted(from);

            bool isOwner = m_House.IsOwner(from);
            bool isCoOwner = isOwner || m_House.IsCoOwner(from);
            bool isFriend = isCoOwner || m_House.IsFriend(from);

            if (isCombatRestricted)
                isFriend = isCoOwner = isOwner = false;

            AddPage(0);

            if (isFriend)
            {
                AddBackground(100, 100, 400, 300, 0xA28);
                AddBackground(116, 165, 369, 25, 0x13EC);
            }

            AddImage(230, 65, 100);

            if (m_House.Sign != null)
            {
                ArrayList lines = Wrap(m_House.Sign.Name);

                if (lines != null) //HOUSE SIGN NAME TO FIX
                {
                    for (int i = 0, y = (101 - (lines.Count * 14)) / 2; i < lines.Count; ++i, y += 14)
                    {
                        string s = (string)lines[i];

                        string housename = String.Format("<big>{0}</big>", s);
                        AddHtml(230 + ((143 - (s.Length * 8)) / 2), y + 65, 100, 20, housename, false, false);
                    }
                }
            }

            if (!isFriend)
                return;

            AddHtml(125, 168, 75, 20, "<big>INFO</big>", false, false); //INFO
            AddButton(170, 169, 0x1459, 0x138B, 0, GumpButtonType.Page, 1);

            AddHtml(230, 168, 75, 20, "<big>FRIENDS</big>", false, false); //FRIENDS
            AddButton(310, 169, 0x1459, 0x138B, 0, GumpButtonType.Page, 2);

            AddHtml(375, 168, 75, 20, "<big>OPTIONS</big>", false, false); //OPTIONS
            AddButton(455, 169, 0x1459, 0x138B, 0, GumpButtonType.Page, 3);

            // Info page
            AddPage(1);

            AddButton(150, 366, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0); //EXIT;

            AddHtml(245, 365, 300, 20, "<big>Change this house's name!</big>", false, false); //Change this house's name!
            AddButton(425, 365, 0xA9A, 0xA9B, 1, GumpButtonType.Reply, 0);

            string ownedbyname = String.Format("<big><center><basefont color=white>Owned by  <basefont color=black>{0}</big></center>", GetOwnerName());
            AddHtml(100, 205, 400, 20, ownedbyname, false, false);

            string lockdowns = String.Format("<big><basefont color=white>Number of locked down items:<basefont color=black> {0} out of {1}</basefont>", m_House.LockDownCount, m_House.MaxLockDowns);
            AddHtml(140, 240, 350, 20, lockdowns, false, false);

            string secures = String.Format("<big><basefont color=white>Number of secure containers:<basefont color=black> {0} out of {1}</basefont>", m_House.SecureCount, m_House.MaxSecures);
            AddHtml(140, 260, 350, 20, secures, false, false);

            AddHtml(140, 315, 400, 20, "<big><basefont color=white>This house is properly placed.</big></basefont>", false, false);
            AddHtml(140, 333, 400, 20, "<big><basefont color=white>This house is of classic design.</big></basefont>", false, false);

            if (m_House.Public)
            {
                string visits = String.Format("<big><basefont color=white>Number of visits this building has had:  <basefont color=black>{0}</big></basefont>", m_House.Visits);
                AddHtml(140, 295, 400, 20, visits, false, false);
            }

            // Friends page
            AddPage(2);

            AddButton(150, 366, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0); //EXIT;

            AddHtml(153, 194, 150, 20, "<big><basefont color=white>List of co-owners</basefont>", false, false); // <big><basefont color=white>List of co-owners</basefont>
            AddButton(125, 194, 2714, 2715, 2, GumpButtonType.Reply, 0);

            AddHtml(153, 216, 150, 20, "<big><basefont color=white>Add a co-owner</basefont>", false, false); // <big><basefont color=white>Add a co-owner</basefont>
            AddButton(125, 216, 2714, 2715, 3, GumpButtonType.Reply, 0);

            AddHtml(153, 238, 150, 20, "<big><basefont color=white>Remove a co-owner</basefont>", false, false); // <big><basefont color=white>Remove a co-owner</basefont>
            AddButton(125, 238, 2714, 2715, 4, GumpButtonType.Reply, 0);

            AddHtml(153, 260, 150, 20, "<big><basefont color=white>Clear co-owner list</basefont>", false, false); // <big><basefont color=white>Clear co-owner list</basefont>
            AddButton(125, 260, 2714, 2715, 5, GumpButtonType.Reply, 0);

            AddHtml(340, 194, 155, 20, "<big><basefont color=white>List of Friends</basefont>", false, false); // <big><basefont color=white>List of Friends</basefont>
            AddButton(310, 194, 2714, 2715, 6, GumpButtonType.Reply, 0);

            AddHtml(340, 216, 155, 20, "<big><basefont color=white>Add a Friend</basefont>", false, false); // <big><basefont color=white>Add a Friend</basefont>
            AddButton(310, 216, 2714, 2715, 7, GumpButtonType.Reply, 0);

            AddHtml(340, 238, 155, 20, "<big><basefont color=white>Remove a Friend</basefont>", false, false); // <big><basefont color=white>Remove a Friend</basefont>
            AddButton(310, 238, 2714, 2715, 8, GumpButtonType.Reply, 0);

            AddHtml(340, 260, 155, 20, "<big><basefont color=white>Clear Friends list</basefont>", false, false); // <big><basefont color=white>Clear Friends list</basefont>
            AddButton(310, 260, 2714, 2715, 9, GumpButtonType.Reply, 0);

            if (!isTent)
            {
                AddHtml(225, 281, 280, 20, "<big><basefont color=white>Ban someone from the house</basefont>", false, false); // <big><basefont color=white>Ban someone from the house</basefont>
                AddButton(195, 281, 2714, 2715, 10, GumpButtonType.Reply, 0);

                AddHtml(225, 302, 280, 20, "<big><basefont color=white>Eject someone from the house</basefont>", false, false); // <big><basefont color=white>Eject someone from the house</basefont>
                AddButton(195, 302, 2714, 2715, 11, GumpButtonType.Reply, 0);

                AddHtml(225, 324, 280, 20, "<big><basefont color=white>View a list of banned people</basefont>", false, false); // <big><basefont color=white>View a list of banned people</basefont>
                AddButton(195, 324, 2714, 2715, 12, GumpButtonType.Reply, 0);

                AddHtml(225, 346, 280, 20, "<big><basefont color=white>Lift a ban</basefont>", false, false); // <big><basefont color=white>Lift a ban</basefont>
                AddButton(195, 346, 2714, 2715, 13, GumpButtonType.Reply, 0);
            }

            // Options page
            AddPage(3);

            AddButton(150, 366, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0); //EXIT;

            AddHtml(185, 195, 355, 30, "<big><basefont color=white>Transfer ownership of the house</basefont>", false, false); // <big><basefont color=white>Transfer ownership of the house</basefont>
            AddButton(155, 195, 2714, 2715, 14, GumpButtonType.Reply, 0);

            AddHtml(185, 225, 355, 30, "<big><basefont color=white>Demolish house and get deed back</basefont>", false, false); // <big><basefont color=white>Demolish house and get deed back</basefont>
            AddButton(155, 225, 2714, 2715, 15, GumpButtonType.Reply, 0);

            if (!m_House.Public)
            {
                AddHtml(185, 255, 355, 30, "<big><basefont color=white>Change the house locks</basefont>", false, false); // <big><basefont color=white>Change the house locks</basefont>
                AddButton(155, 255, 2714, 2715, 16, GumpButtonType.Reply, 0);

                AddHtml(185, 285, 300, 90, "<big><basefont color=white>Declare this building to be public. This will make your front door unlockable.</basefont>", false, false); // <big><basefont color=white>Declare this building to be public. This will make your front door unlockable.</basefont>
                AddButton(155, 285, 2714, 2715, 17, GumpButtonType.Reply, 0);
            }
            else
            {
                AddHtml(185, 255, 350, 30, "<big><basefont color=white>Change the sign type</basefont>", false, false); // <big><basefont color=white>Change the sign type</basefont>
                AddButton(155, 255, 2714, 2715, 0, GumpButtonType.Page, 4);

                AddHtml(185, 285, 350, 30, "<big><basefont color=white>Declare this building to be private.</basefont>", false, false); // <big><basefont color=white>Declare this building to be private.</basefont>
                AddButton(155, 285, 2714, 2715, 17, GumpButtonType.Reply, 0);

                // Change the sign type
                AddPage(4);

                for (int i = 0; i < 24; ++i)
                {
                    //AddRadio( 53 + ((i / 4) * 50), 137 + ((i % 4) * 35), 210, 211, false, i + 1 );
                    //AddItem( 60 + ((i / 4) * 50), 130 + ((i % 4) * 35), 2980 + (i * 2) );
                    AddRadio(153 + ((i / 4) * 50), 202 + ((i % 4) * 35), 210, 211, false, i + 1);
                    AddItem(160 + ((i / 4) * 50), 195 + ((i % 4) * 35), 2980 + (i * 2));
                }

                AddHtml(275, 365, 129, 20, "<big><basefont color=white>Guild sign choices</basefont>", false, false); // Guild sign choices
                AddButton(425, 360, 252, 253, 0, GumpButtonType.Page, 5);

                AddButton(150, 366, 0xF7, 0xF8, 18, GumpButtonType.Reply, 0); //OKAY

                AddPage(5);

                for (int i = 0; i < 29; ++i)
                {
                    AddRadio(153 + ((i / 5) * 50), 202 + ((i % 5) * 35), 210, 211, false, i + 25);
                    AddItem(160 + ((i / 5) * 50), 195 + ((i % 5) * 35), 3028 + (i * 2));
                }

                AddHtml(275, 365, 129, 20, "<big><basefont color=white>Shop sign choices</basefont>", false, false); // Shop sign choices
                AddButton(425, 360, 250, 251, 0, GumpButtonType.Page, 4);

                AddButton(150, 366, 0xF7, 0xF8, 18, GumpButtonType.Reply, 0); //OKAY
            }
        }
Ejemplo n.º 14
0
        public HouseGumpAOS( HouseGumpPageAOS page, Mobile from, BaseHouse house )
            : base(50, 40)
        {
            m_House = house;
            m_Page = page;

            from.CloseGump( typeof( HouseGumpAOS ) );
            //from.CloseGump( typeof( HouseListGump ) );
            //from.CloseGump( typeof( HouseRemoveGump ) );

            bool isCombatRestricted = house.IsCombatRestricted( from );

            bool isOwner = house.IsOwner( from );
            bool isCoOwner = isOwner || house.IsCoOwner( from );
            bool isFriend = isCoOwner || house.IsFriend( from );

            if ( isCombatRestricted )
                isFriend = isCoOwner = isOwner = false;

            AddPage( 0 );

            if ( isFriend || page == HouseGumpPageAOS.Vendors )
            {
                AddBackground(0, 0, 420, page != HouseGumpPageAOS.Vendors ? 440 : 420, 9270);

                AddImageTiled( 10, 10, 400, 100, 2624 );
                //AddAlphaRegion( 10, 10, 400, 100 );

                AddImageTiled( 10, 120, 400, 260, 2624 );
                //AddAlphaRegion( 10, 120, 400, 260 );

                AddImageTiled( 10, 390, 400, page != HouseGumpPageAOS.Vendors ? 40 : 20, 2624 );
                //AddAlphaRegion( 10, 390, 400, page != HouseGumpPageAOS.Vendors ? 40 : 20 );

                AddButtonLabeled( 250, page != HouseGumpPageAOS.Vendors ? 410 : 390, 0, "Fechar", true ); // CLOSE
            }

            AddImage( 10, 10, 100 );

            if ( m_House.Sign != null )
            {
                ArrayList lines = Wrap( m_House.Sign.GetName() );

                if ( lines != null )
                {
                    for ( int i = 0, y = (114 - (lines.Count * 14)) / 2; i < lines.Count; ++i, y += 14 )
                    {
                        string s = (string)lines[i];

                        AddLabel( 10 + ((160 - (s.Length * 8)) / 2), y, 0, s );
                    }
                }
            }

            if ( page == HouseGumpPageAOS.Vendors )
            {
                AddHtmlLocalized( 10, 120, 400, 20, 1062428, LabelColor, false, false ); // <CENTER>SHOPS</CENTER>

                AddList( house.AvailableVendorsFor( from ), 1, false, false, from );
                return;
            }

            if ( !isFriend )
                return;

            if ( house.Public )
            {
                AddButtonLabeled( 10, 390, GetButtonID( 0, 0 ), "Banir", true); // Banish
                AddButtonLabeled(10, 410, GetButtonID(0, 1), "Remover Ban", true); // Lift a Ban
            }
            else
            {
                AddButtonLabeled(10, 390, GetButtonID(0, 2), "Permitir Acesso", true); // Grant Access
                AddButtonLabeled(10, 410, GetButtonID(0, 3), "Remover Acesso", true); // Revoke Access
            }

            AddPageButton( 150, 10, GetButtonID( 1, 0 ), "INFORMAÇÕES", HouseGumpPageAOS.Information );
            AddPageButton( 150, 30, GetButtonID( 1, 1 ), "SEGURANÇA", HouseGumpPageAOS.Security );
            AddPageButton( 150, 50, GetButtonID( 1, 2 ), "SECURES", HouseGumpPageAOS.Storage );
            AddPageButton( 150, 70, GetButtonID( 1, 3 ), "CUSTOMIZAR", HouseGumpPageAOS.Customize );
            AddPageButton( 150, 90, GetButtonID( 1, 4 ), "TRANSFERIR", HouseGumpPageAOS.Ownership );

            switch ( page )
            {
                case HouseGumpPageAOS.Information:
                {
                    //AddHtmlLocalized( 20, 130, 200, 20, 1011242, LabelColor, false, false ); // Owned By:
                    AddHtml(20, 130, 200, 20, "Dono: " + GetOwnerName(), false, false); // Owned By:
                    //AddLabel( 210, 130, LabelHue, GetOwnerName() );

                    AddHtml(20, 170, 380, 20, "Esta casa está colocada corretamente", false, false); // This house is properly placed.
                    AddHtml(20, 190, 380, 20, "Esta casa é de estilo moderno", false, false); // This house is of modern design.
                    AddHtml(20, 210, 380, 20, (house is HouseFoundation) ? "Esta é uma casa customizada" : "Esta é uma casa pré-moldada", false, false); // This is a (pre | custom)-built house.
                    //AddHtmlLocalized(20, 230, 380, 20, house.Public ? "" : 1060679, SelectedColor, false, false); // This house is (private | open to the public).
                    AddHtml(20, 230, 380, 20, house.Public ? "Esta casa é pública" : "Esta casa é restrita", false, false); // This house is (private | open to the public).

                    switch ( house.DecayType )
                    {
                        case DecayType.Ageless:
                        case DecayType.AutoRefresh:
                        {
                            AddHtml(20, 250, 380, 20, "Esta casa tem Refresh Automático", false, false); // This house is <a href = "?ForceTopic97">Automatically</a> refreshed.
                            break;
                        }
                        case DecayType.ManualRefresh:
                        {
                            AddHtml(20, 250, 380, 20, "Esta casa necessita de Refresh a cada 30 dias", false, false); // This house is <a href = "?ForceTopic97">Grandfathered</a>.
                            break;
                        }
                        case DecayType.Condemned:
                        {
                            AddHtml(20, 250, 380, 20, "Esta casa está condenada", false, false); // This house is <a href = "?ForceTopic97">Condemned</a>.
                            break;
                        }
                    }

                    AddHtml(20, 290, 200, 20, "Construída em", false, false); // Built On:
                    AddLabel( 250, 290, LabelHue, GetDateTime( house.BuiltOn ) );

                    AddHtml(20, 310, 200, 20, "Última negociação",  false, false); // Last Traded:
                    AddLabel( 250, 310, LabelHue, GetDateTime( house.LastTraded ) );

                    AddHtml(20, 330, 200, 20, "Valor da casa", false, false); // House Value
                    AddLabel( 250, 330, LabelHue, house.Price.ToString() );

                    AddHtml(20, 360, 300, 20, "Número de visitas a esta casa", false, false); // Number of visits this building has had:
                    AddLabel( 350, 360, LabelHue, house.Visits.ToString() );

                    break;
                }
                case HouseGumpPageAOS.Security:
                {
                    //AddButtonLabeled( 10, 130, GetButtonID( 3, 0 ), 1011266, isCoOwner ); // View Co-Owner List
                    //AddButtonLabeled( 10, 150, GetButtonID( 3, 1 ), 1011267, isOwner ); // Add a Co-Owner
                    //AddButtonLabeled( 10, 170, GetButtonID( 3, 2 ), 1018036, isOwner ); // Remove a Co-Owner
                    //AddButtonLabeled( 10, 190, GetButtonID( 3, 3 ), 1011268, isOwner ); // Clear Co-Owner List
                    AddButtonLabeled(10, 130, GetButtonID(3, 0), "Lista de Sócios", isCoOwner); // View Co-Owner List
                    AddButtonLabeled(10, 150, GetButtonID(3, 1), "Adicionar Sócio", isOwner); // Add a Co-Owner
                    AddButtonLabeled(10, 170, GetButtonID(3, 2), "Remover Sócio", isOwner); // Remove a Co-Owner
                    AddButtonLabeled(10, 190, GetButtonID(3, 3), "Limpar Lista de Sócios", isOwner); // Clear Co-Owner List

                    //AddButtonLabeled( 10, 220, GetButtonID( 3, 4 ), 1011243 ); // View Friends List
                    //AddButtonLabeled( 10, 240, GetButtonID( 3, 5 ), 1011244, isCoOwner ); // Add a Friend
                    //AddButtonLabeled( 10, 260, GetButtonID( 3, 6 ), 1018037, isCoOwner ); // Remove a Friend
                    //AddButtonLabeled( 10, 280, GetButtonID( 3, 7 ), 1011245, isCoOwner ); // Clear Friend List
                    AddButtonLabeled(10, 220, GetButtonID(3, 4), "Lista de Amigos", true); // View Friends List
                    AddButtonLabeled(10, 240, GetButtonID(3, 5), "Adicionar Amigo", isCoOwner); // Add a Friend
                    AddButtonLabeled(10, 260, GetButtonID(3, 6), "Remover Amigo", isCoOwner); // Remove a Friend
                    AddButtonLabeled(10, 280, GetButtonID(3, 7), "Limpar Lista de Amigos", isCoOwner); // Clear Friend List

                    if ( house.Public )
                    {
                        //AddButtonLabeled( 10, 310, GetButtonID( 3, 8 ), 1011260 ); // View Ban List
                        //AddButtonLabeled( 10, 330, GetButtonID( 3, 9 ), 1060698 ); // Clear Ban List
                        //AddButtonLabeled( 210, 130, GetButtonID( 3, 12 ), 1060695, isOwner ); // Change to Private
                        //AddHtmlLocalized( 245, 150, 240, 20, 1060694, SelectedColor, false, false ); // Change to Public
                        AddButtonLabeled(10, 310, GetButtonID(3, 8), "Lista de Bans", true); // View Ban List
                        AddButtonLabeled(10, 330, GetButtonID(3, 9), "Limpar Lista de Bans", true); // Clear Ban List
                        AddButtonLabeled(210, 130, GetButtonID(3, 12), "Tornar Casa Privada", isOwner); // Change to Private
                        AddHtml(245, 150, 240, 20, "Tornar Casa Pública", false, false); // Change to Public
                    }
                    else
                    {
                        //AddButtonLabeled( 10, 310, GetButtonID( 3, 10 ), 1060699 ); // View Access List
                        //AddButtonLabeled( 10, 330, GetButtonID( 3, 11 ), 1060700 ); // Clear Access List
                        //AddHtmlLocalized( 245, 130, 240, 20, 1060695, SelectedColor, false, false ); // Change to Private
                        //AddButtonLabeled( 210, 150, GetButtonID( 3, 13 ), 1060694, isOwner ); // Change to Public
                        AddButtonLabeled(10, 310, GetButtonID(3, 10), "Lista de Acessos", true); // View Access List
                        AddButtonLabeled(10, 330, GetButtonID(3, 11), "Limpar Lista de Acessos", true); // Clear Access List
                        AddHtml(245, 130, 240, 20, "Tornar Casa Privada", false, false); // Change to Private
                        AddButtonLabeled(210, 150, GetButtonID(3, 13), "Tornar Casa Pública", isOwner); // Change to Public
                    }

                    break;
                }
                case HouseGumpPageAOS.Storage:
                {
                    AddHtmlLocalized( 10, 130, 400, 20, 1060682, LabelColor, false, false ); // <CENTER>HOUSE STORAGE SUMMARY</CENTER>

                    // This is not as OSI; storage changes not yet implemented

                    /*AddHtmlLocalized( 10, 170, 275, 20, 1011237, LabelColor, false, false ); // Number of locked down items:
                    AddLabel( 310, 170, LabelHue, m_House.LockDownCount.ToString() );

                    AddHtmlLocalized( 10, 190, 275, 20, 1011238, LabelColor, false, false ); // Maximum locked down items:
                    AddLabel( 310, 190, LabelHue, m_House.MaxLockDowns.ToString() );

                    AddHtmlLocalized( 10, 210, 275, 20, 1011239, LabelColor, false, false ); // Number of secure containers:
                    AddLabel( 310, 210, LabelHue, m_House.SecureCount.ToString() );

                    AddHtmlLocalized( 10, 230, 275, 20, 1011240, LabelColor, false, false ); // Maximum number of secure containers:
                    AddLabel( 310, 230, LabelHue, m_House.MaxSecures.ToString() );*/

                    int fromSecures, fromVendors, fromLockdowns, fromMovingCrate;

                    int maxSecures = house.GetAosMaxSecures();
                    int curSecures = house.GetAosCurSecures( out fromSecures, out fromVendors, out fromLockdowns, out fromMovingCrate );

                    int maxLockdowns = house.GetAosMaxLockdowns();
                    int curLockdowns = house.GetAosCurLockdowns();

                    int bonusStorage = (int)((house.BonusStorageScalar * 100)-100);

                    //if( bonusStorage > 0 )
                    //{
                    //    //AddHtmlLocalized( 10, 150, 300, 20, 1072519, LabelColor, false, false ); // Increased Storage
                    //    AddLabel( 310, 150, LabelHue, String.Format( "{0}%", bonusStorage ) );
                    //}

                    //AddHtmlLocalized( 10, 170, 300, 20, 1060683, LabelColor, false, false ); // Maximum Secure Storage
                    AddHtml(10, 170, 300, 20, "Maximo de Secures", false, false); // Maximum Secure Storage
                    AddLabel( 310, 170, LabelHue, maxSecures.ToString() );

                    //AddHtmlLocalized( 10, 190, 300, 20, 1060685, LabelColor, false, false ); // Used by Moving Crate
                    AddHtml(10, 190, 300, 20, "Utilizado por Itens Moveis", false, false); // Used by Moving Crate
                    AddLabel( 310, 190, LabelHue, fromMovingCrate.ToString() );

                    //AddHtmlLocalized( 10, 210, 300, 20, 1060686, LabelColor, false, false ); // Used by Lockdowns
                    AddHtml(10, 210, 300, 20, "Utilizado por Lockdowns", false, false); // Used by Lockdowns
                    AddLabel( 310, 210, LabelHue, fromLockdowns.ToString() );

                    if ( BaseHouse.NewVendorSystem )
                    {
                        //AddHtmlLocalized( 10, 230, 300, 20, 1060688, LabelColor, false, false ); // Used by Secure Containers
                        AddHtml(10, 230, 300, 20, "Utilizado por Secures Containers", false, false); // Used by Secure Containers
                        AddLabel( 310, 230, LabelHue, fromSecures.ToString() );

                        //AddHtmlLocalized( 10, 250, 300, 20, 1060689, LabelColor, false, false ); // Available Storage
                        AddHtml(10, 250, 300, 20, "Storages Disponíveis", false, false); // Available Storage
                        AddLabel( 310, 250, LabelHue, Math.Max( maxSecures - curSecures, 0 ).ToString() );

                        //AddHtmlLocalized( 10, 290, 300, 20, 1060690, LabelColor, false, false ); // Maximum Lockdowns
                        AddHtml(10, 290, 300, 20, "Máximo de Lockdowns", false, false); // Maximum Lockdowns
                        AddLabel( 310, 290, LabelHue, maxLockdowns.ToString() );

                        //AddHtmlLocalized( 10, 310, 300, 20, 1060691, LabelColor, false, false ); // Available Lockdowns
                        AddHtml(10, 310, 300, 20, "Lockdowns Disponíveis", false, false); // Available Lockdowns
                        AddLabel( 310, 310, LabelHue, Math.Max( maxLockdowns - curLockdowns, 0 ).ToString() );

                        int maxVendors = house.GetNewVendorSystemMaxVendors();
                        int vendors = house.PlayerVendors.Count + house.VendorRentalContracts.Count;

                        //AddHtmlLocalized( 10, 350, 300, 20, 1062391, LabelColor, false, false ); // Vendor Count
                        AddHtml(10, 350, 300, 20, "Total Vendors", false, false); // Vendor Count
                        AddLabel( 310, 350, LabelHue, vendors.ToString() + " / " + maxVendors.ToString() );
                    }
                    else
                    {
                        //AddHtmlLocalized( 10, 230, 300, 20, 1060687, LabelColor, false, false ); // Used by Vendors
                        AddHtml(10, 230, 300, 20, "Utilizado por Vendors", false, false); // Used by Vendors
                        AddLabel( 310, 230, LabelHue, fromVendors.ToString() );

                        //AddHtmlLocalized( 10, 250, 300, 20, 1060688, LabelColor, false, false ); // Used by Secure Containers
                        AddHtml(10, 250, 300, 20, "Utilizado por Secure Containers", false, false); // Used by Secure Containers
                        AddLabel( 310, 250, LabelHue, fromSecures.ToString() );

                        //AddHtmlLocalized( 10, 270, 300, 20, 1060689, LabelColor, false, false ); // Available Storage
                        AddHtml(10, 270, 300, 20, "Storages Disponíveis", false, false); // Available Storage
                        AddLabel( 310, 270, LabelHue, Math.Max( maxSecures - curSecures, 0 ).ToString() );

                        //AddHtmlLocalized( 10, 330, 300, 20, 1060690, LabelColor, false, false ); // Maximum Lockdowns
                        AddHtml(10, 330, 300, 20, "Máximo de Lockdowns", false, false); // Maximum Lockdowns
                        AddLabel( 310, 330, LabelHue, maxLockdowns.ToString() );

                        //AddHtmlLocalized( 10, 350, 300, 20, 1060691, LabelColor, false, false ); // Available Lockdowns
                        AddHtml(10, 350, 300, 20, "Lockdowns Disponíveis", false, false); // Available Lockdowns
                        AddLabel( 310, 350, LabelHue, Math.Max( maxLockdowns - curLockdowns, 0 ).ToString() );
                    }

                    break;
                }
                case HouseGumpPageAOS.Customize:
                {
                    bool isCustomizable = isOwner && ( house is HouseFoundation );

                    //AddButtonLabeled(10, 120, GetButtonID(5, 0), "Transformar em Casa Custom", isOwner && !isCustomizable && (house.ConvertEntry != null)); // Convert Into Customizable House
                    //AddButtonLabeled(10, 160, GetButtonID(5, 1), "Customizar Casa", isOwner && isCustomizable); // Customize This House
                    //AddButtonLabeled(10, 180, GetButtonID(5, 2), 1060760, isOwner && house.MovingCrate != null); // Relocate Moving Crate

                    AddButtonLabeled(10, 120, GetButtonID(5, 10), "Tornar um Cofre Seguro", isOwner || isCoOwner);
                    AddButtonLabeled(10, 140, GetButtonID(5, 11), "Destrancar um Cofre", isOwner || isCoOwner);
                    AddButtonLabeled(10, 160, GetButtonID(5, 12), "Trancar Item", isOwner || isCoOwner);
                    AddButtonLabeled(10, 180, GetButtonID(5, 13), "Destrancar Item", isOwner || isCoOwner);

                    //AddButtonLabeled(10, 230, GetButtonID( 5, 3 ), "Mudar Placa", isOwner); // Change House Sign
                    AddButtonLabeled(10, 230, GetButtonID(5, 7), "Renomear Casa", isCoOwner); // Rename House

                    //AddButtonLabeled( 10, 270, GetButtonID( 5, 4 ), "Mudar Assinatura", isOwner); // Change House Sign Hanger
                    //AddButtonLabeled(10, 250, GetButtonID(5, 5), 1060763, isOwner && isCustomizable && (((HouseFoundation)house).Signpost != null)); // Change Signpost
                    //AddButtonLabeled(10, 280, GetButtonID(5, 6), 1062004, isOwner && isCustomizable); // Change Foundation Style

                    break;
                }
                case HouseGumpPageAOS.Ownership:
                {
                    AddButtonLabeled( 10, 130, GetButtonID( 6, 0 ), "Demolir Casa", isOwner && house.MovingCrate == null && house.InternalizedVendors.Count == 0 ); // Demolish House
                    AddButtonLabeled( 10, 150, GetButtonID( 6, 1 ), "Transferir Casa", isOwner ); // Trade House
                    AddButtonLabeled( 10, 190, GetButtonID( 6, 2 ), "Definir como casa primária", false ); // Make Primary

                    break;
                }
                case HouseGumpPageAOS.ChangeHanger:
                {
                    for ( int i = 0; i < m_HangerNumbers.Length; ++i )
                    {
                        int x = 50 + ((i % 3) * 100);
                        int y = 180 + ((i / 3) * 80);

                        AddButton( x, y, 4005, 4007, GetButtonID( 7, i ), GumpButtonType.Reply, 0 );
                        AddItem( x + 20, y, m_HangerNumbers[i] );
                    }

                    break;
                }
                case HouseGumpPageAOS.ChangeFoundation:
                {
                    for ( int i = 0; i < m_FoundationNumbers.Length; ++i )
                    {
                        int x = 15 + ((i % 5) * 80);
                        int y = 180 + ((i / 5) * 100);

                        AddButton( x, y, 4005, 4007, GetButtonID( 8, i ), GumpButtonType.Reply, 0 );
                        AddItem( x + 25, y, m_FoundationNumbers[i] );
                    }

                    break;
                }
                case HouseGumpPageAOS.ChangeSign:
                {
                    int index = 0;

                    if ( _HouseSigns.Count == 0 )
                    {
                        // Add standard signs
                        for ( int i = 0; i < 54; ++i )
                        {
                            _HouseSigns.Add( 2980 + ( i * 2 ) );
                        }

                        // Add library and beekeeper signs ( ML )
                        _HouseSigns.Add( 2966 );
                        _HouseSigns.Add( 3140 );
                    }

                    int signsPerPage = Core.ML ? 24 : 18;
                    int totalSigns = Core.ML ? 56 : 54;
                    int pages = (int) Math.Ceiling( (double) totalSigns / signsPerPage );

                    for ( int i = 0; i < pages; ++i )
                    {
                        AddPage( i + 1 );

                        AddButton( 10, 360, 4005, 4007, 0, GumpButtonType.Page, ((i + 1) % pages ) + 1 );

                        for ( int j = 0; j < signsPerPage && totalSigns - ( signsPerPage * i ) - j > 0; ++j )
                        {
                            int x = 30 + ((j % 6) * 60);
                            int y = 130 + ((j / 6) * 60);

                            AddButton( x, y, 4005, 4007, GetButtonID( 9, index ), GumpButtonType.Reply, 0 );
                            AddItem( x + 20, y, _HouseSigns[index++] );
                        }
                    }

                    break;
                }
                case HouseGumpPageAOS.RemoveCoOwner:
                {
                    //AddHtmlLocalized( 10, 120, 400, 20, 1060730, LabelColor, false, false ); // <CENTER>CO-OWNER LIST</CENTER>
                    AddHtml(10, 120, 400, 20, "<CENTER>LISTA DE SÓCIOS</CENTER>", false, false); // <CENTER>CO-OWNER LIST</CENTER>
                    AddList( house.CoOwners, 10, false, true, from );
                    break;
                }
                case HouseGumpPageAOS.ListCoOwner:
                {
                    //AddHtmlLocalized( 10, 120, 400, 20, 1060730, LabelColor, false, false ); // <CENTER>CO-OWNER LIST</CENTER>
                    AddHtml(10, 120, 400, 20, "<CENTER>LISTA DE SÓCIOS</CENTER>", false, false); // <CENTER>CO-OWNER LIST</CENTER>
                    AddList( house.CoOwners, -1, false, true, from );
                    break;
                }
                case HouseGumpPageAOS.RemoveFriend:
                {
                    //AddHtmlLocalized( 10, 120, 400, 20, 1060731, LabelColor, false, false ); // <CENTER>FRIENDS LIST</CENTER>
                    AddHtml(10, 120, 400, 20, "<CENTER>LISTA DE AMIGOS</CENTER>", false, false); // <CENTER>FRIENDS LIST</CENTER>
                    AddList( house.Friends, 11, false, true, from );
                    break;
                }
                case HouseGumpPageAOS.ListFriend:
                {
                    //AddHtmlLocalized( 10, 120, 400, 20, 1060731, LabelColor, false, false ); // <CENTER>FRIENDS LIST</CENTER>
                    AddHtml(10, 120, 400, 20, "<CENTER>LISTA DE AMIGOS</CENTER>", false, false); // <CENTER>FRIENDS LIST</CENTER>
                    AddList( house.Friends, -1, false, true, from );
                    break;
                }
                case HouseGumpPageAOS.RemoveBan:
                {
                    //AddHtmlLocalized( 10, 120, 400, 20, 1060733, LabelColor, false, false ); // <CENTER>BAN LIST</CENTER>
                    AddHtml(10, 120, 400, 20, "<CENTER>LISTA DE BANS</CENTER>", false, false); // <CENTER>BAN LIST</CENTER>
                    AddList( house.Bans, 12, true, true, from );
                    break;
                }
                case HouseGumpPageAOS.ListBan:
                {
                    //AddHtmlLocalized( 10, 120, 400, 20, 1060733, LabelColor, false, false ); // <CENTER>BAN LIST</CENTER>
                    AddHtml(10, 120, 400, 20, "<CENTER>LISTA DE BANS</CENTER>", false, false); // <CENTER>BAN LIST</CENTER>
                    AddList( house.Bans, -1, true, true, from );
                    break;
                }
                case HouseGumpPageAOS.RemoveAccess:
                {
                    //AddHtmlLocalized( 10, 120, 400, 20, 1060732, LabelColor, false, false ); // <CENTER>ACCESS LIST</CENTER>
                    AddHtml(10, 120, 400, 20, "<CENTER>LISTA DE ACESSOS</CENTER>", false, false); // <CENTER>ACCESS LIST</CENTER>
                    AddList(house.Access, 13, false, true, from);
                    break;
                }
                case HouseGumpPageAOS.ListAccess:
                {
                    //AddHtmlLocalized( 10, 120, 400, 20, 1060732, LabelColor, false, false ); // <CENTER>ACCESS LIST</CENTER>
                    AddHtml(10, 120, 400, 20, "<CENTER>LISTA DE ACESSOS</CENTER>", false, false); // <CENTER>ACCESS LIST</CENTER>
                    AddList( house.Access, -1, false, true, from );
                    break;
                }
                case HouseGumpPageAOS.ChangePost:
                {
                    int index = 0;

                    for ( int i = 0; i < 2; ++i )
                    {
                        AddPage( i + 1 );

                        AddButton( 10, 360, 4005, 4007, 0, GumpButtonType.Page, ((i + 1) % 2) + 1 );

                        for ( int j = 0; j < 16 && index < m_PostNumbers.Length; ++j )
                        {
                            int x = 15 + ((j % 8) * 50);
                            int y = 130 + ((j / 8) * 110);

                            AddButton( x, y, 4005, 4007, GetButtonID( 14, index ), GumpButtonType.Reply, 0 );
                            AddItem( x + 10, y, m_PostNumbers[index++] );
                        }
                    }

                    break;
                }
            }
        }
Ejemplo n.º 15
0
		public HouseGumpAOS( HouseGumpPageAOS page, Mobile from, BaseHouse house ) : base( 50, 40 )
		{
			m_House = house;
			m_Page = page;

			from.CloseGump( typeof( HouseGumpAOS ) );
			//from.CloseGump( typeof( HouseListGump ) );
			//from.CloseGump( typeof( HouseRemoveGump ) );

			bool isOwner = house.IsOwner( from );
			bool isCoOwner = isOwner || house.IsCoOwner( from );
			bool isFriend = isCoOwner || house.IsFriend( from );

			AddPage( 0 );

			if ( isFriend )
			{
				AddBackground( 0, 0, 420, 440, 5054 );

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

				AddImageTiled( 10, 120, 400, 260, 2624 );
				AddAlphaRegion( 10, 120, 400, 260 );

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

				AddButtonLabeled( 250, 410, 0, 1060675 ); // CLOSE
			}

			AddImage( 10, 10, 100 );

			if ( m_House.Sign != null )
			{
				ArrayList lines = Wrap( m_House.Sign.Name );

				if ( lines != null )
				{
					for ( int i = 0, y = (114 - (lines.Count * 14)) / 2; i < lines.Count; ++i, y += 14 )
					{
						string s = (string)lines[i];

						AddLabel( 10 + ((160 - (s.Length * 8)) / 2), y, 0, s );
					}
				}
			}

			if ( !isFriend )
				return;

			if ( house.Public )
			{
				AddButtonLabeled( 10, 390, GetButtonID( 0, 0 ), 1060674 ); // Banish
				AddButtonLabeled( 10, 410, GetButtonID( 0, 1 ), 1011261 ); // Lift a Ban
			}
			else
			{
				AddButtonLabeled( 10, 390, GetButtonID( 0, 2 ), 1060676 ); // Grant Access
				AddButtonLabeled( 10, 410, GetButtonID( 0, 3 ), 1060677 ); // Revoke Access
			}

			AddPageButton( 150, 10, GetButtonID( 1, 0 ), 1060668, HouseGumpPageAOS.Information );
			AddPageButton( 150, 30, GetButtonID( 1, 1 ), 1060669, HouseGumpPageAOS.Security );
			AddPageButton( 150, 50, GetButtonID( 1, 2 ), 1060670, HouseGumpPageAOS.Storage );
			AddPageButton( 150, 70, GetButtonID( 1, 3 ), 1060671, HouseGumpPageAOS.Customize );
			AddPageButton( 150, 90, GetButtonID( 1, 4 ), 1060672, HouseGumpPageAOS.Ownership );

			switch ( page )
			{
				case HouseGumpPageAOS.Information:
				{
					AddHtmlLocalized( 20, 130, 200, 20, 1011242, LabelColor, false, false ); // Owned By: 
					AddLabel( 210, 130, LabelHue, GetOwnerName() );

					AddHtmlLocalized( 20, 170, 380, 20, 1018032, SelectedColor, false, false ); // This house is properly placed.
					AddHtmlLocalized( 20, 190, 380, 20, 1018035, SelectedColor, false, false ); // This house is of modern design.
					AddHtmlLocalized( 20, 210, 380, 20, (house is HouseFoundation) ? 1060681 : 1060680, SelectedColor, false, false ); // This is a (pre | custom)-built house.
					AddHtmlLocalized( 20, 230, 380, 20, house.Public ? 1060678 : 1060679, SelectedColor, false, false ); // This house is (private | open to the public).
					AddHtmlLocalized( 20, 250, 380, 20, 1062209, SelectedColor, false, false ); // This house is <a href = "?ForceTopic97">Automatically</a> refreshed.

					AddHtmlLocalized( 20, 290, 200, 20, 1060692, SelectedColor, false, false ); // Built On:
					AddLabel( 250, 290, LabelHue, GetDateTime( house.BuiltOn ) );

					AddHtmlLocalized( 20, 310, 200, 20, 1060693, SelectedColor, false, false ); // Last Traded:
					AddLabel( 250, 310, LabelHue, GetDateTime( house.LastTraded ) );

					AddHtmlLocalized( 20, 330, 200, 20, 1061793, SelectedColor, false, false ); // House Value
					AddLabel( 250, 330, LabelHue, house.Price.ToString() );

					AddHtmlLocalized( 20, 360, 300, 20, 1011241, SelectedColor, false, false ); // Number of visits this building has had: 
					AddLabel( 350, 360, LabelHue, house.Visits.ToString() );

					break;
				}
				case HouseGumpPageAOS.Security:
				{
					AddButtonLabeled( 10, 130, GetButtonID( 3, 0 ), 1011266, isCoOwner ); // View Co-Owner List
					AddButtonLabeled( 10, 150, GetButtonID( 3, 1 ), 1011267, isOwner ); // Add a Co-Owner
					AddButtonLabeled( 10, 170, GetButtonID( 3, 2 ), 1018036, isOwner ); // Remove a Co-Owner
					AddButtonLabeled( 10, 190, GetButtonID( 3, 3 ), 1011268, isOwner ); // Clear Co-Owner List

					AddButtonLabeled( 10, 220, GetButtonID( 3, 4 ), 1011243 ); // View Friends List
					AddButtonLabeled( 10, 240, GetButtonID( 3, 5 ), 1011244, isCoOwner ); // Add a Friend
					AddButtonLabeled( 10, 260, GetButtonID( 3, 6 ), 1018037, isCoOwner ); // Remove a Friend
					AddButtonLabeled( 10, 280, GetButtonID( 3, 7 ), 1011245, isCoOwner ); // Clear Friend List

					if ( house.Public )
					{
						AddButtonLabeled( 10, 310, GetButtonID( 3, 8 ), 1011260 ); // View Ban List
						AddButtonLabeled( 10, 330, GetButtonID( 3, 9 ), 1060698 ); // Clear Ban List

//						AddButtonLabeled( 210, 130, GetButtonID( 3, 12 ), 1060695, isOwner ); // Make This House Private
					}
					else
					{
						AddButtonLabeled( 10, 310, GetButtonID( 3, 10 ), 1060699 ); // View Access List
						AddButtonLabeled( 10, 330, GetButtonID( 3, 11 ), 1060700 ); // Clear Access List

						AddButtonLabeled( 210, 130, GetButtonID( 3, 13 ), 1060694, isOwner ); // Make This House Public
					}

					break;
				}
				case HouseGumpPageAOS.Storage:
				{
					AddHtmlLocalized( 10, 130, 400, 20, 1060682, LabelColor, false, false ); // <CENTER>HOUSE STORAGE SUMMARY</CENTER>

					// This is not as OSI; storage changes not yet implemented

					/*AddHtmlLocalized( 10, 170, 275, 20, 1011237, LabelColor, false, false ); // Number of locked down items:
					AddLabel( 310, 170, LabelHue, m_House.LockDownCount.ToString() );

					AddHtmlLocalized( 10, 190, 275, 20, 1011238, LabelColor, false, false ); // Maximum locked down items:
					AddLabel( 310, 190, LabelHue, m_House.MaxLockDowns.ToString() );

					AddHtmlLocalized( 10, 210, 275, 20, 1011239, LabelColor, false, false ); // Number of secure containers:
					AddLabel( 310, 210, LabelHue, m_House.SecureCount.ToString() );

					AddHtmlLocalized( 10, 230, 275, 20, 1011240, LabelColor, false, false ); // Maximum number of secure containers:
					AddLabel( 310, 230, LabelHue, m_House.MaxSecures.ToString() );*/

					int fromSecures, fromVendors, fromLockdowns;

					int maxSecures = house.GetAosMaxSecures();
					int curSecures = house.GetAosCurSecures( out fromSecures, out fromVendors, out fromLockdowns );

					int maxLockdowns = house.GetAosMaxLockdowns();
					int curLockdowns = house.GetAosCurLockdowns();

					AddHtmlLocalized( 10, 170, 300, 20, 1060683, LabelColor, false, false ); // Maximum Secure Storage
					AddLabel( 310, 170, LabelHue, maxSecures.ToString() );

					AddHtmlLocalized( 10, 190, 300, 20, 1060685, LabelColor, false, false ); // Used by Moving Crate
					AddLabel( 310, 190, LabelHue, "0" );

					AddHtmlLocalized( 10, 210, 300, 20, 1060686, LabelColor, false, false ); // Used by Lockdowns
					AddLabel( 310, 210, LabelHue, fromLockdowns.ToString() );

					AddHtmlLocalized( 10, 230, 300, 20, 1060687, LabelColor, false, false ); // Used by Vendors
					AddLabel( 310, 230, LabelHue, fromVendors.ToString() );

					AddHtmlLocalized( 10, 250, 300, 20, 1060688, LabelColor, false, false ); // Used by Secure Containers
					AddLabel( 310, 250, LabelHue, fromSecures.ToString() );

					AddHtmlLocalized( 10, 270, 300, 20, 1060689, LabelColor, false, false ); // Available Storage
					AddLabel( 310, 270, LabelHue, Math.Max( maxSecures - curSecures, 0 ).ToString() );

					AddHtmlLocalized( 10, 330, 300, 20, 1060690, LabelColor, false, false ); // Maximum Lockdowns
					AddLabel( 310, 330, LabelHue, maxLockdowns.ToString() );

					AddHtmlLocalized( 10, 350, 300, 20, 1060691, LabelColor, false, false ); // Available Lockdowns
					AddLabel( 310, 350, LabelHue, Math.Max( maxLockdowns - curLockdowns, 0 ).ToString() );

					break;
				}
				case HouseGumpPageAOS.Customize:
				{
					bool isCustomizable = isOwner && ( house is HouseFoundation );

					AddButtonLabeled( 10, 120, GetButtonID( 5, 0 ), 1060759, isOwner && !isCustomizable && ( house.ConvertEntry != null ) ); // Convert Into Customizable House
					AddButtonLabeled( 10, 160, GetButtonID( 5, 1 ), 1060765, isOwner && isCustomizable ); // Customize This House
					AddButtonLabeled( 10, 180, GetButtonID( 5, 2 ), 1060760, false ); // Relocate Moving Crate
					AddButtonLabeled( 10, 210, GetButtonID( 5, 3 ), 1060761, isOwner && house.Public ); // Change House Sign
					AddButtonLabeled( 10, 230, GetButtonID( 5, 4 ), 1060762, isOwner && isCustomizable ); // Change House Sign Hanger
					AddButtonLabeled( 10, 250, GetButtonID( 5, 5 ), 1060763, isOwner && isCustomizable && ( ((HouseFoundation)house).Signpost != null ) ); // Change Signpost
					AddButtonLabeled( 10, 280, GetButtonID( 5, 6 ), 1062004, isOwner && isCustomizable ); // Change Foundation Style
					AddButtonLabeled( 10, 310, GetButtonID( 5, 7 ), 1060764, isCoOwner ); // Rename House

					break;
				}
				case HouseGumpPageAOS.Ownership:
				{
					AddButtonLabeled( 10, 130, GetButtonID( 6, 0 ), 1061794, isOwner ); // Demolish House
					AddButtonLabeled( 10, 150, GetButtonID( 6, 1 ), 1061797, isOwner ); // Trade House
					AddButtonLabeled( 10, 190, GetButtonID( 6, 2 ), 1061798, false ); // Make Primary

					break;
				}
				case HouseGumpPageAOS.ChangeHanger:
				{
					for ( int i = 0; i < m_HangerNumbers.Length; ++i )
					{
						int x = 50 + ((i % 3) * 100);
						int y = 180 + ((i / 3) * 80);

						AddButton( x, y, 4005, 4007, GetButtonID( 7, i ), GumpButtonType.Reply, 0 );
						AddItem( x + 20, y, m_HangerNumbers[i] );
					}

					break;
				}
				case HouseGumpPageAOS.ChangeFoundation:
				{
					for ( int i = 0; i < m_FoundationNumbers.Length; ++i )
					{
						int x = 15 + ((i % 5) * 80);
						int y = 180 + ((i / 5) * 100);

						AddButton( x, y, 4005, 4007, GetButtonID( 8, i ), GumpButtonType.Reply, 0 );
						AddItem( x + 25, y, m_FoundationNumbers[i] );
					}

					break;
				}
				case HouseGumpPageAOS.ChangeSign:
				{
					int index = 0;

					for ( int i = 0; i < 3; ++i )
					{
						AddPage( i + 1 );

						AddButton( 10, 360, 4005, 4007, 0, GumpButtonType.Page, ((i + 1) % 3) + 1 );

						for ( int j = 0; j < 18; ++j )
						{
							int x = 30 + ((j % 6) * 60);
							int y = 130 + ((j / 6) * 60);

							AddButton( x, y, 4005, 4007, GetButtonID( 9, index ), GumpButtonType.Reply, 0 );
							AddItem( x + 20, y, 2980 + (index++ * 2) );
						}
					}

					break;
				}
				case HouseGumpPageAOS.RemoveCoOwner:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060730, LabelColor, false, false ); // <CENTER>CO-OWNER LIST</CENTER>
					AddList( house.CoOwners, 10, false );
					break;
				}
				case HouseGumpPageAOS.ListCoOwner:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060730, LabelColor, false, false ); // <CENTER>CO-OWNER LIST</CENTER>
					AddList( house.CoOwners, -1, false );
					break;
				}
				case HouseGumpPageAOS.RemoveFriend:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060731, LabelColor, false, false ); // <CENTER>FRIENDS LIST</CENTER>
					AddList( house.Friends, 11, false );
					break;
				}
				case HouseGumpPageAOS.ListFriend:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060731, LabelColor, false, false ); // <CENTER>FRIENDS LIST</CENTER>
					AddList( house.Friends, -1, false );
					break;
				}
				case HouseGumpPageAOS.RemoveBan:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060733, LabelColor, false, false ); // <CENTER>BAN LIST</CENTER>
					AddList( house.Bans, 12, true );
					break;
				}
				case HouseGumpPageAOS.ListBan:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060733, LabelColor, false, false ); // <CENTER>BAN LIST</CENTER>
					AddList( house.Bans, -1, true );
					break;
				}
				case HouseGumpPageAOS.RemoveAccess:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060732, LabelColor, false, false ); // <CENTER>ACCESS LIST</CENTER>
					AddList( house.Access, 13, false );
					break;
				}
				case HouseGumpPageAOS.ListAccess:
				{
					AddHtmlLocalized( 10, 120, 400, 20, 1060732, LabelColor, false, false ); // <CENTER>ACCESS LIST</CENTER>
					AddList( house.Access, -1, false );
					break;
				}
				case HouseGumpPageAOS.ChangePost:
				{
					int index = 0;

					for ( int i = 0; i < 2; ++i )
					{
						AddPage( i + 1 );

						AddButton( 10, 360, 4005, 4007, 0, GumpButtonType.Page, ((i + 1) % 2) + 1 );

						for ( int j = 0; j < 16 && index < m_PostNumbers.Length; ++j )
						{
							int x = 15 + ((j % 8) * 50);
							int y = 130 + ((j / 8) * 110);

							AddButton( x, y, 4005, 4007, GetButtonID( 14, index ), GumpButtonType.Reply, 0 );
							AddItem( x + 10, y, m_PostNumbers[index++] );
						}
					}

					break;
				}
			}
		}
Ejemplo n.º 16
0
		public HouseGump( Mobile from, BaseHouse house ) : base( 20, 30 )
		{
			if ( house.Deleted )
				return;

			m_House = house;

			from.CloseGump( typeof( HouseGump ) );
			from.CloseGump( typeof( HouseListGump ) );
			from.CloseGump( typeof( HouseRemoveGump ) );

			bool isOwner = m_House.IsOwner( from );
			bool isCoOwner = isOwner || m_House.IsCoOwner( from );
			bool isFriend = isCoOwner || m_House.IsFriend( from );

			AddPage( 0 );

			if ( isFriend )
			{
				AddBackground( 0, 0, 420, 430, 5054 );
				AddBackground( 10, 10, 400,410, 3000 );
			}

			AddImage( 130, 0, 100 );

			if ( m_House.Sign != null )
			{
				ArrayList lines = Wrap( m_House.Sign.Name );

				if ( lines != null )
				{
					for ( int i = 0, y = (101 - (lines.Count * 14)) / 2; i < lines.Count; ++i, y += 14 )
					{
						string s = (string)lines[i];

						AddLabel( 130 + ((143 - (s.Length * 8)) / 2), y, 0, s );
					}
				}
			}

			if ( !isFriend )
				return;

			AddHtmlLocalized( 55, 103, 75, 20, 1011233, false, false ); // INFO
			AddButton( 20, 103, 4005, 4007, 0, GumpButtonType.Page, 1 );

			AddHtmlLocalized( 170, 103, 75, 20, 1011234, false, false ); // FRIENDS
			AddButton( 135, 103, 4005, 4007, 0, GumpButtonType.Page, 2 );

			AddHtmlLocalized( 295, 103, 75, 20, 1011235, false, false ); // OPTIONS
			AddButton( 260, 103, 4005, 4007, 0, GumpButtonType.Page, 3 );

			AddHtmlLocalized( 295, 390, 75, 20, 1011441, false, false );  // EXIT
			AddButton( 260, 390, 4005, 4007, 0, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 55, 390, 200, 20, 1011236, false, false ); // Change this house's name!
			AddButton( 20, 390, 4005, 4007, 1, GumpButtonType.Reply, 0 );

			// Info page
			AddPage( 1 );

			//const int fieldStartC = 260;	// Center
			const int fieldStartN = 120;	// Near
			const int fieldStartF = 320;	// Far

			AddHtmlLocalized( 20, 135, 100, 20, 1011242, false, false ); // Owned by:
			AddHtml(fieldStartN, 135, 100, 20, GetOwnerName(), false, false);

			// Angel Island House decay display - owner only.
			if( from.Account == m_House.Owner.Account || from.AccessLevel >= AccessLevel.GameMaster )
			{
				if (m_House.TownshipRestrictedRefresh)
				{	// replace the entire "Decay Time" line
					AddLabel(20, 155, 0x20, @"** NON TOWNSHIP HOUSE - WILL NOT REFRESH! **");
				}
				else
				{
					AddHtml(20, 155, 100, 20, "Decay Time:", false, false); //time until decay
					TimeSpan decay = m_House.StructureDecayTime - DateTime.Now;
					int days = decay.Days;
					double hours = decay.Hours;
					hours += ((double)decay.Minutes) / 60;
					string decaystring = string.Format("{0} days, {1:0.0} hours", days, hours);
					AddHtml(fieldStartN, 155, 300, 20, decaystring, false, false);
				}
			}

			int vstep = 175 - 20;
			AddHtml(20, vstep += 20, 275, 20, "Number of locked down items:", false, false); // Number of locked down items:
			AddHtml(fieldStartF, vstep, 64, 20, String.Format("{0}/{1}", m_House.LockDownCount.ToString(), m_House.MaxLockDowns.ToString()), false, false);
	
			//AddHtmlLocalized(20, vstep += 20, 275, 20, 1011238, false, false); // Maximum locked down items:
			//AddHtml(320, vstep, 50, 20, m_House.MaxLockDowns.ToString(), false, false);

			AddHtml(20, vstep += 20, 275, 20, "Number of secure containers:", false, false); // Number of secure containers:
			AddHtml(fieldStartF, vstep, 64, 20, String.Format("{0}/{1}", m_House.SecureCount.ToString(), m_House.MaxSecures.ToString()), false, false);

			//AddHtmlLocalized(20, vstep += 20, 275, 20, 1011240, false, false); // Maximum number of secure containers:
			//AddHtml(320, vstep, 50, 20, m_House.MaxSecures.ToString(), false, false);

			//if ( true /*!m_House.Public*/ )	// Public houses don't get LockBoxes.
			/*{*/
			AddHtml(20, vstep += 20, 275, 20, "Number of lockboxes:", false, false);
			AddHtml(fieldStartF, vstep, 64, 20, String.Format("{0}/{1}", m_House.LockBoxCount.ToString(), m_House.MaxLockBoxes.ToString()), false, false);

			//AddHtml(20, vstep += 20, 275, 20, "Maximum Number of LockBoxes:", false, false);
			//AddHtml(320, vstep, 50, 20, m_House.MaxLockBoxes.ToString(), false, false);

			AddHtml(20, vstep += 20, 275, 20, "Storage tax credits:", false, false);
			AddHtml(fieldStartF, vstep, 50, 20, m_House.StorageTaxCredits.ToString(), false, false);

			//AddHtmlLocalized( 20, 320, 400, 20, 1018032, false, false ); // This house is properly placed.
			//AddHtmlLocalized( 20, 340, 400, 20, 1018035, false, false ); // This house is of modern design.

            if (m_House.Public == true)
            {
				AddHtmlLocalized(20, vstep += 20, 275, 20, 1011241, false, false); // Number of visits this building has had
				AddHtml(fieldStartF, vstep, 50, 20, m_House.Visits.ToString(), false, false);
            }

			AddHtml(20, vstep += 20, 275, 20, "Barkeepers allowed:", false, false);
			AddHtml(fieldStartF, vstep, 50, 20, m_House.MaximumBarkeepCount.ToString(), false, false);

			if (m_House is Server.Multis.StaticHousing.StaticHouse)
			{
				Server.Multis.StaticHousing.StaticHouse sh = m_House as Server.Multis.StaticHousing.StaticHouse;
				//AddHtml(20, vstep += 20, 275, 20, "------------------", false, false);
				AddHtml(20,  vstep += 20,	275, 20, "House designed by:", false, false);
				AddHtml(fieldStartF, vstep, 275, 20, sh.OriginalOwnerName, false, false);
				AddHtml(20,  vstep += 20,	275, 20, "Designer license:", false, false);
				AddHtml(fieldStartF, vstep, 275, 20, "DL" + ((int)sh.OriginalOwnerSerial).ToString(), false, false);
				AddHtml(20,  vstep += 20,	275, 20, "Version:", false, false);
				AddHtml(fieldStartF, vstep, 275, 20, sh.BlueprintVersion.ToString(), false, false);
				AddHtml(20, vstep += 20,	275, 20, "Last revision:", false, false);
				AddHtml(fieldStartF, vstep, 275, 20, sh.RevisionDate.ToShortDateString(), false, false);
			}

			/*}
			else
			{
				AddHtmlLocalized( 20, 260, 400, 20, 1018032, false, false ); // This house is properly placed.
				AddHtmlLocalized( 20, 280, 400, 20, 1018035, false, false ); // This house is of modern design.

				// TODO: Validate exact placement
				AddHtmlLocalized( 20, 305, 275, 20, 1011241, false, false ); // Number of visits this building has had
				AddHtml( 320, 305, 50, 20, m_House.Visits.ToString(), false, false );
			}*/

			// Friends page
			AddPage( 2 );

			AddHtmlLocalized( 45, 130, 150, 20, 1011266, false, false ); // List of co-owners
			AddButton( 20, 130, 2714, 2715, 2, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 45, 150, 150, 20, 1011267, false, false ); // Add a co-owner
			AddButton( 20, 150, 2714, 2715, 3, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 45, 170, 150, 20, 1018036, false, false ); // Remove a co-owner
			AddButton( 20, 170, 2714, 2715, 4, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 45, 190, 150, 20, 1011268, false, false ); // Clear co-owner list
			AddButton( 20, 190, 2714, 2715, 5, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 225, 130, 155, 20, 1011243, false, false ); // List of Friends
			AddButton( 200, 130, 2714, 2715, 6, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 225, 150, 155, 20, 1011244, false, false ); // Add a Friend
			AddButton( 200, 150, 2714, 2715, 7, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 225, 170, 155, 20, 1018037, false, false ); // Remove a Friend
			AddButton( 200, 170, 2714, 2715, 8, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 225, 190, 155, 20, 1011245, false, false ); // Clear Friends list
			AddButton( 200, 190, 2714, 2715, 9, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 120, 215, 280, 20, 1011258, false, false ); // Ban someone from the house
			AddButton( 95, 215, 2714, 2715, 10, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 120, 235, 280, 20, 1011259, false, false ); // Eject someone from the house
			AddButton( 95, 235, 2714, 2715, 11, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 120, 255, 280, 20, 1011260, false, false ); // View a list of banned people
			AddButton( 95, 255, 2714, 2715, 12, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 120, 275, 280, 20, 1011261, false, false ); // Lift a ban
			AddButton( 95, 275, 2714, 2715, 13, GumpButtonType.Reply, 0 );

			// Options page
			AddPage( 3 );

			AddHtmlLocalized( 45, 150, 355, 30, 1011248, false, false ); // Transfer ownership of the house
			AddButton( 20, 150, 2714, 2715, 14, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 45, 180, 355, 30, 1011249, false, false ); // Demolish house and get deed back
			AddButton( 20, 180, 2714, 2715, 15, GumpButtonType.Reply, 0 );

            AddHtmlLocalized(45, 210, 355, 30, 1011247, false, false); // Change the house locks
            AddButton(20, 210, 2714, 2715, 16, GumpButtonType.Reply, 0);

			if ( !m_House.Public )
			{
				//AddHtmlLocalized( 45, 210, 355, 30, 1011247, false, false ); // Change the house locks
				//AddButton( 20, 210, 2714, 2715, 16, GumpButtonType.Reply, 0 );

				//AddHtmlLocalized( 45, 240, 350, 90, 1011253, false, false ); // Declare this building to be public. This will make your front door unlockable.
                AddHtml(45, 240, 350, 90, "Declare this building to be public.", false, false); // Declare this building to be public. 
				AddButton( 20, 240, 2714, 2715, 17, GumpButtonType.Reply, 0 );
			}
			else
			{
				//AddHtmlLocalized( 45, 280, 350, 30, 1011250, false, false ); // Change the sign type
                AddHtmlLocalized(45, 210 + 30, 350, 30, 1011250, false, false); // Change the sign type
                AddButton(20, 210 + 30, 2714, 2715, 0, GumpButtonType.Page, 4);

                AddHtmlLocalized(45, 240 + 30, 350, 30, 1011252, false, false); // Declare this building to be private.
                AddButton(20, 240 + 30, 2714, 2715, 17, GumpButtonType.Reply, 0);
			
				// Change the sign type
				AddPage( 4 );

				for ( int i = 0; i < 24; ++i )
				{
					AddRadio( 53 + ((i / 4) * 50), 137 + ((i % 4) * 35), 210, 211, false, i + 1 );
					AddItem( 60 + ((i / 4) * 50), 130 + ((i % 4) * 35), 2980 + (i * 2) );
				}

				AddHtmlLocalized( 200, 305, 129, 20, 1011254, false, false ); // Guild sign choices
				AddButton( 350, 305, 252, 253, 0, GumpButtonType.Page, 5 );

				AddHtmlLocalized( 200, 340, 355, 30, 1011277, false, false ); // Okay that is fine.
				AddButton( 350, 340, 4005, 4007, 18, GumpButtonType.Reply, 0 );

				AddPage( 5 );

				for ( int i = 0; i < 29; ++i )
				{
					AddRadio( 53 + ((i / 5) * 50), 137 + ((i % 5) * 35), 210, 211, false, i + 25 );
					AddItem( 60 + ((i / 5) * 50), 130 + ((i % 5) * 35), 3028 + (i * 2) );
				}

				AddHtmlLocalized( 200, 305, 129, 20, 1011255, false, false ); // Shop sign choices
				AddButton( 350, 305, 250, 251, 0, GumpButtonType.Page, 4 );

				AddHtmlLocalized( 200, 340, 355, 30, 1011277, false, false ); // Okay that is fine.
				AddButton( 350, 340, 4005, 4007, 18, GumpButtonType.Reply, 0 );
			}
		}