Пример #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            Troll         = reader.ReadMobile() as CaveTroll;
            StartSpot     = reader.ReadPoint3D();
            StartMap      = reader.ReadMap();
            TrollSpawnLoc = reader.ReadPoint3D();

            if (Troll != null)
            {
                Troll.Wall = this;
            }

            if (Location != StartSpot || Troll == null || Troll.Deleted || !Troll.Alive)
            {
                Reset();
            }

            if (version == 2)
            {
                Timer.DelayCall(() => AddTeleporters(this));
            }

            if (version == 1 && StartSpot == new Point3D(5619, 57, 0) && StartMap == Map.Felucca)
            {
                Timer.DelayCall(TimeSpan.FromSeconds(20), () =>
                {
                    ShameWall.AddTeleporters(this);
                });
            }
        }
Пример #2
0
        public static void Generate(CommandEventArgs e)
        {
            RemoveItems();

            CommandSystem.Handle(e.Mobile, CommandSystem.Prefix + "XmlLoad RevampedSpawns/ShameRevamped.xml");

            // Level 1
            Point3D altarLoc = new Point3D(5403, 43, 30);

            if (!CheckForAltar(altarLoc, Map.Trammel))
            {
                ShameAltar altar = new ShameAltar(typeof(QuartzElemental), new Point3D(5490, 19, -25), new Point3D(5514, 10, 5), new Point3D(5387, 11, 30), 10);
                WeakEntityCollection.Add("newshame", altar);
                altar.MoveToWorld(altarLoc, Map.Trammel);
            }

            if (!CheckForAltar(altarLoc, Map.Felucca))
            {
                ShameAltar altar = new ShameAltar(typeof(QuartzElemental), new Point3D(5490, 19, -25), new Point3D(5514, 10, 5), new Point3D(5387, 11, 30), 10);
                WeakEntityCollection.Add("newshame", altar);
                altar.MoveToWorld(altarLoc, Map.Felucca);
            }

            // Level 2
            altarLoc = new Point3D(5577, 54, 2);

            if (!CheckForAltar(altarLoc, Map.Trammel))
            {
                ShameAltar altar = new ShameAltar(typeof(FlameElemental), new Point3D(5604, 102, 5), new Point3D(5514, 147, 25), new Point3D(5571, 115, 3), 20);
                WeakEntityCollection.Add("newshame", altar);
                altar.MoveToWorld(altarLoc, Map.Trammel);
            }

            if (!CheckForAltar(altarLoc, Map.Felucca))
            {
                ShameAltar altar = new ShameAltar(typeof(FlameElemental), new Point3D(5604, 102, 5), new Point3D(5514, 147, 25), new Point3D(5571, 115, 3), 20);
                WeakEntityCollection.Add("newshame", altar);
                altar.MoveToWorld(altarLoc, Map.Felucca);
            }

            // Level 3
            altarLoc = new Point3D(5390, 145, 20);

            if (!CheckForAltar(altarLoc, Map.Trammel))
            {
                ShameAltar altar = new ShameAltar(typeof(WindElemental), new Point3D(5538, 170, 5), new Point3D(5513, 176, 5), new Point3D(5618, 223, 0), 30);
                WeakEntityCollection.Add("newshame", altar);
                altar.MoveToWorld(altarLoc, Map.Trammel);
            }

            if (!CheckForAltar(altarLoc, Map.Felucca))
            {
                ShameAltar altar = new ShameAltar(typeof(WindElemental), new Point3D(5538, 170, 5), new Point3D(5513, 176, 5), new Point3D(5618, 223, 0), 30);
                WeakEntityCollection.Add("newshame", altar);
                altar.MoveToWorld(altarLoc, Map.Felucca);
            }

            // Wall 1
            Dictionary <Point3D, int> dictionary = null;

            altarLoc = new Point3D(5403, 82, 10);

            if (!CheckForAltar(altarLoc, Map.Trammel))
            {
                dictionary = new Dictionary <Point3D, int>();
                dictionary[new Point3D(-1, 0, 0)] = 2272;
                dictionary[new Point3D(0, 0, 0)]  = 2272;
                dictionary[new Point3D(2, 0, 0)]  = 2272;
                dictionary[new Point3D(1, 0, 0)]  = 2272;

                ShameWall wall = new ShameWall(dictionary, altarLoc, new Point3D(5405, 90, 10), Map.Trammel);
                WeakEntityCollection.Add("newshame", wall);
                wall.MoveToWorld(altarLoc, Map.Trammel);
                ShameWall.AddTeleporters(wall);
            }

            if (!CheckForAltar(altarLoc, Map.Felucca))
            {
                dictionary = new Dictionary <Point3D, int>();
                dictionary[new Point3D(-1, 0, 0)] = 2272;
                dictionary[new Point3D(0, 0, 0)]  = 2272;
                dictionary[new Point3D(2, 0, 0)]  = 2272;
                dictionary[new Point3D(1, 0, 0)]  = 2272;

                ShameWall wall = new ShameWall(dictionary, altarLoc, new Point3D(5405, 90, 10), Map.Felucca);
                WeakEntityCollection.Add("newshame", wall);
                wall.MoveToWorld(altarLoc, Map.Felucca);
                ShameWall.AddTeleporters(wall);
            }

            // Wall 2
            altarLoc = new Point3D(5465, 26, -10);

            if (!CheckForAltar(altarLoc, Map.Trammel))
            {
                dictionary = new Dictionary <Point3D, int>();
                dictionary[new Point3D(0, -1, 0)] = 2272;
                dictionary[new Point3D(0, 0, 0)]  = 2272;
                dictionary[new Point3D(0, 1, 0)]  = 2272;
                dictionary[new Point3D(0, 2, 0)]  = 2272;

                ShameWall wall = new ShameWall(dictionary, altarLoc, new Point3D(5472, 26, -30), Map.Trammel);
                WeakEntityCollection.Add("newshame", wall);
                wall.MoveToWorld(altarLoc, Map.Trammel);
                ShameWall.AddTeleporters(wall);
            }

            if (!CheckForAltar(altarLoc, Map.Felucca))
            {
                dictionary = new Dictionary <Point3D, int>();
                dictionary[new Point3D(0, -1, 0)] = 2272;
                dictionary[new Point3D(0, 0, 0)]  = 2272;
                dictionary[new Point3D(0, 1, 0)]  = 2272;
                dictionary[new Point3D(0, 2, 0)]  = 2272;

                ShameWall wall = new ShameWall(dictionary, altarLoc, new Point3D(5472, 26, -30), Map.Felucca);
                WeakEntityCollection.Add("newshame", wall);
                wall.MoveToWorld(altarLoc, Map.Felucca);
                ShameWall.AddTeleporters(wall);
            }

            // Wall 3
            altarLoc = new Point3D(5619, 57, 0);

            if (!CheckForAltar(altarLoc, Map.Trammel))
            {
                dictionary = new Dictionary <Point3D, int>();
                dictionary[new Point3D(-1, 0, 0)] = 1059;
                dictionary[new Point3D(0, 0, 0)]  = 1059;
                dictionary[new Point3D(1, 0, 0)]  = 1059;

                ShameWall wall = new ShameWall(dictionary, altarLoc, new Point3D(5621, 43, 0), Map.Trammel);
                WeakEntityCollection.Add("newshame", wall);
                wall.MoveToWorld(altarLoc, Map.Trammel);
                ShameWall.AddTeleporters(wall);
            }

            if (!CheckForAltar(altarLoc, Map.Felucca))
            {
                dictionary = new Dictionary <Point3D, int>();
                dictionary[new Point3D(-1, 0, 0)] = 1059;
                dictionary[new Point3D(0, 0, 0)]  = 1059;
                dictionary[new Point3D(1, 0, 0)]  = 1059;

                ShameWall wall = new ShameWall(dictionary, altarLoc, new Point3D(5621, 43, 0), Map.Felucca);
                WeakEntityCollection.Add("newshame", wall);
                wall.MoveToWorld(altarLoc, Map.Felucca);
                ShameWall.AddTeleporters(wall);
            }

            e.Mobile.SendMessage("Shame Revamped setup!");
        }