Example #1
0
        public static BaseDoor CreateDoorSet(int xDoor, int yDoor, bool doorEastToWest, int hue)
        {
            var ph = new Point3D(xDoor, yDoor, -1);
            var pl = new Point3D(xDoor + (doorEastToWest ? 0 : 1), yDoor + (doorEastToWest ? 1 : 0), -1);

            BaseDoor hiDoor, loDoor;

            if (FindObject(Map.Malas, ph, 0, out hiDoor))
            {
                DeleteDoor(hiDoor);
            }

            if (FindObject(Map.Malas, pl, 0, out loDoor))
            {
                DeleteDoor(loDoor);
            }

            hiDoor = new MetalDoor(doorEastToWest ? DoorFacing.NorthCCW : DoorFacing.WestCW);
            loDoor = new MetalDoor(doorEastToWest ? DoorFacing.SouthCW : DoorFacing.EastCCW);

            hiDoor.MoveToWorld(ph, Map.Malas);
            loDoor.MoveToWorld(pl, Map.Malas);

            hiDoor.Link = loDoor;
            loDoor.Link = hiDoor;

            hiDoor.Hue = hue;
            loDoor.Hue = hue;

            WeakEntityCollection.Add("doom", hiDoor);
            WeakEntityCollection.Add("doom", loDoor);

            return(hiDoor);
        }
Example #2
0
        public static void GenRoom_OnCommand(CommandEventArgs e)
        {
            e.Mobile.SendMessage("Generating room, please wait.");

            int count = 0;

            // doors
            MetalDoor north = FindItem(new GuardianRoomDoor(DoorFacing.NorthCCW), 0, 355, 14, -1, Map.Malas, ref count) as MetalDoor;
            MetalDoor south = FindItem(new GuardianRoomDoor(DoorFacing.SouthCW), 0, 355, 15, -1, Map.Malas, ref count) as MetalDoor;

            if (north != null && south != null)
            {
                north.Link = south;
                south.Link = north;
            }

            // pentagram center
            FindItem(new Static(0xFEA), 0x835, 365, 15, -1, Map.Malas, ref count);

            // ghost teleporters
            Teleporter tele;

            tele = FindItem(new GhostTeleporter(), 0x835, 354, 14, -1, Map.Malas, ref count) as Teleporter;

            if (tele != null)
            {
                tele.PointDest = new Point3D(349, 176, 14);
                tele.MapDest   = Map.Malas;
            }

            tele = FindItem(new GhostTeleporter(), 0x835, 354, 15, -1, Map.Malas, ref count) as Teleporter;

            if (tele != null)
            {
                tele.PointDest = new Point3D(349, 176, 14);
                tele.MapDest   = Map.Malas;
            }

            // treasure chest spawner
            Spawner spawner = new Spawner(3, 1, 5, 0, 9, "GuardianTreasureChest");

            spawner = FindItem(spawner, 0, 365, 15, 0, Map.Malas, ref count) as Spawner;

            if (spawner != null)
            {
                spawner.Movable = false;
                spawner.Respawn();
            }

            if (count > 0)
            {
                e.Mobile.SendMessage("Room generating complete. {0} items were generated.", count);
            }
            else
            {
                e.Mobile.SendMessage("Room generating complete. No changes neccessary.");
            }
        }
Example #3
0
        public static void SetupShadowguard(Mobile from)
        {
            if (Instance != null)
            {
                return;
            }

            ShadowguardController controller = new ShadowguardController();

            controller.MoveToWorld(new Point3D(501, 2192, 50), Map.TerMur);

            MetalDoor door = new MetalDoor(DoorFacing.NorthCCW)
            {
                Hue = 1779
            };

            door.MoveToWorld(new Point3D(519, 2188, 25), Map.TerMur);

            door = new MetalDoor(DoorFacing.SouthCW)
            {
                Hue = 1779
            };
            door.MoveToWorld(new Point3D(519, 2189, 25), Map.TerMur);

            door = new MetalDoor(DoorFacing.NorthCCW)
            {
                Hue = 1779
            };
            door.MoveToWorld(new Point3D(519, 2192, 25), Map.TerMur);

            door = new MetalDoor(DoorFacing.SouthCW)
            {
                Hue = 1779
            };
            door.MoveToWorld(new Point3D(519, 2193, 25), Map.TerMur);

            AnkhWest ankh = new AnkhWest();

            ankh.MoveToWorld(new Point3D(503, 2191, 25), Map.TerMur);

            Item item = new Static(19343);

            item.MoveToWorld(new Point3D(64, 2336, 29), Map.TerMur);

            item = new Static(19343);
            item.MoveToWorld(new Point3D(160, 2336, 29), Map.TerMur);

            item = new Static(19343);
            item.MoveToWorld(new Point3D(64, 2432, 29), Map.TerMur);

            item = new Static(19343);
            item.MoveToWorld(new Point3D(160, 2432, 29), Map.TerMur);

            from.SendMessage("Shadowguard has been setup!");
            Console.WriteLine("Shadowguard setup!");
        }
Example #4
0
        public static BaseDoor CreateDoorSet(int xDoor, int yDoor, bool doorEastToWest, int hue)
        {
            BaseDoor hiDoor = new MetalDoor(doorEastToWest ? DoorFacing.NorthCCW : DoorFacing.WestCW);
            BaseDoor loDoor = new MetalDoor(doorEastToWest ? DoorFacing.SouthCW : DoorFacing.EastCCW);

            hiDoor.MoveToWorld(new Point3D(xDoor, yDoor, -1), Map.Malas);
            loDoor.MoveToWorld(new Point3D(xDoor + (doorEastToWest ? 0 : 1), yDoor + (doorEastToWest ? 1 : 0), -1), Map.Malas);

            hiDoor.Link = loDoor;
            loDoor.Link = hiDoor;

            hiDoor.Hue = hue;
            loDoor.Hue = hue;

            return(hiDoor);
        }
Example #5
0
        /*
         * ██╗     ██╗███████╗████████╗███████╗███╗   ██╗
         * ██║     ██║██╔════╝╚══██╔══╝██╔════╝████╗  ██║
         * ██║     ██║███████╗   ██║   █████╗  ██╔██╗ ██║
         * ██║     ██║╚════██║   ██║   ██╔══╝  ██║╚██╗██║
         * ███████╗██║███████║   ██║   ███████╗██║ ╚████║
         * ╚══════╝╚═╝╚══════╝   ╚═╝   ╚══════╝╚═╝  ╚═══╝
         */

        /*
         * ██████╗ ██████╗ ███████╗███╗   ██╗
         * ██╔═══██╗██╔══██╗██╔════╝████╗  ██║
         * ██║   ██║██████╔╝█████╗  ██╔██╗ ██║
         * ██║   ██║██╔═══╝ ██╔══╝  ██║╚██╗██║
         * ╚██████╔╝██║     ███████╗██║ ╚████║
         * ╚═════╝ ╚═╝     ╚══════╝╚═╝  ╚═══╝
         */

        /*
         * ██████╗██╗      ██████╗ ███████╗███████╗
         * ██╔════╝██║     ██╔═══██╗██╔════╝██╔════╝
         * ██║     ██║     ██║   ██║███████╗█████╗
         * ██║     ██║     ██║   ██║╚════██║██╔══╝
         * ╚██████╗███████╗╚██████╔╝███████║███████╗
         * ╚═════╝╚══════╝ ╚═════╝ ╚══════╝╚══════╝
         */

        /*
         * ████████╗ █████╗ ██╗  ██╗███████╗
         * ╚══██╔══╝██╔══██╗██║ ██╔╝██╔════╝
         * ██║   ███████║█████╔╝ █████╗
         * ██║   ██╔══██║██╔═██╗ ██╔══╝
         * ██║   ██║  ██║██║  ██╗███████╗
         * ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝
         */

        /*
         * ██████╗ ██╗   ██╗████████╗
         * ██╔══██╗██║   ██║╚══██╔══╝
         * ██████╔╝██║   ██║   ██║
         * ██╔═══╝ ██║   ██║   ██║
         * ██║     ╚██████╔╝   ██║
         * ╚═╝      ╚═════╝    ╚═╝
         */

        /*
         * ██╗   ██╗███████╗███████╗
         * ██║   ██║██╔════╝██╔════╝
         * ██║   ██║███████╗█████╗
         * ██║   ██║╚════██║██╔══╝
         * ╚██████╔╝███████║███████╗
         * ╚═════╝ ╚══════╝╚══════╝
         */
        public override void Use(IPlayer sender, IThing other)
        {
            Action action = other switch
            {
                MetalDoor door => () => door.UseDynamite(sender, this),
                _ => () => base.Use(sender, other)
            };

            action();
        }

        /*
         * ██╗  ██╗███████╗██╗     ██████╗ ███████╗██████╗ ███████╗
         * ██║  ██║██╔════╝██║     ██╔══██╗██╔════╝██╔══██╗██╔════╝
         * ███████║█████╗  ██║     ██████╔╝█████╗  ██████╔╝███████╗
         * ██╔══██║██╔══╝  ██║     ██╔═══╝ ██╔══╝  ██╔══██╗╚════██║
         * ██║  ██║███████╗███████╗██║     ███████╗██║  ██║███████║
         * ╚═╝  ╚═╝╚══════╝╚══════╝╚═╝     ╚══════╝╚═╝  ╚═╝╚══════╝
         */
    }
Example #6
0
        public static BaseDoor CreateDoorSet(int xDoor, int yDoor, bool doorEastToWest, int hue)
        {
            var spawnLoc = new Point3D(xDoor, yDoor, -1);
            var map      = Map.Malas;

            if (!MythikStaticValues.UpdateLoc(ref spawnLoc, ref map))
            {
                return(null);
            }

            BaseDoor hiDoor = new MetalDoor(doorEastToWest ? DoorFacing.NorthCCW : DoorFacing.WestCW);
            BaseDoor loDoor = new MetalDoor(doorEastToWest ? DoorFacing.SouthCW : DoorFacing.EastCCW);

            hiDoor.MoveToWorld(spawnLoc, map);
            loDoor.MoveToWorld(new Point3D(spawnLoc.X + (doorEastToWest ? 0 : 1), spawnLoc.Y + (doorEastToWest ? 1 : 0), -1), map);

            hiDoor.Link = loDoor;
            loDoor.Link = hiDoor;

            hiDoor.Hue = hue;
            loDoor.Hue = hue;

            return(hiDoor);
        }
Example #7
0
        public static void Generate(Map map)
        {
            DungeonHitchingPost post = new DungeonHitchingPost();

            post.MoveToWorld(new Point3D(6428, 2677, 0), map);

            MetalDoor door = new MetalDoor(DoorFacing.WestCCW);

            door.MoveToWorld(new Point3D(6409, 2695, 0), map);

            door = new MetalDoor(DoorFacing.EastCW);
            door.MoveToWorld(new Point3D(6410, 2695, 0), map);

            door = new MetalDoor(DoorFacing.WestCW);
            door.MoveToWorld(new Point3D(6409, 2664, 0), map);

            door = new MetalDoor(DoorFacing.EastCCW);
            door.MoveToWorld(new Point3D(6410, 2664, 0), map);

            door = new MetalDoor(DoorFacing.SouthCW);
            door.MoveToWorld(new Point3D(6394, 2680, 0), map);

            door = new MetalDoor(DoorFacing.NorthCCW);
            door.MoveToWorld(new Point3D(6394, 2679, 0), map);

            door = new MetalDoor(DoorFacing.NorthCW);
            door.MoveToWorld(new Point3D(6425, 2679, 0), map);

            door = new MetalDoor(DoorFacing.SouthCCW);
            door.MoveToWorld(new Point3D(6425, 2680, 0), map);

            // Tram ones already exist on create world teleporter section
            if (map == Map.Felucca)
            {
                Teleporter tele = new Teleporter(new Point3D(1517, 1417, 9), map);
                tele.MoveToWorld(new Point3D(6440, 2677, 20), map);

                tele = new Teleporter(new Point3D(1517, 1418, 9), map);
                tele.MoveToWorld(new Point3D(6440, 2678, 20), map);

                tele = new Teleporter(new Point3D(1517, 1419, 9), map);
                tele.MoveToWorld(new Point3D(6440, 2679, 20), map);

                tele = new Teleporter(new Point3D(1517, 1420, 9), map);
                tele.MoveToWorld(new Point3D(6440, 2680, 20), map);

                tele = new Teleporter(new Point3D(1517, 1420, 9), map);
                tele.MoveToWorld(new Point3D(6440, 2681, 20), map);

                tele = new Teleporter(new Point3D(6440, 2677, 20), map);
                tele.MoveToWorld(new Point3D(1517, 1417, 9), map);

                tele = new Teleporter(new Point3D(6440, 2678, 20), map);
                tele.MoveToWorld(new Point3D(1517, 1418, 9), map);

                tele = new Teleporter(new Point3D(6440, 2679, 20), map);
                tele.MoveToWorld(new Point3D(1517, 1419, 9), map);

                tele = new Teleporter(new Point3D(6440, 2680, 20), map);
                tele.MoveToWorld(new Point3D(1517, 1420, 12), map);
            }
        }
Example #8
0
        // Create the appropriate item class - Defaults to a Static Item
        private Item CreateItem(int ItemID)
        {
            Item item = null;

            switch (ItemID)
            {
            // Don't import nodraw, node crystals, odd items, etc.
            // Add any unwanted items here.
            // TODO: Boat parts: planks, tillerman, etc.
            case 0x0001:
            case 0x1F19:
            case 0x0FB7:
                break;

            /*
             * Put all usable items here, for example, forges, anvils,
             * training dummies, lights, containers, messageboards, etc.
             * We'll need to wait until some of them are scripted.
             *
             * The following are some examples, I intend to finish things
             * up as quickly as I can.
             */
            case 0x0FB1:                      //forge
                item = new SmallForgeAddon();
                break;

            case 0x0FAF:                      //anvil east
                item = new AnvilEastAddon();
                break;

            case 0x0FB0:                      //anvil south
                item = new AnvilSouthAddon();
                break;

            // TODO: Gates

            /*
             * Now create all of the doors according to graphic.
             * NOTE: Some doors seem to open the wrong way, but
             *       there's no way to determine correct CCW/CW
             *       from the POL file.
             */

            // Metal Doors 2
            case 0x0675:
                item = new MetalDoor2(DoorFacing.WestCW);
                break;

            case 0x0677:
                item = new MetalDoor2(DoorFacing.EastCCW);
                break;

            case 0x067D:
                item = new MetalDoor2(DoorFacing.SouthCW);
                break;

            case 0x067F:
                item = new MetalDoor2(DoorFacing.NorthCCW);
                break;

            // Barred Metal Doors
            case 0x0685:
                item = new BarredMetalDoor(DoorFacing.WestCW);
                break;

            case 0x0687:
                item = new BarredMetalDoor(DoorFacing.EastCCW);
                break;

            case 0x068D:
                item = new BarredMetalDoor(DoorFacing.SouthCW);
                break;

            case 0x068F:
                item = new BarredMetalDoor(DoorFacing.NorthCCW);
                break;

            // Rattan Doors
            case 0x0695:
                item = new RattanDoor(DoorFacing.WestCW);
                break;

            case 0x0697:
                item = new RattanDoor(DoorFacing.EastCCW);
                break;

            case 0x069D:
                item = new RattanDoor(DoorFacing.SouthCW);
                break;

            case 0x069F:
                item = new RattanDoor(DoorFacing.NorthCCW);
                break;

            // Dark Wood Doors
            case 0x06A5:
                item = new DarkWoodDoor(DoorFacing.WestCW);
                break;

            case 0x06A7:
                item = new DarkWoodDoor(DoorFacing.EastCCW);
                break;

            case 0x06AD:
                item = new DarkWoodDoor(DoorFacing.SouthCW);
                break;

            case 0x06AF:
                item = new DarkWoodDoor(DoorFacing.NorthCCW);
                break;

            // Medium Wood Doors
            case 0x06B5:
                item = new MediumWoodDoor(DoorFacing.WestCW);
                break;

            case 0x06B7:
                item = new MediumWoodDoor(DoorFacing.EastCCW);
                break;

            case 0x06BD:
                item = new MediumWoodDoor(DoorFacing.SouthCW);
                break;

            case 0x06BF:
                item = new MediumWoodDoor(DoorFacing.NorthCCW);
                break;

            // Metal Doors
            case 0x06C5:
                item = new MetalDoor(DoorFacing.WestCW);
                break;

            case 0x06C7:
                item = new MetalDoor(DoorFacing.EastCCW);
                break;

            case 0x06CD:
                item = new MetalDoor(DoorFacing.SouthCW);
                break;

            case 0x06CF:
                item = new MetalDoor(DoorFacing.NorthCCW);
                break;

            // Light Wood Doors
            case 0x06D5:
                item = new LightWoodDoor(DoorFacing.WestCW);
                break;

            case 0x06D7:
                item = new LightWoodDoor(DoorFacing.EastCCW);
                break;

            case 0x06DD:
                item = new LightWoodDoor(DoorFacing.SouthCW);
                break;

            case 0x06DF:
                item = new LightWoodDoor(DoorFacing.NorthCCW);
                break;

            // Strong Wood Doors
            case 0x06E5:
                item = new StrongWoodDoor(DoorFacing.WestCW);
                break;

            case 0x06E7:
                item = new StrongWoodDoor(DoorFacing.EastCCW);
                break;

            case 0x06ED:
                item = new StrongWoodDoor(DoorFacing.SouthCW);
                break;

            case 0x06EF:
                item = new StrongWoodDoor(DoorFacing.NorthCCW);
                break;

            default:
                item         = new Static(ItemID);
                item.Movable = false;
                break;
            }

            return(item);
        }