Exemplo n.º 1
0
        public override void OnResponse(RelayInfo info)
        {
            if (info.ButtonID > 0)
            {
                int         id      = info.ButtonID - 100;
                TOSDSpawner spawner = TOSDSpawner.Instance;

                if (spawner != null && id >= 0 && id < spawner.Entries.Count)
                {
                    TOSDSpawnEntry entry = spawner.Entries[id];

                    do
                    {
                        Point3D p = Map.Ilshenar.GetRandomSpawnPoint(entry.SpawnArea);

                        if (Map.Ilshenar.CanSpawnMobile(p))
                        {
                            User.MoveToWorld(p, Map.Ilshenar);
                            Refresh();

                            break;
                        }
                    }while (true);
                }
            }
        }
Exemplo n.º 2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            Enabled = reader.ReadBool();

            if (reader.ReadInt() == 0)
            {
                var spawner = new TOSDSpawner();
                spawner.Deserialize(reader);
            }

            int count = reader.ReadInt();

            for (int i = 0; i < count; i++)
            {
                Mobile m      = reader.ReadMobile();
                int    points = reader.ReadInt();

                if (m != null && points > 0)
                {
                    DungeonPoints[m] = points;
                }
            }
        }
Exemplo n.º 3
0
        public static void Generate()
        {
            Map map = Map.Ilshenar;

            if (SorcerersDungeonResearcher.Instance == null)
            {
                SorcerersDungeonResearcher.Instance = new SorcerersDungeonResearcher();
                SorcerersDungeonResearcher.Instance.MoveToWorld(new Point3D(536, 456, -53), map);
            }

            if (map.FindItem <Static>(new Point3D(546, 460, 6)) == null)
            {
                Static st = new Static(0x9D2B);
                st.MoveToWorld(new Point3D(546, 460, 6), map);

                st = new Static(0x9D2C);
                st.MoveToWorld(new Point3D(548, 460, 6), map);

                st = new Static(0x9D2D);
                st.MoveToWorld(new Point3D(548, 458, 6), map);
            }

            if (map.FindItem <Static>(new Point3D(545, 462, -53)) == null)
            {
                Static st = new Static(0x9F34);
                st.MoveToWorld(new Point3D(545, 462, -53), map);
            }

            if (map.FindItem <Static>(new Point3D(550, 462, -53)) == null)
            {
                Static st = new Static(0x9F34);
                st.MoveToWorld(new Point3D(550, 462, -53), map);
            }

            if (map.FindItem <Static>(new Point3D(545, 463, -55)) == null)
            {
                Static st = new Static(0x9F28);
                st.MoveToWorld(new Point3D(545, 463, -55), map);
            }

            if (map.FindItem <Static>(new Point3D(550, 463, -55)) == null)
            {
                Static st = new Static(0x9F24);
                st.MoveToWorld(new Point3D(550, 463, -55), map);
            }

            if (TOSDSpawner.Instance == null)
            {
                TOSDSpawner spawner = new TOSDSpawner();
                spawner.BeginTimer();
            }
        }
Exemplo n.º 4
0
        public override void AddGumpLayout()
        {
            AddBackground(0, 0, 500, 300, 9300);
            AddHtml(0, 10, 500, 20, Center("Treasures of Sorcerer's Dungeon Spawner"), false, false);

            TOSDSpawner spawner = TOSDSpawner.Instance;

            if (spawner == null)
            {
                AddHtml(10, 40, 150, 20, "Spawner Disabled", false, false);
            }
            else
            {
                int y = 60;

                AddLabel(10, 40, 0, "Go");
                AddLabel(40, 40, 0, "Boss");
                AddLabel(240, 40, 0, "Current");
                AddLabel(320, 40, 0, "Max");
                AddLabel(400, 40, 0, "Killed");

                for (int i = 0; i < spawner.Entries.Count; i++)
                {
                    TOSDSpawnEntry entry = spawner.Entries[i];
                    string         hue   = i == spawner.Index ? "green" : "red";

                    AddButton(7, y, 1531, 1532, i + 100, GumpButtonType.Reply, 0);
                    AddHtml(40, y, 200, 20, Color(hue, entry.Boss.Name), false, false);
                    AddHtml(320, y, 80, 20, Color(hue, entry.MaxSpawn.ToString()), false, false);

                    if (hue == "green")
                    {
                        AddHtml(240, y, 80, 20, Color(hue, spawner.Spawn.Count.ToString()), false, false);
                        AddHtml(400, y, 80, 20, Color(hue, spawner.KillCount.ToString()), false, false);
                    }
                    else
                    {
                        AddHtml(240, y, 80, 20, Color(hue, "0"), false, false);
                        AddHtml(400, y, 80, 20, Color(hue, "0"), false, false);
                    }

                    y += 22;
                }
            }
        }