Ejemplo n.º 1
0
        public void AddIcon(int iconID, string type, Gump g)
        {
            switch (type)
            {
            case "Control":
                if (Skin.IconSOn)
                {
                    g.AddImage(Skin.IconSX, g.Y + Skin.IconSY, iconID);
                }
                break;

            case "Underbar":
                if (Skin.IconHOn)
                {
                    g.AddImage(Skin.IconHX, g.Y + Skin.IconHY, iconID);
                }
                break;

            case "Master":
                if (Skin.IconMOn)
                {
                    g.AddImage(Skin.IconMX, g.Y + Skin.IconMY, iconID);
                }
                break;
            }
        }
Ejemplo n.º 2
0
 public void AddToGump(Gump g, int x, int y)
 {
     if (Hue > 0)
     {
         if (AssetType == IconType.ItemArt)
         {
             g.AddItem(x, y, AssetID, Hue);
         }
         else
         {
             g.AddImage(x, y, AssetID, Hue);
         }
     }
     else
     {
         if (AssetType == IconType.ItemArt)
         {
             g.AddItem(x, y, AssetID);
         }
         else
         {
             g.AddImage(x, y, AssetID);
         }
     }
 }
Ejemplo n.º 3
0
        public override void OnDoubleClick(Mobile m)
        {
            if (m is PlayerMobile && m.InRange(GetWorldLocation(), 3))
            {
                var gump = new Gump(100, 100);
                gump.AddImage(0, 0, 0x761C);
                gump.AddImage(95, 40, 0x69E);
                gump.AddHtmlLocalized(115, 200, 350, 400, 1158516, "#1158516", 0x1, false, true);

                /*The study of Britannian astronomy dates back to the appearances of strangers from offwordly realms. When it was learned that
                 * Sosaria exists within a much larger universe, curiosity tilted our heads upwards towards the sky. Before long skilled tinkers
                 * granted the ability to see objects at great distance became a reality - enter the telescope. While the most impressive example
                 * of these contraptions is the one located in Moonglow at 43o 52'N, 122o 4'W, where I have chosen to spend my time deep in
                 * research, recent developments in miniaturization have brought the size of these instruments within the grasp of the casual
                 * observer.<br><br>Using a telescope may appear quite simple, but one would be naive to think there is no more beyond haphazardly
                 * pointing towards the sky to make observations!<br><br>The best viewing hours are during the night between the hours of 5pm
                 * and 4am. Any standard clock is an essential tool in mapping the night sky!<br><br>While there are a variety of objects in the
                 * night sky to observe if one points their telescope at the object as it traverses space, the real search is for constellations
                 * - a unique collection of several stars.<br><br>Constellations appear at various periods during the night. Constellations can
                 * be seen during the early evening (5pm-8pm), late at night (9pm-11pm), midnight (12am), or the middle of the night (1am-4am).
                 * After 4am daylight will drown out any attempt at making meaningful observations.<br><br>Constellations can be observed in
                 * these time periods based on their location in the night sky. Britannian astronomers have adopted a coordinate system that
                 * uses right ascension (RA) and declination (DEC) to pinpoint a constellation's location during night time periods.<br><br>RA
                 * can be measured from 0-24 and DEC can be measured from 0-90. Current Telescopes are capable of resolving increments of 1 hour
                 * of RA and 0.2 degrees of DEC.<br><br>When a time period has been selected and the RA and DEC have been set one need only
                 * initiate a switch conveniently located in the viewfinder, to check that section of the sky! Should you be lucky enough to
                 * see a constellation a standard mapmaking pen can be used to create a star chart. As the potential discoverer of a new
                 * constellation you have the opportunity to name and submit your discovery to the Britannian Astronomical Society, of whom
                 * this author is primary registrar, for documentation.<br><br>Happy skywatching!*/

                m.SendGump(gump);
            }
        }
Ejemplo n.º 4
0
        public void OnForensicEval(Mobile m)
        {
            if (!m.Player)
            {
                return;
            }

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

            if (quest != null)
            {
                m.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1158571, m.NetState); // *You examine the headstone...*
                m.SendLocalizedMessage(1158562, null, 0x23);                               // The damage to the epitaph seems deliberate.  Using your training from Inspector Jasper you have found a hidden message among the scratches. You recreate the original epitaph in your mind's eye...

                m.SendSound(quest.UpdateSound);

                var gump = new Gump(50, 50);

                gump.AddImage(0, 0, 0x66);
                gump.AddHtmlLocalized(47, 60, 146, 160, GumpLocalization, false, false);

                m.SendGump(gump);

                SetPrerequisite(quest);
            }
            else
            {
                m.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1158563, m.NetState); // *It appears to be a normal, yet oddly damaged, headstone. The epitaph is illegible..*
            }
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.InRange(Location, 1))
            {
                if (FellowshipMedallion.IsDressed(from))
                {
                    Gump g = new Gump(100, 100);
                    g.AddImage(0, 0, 0x761C6);
                    g.AddHtmlLocalized(115, 30, 350, 600, 1159311, "#1159311", 0x1, false,
                                       true); // My inner voice guided me but has fallen silent...and to that end I have failed my purpose. We set sail for Iver's Rounding West of Skara Brae...I fear the end has come though, we are far off course and provisions are low and the weather has turned. The Love I had is my only Truth now. All that is left is Courage. When will my inner voice return?

                    from.SendGump(g);
                    from.PlaySound(1664);
                }
                else
                {
                    from.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1159310,
                                                from.NetState); // * You attempt to read the journal but the characters are jumbled in your field of vision. Now your head hurts. *
                }
            }
            else
            {
                from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
            }
        }
Ejemplo n.º 7
0
 public override void OnDoubleClick(Mobile m)
 {
     if (m.InRange(GetWorldLocation(), 2))
     {
         Gump g = new Gump(50, 50);
         g.AddImage(0, 0, 30576);
         m.SendGump(g);
     }
 }
Ejemplo n.º 8
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.InRange(GetWorldLocation(), 3))
            {
                Gump g = new Gump(100, 100);

                if (_Type == CardType.Krampus)
                {
                    g.AddImage(0, 0, 39914);
                }
                else
                {
                    g.AddImage(0, 0, 39904 + (int)_Type);
                }

                from.SendGump(g);
            }
        }
Ejemplo n.º 9
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);
        }
Ejemplo n.º 10
0
        public override void OnDoubleClick(Mobile m)
        {
            if (m.InRange(GetWorldLocation(), 2))
            {
                var gump = new Gump(50, 50);
                gump.AddImage(0, 0, 0x9CE9);

                m.SendGump(gump);
            }
        }
Ejemplo n.º 11
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.InRange(this.GetWorldLocation(), 3))
            {
                Gump g = new Gump(100, 100);
                g.AddImage(0, 0, 39904 + (int)_Type);

                from.SendGump(g);
            }
        }
Ejemplo n.º 12
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.InRange(GetWorldLocation(), 5))
            {
                Gump g = new Gump(0, 0);
                g.AddImage(0, 0, 49999);

                from.SendGump(g);
            }
        }
Ejemplo n.º 13
0
        public override void OnDoubleClick(Mobile m)
        {
            if (TreasuresOfDoomEvent.Instance.Running && m.InRange(GetWorldLocation(), 2))
            {
                Gump gump = new Gump(150, 150);

                gump.AddImage(0, 0, HasRevealed(m) ? 0x7779 : 0x7724);

                m.SendGump(gump);
            }
        }
Ejemplo n.º 14
0
        public override void OnDoubleClick(Mobile m)
        {
            if (IsChildOf(m.Backpack))
            {
                Gump g = new Gump(150, 150);
                g.AddImage(0, 0, 30236);
                g.AddHtmlLocalized(110, 30, 350, 630, Content, false, false);

                m.SendGump(g);
            }
        }
Ejemplo n.º 15
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);
        }
Ejemplo n.º 16
0
        public override void OnDoubleClick(Mobile m)
        {
            if (PointsSystem.TreasuresOfDoom.InSeason && m.InRange(GetWorldLocation(), 2))
            {
                var gump = new Gump(150, 150);

                gump.AddImage(0, 0, HasRevealed(m) ? 0x7779 : 0x7724);

                m.SendGump(gump);
            }
        }
Ejemplo n.º 17
0
        public override void OnDoubleClick(Mobile m)
        {
            if (IsChildOf(m.Backpack))
            {
                Gump g = new Gump(100, 50);
                g.AddImage(0, 0, 30236);
                g.AddHtmlLocalized(115, 35, 350, 600, 1156723, 1, false, true);

                m.SendGump(g);
            }
        }
Ejemplo n.º 18
0
        public override void OnDoubleClick(Mobile m)
        {
            if (!m.InRange(GetWorldLocation(), 3))
            {
                m.LocalOverheadMessage(Network.MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
            }
            else
            {
                Gump g = new Gump(100, 100);
                g.AddImage(0, 0, GumpID);

                m.SendGump(g);
            }
        }
Ejemplo n.º 19
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);
            }
        }
Ejemplo n.º 20
0
 public override void OnComponentUsed(AddonComponent comp, Mobile from)
 {
     if (comp.ItemID == 0x0FF4)
     {
         if (!from.InRange(comp.GetWorldLocation(), 2))
         {
             from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
         }
         else
         {
             Gump g = new Gump(35, 70);
             g.AddImage(0, 0, 500);
             g.AddHtmlLocalized(40, 17, 150, 220, 1055141, false, false);
             from.SendGump(g);
         }
     }
 }
Ejemplo n.º 21
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... *
                }
            }
        }
Ejemplo n.º 22
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... *
                }
            }
        }
Ejemplo n.º 23
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... *
                }
            }
        }
Ejemplo n.º 24
0
        public virtual void AddToGump(Gump g, int x, int y, int hue)
        {
            if (IsEmpty)
            {
                return;
            }

            x += OffsetX;
            y += OffsetY;

            if (hue < 0)
            {
                hue = Hue;
            }

            switch (AssetType)
            {
            case IconType.ItemArt:
            {
                if (ComputeOffset)
                {
                    var o = ArtExtUtility.GetImageOffset(AssetID);

                    if (o != Point.Empty)
                    {
                        x += o.X;
                        y += o.Y;
                    }
                }

                x = Math.Max(0, x);
                y = Math.Max(0, y);

                if (hue > 0)
                {
                    g.AddItem(x, y, AssetID, hue);
                }
                else
                {
                    g.AddItem(x, y, AssetID);
                }
            }
            break;

            case IconType.GumpArt:
            {
                x = Math.Max(0, x);
                y = Math.Max(0, y);

                if (hue > 0)
                {
                    g.AddImage(x, y, AssetID, hue);
                }
                else
                {
                    g.AddImage(x, y, AssetID);
                }
            }
            break;
            }
        }
Ejemplo n.º 25
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
            }
        }