Exemple #1
0
            public DamageTimer(ExodusNexus nexus, Mobile to)
                : base(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(5.0))
            {
                m_Nexus = nexus;
                m_To    = to;
                m_Step  = 0;

                Priority = TimerPriority.TwoFiftyMS;
            }
Exemple #2
0
            public NexusGameGump(ExodusNexus nexus, Mobile from, int step, bool hint)
                : base(5, 30)
            {
                m_Nexus = nexus;
                m_From  = from;
                m_Step  = step;

                int sideLength = nexus.SideLength;

                AddBackground(50, 0, 530, 410, 0xA28);

                AddImage(0, 0, 0x28C8);
                AddImage(547, 0, 0x28C9);

                AddBackground(95, 20, 442, 90, 0xA28);

                AddHtmlLocalized(165, 35, 300, 45, 1153747, false, false); // <center>GENERATOR CONTROL nexus</center>
                AddHtmlLocalized(165, 60, 300, 70, 1153748, false, false); // <center>Use the Directional Controls to</center>
                AddHtmlLocalized(165, 75, 300, 85, 1153749, false, false); // <center>Close the Grid Circuit</center>

                AddImage(140, 40, 0x28D3);
                AddImage(420, 40, 0x28D3);

                AddBackground(365, 120, 178, 210, 0x1400);

                AddImage(365, 115, 0x28D4);
                AddImage(365, 288, 0x28D4);

                AddImage(414, 189, 0x589);
                AddImage(435, 210, 0xA52);

                AddButton(408, 222, 0x29EA, 0x29EC, 1, GumpButtonType.Reply, 0); // Left
                AddButton(448, 185, 0x29CC, 0x29CE, 2, GumpButtonType.Reply, 0); // Up
                AddButton(473, 222, 0x29D6, 0x29D8, 3, GumpButtonType.Reply, 0); // Right
                AddButton(448, 243, 0x29E0, 0x29E2, 4, GumpButtonType.Reply, 0); // Down

                AddBackground(90, 115, 30 + 40 * sideLength, 30 + 40 * sideLength, 0xA28);
                AddBackground(100, 125, 10 + 40 * sideLength, 10 + 40 * sideLength, 0x1400);

                for (int i = 0; i < sideLength; i++)
                {
                    for (int j = 0; j < sideLength - 1; j++)
                    {
                        AddImage(120 + 40 * i, 162 + 40 * j, 0x13F9);
                    }
                }

                for (int i = 0; i < sideLength - 1; i++)
                {
                    for (int j = 0; j < sideLength; j++)
                    {
                        AddImage(138 + 40 * i, 147 + 40 * j, 0x13FD);
                    }
                }

                Node[] path = nexus.Path;

                NodeHue[,] hues = new NodeHue[sideLength, sideLength];

                for (int i = 0; i <= step; i++)
                {
                    Node n = path[i];
                    hues[n.X, n.Y] = NodeHue.Blue;
                }

                Node lastNode = path[path.Length - 1];

                hues[lastNode.X, lastNode.Y] = NodeHue.Red;

                for (int i = 0; i < sideLength; i++)
                {
                    for (int j = 0; j < sideLength; j++)
                    {
                        AddNode(110 + 40 * i, 135 + 40 * j, hues[i, j]);
                    }
                }

                Node curNode = path[step];

                AddImage(118 + 40 * curNode.X, 143 + 40 * curNode.Y, 0x13A8);

                if (hint)
                {
                    Node nextNode = path[step + 1];
                    AddImage(119 + 40 * nextNode.X, 143 + 40 * nextNode.Y, 0x939);
                }

                if (from.Skills.Lockpicking.Value >= 65.0)
                {
                    AddButton(365, 350, 0xFA6, 0xFA7, 5, GumpButtonType.Reply, 0);
                    AddHtmlLocalized(405, 345, 140, 40, 1153750, false, false); // Attempt to Decipher the Circuit Path
                }
            }