public StaticRenamePrompt(StaticHouseSign house)
 {
     m_House = house;
 }
        public StaticHouseGump(Mobile from, StaticHouseSign house) : base(20, 30)
        {
            m_House = house;

            bool isOwner = (from.AccessLevel >= AccessLevel.GameMaster || from == m_House.Owner);
            bool isCoOwner;
            bool isFriend;

            if (isOwner)
            {
                isCoOwner = isFriend = true;
            }
            else
            {
                isCoOwner = m_House.IsCoOwner(from);

                if (isCoOwner)
                {
                    isFriend = true;
                }
                else
                {
                    isFriend = 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);
            if (isGM(from))
            {
                AddButton(20, 365, 4005, 4007, 0, GumpButtonType.Page, 6);                  //door page
                AddLabel(55, 365, 0, " Static House Setup ");
            }
            // 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.Secures == null ? "0" : m_House.Secures.Count.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.

            // 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(45, 215, 280, 20, 1011258, false, false);               // Ban someone from the house
            AddButton(20, 215, 2714, 2715, 10, GumpButtonType.Reply, 0);

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

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

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

            AddLabel(265, 215, 280, "Grant Access");
            AddButton(240, 215, 2714, 2715, 26, GumpButtonType.Reply, 0);

            AddLabel(265, 235, 280, "Remove Access");
            AddButton(240, 235, 2714, 2715, 27, GumpButtonType.Reply, 0);

            AddLabel(265, 255, 280, "View Access List");
            AddButton(240, 255, 2714, 2715, 28, GumpButtonType.Reply, 0);

            AddLabel(265, 275, 280, "Clear Access List");
            AddButton(240, 275, 2714, 2715, 29, 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);

            if (isGM(from))
            {
                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, 240, 350, 30, 1011252, false, false);                   // Declare this building to be private.
                AddButton(20, 240, 2714, 2715, 17, GumpButtonType.Reply, 0);
            }

            AddHtmlLocalized(45, 280, 350, 30, 1011250, false, false);               // Change the sign type
            AddButton(20, 280, 2714, 2715, 0, GumpButtonType.Page, 4);

            // 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, 30, 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, 30, GumpButtonType.Reply, 0);

            AddPage(6);
            AddLabel(55, 145, 0, "Set the Yard for this House");
            AddButton(20, 145, 4005, 4007, 19, GumpButtonType.Reply, 0);
            AddLabel(55, 175, 0, "Initialize This House");
            AddButton(20, 175, 4005, 4007, 20, GumpButtonType.Reply, 0);
            AddLabel(55, 205, 0, "Add a Door to this House");
            AddButton(20, 205, 4005, 4007, 21, GumpButtonType.Reply, 0);
            AddLabel(55, 235, 0, "Set the maximum lockdowns of this house");
            AddButton(20, 235, 4005, 4007, 22, GumpButtonType.Reply, 0);
            AddLabel(55, 265, 0, "Set the maximum secures of this house");
            AddButton(20, 265, 4005, 4007, 23, GumpButtonType.Reply, 0);
            AddLabel(55, 295, 0, "Reset this house's region");
            AddButton(20, 295, 4005, 4007, 24, GumpButtonType.Reply, 0);
            AddLabel(55, 325, 0, "Set the Ban Location");
            AddButton(20, 325, 4005, 4007, 25, GumpButtonType.Reply, 0);
        }
 public StaticSetLockDownsPrompt(StaticHouseSign house)
 {
     m_House = house;
 }
 public StaticSetSecurePrompt(StaticHouseSign house)
 {
     m_House = house;
 }
Exemplo n.º 5
0
 public StaticHouseRegion(StaticHouseSign house) : base("", "", house.Map)
 {
     Priority    = Region.HousePriority;
     LoadFromXml = false;
     m_House     = house;
 }