public static void SetupChest(Item box) { Region reg = Region.Find(box.Location, box.Map); int design = 0; DungeonChest chest = (DungeonChest)box; if (Server.Misc.Worlds.IsIceDungeon(box.Location, box.Map)) { design = 1; } else if (reg.IsPartOf("the Daemon's Crag") || reg.IsPartOf("Dungeon Covetous")) { design = 2; } // CRATES, BARRELS, BODIES else if (reg.IsPartOf("the Ancient Sky Ship") && box.X > 879 && box.Y > 3613) { design = 14; } // METAL CRATES else if (reg.IsPartOf("the Ancient Crash Site") || reg.IsPartOf("the Ancient Sky Ship")) { design = 13; } // METAL CRATES AND ALIEN BODIES else if (reg.IsPartOf("the Temple of Osirus")) { design = 4; } // BODIES else if (reg.IsPartOf("the Lodoria Sewers") || reg.IsPartOf("the Montor Sewers") || reg.IsPartOf("the Sewers") || reg.IsPartOf("the Kuldara Sewers")) { design = 5; } // CRATES, BARRELS else if (Server.Misc.Worlds.IsFireDungeon(box.Location, box.Map)) { design = 6; } // METAL CHESTS else if (reg.IsPartOf("Dungeon Hythloth") || reg.IsPartOf("the Ancient Pyramid") || reg.IsPartOf("the Tomb of the Fallen Wizard")) { design = 7; } // METAL CHESTS/BOXES, BODIES, URNS else if (reg.IsPartOf("the Mines of Morinia")) { if ( (box.X >= 5859 && box.Y >= 1384 && box.X <= 5959 && box.Y <= 1477) || (box.X >= 5589 && box.Y >= 1445 && box.X <= 5711 && box.Y <= 1473) || (box.X >= 5611 && box.Y >= 1473 && box.X <= 5715 && box.Y <= 1530) || (box.X >= 5652 && box.Y >= 1525 && box.X <= 5717 && box.Y <= 1552) ) { design = 0; } else { design = 4; // BODIES } } else if (reg.IsPartOf(typeof(NecromancerRegion))) { design = 9; // CASKETS } else if (Server.Misc.Worlds.IsCrypt(box.Location, box.Map)) { design = 8; // METAL CHESTS/BOXES, CASKETS, URNS } else if (Server.Misc.Worlds.IsSeaDungeon(box.Location, box.Map) || reg.IsPartOf("Argentrock Castle")) { design = 11; // WOOD CHESTS, METAL CHESTS, URNS, STONE CHESTS } else if (reg.IsPartOf("the Hall of the Mountain King")) { design = 12; // METAL/WOOD CHESTS, LEATHER BAGS, BODIES } int nContainerLockable = ContainerFunctions.BuildContainer(((LockableContainer)box), 0, 0, 0, design); int LockWatch = ContainerFunctions.LockTheContainer(chest.ContainerLevel, ((LockableContainer)box), nContainerLockable); // THE CONTAINER FILLS WHEN IT IS OPENED // THIS KEEPS THE WORLD ITEM COUNT DOWN // AND ALSO ALLOWS FOR CHARACTER LUCK TO // INFLUENCE WHAT IS INSIDE THE CONTAINER chest.ContainerLockable = LockWatch; chest.ContainerID = box.ItemID; chest.ContainerGump = ((Container)box).GumpID; chest.ContainerHue = box.Hue; chest.ContainerName = box.Name; chest.ContainerWeight = box.Weight; if (box.ItemID == 0xE3F) { chest.ContainerFlip = 0xE3E; } else if (box.ItemID == 0xE3E) { chest.ContainerFlip = 0xE3F; } else if (box.ItemID == 0xE3D) { chest.ContainerFlip = 0xE3C; } else if (box.ItemID == 0xE75) { chest.ContainerFlip = 0x9B2; } else if (box.ItemID == 0x9A8) { chest.ContainerFlip = 0xE80; } else if (box.ItemID == 0x9AA) { chest.ContainerFlip = 0xE7D; } else if (box.ItemID == 0x2813) { chest.ContainerFlip = 0x2814; } else if (box.ItemID == 0x2811) { chest.ContainerFlip = 0x2812; } else if (box.ItemID == 0xe40) { chest.ContainerFlip = 0xe41; } else if (box.ItemID == 0xe42) { chest.ContainerFlip = 0xe43; } else if (box.ItemID == 0xE3C) { chest.ContainerFlip = 0xE3D; } else if (box.ItemID == 0x9B2) { chest.ContainerFlip = 0xE75; } else if (box.ItemID == 0xE80) { chest.ContainerFlip = 0x9A8; } else if (box.ItemID == 0xE7D) { chest.ContainerFlip = 0x9AA; } else if (box.ItemID == 0x2814) { chest.ContainerFlip = 0x2813; } else if (box.ItemID == 0x2812) { chest.ContainerFlip = 0x2811; } else if (box.ItemID == 0xe41) { chest.ContainerFlip = 0xe40; } else if (box.ItemID == 0xe43) { chest.ContainerFlip = 0xe42; } else if (box.ItemID == 0xE76) { chest.ContainerFlip = 0xE76; } else if (box.ItemID == 0x281D) { chest.ContainerFlip = 0x281E; } else if (box.ItemID == 0x281F) { chest.ContainerFlip = 0x2820; } else if (box.ItemID == 0x2821) { chest.ContainerFlip = 0x2822; } else if (box.ItemID == 0x2825) { chest.ContainerFlip = 0x2826; } else if (box.ItemID == 0x2823) { chest.ContainerFlip = 0x2824; } else if (box.ItemID == 0x3330) { chest.ContainerFlip = 0x3331; } else if (box.ItemID == 0x3332) { chest.ContainerFlip = 0x3333; } else if (box.ItemID == 0x3334) { chest.ContainerFlip = 0x3335; } else if (box.ItemID == 0x3336) { chest.ContainerFlip = 0x3337; } else if (box.ItemID == 0x10EA) { chest.ContainerFlip = 0x10EB; } else if (box.ItemID == 0x10EC) { chest.ContainerFlip = 0x10ED; } else if (box.ItemID == 0x281E) { chest.ContainerFlip = 0x281D; } else if (box.ItemID == 0x2820) { chest.ContainerFlip = 0x281F; } else if (box.ItemID == 0x2822) { chest.ContainerFlip = 0x2821; } else if (box.ItemID == 0x2826) { chest.ContainerFlip = 0x2825; } else if (box.ItemID == 0x2824) { chest.ContainerFlip = 0x2823; } else if (box.ItemID == 0x3331) { chest.ContainerFlip = 0x3330; } else if (box.ItemID == 0x3333) { chest.ContainerFlip = 0x3332; } else if (box.ItemID == 0x3335) { chest.ContainerFlip = 0x3334; } else if (box.ItemID == 0x3337) { chest.ContainerFlip = 0x3336; } else if (box.ItemID == 0x10EB) { chest.ContainerFlip = 0x10EA; } else if (box.ItemID == 0x10ED) { chest.ContainerFlip = 0x10EC; } else if (box.ItemID == 0x3866) { chest.ContainerFlip = 0x3867; } else if (box.ItemID == 0x3867) { chest.ContainerFlip = 0x3866; } else { chest.ContainerFlip = box.ItemID; } }