public override void AddComponents() { IronGate gate = new IronGate(DoorFacing.EastCCW); m_Gate = gate; gate.KeyValue = Key.RandomValue(); gate.Locked = true; AddItem(gate, -2, 1, 0); MetalChest chest = new MetalChest(); chest.ItemID = 0xE7C; chest.DropItem(new Key(KeyType.Iron, gate.KeyValue)); chest.LiftOverride = true; TreasureMapChest.FillOld(chest, 2); AddItem(chest, 4, 4, 0); AddMobile(new Ratman(), 15, 0, -2, 0); AddMobile(new Ratman(), 15, 0, 1, 0); AddMobile(new RatmanMage(), 15, 0, -1, 0); AddMobile(new RatmanArcher(), 15, 0, 0, 0); m_Prisoner = new BaseEscort(); m_Prisoner.YellHue = Utility.RandomList(0x57, 0x67, 0x77, 0x87, 0x117); AddMobile(m_Prisoner, 2, -2, 0, 0); }
public override Item Construct(Type type, Mobile from) { if (type == typeof(TreasureMap)) { return(new TreasureMap(1, from.Map)); } else if (type == typeof(MessageInABottle)) { return(new MessageInABottle(from.Map == Map.Felucca ? Map.Felucca : Map.Trammel)); } Container pack = from.Backpack; if (pack != null) { List <SOS> messages = pack.FindItemsByType <SOS>(); for (int i = 0; i < messages.Count; ++i) { SOS sos = messages[i]; if (from.Map == sos.TargetMap && from.InRange(sos.TargetLocation, 60)) { Item preLoot = null; switch (Utility.Random(8)) { case 0: // Body parts { int[] list = new int[] { 0x1CDD, 0x1CE5, // arm 0x1CE0, 0x1CE8, // torso 0x1CE1, 0x1CE9, // head 0x1CE2, 0x1CEC // leg }; preLoot = new ShipwreckedItem(Utility.RandomList(list)); break; } case 1: // Bone parts { int[] list = new int[] { 0x1AE0, 0x1AE1, 0x1AE2, 0x1AE3, 0x1AE4, // skulls 0x1B09, 0x1B0A, 0x1B0B, 0x1B0C, 0x1B0D, 0x1B0E, 0x1B0F, 0x1B10, // bone piles 0x1B15, 0x1B16 // pelvis bones }; preLoot = new ShipwreckedItem(Utility.RandomList(list)); break; } case 2: // Paintings and portraits { preLoot = new ShipwreckedItem(Utility.Random(0xE9F, 10)); break; } case 3: // Pillows { preLoot = new ShipwreckedItem(Utility.Random(0x13A4, 11)); break; } case 4: // Shells { preLoot = new ShipwreckedItem(Utility.Random(0xFC4, 9)); break; } case 5: // Hats { if (Utility.RandomBool()) { preLoot = new SkullCap(); } else { preLoot = new TricorneHat(); } break; } case 6: // Misc { int[] list = new int[] { 0x1EB5, // unfinished barrel 0xA2A, // stool 0xC1F, // broken clock 0x1047, 0x1048, // globe 0x1EB1, 0x1EB2, 0x1EB3, 0x1EB4 // barrel staves }; if (Utility.Random(list.Length + 1) == 0) { preLoot = new Candelabra(); } else { preLoot = new ShipwreckedItem(Utility.RandomList(list)); } break; } } if (preLoot != null) { if (preLoot is IShipwreckedItem) { ((IShipwreckedItem)preLoot).IsShipwreckedItem = true; } return(preLoot); } LockableContainer chest; if (Utility.RandomBool()) { chest = new MetalGoldenChest(); } else { chest = new WoodenChest(); } if (sos.IsAncient) { chest.Hue = 0x481; } TreasureMapChest.FillOld(chest, Math.Max(1, Math.Max(4, sos.Level))); if (sos.IsAncient) { chest.DropItem(new FabledFishingNet()); } else { chest.DropItem(new SpecialFishingNet()); } chest.Movable = true; chest.Locked = false; chest.TrapEnabled = false; chest.TrapPower = 0; chest.TrapLevel = 0; chest.TrapType = TrapType.None; sos.Delete(); return(chest); } } } return(base.Construct(type, from)); }