public GauntletRegion(GauntletSpawner spawner, Map map) : base(null, map, Region.Find(spawner.Location, spawner.Map), spawner.RegionBounds) { m_Spawner = spawner; GoLocation = spawner.Location; Register(); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: { m_RegionBounds = reader.ReadRect2D(); m_Traps = reader.ReadStrongItemList <BaseTrap>(); goto case 0; } case 0: { if (version < 1) { m_Traps = new List <BaseTrap>(); m_RegionBounds = new Rectangle2D(X - 40, Y - 40, 80, 80); } m_Creatures = reader.ReadStrongMobileList(); m_TypeName = reader.ReadString(); m_Door = reader.ReadItem <BaseDoor>();; m_Addon = reader.ReadItem <BaseAddon>();; m_Sequence = reader.ReadItem <GauntletSpawner>(); State = (GauntletSpawnerState)reader.ReadInt(); break; } } }
public static GauntletSpawner CreateSpawner(string typeName, int xSpawner, int ySpawner, int xDoor, int yDoor, int xPentagram, int yPentagram, bool doorEastToWest, int xStart, int yStart, int xWidth, int yHeight) { GauntletSpawner spawner = new GauntletSpawner(typeName); spawner.MoveToWorld(new Point3D(xSpawner, ySpawner, -1), Map.Malas); if (xDoor > 0 && yDoor > 0) { spawner.Door = CreateDoorSet(xDoor, yDoor, doorEastToWest, 0); } spawner.RegionBounds = new Rectangle2D(xStart, yStart, xWidth, yHeight); if (xPentagram > 0 && yPentagram > 0) { PentagramAddon pentagram = new PentagramAddon(); pentagram.MoveToWorld(new Point3D(xPentagram, yPentagram, -1), Map.Malas); spawner.Addon = pentagram; } return(spawner); }
public static void GenGauntlet_OnCommand(CommandEventArgs e) { /* Begin healer room */ CreatePricedHealer(5000, 387, 400); CreateTeleporter(390, 407, 394, 405); BaseDoor healerDoor = CreateDoorSet(393, 404, true, 0x44E); healerDoor.Locked = true; healerDoor.KeyValue = Key.RandomValue(); if (healerDoor.Link != null) { healerDoor.Link.Locked = true; healerDoor.Link.KeyValue = Key.RandomValue(); } /* End healer room */ /* Begin supply room */ CreateMorphItem(433, 371, 0x29F, 0x116, 3, 0x44E); CreateMorphItem(433, 372, 0x29F, 0x115, 3, 0x44E); CreateVarietyDealer(492, 369); for (int x = 434; x <= 478; ++x) { for (int y = 371; y <= 372; ++y) { Static item = new Static(0x524); item.Hue = 1; item.MoveToWorld(new Point3D(x, y, -1), Map.Malas); } } /* End supply room */ /* Begin gauntlet cycle */ CreateTeleporter(471, 428, 474, 428); CreateTeleporter(462, 494, 462, 498); CreateTeleporter(403, 502, 399, 506); CreateTeleporter(357, 476, 356, 480); CreateTeleporter(361, 433, 357, 434); GauntletSpawner sp1 = CreateSpawner("DarknightCreeper", 491, 456, 473, 432, 417, 426, true, 473, 412, 39, 60); GauntletSpawner sp2 = CreateSpawner("FleshRenderer", 482, 520, 468, 496, 426, 422, false, 448, 496, 56, 48); GauntletSpawner sp3 = CreateSpawner("Impaler", 406, 538, 408, 504, 432, 430, false, 376, 504, 64, 48); GauntletSpawner sp4 = CreateSpawner("ShadowKnight", 335, 512, 360, 478, 424, 439, false, 300, 478, 72, 64); GauntletSpawner sp5 = CreateSpawner("AbysmalHorror", 326, 433, 360, 429, 416, 435, true, 300, 408, 60, 56); GauntletSpawner sp6 = CreateSpawner("DemonKnight", 423, 430, 0, 0, 423, 430, true, 392, 392, 72, 96); sp1.Sequence = sp2; sp2.Sequence = sp3; sp3.Sequence = sp4; sp4.Sequence = sp5; sp5.Sequence = sp6; sp6.Sequence = sp1; sp1.State = GauntletSpawnerState.InProgress; /* End gauntlet cycle */ /* Begin exit gate */ ConfirmationMoongate gate = new ConfirmationMoongate(); gate.Dispellable = false; gate.Target = new Point3D(2350, 1270, -85); gate.TargetMap = Map.Malas; gate.GumpWidth = 420; gate.GumpHeight = 280; gate.MessageColor = 0x7F00; gate.MessageNumber = 1062109; // You are about to exit Dungeon Doom. Do you wish to continue? gate.TitleColor = 0x7800; gate.TitleNumber = 1062108; // Please verify... gate.Hue = 0x44E; gate.MoveToWorld(new Point3D(433, 326, 4), Map.Malas); /* End exit gate */ }