public static void Fill(Mobile from, LockableContainer cont, int level, bool isSos) { Map map = from.Map; int luck = from is PlayerMobile ? ((PlayerMobile)from).RealLuck : from.Luck; cont.Movable = false; cont.Locked = true; int count; if (level == 0) { cont.LockLevel = 0; // Can't be unlocked cont.DropItem(new Gold(Utility.RandomMinMax(50, 100))); if (Utility.RandomDouble() < 0.75) { cont.DropItem(new TreasureMap(0, Map.Trammel)); } } else { cont.TrapType = TrapType.ExplosionTrap; cont.TrapPower = level * 25; cont.TrapLevel = level; switch (level) { case 1: cont.RequiredSkill = 5; break; case 2: cont.RequiredSkill = 45; break; case 3: cont.RequiredSkill = 65; break; case 4: cont.RequiredSkill = 75; break; case 5: cont.RequiredSkill = 75; break; case 6: cont.RequiredSkill = 80; break; case 7: cont.RequiredSkill = 80; break; } cont.LockLevel = cont.RequiredSkill - 10; cont.MaxLockLevel = cont.RequiredSkill + 40; #region Gold cont.DropItem(new Gold(isSos ? level * 10000 : level * 5000)); #endregion #region Scrolls if (isSos) { switch (level) { default: count = 20; break; case 0: case 1: count = Utility.RandomMinMax(2, 5); break; case 2: count = Utility.RandomMinMax(10, 15); break; } } else { count = level * 5; } for (int i = 0; i < count; ++i) { cont.DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular)); } #endregion #region Magical Items double propsScale = 1.0; switch (level) { case 1: count = isSos ? Utility.RandomMinMax(2, 6) : 32; propsScale = 0.5625; break; case 2: count = isSos ? Utility.RandomMinMax(10, 15) : 40; propsScale = 0.6875; break; case 3: count = isSos ? Utility.RandomMinMax(15, 20) : 48; propsScale = 0.875; break; case 4: count = isSos ? Utility.RandomMinMax(15, 20) : 56; break; case 5: count = isSos ? Utility.RandomMinMax(15, 20) : 64; break; case 6: count = isSos ? Utility.RandomMinMax(15, 20) : 72; break; case 7: count = isSos ? Utility.RandomMinMax(15, 20) : 80; break; default: count = 0; break; } for (int i = 0; i < count; ++i) { Item item; item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(); if (item != null && RandomItemGenerator.Enabled) { int min, max; GetRandomItemStat(out min, out max, propsScale); RunicReforging.GenerateRandomItem(item, luck, min, max, map); cont.DropItem(item); } else if (item is BaseWeapon) { BaseWeapon weapon = (BaseWeapon)item; int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max); cont.DropItem(item); } else if (item is BaseArmor) { BaseArmor armor = (BaseArmor)item; int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max); cont.DropItem(item); } else if (item is BaseHat) { BaseHat hat = (BaseHat)item; int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max); cont.DropItem(item); } else if (item is BaseJewel) { int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max); cont.DropItem(item); } } } #endregion #region Reagents if (isSos) { switch (level) { default: count = Utility.RandomMinMax(45, 60); break; case 0: case 1: count = Utility.RandomMinMax(15, 20); break; case 2: count = Utility.RandomMinMax(25, 40); break; } } else { count = level == 0 ? 12 : Utility.RandomMinMax(40, 60) * (level + 1); } for (int i = 0; i < count; i++) { cont.DropItemStacked(Loot.RandomPossibleReagent()); } #endregion #region Gems if (level == 0) { count = 2; } else { count = (level * 3) + 1; } for (int i = 0; i < count; i++) { cont.DropItem(Loot.RandomGem()); } #endregion #region Imbuing Ingreds if (level > 1) { Item item = Loot.Construct(m_ImbuingIngreds[Utility.Random(m_ImbuingIngreds.Length)]); item.Amount = level; cont.DropItem(item); } #endregion Item arty = null; Item special = null; Item newSpecial = null; if (isSos) { if (0.004 * level > Utility.RandomDouble()) { arty = Loot.Construct(m_SOSArtifacts); } if (0.006 * level > Utility.RandomDouble()) { special = Loot.Construct(m_SOSDecor); } else if (0.009 * level > Utility.RandomDouble()) { special = new TreasureMap(Utility.RandomMinMax(level, Math.Min(7, level + 1)), cont.Map); } if (level >= 4) { switch (Utility.Random(4)) { case 0: newSpecial = new AncientAquariumFishNet(); break; case 1: newSpecial = new LiveRock(); break; case 2: newSpecial = new SaltedSerpentSteaks(); break; case 3: newSpecial = new OceanSapphire(); break; } } } else { if (level >= 7) { if (0.025 > Utility.RandomDouble()) { special = Loot.Construct(m_LevelSevenOnly); } else if (0.10 > Utility.RandomDouble()) { special = Loot.Construct(m_LevelFiveToSeven); } else if (0.25 > Utility.RandomDouble()) { special = GetRandomSpecial(level, cont.Map); } arty = Loot.Construct(m_Artifacts); } else if (level >= 6) { if (0.025 > Utility.RandomDouble()) { special = Loot.Construct(m_LevelFiveToSeven); } else if (0.20 > Utility.RandomDouble()) { special = GetRandomSpecial(level, cont.Map); } arty = Loot.Construct(m_Artifacts); } else if (level >= 5) { if (0.005 > Utility.RandomDouble()) { special = Loot.Construct(m_LevelFiveToSeven); } else if (0.15 > Utility.RandomDouble()) { special = GetRandomSpecial(level, cont.Map); } } else if (0.10 > Utility.RandomDouble()) { special = GetRandomSpecial(level, cont.Map); } } if (arty != null) { Container pack = new Backpack { Hue = 1278 }; pack.DropItem(arty); cont.DropItem(pack); } if (special != null) { cont.DropItem(special); } if (newSpecial != null) { cont.DropItem(newSpecial); } int rolls = 2; if (level >= 5) { rolls += level - 2; } RefinementComponent.Roll(cont, rolls, 0.10); }
public void OnTarget(Mobile from, object obj) { if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042010); // You must have the object in your backpack to use it. return; } if (obj is IArcaneEquip && obj is Item) { Item item = (Item)obj; CraftResource resource = CraftResource.None; if (item is BaseClothing) { resource = ((BaseClothing)item).Resource; } else if (item is BaseArmor) { resource = ((BaseArmor)item).Resource; } else if (item is BaseWeapon) // Sanity, weapons cannot recieve gems... { resource = ((BaseWeapon)item).Resource; } IArcaneEquip eq = (IArcaneEquip)obj; if (!item.IsChildOf(from.Backpack)) { from.SendMessage("You may only target items in your backpack."); return; } int charges = GetChargesFor(from); if (eq.IsArcane) { if (eq.CurArcaneCharges > 0) { from.SendMessage("This item still has charges left."); } else { item.Hue = eq.TempHue; if (charges >= eq.MaxArcaneCharges) { eq.CurArcaneCharges = eq.MaxArcaneCharges; from.SendMessage("Your skill in tailoring allows you to fully recharge the item."); } else { eq.CurArcaneCharges += charges; from.SendMessage("You are only able to restore some of the charges."); } Consume(); } } else if (from.Skills[SkillName.Tailoring].Value >= 60.0) { bool isExceptional = false; if (item is BaseClothing) { isExceptional = ((BaseClothing)item).Quality == ItemQuality.Exceptional; } else if (item is BaseArmor) { isExceptional = ((BaseArmor)item).Quality == ItemQuality.Exceptional; } else if (item is BaseWeapon) { isExceptional = ((BaseWeapon)item).Quality == ItemQuality.Exceptional; } if (isExceptional) { if (item is BaseClothing) { BaseClothing cloth = item as BaseClothing; cloth.Quality = ItemQuality.Normal; cloth.Crafter = from; } else if (item is BaseArmor) { BaseArmor armor = item as BaseArmor; if (armor.IsImbued || armor.IsArtifact || RunicReforging.GetArtifactRarity(armor) > 0) { from.SendLocalizedMessage(1049690); // Arcane gems cannot be used on that type of leather. return; } armor.Quality = ItemQuality.Normal; armor.Crafter = from; armor.PhysicalBonus = 0; armor.FireBonus = 0; armor.ColdBonus = 0; armor.PoisonBonus = 0; armor.EnergyBonus = 0; } else if (item is BaseWeapon) // Sanity, weapons cannot recieve gems... { BaseWeapon weapon = item as BaseWeapon; weapon.Quality = ItemQuality.Normal; weapon.Crafter = from; } eq.CurArcaneCharges = eq.MaxArcaneCharges = charges; item.Hue = DefaultArcaneHue; if (item.LootType == LootType.Blessed) { item.LootType = LootType.Regular; } Consume(); } else { from.SendMessage("You can only use this on exceptionally crafted robes, thigh boots, cloaks, or leather gloves."); } } else { from.SendMessage("You do not have enough skill in tailoring to use this."); } } else { from.SendMessage("You can only use this on exceptionally crafted robes, thigh boots, cloaks, or leather gloves."); } }
public override void AddNameProperty(ObjectPropertyList list) { if (m_ReforgedPrefix != ReforgedPrefix.None || m_ReforgedSuffix != ReforgedSuffix.None) { if (m_ReforgedPrefix != ReforgedPrefix.None) { int prefix = RunicReforging.GetPrefixName(m_ReforgedPrefix); if (m_ReforgedSuffix == ReforgedSuffix.None) { list.Add(1151757, String.Format("#{0}\t{1}", prefix, GetNameString())); // ~1_PREFIX~ ~2_ITEM~ } else { list.Add(1151756, String.Format("#{0}\t{1}\t#{2}", prefix, GetNameString(), RunicReforging.GetSuffixName(m_ReforgedSuffix))); // ~1_PREFIX~ ~2_ITEM~ of ~3_SUFFIX~ } } else if (m_ReforgedSuffix != ReforgedSuffix.None) { RunicReforging.AddSuffixName(list, m_ReforgedSuffix, GetNameString()); } } else { base.AddNameProperty(list); } }
public static void Fill(LockableContainer cont, int luck, int level, bool isSos) { cont.Movable = false; cont.Locked = true; int numberItems; if (level == 0) { cont.LockLevel = 0; // Can't be unlocked cont.DropItem(new Gold(Utility.RandomMinMax(50, 100))); if (Utility.RandomDouble() < 0.75) { cont.DropItem(new TreasureMap(0, Map.Trammel)); } } else { cont.TrapType = TrapType.ExplosionTrap; cont.TrapPower = level * 25; cont.TrapLevel = level; switch (level) { case 1: cont.RequiredSkill = 36; break; case 2: cont.RequiredSkill = 76; break; case 3: cont.RequiredSkill = 84; break; case 4: cont.RequiredSkill = 92; break; case 5: cont.RequiredSkill = 105; break; case 6: case 7: cont.RequiredSkill = 110; break; } cont.LockLevel = cont.RequiredSkill - 10; cont.MaxLockLevel = cont.RequiredSkill + 40; cont.DropItem(new Gold(level * 5000)); for (int i = 0; i < level * 5; ++i) { cont.DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular)); } if (Core.SE) { switch (level) { case 1: numberItems = 32; break; case 2: numberItems = 40; break; case 3: numberItems = 48; break; case 4: numberItems = 56; break; case 5: numberItems = 64; break; case 6: numberItems = 72; break; case 7: numberItems = 80; break; default: numberItems = 0; break; } } else { numberItems = level * 6; } for (int i = 0; i < numberItems; ++i) { Item item; if (Core.AOS) { item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(); } else { item = Loot.RandomArmorOrShieldOrWeapon(); } if (item != null && Core.HS && RandomItemGenerator.Enabled) { int min, max; GetRandomItemStat(out min, out max); RunicReforging.GenerateRandomItem(item, LootPack.GetLuckChance(luck), min, max); cont.DropItem(item); } else if (item is BaseWeapon) { BaseWeapon weapon = (BaseWeapon)item; if (Core.AOS) { int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max); } else { weapon.DamageLevel = (WeaponDamageLevel)Utility.Random(6); weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random(6); weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6); } cont.DropItem(item); } else if (item is BaseArmor) { BaseArmor armor = (BaseArmor)item; if (Core.AOS) { int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max); } else { armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6); armor.Durability = (ArmorDurabilityLevel)Utility.Random(6); } cont.DropItem(item); } else if (item is BaseHat) { BaseHat hat = (BaseHat)item; if (Core.AOS) { int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max); } cont.DropItem(item); } else if (item is BaseJewel) { int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max); cont.DropItem(item); } } } int reagents; if (level == 0) { reagents = 12; } else { reagents = level + 1; } for (int i = 0; i < reagents; i++) { Item item = Loot.RandomPossibleReagent(); item.Amount = Utility.RandomMinMax(40, 60); cont.DropItem(item); } int gems; if (level == 0) { gems = 2; } else { gems = (level * 3) + 1; } for (int i = 0; i < gems; i++) { Item item = Loot.RandomGem(); cont.DropItem(item); } if (level > 1) { Item item = Loot.Construct(m_ImbuingIngreds[Utility.Random(m_ImbuingIngreds.Length)]); item.Amount = level; cont.DropItem(item); } Item arty = null; Item special = null; if (isSos) { if (0.002 * level > Utility.RandomDouble()) { arty = Loot.Construct(m_SOSArtifacts); } } else { if (level >= 7) { if (0.025 > Utility.RandomDouble()) { special = Loot.Construct(m_LevelSevenOnly); } else if (0.10 > Utility.RandomDouble()) { special = Loot.Construct(m_LevelFiveToSeven); } else if (0.25 > Utility.RandomDouble()) { special = GetRandomSpecial(level, cont.Map); } arty = Loot.Construct(m_Artifacts); } else if (level >= 6) { if (0.025 > Utility.RandomDouble()) { special = Loot.Construct(m_LevelFiveToSeven); } else if (0.10 > Utility.RandomDouble()) { special = GetRandomSpecial(level, cont.Map); } arty = Loot.Construct(m_Artifacts); } else if (level >= 5) { if (0.05 > Utility.RandomDouble()) { special = Loot.Construct(m_LevelFiveToSeven); } else if (0.25 > Utility.RandomDouble()) { special = GetRandomSpecial(level, cont.Map); } } else if (.10 > Utility.RandomDouble()) { special = GetRandomSpecial(level, cont.Map); } } if (arty != null) { Container pack = new Backpack(); pack.Hue = 1278; pack.DropItem(arty); cont.DropItem(pack); } if (special != null) { cont.DropItem(special); } }
public virtual void Fill() { List <Item> contains = new List <Item>(Items); foreach (Item i in contains) { i.Delete(); } ColUtility.Free(contains); for (int i = 0; i < Utility.RandomMinMax(6, 12); i++) { DropItem(Loot.RandomGem()); } DropItem(new Gold(Utility.RandomMinMax(800, 1100))); Item item = null; if (0.30 > Utility.RandomDouble()) { switch (Utility.Random(7)) { case 0: item = new Bandage(Utility.Random(10, 30)); break; case 1: item = new SmokeBomb(); item.Amount = Utility.Random(3, 6); break; case 2: item = new InvisibilityPotion(); item.Amount = Utility.Random(1, 3); break; case 3: item = new Lockpick(Utility.Random(1, 10)); break; case 4: item = new DreadHornMane(Utility.Random(1, 2)); break; case 5: item = new Corruption(Utility.Random(1, 2)); break; case 6: item = new Taint(Utility.Random(1, 2)); break; } DropItem(item); } if (0.25 > Utility.RandomDouble()) { DropItem(new CounterfeitPlatinum()); } if (0.2 > Utility.RandomDouble()) { switch (Utility.Random(3)) { case 0: item = new ZombiePainting(); break; case 1: item = new SkeletonPortrait(); break; case 2: item = new LichPainting(); break; } DropItem(item); } if (0.1 > Utility.RandomDouble()) { item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(LootPackEntry.IsInTokuno(this), LootPackEntry.IsMondain(this), LootPackEntry.IsStygian(this)); if (item != null) { int min, max; TreasureMapChest.GetRandomItemStat(out min, out max, 1.0); RunicReforging.GenerateRandomItem(item, null, Utility.RandomMinMax(min, max), 0, ReforgedPrefix.None, ReforgedSuffix.Khaldun, Map); DropItem(item); } } if (0.01 > Utility.RandomDouble()) { switch (Utility.Random(4)) { case 0: item = new RelicOfHydros(); break; case 1: item = new RelicOfLithos(); break; case 2: item = new RelicOfPyros(); break; case 3: item = new RelicOfStratos(); break; } DropItem(item); } }
public void OnTarget(Mobile from, object obj) { if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042010); // You must have the object in your backpack to use it. return; } if (obj is IArcaneEquip eq && eq is Item item) { if (!item.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1045158); // You must have the item in your backpack to target it. return; } int charges = GetChargesFor(from); if (eq.IsArcane) { if (eq.CurArcaneCharges > 0) { from.SendLocalizedMessage(1075099); // You cannot recharge that item until all of its current charges have been used. } else { item.Hue = eq.TempHue; if (charges >= eq.MaxArcaneCharges) { eq.CurArcaneCharges = eq.MaxArcaneCharges; from.SendMessage("Your skill in tailoring allows you to fully recharge the item."); } else { eq.CurArcaneCharges += charges; from.SendMessage("You are only able to restore some of the charges."); } Consume(); } } else if (from.Skills[SkillName.Tailoring].Value >= 60.0) { bool isExceptional = false; if (item is BaseClothing bc) { isExceptional = bc.Quality == ItemQuality.Exceptional; } else if (item is BaseArmor ba) { isExceptional = ba.Quality == ItemQuality.Exceptional; } if (isExceptional) { if (item is BaseClothing cloth) { cloth.Quality = ItemQuality.Normal; cloth.Crafter = from; } if (item is BaseArmor armor) { if (armor.IsImbued || armor.IsArtifact || RunicReforging.GetArtifactRarity(armor) > 0) { from.SendLocalizedMessage(1049690); // Arcane gems cannot be used on that type of leather. return; } armor.Quality = ItemQuality.Normal; armor.Crafter = from; armor.PhysicalBonus = 0; armor.FireBonus = 0; armor.ColdBonus = 0; armor.PoisonBonus = 0; armor.EnergyBonus = 0; } eq.CurArcaneCharges = eq.MaxArcaneCharges = charges; item.Hue = 2117; // Default Arcane Hue if (item.LootType == LootType.Blessed) { item.LootType = LootType.Regular; } Consume(); } else { from.SendMessage("You can only use this on exceptionally crafted robes, thigh boots, cloaks, or leather gloves."); } } else { from.SendMessage("You do not have enough skill in tailoring to use this."); } }
private void Fill(int level) { TrapType = TrapType.ExplosionTrap; TrapPower = level * 25; TrapLevel = level; Locked = true; switch (level) { case 1: RequiredSkill = 36; break; case 2: RequiredSkill = 76; break; case 3: RequiredSkill = 84; break; case 4: RequiredSkill = 92; break; case 5: RequiredSkill = 100; break; case 6: RequiredSkill = 100; break; } LockLevel = RequiredSkill - 10; MaxLockLevel = RequiredSkill + 40; DropItem(new Gold(level * 200)); for (int i = 0; i < level; ++i) { DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular)); } for (int i = 0; i < level * 2; ++i) { Item item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(); if (item != null && RandomItemGenerator.Enabled) { TreasureMapChest.GetRandomItemStat(out int min, out int max); RunicReforging.GenerateRandomItem(item, 0, min, max); DropItem(item); continue; } if (item is BaseWeapon) { BaseWeapon weapon = (BaseWeapon)item; int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max); DropItem(item); } else if (item is BaseArmor) { BaseArmor armor = (BaseArmor)item; int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max); DropItem(item); } else if (item is BaseHat) { BaseHat hat = (BaseHat)item; int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max); DropItem(item); } else if (item is BaseJewel) { int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max); DropItem(item); } } for (int i = 0; i < level; i++) { Item item = Loot.RandomPossibleReagent(); item.Amount = Utility.RandomMinMax(40, 60); DropItem(item); } for (int i = 0; i < level; i++) { Item item = Loot.RandomGem(); DropItem(item); } DropItem(new TreasureMap(TreasureMapInfo.ConvertLevel(level + 1), (Siege.SiegeShard ? Map.Felucca : Utility.RandomBool() ? Map.Felucca : Map.Trammel))); }
private void Fill(int level) { this.TrapType = TrapType.ExplosionTrap; this.TrapPower = level * 25; this.TrapLevel = level; this.Locked = true; switch (level) { case 1: this.RequiredSkill = 36; break; case 2: this.RequiredSkill = 76; break; case 3: this.RequiredSkill = 84; break; case 4: this.RequiredSkill = 92; break; case 5: this.RequiredSkill = 100; break; case 6: this.RequiredSkill = 100; break; } this.LockLevel = this.RequiredSkill - 10; this.MaxLockLevel = this.RequiredSkill + 40; this.DropItem(new Gold(level * 200)); for (int i = 0; i < level; ++i) { this.DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular)); } for (int i = 0; i < level * 2; ++i) { Item item; if (Core.AOS) { item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(); } else { item = Loot.RandomArmorOrShieldOrWeapon(); } if (item != null && Core.HS && Server.Mobiles.RandomItemGenerator.Enabled) { int min, max; TreasureMapChest.GetRandomItemStat(out min, out max); RunicReforging.GenerateRandomItem(item, 0, min, max); DropItem(item); continue; } if (item is BaseWeapon) { BaseWeapon weapon = (BaseWeapon)item; if (Core.AOS) { int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max); } else { weapon.DamageLevel = (WeaponDamageLevel)Utility.Random(6); weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random(6); weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6); } this.DropItem(item); } else if (item is BaseArmor) { BaseArmor armor = (BaseArmor)item; if (Core.AOS) { int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max); } else { armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6); armor.Durability = (ArmorDurabilityLevel)Utility.Random(6); } this.DropItem(item); } else if (item is BaseHat) { BaseHat hat = (BaseHat)item; if (Core.AOS) { int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max); } this.DropItem(item); } else if (item is BaseJewel) { int attributeCount; int min, max; GetRandomAOSStats(out attributeCount, out min, out max); BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max); this.DropItem(item); } } for (int i = 0; i < level; i++) { Item item = Loot.RandomPossibleReagent(); item.Amount = Utility.RandomMinMax(40, 60); this.DropItem(item); } for (int i = 0; i < level; i++) { Item item = Loot.RandomGem(); this.DropItem(item); } this.DropItem(new TreasureMap(level + 1, (Utility.RandomBool() ? Map.Felucca : Map.Trammel))); }