Ejemplo n.º 1
0
 public void AddStory(BookOfLore book, Mobile from)
 {
     book.Content.Add(PageID);
     book.Story = Story;
     from.PlaySound(585);
     from.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1159633, from.NetState);
     Delete();
 }
Ejemplo n.º 2
0
            public BookOfLoreGump(BookOfLore book, int page)
                : base(100, 100)
            {
                Book = book;

                var pages = book.Content.OrderBy(x => x);

                if (page == 0)
                {
                    page = pages.First();
                }

                if (!pages.Contains(page))
                {
                    page = pages.Last();
                }

                Page             = page;
                Book.CurrentPage = page;

                var content = PageOfLore.Table.FirstOrDefault(x => x.Story == book.Story && x.PageID == Page);

                AddPage(0);

                AddImage(0, 0, 0xA9C);
                AddImage(85, 18, 0xA9D);
                AddHtml(163, 45, 150, 70, string.Format("<BASEFONT COLOR=#000080><DIV ALIGN=CENTER>The Tale of {0}</DIV></BASEFONT>", Misc.ServerList.ServerName), false, false);
                AddHtml(100, 120, 270, 20, string.Format("<BASEFONT COLOR=#15156A><DIV ALIGN=CENTER>{0}</DIV></BASEFONT>", PageOfLore.GetStoryName(book.Story)), false, false);
                AddHtml(115, 145, 250, 126, string.Format("<BASEFONT COLOR=#1F1F1F>{0}</BASEFONT>", content.ArticlePart1), false, false);
                AddHtml(115, 275, 250, 126, string.Format("<BASEFONT COLOR=#1F1F1F>{0}</BASEFONT>", content.ArticlePart2), false, false);
                AddButton(200, 420, 0x15E3, 0x15E7, 11001, GumpButtonType.Reply, 0);
                AddHtml(110, 419, 250, 18, string.Format("<BASEFONT COLOR=#1F1F1F><DIV ALIGN=CENTER>{0}</DIV></BASEFONT>", Page.ToString()), false, false);
                AddButton(250, 420, 0x15E1, 0x15E5, 11000, GumpButtonType.Reply, 0);

                AddImage(435, 52, content.BGumpID);
                AddImage(426, 42, 0xA9E);

                if (content.UPCGumpID != 0)
                {
                    AddImage(418, 35, content.UPCGumpID);
                    AddImage(409, 25, 0xAA1);
                }

                if (content.BRCGumpID != 0)
                {
                    AddImage(591, 363, content.BRCGumpID);
                    AddImage(582, 353, 0xAA1);
                }
            }