コード例 #1
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background",
                () =>
            {
                AddImageTiled(40, 80, 44, 458, 202);
                AddImage(40, 39, 206);
                AddImageTiled(80, 38, 422, 45, 201);
                AddImage(40, 538, 204);
                AddImageTiled(495, 71, 44, 469, 203);
                AddImage(496, 39, 207);
                AddImageTiled(84, 539, 417, 43, 233);
                AddImageTiled(75, 82, 446, 459, 200);
                AddImage(171, 16, 1419);
                AddImage(248, -1, 1417);
                AddImage(257, 8, 5545);
                AddImage(496, 538, 205);

                AddImageTiled(81, 92, 420, 12, 50);
                AddImageTiled(81, 518, 420, 12, 50);
            });

            layout.Add("SideButtons",
                       () =>
            {
                AddButton(0, 87, 224, 223, b =>
                {
                    new CentralGumpUI(User, CentralGump.EnsureProfile(User),
                                      CentralGumpType.News).Send();
                });

                AddButton(0, 154, 222, 221, b =>
                {
                    new CentralGumpUI(User, CentralGump.EnsureProfile(User),
                                      CentralGumpType.Links).Send();
                });


                AddButton(0, 286, 220, 219, b =>
                {
                    new CentralGumpUI(User, CentralGump.EnsureProfile(User),
                                      CentralGumpType.Information).Send();
                });


                AddButton(0, 352, 218, 217, b =>
                {
                    new CentralGumpUI(User, CentralGump.EnsureProfile(User),
                                      CentralGumpType.Commands).Send();
                });


                AddButton(525, 87, 230, 229, b =>
                {
                    new CentralGumpUI(User, CentralGump.EnsureProfile(User),
                                      CentralGumpType.Profile).Send();
                });


                AddButton(525, 154, 232, 231, b =>
                {
                    new CentralGumpUI(User, CentralGump.EnsureProfile(User),
                                      CentralGumpType.Options).Send();
                });


                AddButton(525, 286, 228, 227, b =>
                {
                    new CentralGumpUI(User, CentralGump.EnsureProfile(User),
                                      CentralGumpType.Events).Send();
                });

                AddButton(525, 352, 234, 234, b => { Refresh(true); });
            });

            var acct = User.Account as Account;

            if (acct != null && acct.Young || User.Companion)
            {
                layout.Add("Young",
                           () =>
                {
                    if (acct != null && acct.Young || User.AccessLevel >= AccessLevel.GameMaster)
                    {
                        AddHtml(115, 74, 513, 18,
                                String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Young Player Program")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                        AddHtml(95, 112, 155, 17,
                                String.Format("<BIG>{0}</BIG>", "Time Left as Young")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                        AddHtml(95, 135, 165, 17,
                                String.Format("<BIG>{0}</BIG>",
                                              ((int)Math.Ceiling(acct.GetYoungTime().TotalHours) + "/" +
                                               (int)Math.Ceiling(Account.YoungDuration.TotalHours) + " Hours Left"))
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                        AddHtml(345, 112, 155, 17,
                                String.Format("<BIG>{0}</BIG>", "Skill Points Left")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                        AddHtml(345, 135, 200, 25,
                                String.Format("<BIG>{0}</BIG>",
                                              600 - User.SkillsTotal / 10 + "/600" + " Skill Points")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                        AddHtml(95, 175, 390, 80,
                                String.Format(
                                    "<BIG>You have {0} hours left as a young player.  You will also reach mature status if you gain {1} more skill points.</BIG>",
                                    (int)Math.Ceiling(acct.GetYoungTime().TotalHours), 600 - (User.SkillsTotal / 10))
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);


                        if (User.Guild == null)
                        {
                            AddButton(305, 260, 4005, 4007, b =>
                            {
                                var g = (Guild)BaseGuild.FindByAbbrev("New");
                                if (g != null && User.Guild == null)
                                {
                                    Refresh(true);
                                    User.SendGump(new NewPlayerGuildJoinGump(g, User));
                                }
                            });

                            AddLabel(340, 260, 2049, "Join the new player guild?");
                        }


                        AddButton(305, 285, 4005, 4007, b =>
                        {
                            if (Profile.LastBritainTeleport <= DateTime.UtcNow && User.PokerGame == null)
                            {
                                User.Map = Map.Felucca;
                                User.MoveToWorld(new Point3D(1438, 1690, 0), Map.Felucca);
                                User.SendMessage(54, "You have been teleported to the West Britain Bank.");
                                Profile.LastBritainTeleport = DateTime.UtcNow + TimeSpan.FromMinutes(5);
                            }
                            else if (User.PokerGame == null)
                            {
                                User.SendMessage(54,
                                                 "You cannot teleport to West Britain Bank for another " +
                                                 (int)
                                                 Math.Ceiling(
                                                     (Profile.LastBritainTeleport - DateTime.UtcNow).TotalMinutes) +
                                                 " minute(s).");
                            }
                            else
                            {
                                User.SendMessage(61, "You cannot use this while playing a poker game.");
                            }
                        });


                        AddLabel(340, 285, 2049, "Travel to Britain?");

                        AddButton(305, 310, 4005, 4007, b =>
                        {
                            if (Profile.LastDungeonTeleport <= DateTime.UtcNow && User.PokerGame == null)
                            {
                                User.Map = Map.Ilshenar;
                                User.MoveToWorld(new Point3D(2182, 18, -32), Map.Ilshenar);
                                User.SendMessage(54, "You have been teleported to the New Player Dungeon.");
                                Profile.LastDungeonTeleport = DateTime.UtcNow + TimeSpan.FromMinutes(5);
                            }
                            else if (User.PokerGame == null)
                            {
                                User.SendMessage(54,
                                                 "You cannot teleport to the New Player Dungeon for another " +
                                                 (int)Math.Ceiling((Profile.LastDungeonTeleport - DateTime.UtcNow).TotalMinutes) +
                                                 " minute(s).");
                            }
                            else
                            {
                                User.SendMessage(61, "You cannot use this while playing a poker game.");
                            }
                        });

                        AddLabel(340, 310, 2049, "Travel to Young Dungeon?");

                        AddButton(305, 335, 4005, 4007);

                        AddLabel(340, 335, 2049, "Page a Companion?");

                        AddButton(305, 360, 4005, 4007, b =>
                        {
                            Refresh(true);
                            if (User.NetState.Gumps.OfType <HelpGump>().Any())
                            {
                                return;
                            }

                            if (!PageQueue.CheckAllowedToPage(User))
                            {
                                return;
                            }

                            if (PageQueue.Contains(User))
                            {
                                User.SendMenu(new ContainedMenu(User));
                            }
                            else
                            {
                                User.SendGump(new Help.HelpGump(User));
                            }
                        });

                        AddLabel(340, 360, 2049, "Page a GM?");

                        AddButton(305, 480, 4005, 4007,
                                  b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                        {
                            acct.Young = false;
                            User.SendMessage(54, "You have successfully left the Young Player Program.");
                            CentralGump.Adventurers.Remove(User);
                        }, c => { Refresh(true); })
                        {
                            Title     = "Leave the Young Player Program?",
                            Html      = "Are you sure you wish to leave the Young Player Program?",
                            HtmlColor = DefaultHtmlColor
                        }.Send()
                                  );

                        AddLabel(340, 480, 2049, "Leave the Young Player");

                        AddLabel(340, 495, 2049, "Program?");
                    }

                    if (User.Companion && acct != null && !acct.Young)
                    {
                        AddHtml(109, 74, 513, 18,
                                String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Companion Control Panel")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                        AddBackground(61, 107, 454, 125, 3500);

                        AddLabel(86, 114, 2049, "Companion Message of the Day");

                        AddButton(305, 250, 4005, 4007);

                        AddLabel(340, 250, 2049, "Set MotD?");

                        AddButton(305, 280, 4005, 4007);

                        AddLabel(340, 280, 2049, "Answer Companion Pages?");
                    }
                    AddBackground(61, 250, 245, 267, 3500);

                    AddLabel(186, 260, 2049, "Join");

                    AddLabel(85, 260, 2049, "Name");

                    AddLabel(67, 233, 2049, "Adventuring Partners");

                    AddLabel(230, 260, 2049, "Members");

                    if (!CentralGump.Adventurers.Contains(User))
                    {
                        AddButton(305, 420, 4005, 4007, b =>
                        {
                            if (User.Party == null || Party.Get(User).Leader == User)
                            {
                                CentralGump.Adventurers.Add(User);
                                User.SendMessage(54, "You have signed up to start an adventure.");
                                Refresh(true);
                            }
                            else
                            {
                                User.SendMessage(54, "Only the leader of your party may sign up for an adventure.");
                            }
                        });

                        AddLabel(340, 420, 2049, "Join the adventuring");

                        AddLabel(340, 435, 2049, "list?");
                    }
                    else
                    {
                        AddButton(305, 420, 4005, 4007, b =>
                        {
                            CentralGump.Adventurers.Remove(User);
                            User.SendMessage(54, "You have removed yourself from the adventuring list.");
                            Refresh(true);
                        });

                        AddLabel(340, 420, 2049, "Remove yourself from the");

                        AddLabel(340, 435, 2049, "adventuring list?");
                    }

                    if (PageCount - 1 > Page)
                    {
                        AddButton(266, 485, 5601, 5605, NextPage);
                    }

                    if (Page > 0)
                    {
                        AddButton(240, 485, 5603, 5607, PreviousPage);
                    }
                })
                ;
                Dictionary <int, PlayerMobile> range = GetListRange();

                if (range.Count > 0)
                {
                    CompileEntryLayout(layout, range);
                }
            }
            else
            {
                AddHtml(116, 74, 513, 18,
                        String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Companion Application")
                        .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
            }
        }
コード例 #2
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background",
                () =>
            {
                AddImageTiled(40, 80, 44, 458, 202);
                AddImage(40, 39, 206);
                AddImageTiled(80, 38, 422, 45, 201);
                AddImage(40, 538, 204);
                AddImageTiled(495, 71, 44, 469, 203);
                AddImage(496, 39, 207);
                AddImageTiled(84, 539, 417, 43, 233);
                AddImageTiled(75, 82, 446, 459, 200);
                AddImage(171, 16, 1419);
                AddImage(248, -1, 1417);
                AddImage(257, 8, 5545);
                AddImage(496, 538, 205);
            });

            layout.Add("SideButtons",
                       () =>
            {
                if (GumpType == CentralGumpType.News)
                {
                    AddButton(0, 87, 223, 223, b =>
                    {
                        GumpType = CentralGumpType.News;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(0, 87, 224, 223, b =>
                    {
                        GumpType = CentralGumpType.News;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Links)
                {
                    AddButton(0, 154, 221, 221, b =>
                    {
                        GumpType = CentralGumpType.Links;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(0, 154, 222, 221, b =>
                    {
                        GumpType = CentralGumpType.Links;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Information)
                {
                    AddButton(0, 286, 219, 219, b =>
                    {
                        GumpType = CentralGumpType.Information;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(0, 286, 220, 219, b =>
                    {
                        GumpType = CentralGumpType.Information;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Commands)
                {
                    AddButton(0, 352, 217, 217, b =>
                    {
                        GumpType = CentralGumpType.Commands;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(0, 352, 218, 217, b =>
                    {
                        GumpType = CentralGumpType.Commands;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Profile)
                {
                    AddButton(525, 87, 229, 229, b =>
                    {
                        GumpType = CentralGumpType.Profile;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(525, 87, 230, 229, b =>
                    {
                        GumpType = CentralGumpType.Profile;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Options)
                {
                    AddButton(525, 154, 231, 231, b =>
                    {
                        GumpType = CentralGumpType.Options;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(525, 154, 232, 231, b =>
                    {
                        GumpType = CentralGumpType.Options;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Events)
                {
                    AddButton(525, 286, 227, 227, b =>
                    {
                        GumpType = CentralGumpType.Events;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(525, 286, 228, 227, b =>
                    {
                        GumpType = CentralGumpType.Events;
                        Refresh(true);
                    });
                }

                AddButton(525, 352, 235, 234, b =>
                {
                    new CentralGumpUIList(User, Profile, X, Y).Send();
                });
            });

            switch (GumpType)
            {
            case CentralGumpType.News:
                layout.Add("News",
                           () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);
                    AddHtml(126, 74, 325, 17,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever News & Patch Notes")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 104, 404, 413, 2624);
                    AddHtml(86, 103, 414, 413, News, false, true);

                    AddImageTiled(81, 518, 420, 12, 50);

                    AddImage(97, 530, 9004);
                    AddHtml(180, 541, 129, 18,
                            String.Format("<BIG>{0}</BIG>", "Receive on login?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite),
                            false, false);
                    AddCheck(147, 536, 2152, 2153, Profile.LoginGump, (b, t) => { Profile.LoginGump = t; });


                    if (User.AccessLevel >= AccessLevel.GameMaster)
                    {
                        AddHtml(385, 541, 113, 18,
                                String.Format("<BIG>{0}</BIG>", "Modify News?")
                                .WrapUOHtmlColor(KnownColor.GhostWhite),
                                false, false);
                        AddButton(351, 541, 4005, 4006, b => { Send(new NewsMessageListGump(User, Hide())); });
                    }
                });
                break;

            case CentralGumpType.Links:
                layout.Add("Links",
                           () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);
                    AddHtml(134, 74, 313, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Important Links")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(135, 115, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Homepage")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 115, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://www.uoforever.com");
                        Refresh();
                    });

                    AddHtml(135, 160, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Donation Page")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 160, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://uoforever.com/donate.php");
                        Refresh();
                    });

                    AddHtml(135, 205, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Forums")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 205, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://www.uoforum.com/");
                        Refresh();
                    });

                    AddHtml(135, 250, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Chatroom [IRC]")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 250, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://uoforever.com/chat/");
                        Refresh();
                    });

                    AddHtml(135, 295, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Wiki")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(99, 295, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://www.uofwiki.com");
                        Refresh();
                    });

                    AddHtml(135, 340, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Frequently Asked Questions")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 340, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://www.uoforum.com/faq/");
                        Refresh();
                    });

                    AddHtml(135, 385, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever: Legends")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 385, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://legends.uoforever.com");
                        Refresh();
                    });

                    AddHtml(135, 430, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Facebook Page")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(99, 430, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("https://www.facebook.com/UltimaOnlineForever");
                        Refresh();
                    });

                    AddHtml(135, 475, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Action Camera")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 475, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://live.uoforever.com");
                        Refresh();
                    });

                    AddImageTiled(81, 518, 420, 12, 50);
                });
                break;

            case CentralGumpType.Information:
                layout.Add("Information",
                           () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);


                    AddHtml(124, 74, 513, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Information and Options")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddLabel(85, 109, 2049, "Young Program");


                    AddLabel(120, 130, 2049, "General Information");
                    AddButton(85, 130, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungBenefitsString())
                        .Send();
                    });

                    AddLabel(120, 155, 2049, "Leaving the Program");
                    AddButton(85, 155, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungLeaveString()).Send
                            ();
                    });

                    AddLabel(120, 180, 2049, "The Defiled Crypt");
                    AddButton(85, 180, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(120, 205, 2049, "Companion Program");
                    AddButton(85, 205, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });


                    AddLabel(85, 228, 2049, "Shopkeeper/NPC Information");


                    AddLabel(120, 250, 2049, "Banks");
                    AddButton(85, 250, 4005, 4007,
                              b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructBankString()).Send();
                    });

                    AddLabel(120, 275, 2049, "Bardic Guild");
                    AddButton(85, 275, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructBardicGuildString())
                        .Send();
                    });


                    AddLabel(120, 300, 2049, "The Blacksmith");
                    AddButton(85, 300, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructBlacksmithGuildString())
                        .Send();
                    });


                    AddLabel(120, 325, 2049, "Carpenter's Guild");
                    AddButton(85, 325, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructLumberjackGuildString())
                        .Send();
                    });

                    AddLabel(120, 350, 2049, "The Docks");
                    AddButton(85, 350, 4005, 4007,
                              b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructDocksString()).Send();
                    });


                    AddLabel(120, 375, 2049, "Healers");
                    AddButton(85, 375, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructHealersGuildString())
                        .Send();
                    });


                    AddLabel(120, 400, 2049, "Inns");
                    AddButton(85, 400, 4005, 4007,
                              b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructInnGuildString())
                        .Send();
                    });


                    AddLabel(120, 425, 2049, "Mage's Guild");
                    AddButton(85, 425, 4005, 4007,
                              b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructMageGuildString())
                        .Send();
                    });


                    AddLabel(120, 450, 2049, "Miner's Guild");
                    AddButton(85, 450, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructMinersGuildString())
                        .Send();
                    });


                    AddLabel(120, 475, 2049, "Stables");
                    AddButton(85, 475, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructStablesGuildString())
                        .Send();
                    });


                    AddLabel(120, 500, 2049, "Tailor Shop");
                    AddButton(85, 500, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructTailorGuildString())
                        .Send();
                    });

                    AddLabel(315, 109, 2049, "General Systems Information");

                    AddLabel(350, 130, 2049, "Battles System");
                    AddButton(315, 130, 4005, 4007,
                              b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructBattlesString())
                        .Send();
                    });

                    AddLabel(350, 155, 2049, "Conquest System");
                    AddButton(315, 155, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 180, 2049, "Event Scoring System");
                    AddButton(315, 180, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 205, 2049, "Invasion System");
                    AddButton(315, 205, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 230, 2049, "Player Scoring System");
                    AddButton(315, 230, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 255, 2049, "Portals System");
                    AddButton(315, 255, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(315, 280, 2049, "Housing Information");

                    AddLabel(350, 300, 2049, "Classic Houses");
                    AddButton(315, 300, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 325, 2049, "Custom Houses");
                    AddButton(315, 325, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 350, 2049, "House Ownership");
                    AddButton(315, 350, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 375, 2049, "Player Run Vendors");
                    AddButton(315, 375, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 475, User.GuildMessageHue, "Guild Chat Color");
                    AddButton(315, 475, 4005, 4007,
                              b => { new CentralGump.GuildChatColorPicker(User, Profile).SendTo(User.NetState); });

                    AddLabel(350, 500, User.AllianceMessageHue, "Alliance Chat Color");
                    AddButton(315, 500, 4005, 4007,
                              b => { new CentralGump.AllianceChatColorPicker(User, Profile).SendTo(User.NetState); });


                    AddImageTiled(81, 523, 420, 12, 50);
                });
                break;

            case CentralGumpType.Commands:
                layout.Add("Commands",
                           () =>
                {
                    AddHtml(81, 74, 513, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - PvP Commands and Notifications")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 92, 420, 12, 50);

                    AddCheck(60, 120, 2152, 2153, Profile.BuyHead,
                             (b, t) => { Profile.BuyHead = t; });
                    AddHtml(95, 125, 221, 18,
                            String.Format("<BIG>{0}</BIG>", "Buy head for 30k?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 120, 2152, 2153, Profile.FactionPoint,
                             (b, t) => { Profile.FactionPoint = t; });
                    AddHtml(318, 125, 204, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Faction Notifications?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 518, 420, 12, 50);
                });
                break;

            case CentralGumpType.Profile:
                layout.Add("Profile",
                           () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);
                    AddHtml(140, 74, 313, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Player Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(79, 110, 186, 18,
                            String.Format("<BIG>{0}</BIG>", "Total Account Play Time")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    TimeSpan totaltime = TimeSpan.Zero;
                    var account        = User.Account as Account;

                    if (account != null)
                    {
                        totaltime =
                            account.Mobiles.Cast <PlayerMobile>()
                            .Where(player => player != null)
                            .Aggregate(totaltime, (current, player) => current + player.GameTime);
                    }

                    AddHtml(79, 135, 186, 18,
                            String.Format("<BIG>{0} Days</BIG>", (int)Math.Ceiling(totaltime.TotalDays))
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(345, 110, 175, 18,
                            String.Format("<BIG>{0}</BIG>", "Character Play Time")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(345, 135, 130, 18,
                            String.Format("<BIG>{0} Days</BIG>", (int)Math.Ceiling(User.GameTime.TotalDays))
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(79, 180, 105, 107,
                            String.Format("<BIG>{0}</BIG>", "Current Title")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    Title t;
                    TitleHue h;
                    CustomTitles.CustomTitles.GetTitle(User, out t);
                    CustomTitles.CustomTitles.GetTitleHue(User, out h);

                    if (t != null)
                    {
                        /*AddHtml(79, 205, 105, 107,
                         *  String.Format("<BIG>{0}</BIG>", User.Female ? t.FemaleTitle : t.MaleTitle)
                         *      .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);*/
                        AddLabel(79, 205, h != null ? h.Hue - 1 : 0, User.Female ? t.FemaleTitle : t.MaleTitle);
                    }
                    else
                    {
                        AddHtml(79, 205, 105, 107,
                                String.Format("<BIG>{0}</BIG>", "No title to display.")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }

                    AddHtml(345, 180, 138, 17,
                            String.Format("<BIG>{0}</BIG>", "Current Title Hue")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    if (t != null && h != null)
                    {
                        /*AddHtml(345, 205, 105, 107,
                         *  String.Format("<BIG>{0}</BIG>", h.Hue)
                         *      .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);*/
                        AddLabel(345, 205, h.Hue - 1, h.Hue.ToString());
                    }
                    else
                    {
                        AddHtml(345, 205, 105, 107,
                                String.Format("<BIG>{0}</BIG>", "No title hue to display.")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }

                    AddHtml(79, 250, 121, 18,
                            String.Format("<BIG>{0}</BIG>", "Conquest Points")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    ConquestProfile conquestprofile = Conquests.Conquests.EnsureProfile(User);
                    long points = conquestprofile.GetPointsTotal();

                    if (points == 0)
                    {
                        AddHtml(79, 275, 171, 107,
                                String.Format("<BIG>{0}</BIG>", "You have not completed any conquests.")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }
                    else
                    {
                        AddHtml(79, 275, 121, 18,
                                String.Format("<BIG>{0}</BIG>", points)
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }

                    AddHtml(345, 250, 171, 107,
                            String.Format("<BIG>{0}</BIG>", "Invasion Points")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(79, 320, 171, 107,
                            String.Format("<BIG>{0}</BIG>", "Event Points")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    PlayerEventScoreProfile eventprofile = EventScores.EventScores.EnsureProfile(User);
                    points = eventprofile.OverallScore;

                    if (points == 0)
                    {
                        AddHtml(79, 345, 171, 107,
                                String.Format("<BIG>{0}</BIG>", "You have not competed in any events.")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }
                    else
                    {
                        AddHtml(79, 345, 121, 18,
                                String.Format("<BIG>{0}</BIG>", points)
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }

                    AddHtml(345, 320, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Portals Points")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 393, 420, 12, 50);

                    AddButton(79, 415, 4005, 4006,
                              b => { Send(new PvPProfileOverviewGump(User, AutoPvP.EnsureProfile(User), Hide())); });

                    AddHtml(117, 415, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Battles Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(79, 460, 4005, 4006,
                              b => { Send(new ConquestStatesGump(User, Hide(), conquestprofile)); });

                    AddHtml(117, 460, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Conquests Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(79, 505, 4005, 4006, b => { Send(new BattlesTUI(User, Hide(), eventprofile)); });

                    AddHtml(117, 505, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Events Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(345, 415, 4005, 4006, b => { Refresh(); });

                    AddHtml(383, 415, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Invasions Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(345, 460, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://uoforever.com/legends/?action=player&s=" + User.Serial.Value);
                        Refresh();
                    });

                    AddHtml(383, 460, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Legends Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(345, 505, 4005, 4006, b => { Refresh(); });

                    AddHtml(383, 505, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Portals Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                });
                break;

            case CentralGumpType.Options:
                layout.Add("Options",
                           () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);


                    AddHtml(119, 74, 513, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Player Profile Options")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);


                    AddCheck(60, 120, 2152, 2153, Profile.IgnoreBattles,
                             (b, t) => { Profile.IgnoreBattles = t; });
                    AddHtml(95, 125, 221, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Battles Prompts?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 120, 2152, 2153, Profile.IgnoreNotifies,
                             (b, t) => { Profile.IgnoreNotifies = t; });
                    AddHtml(318, 125, 204, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Staff Notifications?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(60, 190, 2152, 2153, Profile.IgnoreTournament,
                             (b, t) => { Profile.IgnoreTournament = t; });
                    AddHtml(95, 195, 256, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Tourny Prompts?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 190, 2152, 2153, Profile.IgnoreConquests,
                             (b, t) => { Profile.IgnoreConquests = t; });
                    AddHtml(318, 195, 232, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Conquest Notification?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(60, 260, 2152, 2153, Profile.IgnoreMoongates,
                             (b, t) => { Profile.IgnoreMoongates = t; });
                    AddHtml(95, 265, 202, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Moongate Prompt?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 260, 2152, 2153, Profile.PublicLegends,
                             (b, t) => { Profile.PublicLegends = t; });
                    AddHtml(318, 265, 202, 18,
                            String.Format("<BIG>{0}</BIG>", "Show UOF Legends?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    /*AddCheck(283, 260, 2152, 2153, Profile.IgnoreMoongates,
                    *   (b, t) => { Profile.IgnoreMoongates = t; });
                    *  AddHtml(318, 265, 250, 18,
                    *   String.Format("<BIG>{0}</BIG>", "Auto Buy Head for 30k?")
                    *       .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);*/

                    AddCheck(60, 330, 2152, 2153, Profile.FameTitle, (b, t) => { Profile.FameTitle = t; });
                    AddHtml(95, 335, 155, 18,
                            String.Format("<BIG>{0}</BIG>", "Display Fame Title?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 330, 2152, 2153, User.KarmaLocked, (b, t) => { User.KarmaLocked = t; });
                    AddHtml(318, 335, 147, 20,
                            String.Format("<BIG>{0}</BIG>", "Lock Your Karma?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(60, 400, 2152, 2153, User.DisplayChampionTitle,
                             (b, t) => { User.DisplayChampionTitle = t; });
                    AddHtml(95, 405, 186, 18,
                            String.Format("<BIG>{0}</BIG>", "Display Champion Title?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 400, 2152, 2153, Profile.MiniGump, (b, t) => { Profile.MiniGump = t; });
                    AddHtml(318, 405, 186, 18,
                            String.Format("<BIG>{0}</BIG>", "Display Mini Score Gump")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(60, 470, 2152, 2153, Profile.DisablePvPTemplate,
                             (b, t) => { Profile.DisablePvPTemplate = t; });
                    AddHtml(95, 475, 183, 18,
                            String.Format("<BIG>{0}</BIG>", "Disable PvP Templates?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 470, 2152, 2153, Profile.DisableTemplateEquipment,
                             (b, t) => { Profile.DisableTemplateEquipment = t; });
                    AddHtml(318, 475, 255, 18,
                            String.Format("<BIG>{0}</BIG>", "Disable Template Equipment?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);


                    AddImageTiled(81, 518, 420, 12, 50);
                });
                break;

            case CentralGumpType.Events:
                layout.Add("Events",
                           () =>
                {
                    AddHtml(154, 74, 513, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Events Page")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 92, 420, 12, 50);
                    AddHtml(85, 109, 325, 17,
                            String.Format("<BIG>{0}</BIG>", "There are currently no events at this time.")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 518, 420, 12, 50);
                });
                break;
            }
        }