Example #1
0
        public static void SendGump(Mobile m, string message)
        {
            Gump g = new Gump(10, 10);
            int  xo = (640 - 340) / 2, yo = (480 - 180) / 2;

            g.Closable = false;

            g.AddPage(0);
            g.AddPage(1);
            g.AddBackground(0, 0, 92, 75, 0xA3C);
            g.AddImageTiled(5, 7, 82, 61, 0xA40);
            g.AddAlphaRegion(5, 7, 82, 61);
            g.AddImageTiled(9, 11, 21, 53, 0xBBC);
            g.AddButton(10, 12, 0x7D2, 0x7D2, 2, GumpButtonType.Page, 2);
            g.AddHtmlLocalized(34, 28, 65, 24, 3001002, 0xFFFFFF, false, false); // Message
            g.AddPage(2);
            g.AddBackground(xo + 0, yo + 0, 340, 180, 5054);
            g.AddImageTiled(xo + 10, yo + 10, 340 - 20, 20, 2624);
            g.AddAlphaRegion(xo + 10, yo + 10, 340 - 20, 20);
            g.AddHtmlLocalized(xo + 10, yo + 10, 340 - 20, 20, 1074862, 0xffffff, false, false);
            g.AddImageTiled(xo + 10, yo + 40, 340 - 20, 180 - 80, 2624);
            g.AddAlphaRegion(xo + 10, yo + 40, 340 - 20, 180 - 80);
            g.AddHtml(xo + 10, yo + 40, 340 - 20, 180 - 80, String.Format("<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", 0xffffff, message), false, true);
            g.AddImageTiled(xo + 10, yo + 180 - 30, 340 - 20, 20, 2624);
            g.AddAlphaRegion(xo + 10, yo + 180 - 30, 340 - 20, 20);
            g.AddButton(xo + 10, yo + 180 - 30, 4005, 4007, 1, GumpButtonType.Reply, 0);
            g.AddHtmlLocalized(xo + 40, yo + 180 - 30, 120, 20, 1011036, 32767, false, false); // OKAY
            m.SendGump(g);
        }
Example #2
0
        internal void BaseSkinByType(Gump g)
        {
            if (relplug == null)
            {
                SkillSettings.DoTell("Base Type is invalid. Cannot skin.");
            }
            g.AddPage(0);
            string switchby = relplug.getGumpType();

            if (switchby == "Control")
            {
                //this.X = sk.GetCoord("Control", "X", sk ); this.Y = sk.SelectionY;
                g.X = 0; g.Y = 0;
                if (!Skin.WindowInfo.ContainsKey("Control"))
                {
                    SkillSettings.DoTell("No key for Control gump skin."); return;
                }
                WindowInfo inf = Skin.WindowInfo["Control"];
                g.X = inf.X; g.Y = inf.Y;
                //this.AddBackground(sk.GetCoord("Control", "X", sk ), sk.SelectionY, sk.GetCoord("Control", "W", sk ), sk.GetCoord("Control", "H", sk ), sk.SelectBGID);
                g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
                g.AddImageTiled(Skin.BarSHX, Skin.BarSHY, Skin.BarSHW, Skin.BarSHH, Skin.SelectLineH);
                g.AddHtml(Skin.TMSSX, Skin.TMSSY, 140, 20, "<basefont size=5 face=1 color=#CC0000><Center>TMSS - //4// -</center></basefont>", false, false);
                //<basefont size=5 face=1 color=#CC0000><Center>TM Skill & Stat System v3.0</center></basefont>
            }
            else if (switchby == "Master")
            {
                g.X = 0; g.Y = 0;
                if (!Skin.WindowInfo.ContainsKey("Master"))
                {
                    SkillSettings.DoTell("No key for Master gump skin."); return;
                }
                WindowInfo inf = Skin.WindowInfo["Master"];
                //this.AddBackground(sk.MasterX, sk.MasterY, sk.MasterW, sk.MasterH, sk.MasterBGID);
                g.X = inf.X; g.Y = inf.Y;
                g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
                g.AddImageTiled(Skin.BarMHX, Skin.BarMHY, Skin.BarMHW, Skin.BarMHH, Skin.MasterLineH);
                g.AddImageTiled(Skin.BarMVX, Skin.BarMVY, Skin.BarMVW, Skin.BarMVH, Skin.MasterLineV);
                g.AddItem(Skin.IconMX, Skin.IconMY, Skin.IconMID, Skin.IconMColor);
            }
            else if (switchby == "Underbar")
            {
                g.X = 0; g.Y = 0;
                if (!Skin.WindowInfo.ContainsKey("Underbar"))
                {
                    SkillSettings.DoTell("No key for Underbar gump skin."); return;
                }
                WindowInfo inf = Skin.WindowInfo["Underbar"];
                g.X = inf.X; g.Y = inf.Y;
                g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
                //this.AddBackground(sk.sk.GetCoord("Underbar", "X", );, sk.sk.GetCoord("Underbar", "Y", );, sk.HelpW, sk.HelpH, sk.HelpBGID);
            }
            else
            {
                SkillSettings.DoTell("Unknown Gump Type. Cannot apply base skin.");
            }
        }
Example #3
0
        public override void PlayInstrumentWell(Mobile from)
        {
            var smfs = from.Backpack.FindItemByType(typeof(SheetMusicForStones)) as SheetMusicForStones;

            if (smfs != null && !smfs.Active)
            {
                var box = from.Map.GetItemsInRange(from.Location, 3).FirstOrDefault(x => x.ItemID == 19724 && x.Hue == 1111);

                if (box != null)
                {
                    from.FixedParticles(0x376A, 1, 72, 0x13B5, EffectLayer.Waist);
                    from.AddToBackpack(new LuteTunedToStones());
                    from.PlaySound(1666);

                    smfs.Active = true;
                    Delete();

                    Gump g = new Gump(100, 100);
                    g.AddBackground(0, 0, 620, 290, 0x2454);
                    g.AddImage(0, 0, 0x9D3F);
                    g.AddHtmlLocalized(280, 14, 328, 18, 1114513, "#1159384", 0xC63, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
                    g.AddHtmlLocalized(280, 51, 328, 229, 1159383, 0xC63, false, true);             // Greetings, Britannian! Seems Hawkwind is having some fun with the timeline again? Britannia will always face threats, but it is brave adventurers such as yourself who forge the Britannian Legacy everyday. With your courage, you uphold the ideals of Virtue and the integrity of our realm against threats from monstrous evils and world thieves alike. Go now, visit the Well of Souls and free Hawkwind and restore Virtue to the realm!
                }

                return;
            }

            base.PlayInstrumentWell(from);
        }
Example #4
0
        public void OnForensicEval(Mobile m)
        {
            if (!m.Player)
            {
                return;
            }

            var quest = QuestHelper.GetQuest <GoingGumshoeQuest2>((PlayerMobile)m);

            if (quest != null)
            {
                if (HasFoundClue1(quest))
                {
                    m.SendLocalizedMessage(1158613); // You have already documented this clue.
                }
                else
                {
                    m.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157722, "Forensics", m.NetState); // *Your proficiency in ~1_SKILL~ reveals more about the item*
                    m.SendLocalizedMessage(1158612, null, 0x23);                                            // You have identified a clue! This item seems pertinent to the investigation!

                    m.SendSound(quest.UpdateSound);

                    var gump = new Gump(50, 50);
                    gump.AddBackground(0, 0, 500, 500, 9380);

                    gump.AddItem(84, 130, ItemID, Hue);
                    gump.AddHtml(167, 50, 310, 20, "<center><basefont color=#B22222>Book</center>", false, false);
                    gump.AddHtmlLocalized(167, 70, 310, 380, 1158577, true, false);

                    m.SendGump(gump);

                    SetFoundClue1(quest);
                }
            }
        }
Example #5
0
        public override void OnDoubleClick(Mobile m)
        {
            if (m.InRange(GetWorldLocation(), 2))
            {
                if (m.Skills[SkillName.Carpentry].Value >= 100)
                {
                    Gump g = new Gump(100, 100);
                    g.AddBackground(0, 0, 454, 400, 0x24A4);
                    g.AddItem(35, 120, 0xA2C6);
                    g.AddHtmlLocalized(177, 50, 250, 18, 1114513, "#1158935", 0x3442, false, false); // Mysterious Statue
                    g.AddHtmlLocalized(177, 77, 250, 36, 1114513, "#1158936", 0x3442, false, false); // Purchased from a Pirate Merchant
                    g.AddHtmlLocalized(177, 122, 250, 228, 1158937, 0xC63, true, true);

                    /*This mysterious statue towers above you. Even as skilled a mason as you are, the craftsmanship is uncanny, and unlike anything you have encountered before.
                     * The stone appears to be smooth and special attention was taken to sculpt the statue as a perfect likeness. According to the pirate you purchased the statue
                     * from, it was recovered somewhere at sea. The amount of marine growth seems to reinforce this claim, yet you cannot discern how long it may have been
                     * submerged and are thus unsure of its age.Whatever its origins, one thing is clear - the figure is one you hope you do not encounter anytime soon...
                     */

                    m.SendGump(g);

                    m.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157722, "Carpentry", m.NetState); // *Your proficiency in ~1_SKILL~ reveals more about the item*
                }
                else
                {
                    m.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157693, "Carpentry", m.NetState); // *You lack the required ~1_SKILL~ skill to make anything of it.*
                    m.SendSound(m.Female ? 0x31F : 0x42F);
                }
            }
        }
Example #6
0
        public override bool OnDragDrop(Mobile m, Item dropped)
        {
            if (dropped is StarChart)
            {
                StarChart chart = (StarChart)dropped;

                if (chart.Constellation >= 0 && chart.Constellation < AstronomySystem.MaxConstellations)
                {
                    if (String.IsNullOrEmpty(chart.ConstellationName))
                    {
                        m.SendLocalizedMessage(1158751); // You must name your constellation before submitting it.
                    }
                    else
                    {
                        ConstellationInfo info = AstronomySystem.GetConstellation(chart.Constellation);

                        if (info != null)
                        {
                            Gump gump = new Gump(100, 100);
                            gump.AddBackground(0, 0, 720, 270, 0x2454);
                            gump.AddImage(0, 0, 0x69D);
                            gump.AddHtmlLocalized(290, 14, 418, 18, 1114513, "#1158517", 0xC63, false, false); // Willebrord the Astronomer

                            if (info.HasBeenDiscovered)
                            {
                                m.SendLocalizedMessage(1158764); // That constellation name has already been chosen, please choose another and resubmit your star chart.
                                gump.AddHtmlLocalized(290, 51, 418, 209, 1158530, 0xC63, false, true);
                                // Sorry to say that constellation has already been discovered! Fix your eyes to the heavens and keep up the searc
                            }
                            else
                            {
                                gump.AddHtmlLocalized(290, 51, 418, 209, 1158519, 0xC63, false, true);
                                // Wow! Would you look at that! Always amazes me how even an amateur can make such profound discoveries!
                                // I've recorded your discovery in the ledger. Here's some items I think you have more than earned! Well done!

                                info.DiscoveredBy = chart.ChartedBy;
                                info.Name         = chart.ConstellationName;
                                info.DiscoveredOn = chart.ChartedOn;
                                AstronomySystem.AddDiscovery(info);

                                m.AddToBackpack(new RecipeScroll(465));
                                m.AddToBackpack(new AstronomerTitleDeed());
                            }

                            m.SendGump(gump);
                        }
                    }
                }
            }
            else
            {
                SayTo(m, 1158529, 1163); // What's this? I haven't time for this! Star Charts only please!
            }

            return(false);
        }
Example #7
0
        public override void OnDoubleClick(Mobile from)
        {
            Gump g = new Gump(100, 100);

            g.AddBackground(0, 0, 454, 640, 0x24A4);
            g.AddImage(60, 40, 0x6D2);
            g.AddHtmlLocalized(27, 389, 398, 18, 1114513, "#115938", 0xC63, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
            g.AddHtmlLocalized(27, 416, 398, 174, 1159386, 0xC63, false, true);            // You have found yourself here, or have I made it so you find yourself here? *grins* Alas, here you are! <br><br>Virtue is being drained from your world at the hands of the Fellowship under the guise of their altruistic intent. Do not be fooled, their objective is nefarious and their presence in Britannia is a pox upon our shared devotion to the Virtues. <br><br>The Fellowship has been successful in destroying the Runes of Virtue and the encouraging greed in those coveting Fellowship Treasure. This is fueling the destruction of Shrines across Britannia. To combat this trend, I reached deep inside the timeline and placed fragments of the Runes of Virtue in treasure chests hidden throughout the realm. With these fragments we can begin to restore the Shrines. Place these mysterious fragments at Shrines across Britannia to lure the armies of the Fellowship from hiding. <br><br>If you best eight of these armies at a single shrine you have restored the most fragments, your devotion to Virtue will be rewarded with the Tabard of Virtue. This tabard will reflect the Virtue to which you have restored the most fragments. A corresponding title will also be bestowed upon you. <br><br>For those who are truly devout and summon the Courage to best three of the armies at each Shrine, they will be awarded the Cloak of the Virtuous - a truly auspicious honor! <br><br>When you have completed your quest visit the Ankh behind me to claim your Tabard of Virtue. To claim the Cloak of the Virtuous approach each representation of the Virtues surrounding me. When you are true to each, the Cloak of the Virtuous shall be yours!

            from.SendGump(g);
        }
Example #8
0
        public override void OnDoubleClick(Mobile from)
        {
            Gump g = new Gump(25, 25);

            g.AddBackground(0, 0, 404, 325, 9380);
            g.AddHtmlLocalized(40, 50, 324, 225, 1151735, false, false);

            /*You unfurl the parchment, it appears to be a handwritten note*<br><br>Taking up delivery of goods fer
             * the crown are ya? Well...maybe yer interested in a bit of something fer yerself?  Look fer me in Felucca...
             * the taverns of Ocllo, Nujelm, & Serpent's Hold if ye want to fence yer goods.<br><br>-A Friend*/

            from.SendGump(g);
        }
Example #9
0
        public override void OnDoubleClick(Mobile m)
        {
            if (m.InRange(Location, 3) && InLOS(m))
            {
                Gump gump = new Gump(100, 100);
                gump.AddBackground(0, 0, 720, 270, 0x2454);
                gump.AddImage(0, 0, 0x69D);

                gump.AddHtmlLocalized(290, 14, 418, 18, 1114513, "#1158517", 0xC63, false, false);
                gump.AddHtmlLocalized(290, 51, 418, 209, 1158518, 0xC63, false, true);

                m.SendGump(gump);
            }
        }
Example #10
0
        public override void OnDoubleClick(Mobile from)
        {
            Gump g = new Gump(100, 100);

            g.AddBackground(0, 0, 454, 400, 0x24A4);
            g.AddItem(75, 120, 0xEBF);
            g.AddHtmlLocalized(177, 50, 250, 18, 1114513, "#1159343", 0x3442, false, false); // Sheet Music for Stones
            g.AddHtmlLocalized(177, 77, 250, 36, 1114513, "#1159344", 0x3442, false, false); // Recovered from a Strongbox in Castle British with a Musical Lock
            g.AddHtmlLocalized(177, 122, 250, 228, 1159345, 0xC63, true, true);              // Standard sheet music for the seminal <i>Stones</i> by Iolo the Bard. Written, unsurprisingly, for the lute.

            from.SendGump(g);

            from.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157722, "its origin", from.NetState); // *Your proficiency in ~1_SKILL~ reveals more about the item*
            from.SendSound(from.Female ? 0x30B : 0x41A);
        }
        public override void OnDoubleClick(Mobile from)
        {
            Gump g = new Gump(100, 100);

            g.AddBackground(0, 0, 454, 400, 0x24A4);
            g.AddItem(75, 120, ItemID, Hue);
            g.AddHtmlLocalized(177, 50, 250, 18, 1114513, "#1159025", 0x3442, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
            g.AddHtmlLocalized(177, 77, 250, 36, 1114513, "#1159026", 0x3442, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
            g.AddHtmlLocalized(177, 122, 250, 228, 1159027, 0xC63, true, true);              // The item appears to be the jagged fragment of a larger piece.  While you cannot quite discern the origins or purpose of such a piece, it is no doubt fascinating.  The color shimmers with a strange brilliance that you feel you have seen before, yet cannot quite place.  Whatever created this fragment did so with awesome force.


            from.SendGump(g);

            from.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157722, "its origin", from.NetState); // *Your proficiency in ~1_SKILL~ reveals more about the item*
            from.SendSound(from.Female ? 0x30B : 0x41A);
        }
Example #12
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.InRange(Location, 3))
            {
                if (FellowshipMedallion.IsDressed(from))
                {
                    Gump g = new Gump(100, 100);
                    g.AddBackground(0, 0, 570, 295, 0x2454);
                    g.AddImage(0, 0, 0x9CD6);
                    g.AddHtmlLocalized(335, 24, 223, 261, 1159381, 0xC63, false, true); // *squeak squeak* Have you come to play the instruments? *squeak squeak* I bet you are as good as Iolo! “Practice! Practice!” he would say, “Practice your musical scales!” *squeak squeak* My fingers were too tiny for the lute, but I could sing! Do Re Mi Fa So La Ti Do! *squeak squeak*  <br><br>Long ago, I was supposed to perform at the wedding of Shamino and Princess Beatrix. Ready to go at noon on the nose I would have been, but that was before...everything. *frowns* Sometimes I still visit Castle Sallé Dacil through a secret door in Ilshenar. Even though the castle has seen better days, I am still reminded of the Pure Love Princess Beatrix had for Shamino! *squeak squeak*

                    from.SendGump(g);
                    from.PlaySound(1664);
                }
                else
                {
                    PrivateOverheadMessage(MessageType.Regular, 0x47E, 1159380, from.NetState); // * You attempt to understand the spirit but your connection to them is weak... *
                }
            }
        }
Example #13
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.InRange(Location, 3))
            {
                if (FellowshipMedallion.IsDressed(from))
                {
                    Gump g = new Gump(100, 100);
                    g.AddBackground(0, 0, 570, 295, 0x2454);
                    g.AddImage(0, 0, 0x6D2);
                    g.AddHtmlLocalized(335, 24, 223, 261, GumpCliloc, 0xC63, false, true);

                    from.SendGump(g);
                    from.PlaySound(1664);
                }
                else
                {
                    PrivateOverheadMessage(MessageType.Regular, 0x47E, 1159380,
                                           from.NetState); // * You attempt to understand the spirit but your connection to them is weak... *
                }
            }
        }
Example #14
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.InRange(Location, 3))
            {
                if (FellowshipMedallion.IsDressed(from))
                {
                    Gump g = new Gump(100, 100);
                    g.AddBackground(0, 0, 570, 295, 0x2454);
                    g.AddImage(0, 0, 0x9D3D);
                    g.AddHtmlLocalized(335, 24, 223, 261, 1159379, 0xC63, false, true); // Tis true, I am unlike the spirits you will see roaming nearby - the Well of Souls has allowed me a more robust form between the plane of reality and the ethereal void. Tis no matter though, I return to Britannia only to remember my beloved Beatrix. My how beautiful my Beatrix was... We were to be wed you know! <br><br>What a wedding it would have been! Castle Sallé Dacil was decorated in full regalia and the ceremony was to begin promptly at noon. Elegantly carved swans, a feast set for a king, and a generous gift from our Forgotten King - a magnificent sandalwood box! <br><br>Alas, none of that happened. I was rushed off to the war against Mondain in service of our Forgotten King. <br><br>Ah, I remember my first meeting with him well, I nearly chopped off my own leg from the shock!  Offworld travelers were a rarity then, those would be crowned king even more so!  Little about him was ordinary, right up to his coronation - tis no small feat to assemble such a crowd at midnight! It was very important to pay attention to the clocks so we wouldn't miss the spectacle, but many were in attendance to rejoice in the occasion despite the late hour.<br><br>Time is a funny thing - and my time in the ethereal plane has allowed me to see what would have been. *gestures to the glowing Well* I am afraid in this age of uncertainty, travel to the ethereal void via the Well of Souls is most perilous. Only those bearing the blessing of the Forgotten King will be able to pass. <br><br>And pass you must, for the Time Lord, Hawkwind, has been bound there by dark magics, and only a mortal being, virtuous and true, will be able to free him!  Even bound, time is a fickle thing and the influence of its agent no doubt still at hand. Your quest on this timeline is the one true way forward...<br><br>Thank you for listening to me reminisce. It is especially nice to remember my beloved Beatrix. *smiles*<br>

                    from.SendGump(g);
                    from.PlaySound(1664);
                }
                else
                {
                    PrivateOverheadMessage(MessageType.Regular, 0x47E, 1159380,
                                           from.NetState); // * You attempt to understand the spirit but your connection to them is weak... *
                }
            }
        }
Example #15
0
        public void OnForensicEval(Mobile m)
        {
            if (!m.Player)
            {
                return;
            }

            var quest = QuestHelper.GetQuest <GoingGumshoeQuest2>((PlayerMobile)m);

            if (quest != null)
            {
                if (HasFoundClue(quest))
                {
                    m.SendLocalizedMessage(1158613); // You have already documented this clue.
                }
                else
                {
                    m.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157722, "Forensics", m.NetState); // *Your proficiency in ~1_SKILL~ reveals more about the item*
                    m.SendLocalizedMessage(1158612, null, 0x23);                                            // You have identified a clue! This item seems pertinent to the investigation!

                    m.SendSound(quest.UpdateSound);

                    var gump = new Gump(50, 50);
                    gump.AddBackground(0, 0, 500, 500, 9380);

                    gump.AddItem(84, 130, ItemID, Hue);
                    gump.AddHtml(167, 50, 310, 20, "<center><basefont color=#B22222>a dust pile</center>", false, false);
                    gump.AddHtmlLocalized(167, 70, 310, 380, 1158617, true, false);

                    m.SendGump(gump);

                    /*The dust seems to have have settled in a distinct pattern around whatever once was placed at this location.
                     * Whatever it was, it was certainly small enough to be taken away in a hurry.*/

                    SetFoundClue(quest);
                }
            }
        }
Example #16
0
        public override void Gump(Mobile from, Gump gump, ACCGumpParams subParams)
        {
            gump.AddButton(195, 40, 2445, 2445, 101, GumpButtonType.Reply, 0);
            gump.AddLabel(200, 41, 1153, "Manage System");
            gump.AddButton(310, 40, 2445, 2445, 102, GumpButtonType.Reply, 0);
            gump.AddLabel(342, 41, 1153, "Import");

            if (subParams == null || !(subParams is PGGumpParams))
            {
                gump.AddHtml(215, 65, 300, 25, "<basefont size=7 color=white><center>Public Gates</center></font>", false, false);
                gump.AddHtml(140, 95, 450, 250, "<basefont color=white><center>Welcome to the Public Gate Admin Gump!</center><br>With this gump, you can manage the entire system and import and export locations or full categories.  Please choose an option from the top bar.<br><br>Manage System allows you to add/change/delete locations and categories from anywhere in the world.<br><br>Im/Ex port allows you to import or export categories and locations to files that you can distribute to other servers that use this system.</font>", false, false);
                return;
            }

            Params = subParams as PGGumpParams;

            switch ((int)Params.Page)
            {
                #region Manage Gump Code
            case (int)Pages.Manage:
            {
                gump.AddBackground(640, 0, 160, 400, 5120);
                gump.AddButton(425, 40, 2445, 2445, 123, GumpButtonType.Reply, 0);
                gump.AddLabel(456, 41, 1153, "Export");

                for (int i = 0; i < m_CategoryList.Count && i < 50; i++)
                {
                    PGCategory PGC = m_CategoryList[i];
                    if (PGC != null)
                    {
                        gump.AddButton(650, 10 + i * 30, 2501, 2501, 150 + i, GumpButtonType.Reply, 0);
                        gump.AddButton(655, 12 + i * 30, (Params.SelectedCategory.Key == PGC ? 5401 : 5402), (Params.SelectedCategory.Key == PGC ? 5402 : 5401), 150 + i, GumpButtonType.Reply, 0);
                        gump.AddLabel(675, 10 + i * 30, 1153, PGC.Name);
                    }
                }

                if (Params.SelectedCategory.Key != null)
                {
                    gump.AddBackground(425, 75, 170, 285, 5120);
                    gump.AddButton(195, 65, 2445, 2445, 121, GumpButtonType.Reply, 0);
                    gump.AddLabel(206, 66, 1153, "Add Category");
                    gump.AddButton(310, 65, 2445, 2445, 122, GumpButtonType.Reply, 0);
                    gump.AddLabel(322, 66, 1153, "Add Location");

                    for (int i = 0, c = 0, r = 0; i < Params.SelectedCategory.Key.Locations.Count; i++)
                    {
                        PGLocation PGL = Params.SelectedCategory.Key.Locations[i];
                        if (PGL != null)
                        {
                            gump.AddButton(120 + c * 150, 100 + r * 30, 2501, 2501, 200 + i, GumpButtonType.Reply, 0);
                            gump.AddButton(125 + c * 150, 102 + r * 30, (Params.SelectedLocation.Key == PGL ? 5401 : 5402), (Params.SelectedLocation.Key == PGL ? 5402 : 5401), 200 + i, GumpButtonType.Reply, 0);
                            gump.AddLabel(145 + c * 150, 100 + r * 30, 1153, PGL.Name);
                            r += (c == 1 ? 1 : 0);
                            c += (c == 1 ? -1 : 1);
                        }
                    }

                    if (Params.SelectedLocation.Key != null)
                    {
                        gump.AddButton(550, 265, 2642, 2643, 103, GumpButtonType.Reply, 0);         //Apply Location

                        gump.AddImage(440, 85, 2501);
                        gump.AddTextEntry(446, 85, 130, 20, 0, 105, Params.SelectedLocation.Key.Name);

                        gump.AddImage(445, 110, 2443);
                        gump.AddImage(513, 110, 2443);
                        gump.AddImage(445, 135, 2443);
                        gump.AddImage(513, 135, 2443);
                        gump.AddImage(445, 160, 2443);

                        gump.AddTextEntry(450, 110, 53, 20, 0, 106, Params.SelectedLocation.Key.Location.X.ToString());
                        gump.AddTextEntry(518, 110, 53, 20, 0, 107, Params.SelectedLocation.Key.Location.Y.ToString());
                        gump.AddTextEntry(450, 135, 53, 20, 0, 108, Params.SelectedLocation.Key.Location.Z.ToString());
                        gump.AddTextEntry(518, 135, 53, 20, 0, 109, Params.SelectedLocation.Key.Hue.ToString());
                        gump.AddTextEntry(450, 160, 53, 20, 0, 110, Params.SelectedLocation.Key.Cost.ToString());

                        gump.AddLabel(435, 112, 1153, "X");
                        gump.AddLabel(578, 112, 1153, "Y");
                        gump.AddLabel(435, 137, 1153, "Z");
                        gump.AddLabel(578, 137, 1153, "H");
                        gump.AddLabel(435, 162, 1153, "C");

                        gump.AddRadio(435, 190, 208, 209, (Params.SelectedLocation.Key.Map == Map.Trammel), 111);
                        gump.AddRadio(570, 190, 208, 209, (Params.SelectedLocation.Key.Map == Map.Malas), 112);
                        gump.AddRadio(435, 215, 208, 209, (Params.SelectedLocation.Key.Map == Map.Felucca), 113);
                        gump.AddRadio(570, 215, 208, 209, (Params.SelectedLocation.Key.Map == Map.Ilshenar), 114);
                        gump.AddRadio(435, 240, 208, 209, (Params.SelectedLocation.Key.Map == Map.Tokuno), 115);

                        gump.AddLabel(460, 192, 1153, "Tram");
                        gump.AddLabel(530, 192, 1153, "Malas");
                        gump.AddLabel(460, 217, 1153, "Fel");
                        gump.AddLabel(542, 217, 1153, "Ilsh");
                        gump.AddLabel(460, 242, 1153, "Tokuno");

                        gump.AddLabel(465, 282, 1153, "Young?");
                        gump.AddCheck(440, 280, 210, 211, Params.SelectedLocation.Key.GetFlag(EntryFlag.Young), 120);
                        gump.AddLabel(465, 307, 1153, "Gen?");
                        gump.AddCheck(440, 305, 210, 211, Params.SelectedLocation.Key.GetFlag(EntryFlag.Generate), 116);
                        gump.AddLabel(515, 307, 1153, "Staff?");
                        gump.AddCheck(565, 305, 210, 211, Params.SelectedLocation.Key.GetFlag(EntryFlag.StaffOnly), 117);
                        gump.AddLabel(465, 332, 1153, "Reds?");
                        gump.AddCheck(440, 330, 210, 211, Params.SelectedLocation.Key.GetFlag(EntryFlag.Reds), 118);
                        gump.AddLabel(522, 332, 1153, "Chrg?");
                        gump.AddCheck(565, 330, 210, 211, Params.SelectedLocation.Key.GetFlag(EntryFlag.Charge), 119);
                    }

                    else
                    {
                        gump.AddButton(550, 265, 2642, 2643, 104, GumpButtonType.Reply, 0);         //Apply Category

                        gump.AddImage(440, 110, 2501);
                        gump.AddTextEntry(446, 110, 130, 20, 0, 105, Params.SelectedCategory.Key.Name);

                        gump.AddImage(445, 160, 2443);
                        gump.AddTextEntry(450, 160, 53, 20, 0, 110, Params.SelectedCategory.Key.Cost.ToString());
                        gump.AddLabel(435, 162, 1153, "C");

                        gump.AddLabel(465, 282, 1153, "Young?");
                        gump.AddCheck(440, 280, 210, 211, Params.SelectedCategory.Key.GetFlag(EntryFlag.Young), 120);
                        gump.AddLabel(465, 307, 1153, "Gen?");
                        gump.AddCheck(440, 305, 210, 211, Params.SelectedCategory.Key.GetFlag(EntryFlag.Generate), 116);
                        gump.AddLabel(515, 307, 1153, "Staff?");
                        gump.AddCheck(565, 305, 210, 211, Params.SelectedCategory.Key.GetFlag(EntryFlag.StaffOnly), 117);
                        gump.AddLabel(465, 332, 1153, "Reds?");
                        gump.AddCheck(440, 330, 210, 211, Params.SelectedCategory.Key.GetFlag(EntryFlag.Reds), 118);
                        gump.AddLabel(522, 332, 1153, "Chrg?");
                        gump.AddCheck(565, 330, 210, 211, Params.SelectedCategory.Key.GetFlag(EntryFlag.Charge), 119);
                    }
                }
                break;
            }
                #endregion //Manage Gump Code

                #region Import Gump Code
            case (int)Pages.Import:
            {        //Import
                if (!Directory.Exists("Data/ACC Exports"))
                {
                    from.SendMessage("There are no files to import!");
                    return;
                }

                gump.AddButton(195, 65, 2445, 2445, 124, GumpButtonType.Reply, 0);         //Switch to Systems
                gump.AddLabel(220, 66, 1153, "Systems");

                gump.AddButton(310, 65, 2445, 2445, 125, GumpButtonType.Reply, 0);         //Switch to Categories
                gump.AddLabel(328, 66, 1153, "Categories");

                gump.AddButton(425, 65, 2445, 2445, 126, GumpButtonType.Reply, 0);         //Switch to Locations
                gump.AddLabel(447, 66, 1153, "Locations");
                switch ((int)Params.ImportSelection)
                {
                case (int)ImportSelections.Systems: { Dirs = Directory.GetFiles("Data/ACC Exports/", "*.pgs"); break; }

                case (int)ImportSelections.Categories: { Dirs = Directory.GetFiles("Data/ACC Exports/", "*.pgc"); break; }

                case (int)ImportSelections.Locations: { Dirs = Directory.GetFiles("Data/ACC Exports/", "*.pgl"); break; }

                default: { return; }
                }
                if (Dirs == null || Dirs.Length == 0)
                {
                    from.SendMessage("There are no files of that type!");
                    return;
                }
                for (int i = 0, r = 0, c = 0; i < Dirs.Length && c < 3; i++)
                {
                    string s = Dirs[i];
                    s = s.Remove(0, 12);
                    s = s.Remove(s.Length - 4, 4);
                    if (Params.ImportSelection == ImportSelections.Systems)
                    {
                        s = s.Remove(0, 9);
                    }

                    gump.AddButton(120 + c * 150, 100 + r * 30, 2501, 2501, 300 + i, GumpButtonType.Reply, 0);
                    gump.AddLabelCropped(125 + c * 150, 101 + r * 30, 140, 30, 1153, s);

                    c += (r == 7 ? 1 : 0);
                    r += (r == 7 ? -7 : 1);
                }
                break;
            }
                #endregion //Import Gump Code
            }
        }