Example #1
0
        public ChestOfHeirlooms() : base(0x2811)
        {
            Locked        = true;
            LockLevel     = 95;
            MaxLockLevel  = 140;
            RequiredSkill = 95;

            TrapType  = TrapType.ExplosionTrap;
            TrapLevel = 10;
            TrapPower = 100;

            GumpID = 0x10B;

            for (int i = 0; i < 10; ++i)
            {
                Item item = Loot.ChestOfHeirloomsContains();

                //int attributeCount = Utility.RandomMinMax( 1, 5 );
                //int min = 20;
                //int max = 80;

                if (item is BaseWeapon)
                {
                    BaseWeapon weapon      = (BaseWeapon)item;
                    int        damageLevel = Utility.Random(6);
                    if (PseudoSeerStone.Instance != null && PseudoSeerStone.Instance._HighestDamageLevelSpawn < damageLevel)
                    {
                        if (damageLevel == 5 && PseudoSeerStone.ReplaceVanqWithSkillScrolls)
                        {
                            DropItem(PuzzleChest.CreateRandomSkillScroll());
                        }
                        int platAmount = PseudoSeerStone.PlatinumPerMissedDamageLevel * (damageLevel - PseudoSeerStone.Instance._HighestDamageLevelSpawn);
                        if (platAmount > 0)
                        {
                            DropItem(new Platinum(platAmount));
                        }
                        damageLevel = PseudoSeerStone.Instance._HighestDamageLevelSpawn;
                    }
                    weapon.DamageLevel     = (WeaponDamageLevel)damageLevel;
                    weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(6);
                    weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6);
                }
                else if (item is BaseArmor)
                {
                    BaseArmor armor = (BaseArmor)item;

                    armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6);
                    armor.Durability      = (ArmorDurabilityLevel)Utility.Random(6);
                }
                DropItem(item);
            }
        }
        public ChestOfHeirlooms()
            : base(0x2811)
        {
            Locked        = true;
            LockLevel     = 95;
            MaxLockLevel  = 140;
            RequiredSkill = 95;

            TrapType  = TrapType.ExplosionTrap;
            TrapLevel = 10;
            TrapPower = 100;

            GumpID = 0x10B;

            for (int i = 0; i < 10; ++i)
            {
                Item item = Loot.ChestOfHeirloomsContains();

                int attributeCount = Utility.RandomMinMax(1, 5);
                int min            = 20;
                int max            = 80;

                if (item is BaseWeapon)
                {
                    BaseWeapon weapon = (BaseWeapon)item;

                    BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max);
                }
                else if (item is BaseArmor)
                {
                    BaseArmor armor = (BaseArmor)item;

                    BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max);
                }
                else if (item is BaseHat)
                {
                    BaseRunicTool.ApplyAttributesTo((BaseHat)item, attributeCount, min, max);
                }
                else if (item is BaseJewel)
                {
                    BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max);
                }

                DropItem(item);
            }
        }
Example #3
0
        public ChestOfHeirlooms() : base(0x2811)
        {
            Locked        = true;
            LockLevel     = 95;
            MaxLockLevel  = 140;
            RequiredSkill = 95;

            TrapType  = TrapType.ExplosionTrap;
            TrapLevel = 10;
            TrapPower = 100;

            GumpID = 0x10B;

            for (int i = 0; i < 10; ++i)
            {
                Item item = Loot.ChestOfHeirloomsContains();


                if (item is BaseWeapon)
                {
                    BaseWeapon weapon = (BaseWeapon)item;

                    if (Core.AOS)
                    {
                        int attributeCount = Utility.RandomMinMax(1, 5);
                        int min            = 20;
                        int max            = 80;

                        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);
                    }

                    DropItem(item);
                }
                else if (item is BaseArmor)
                {
                    BaseArmor armor = (BaseArmor)item;

                    if (Core.AOS)
                    {
                        int attributeCount = Utility.RandomMinMax(1, 5);
                        int min            = 20;
                        int max            = 80;

                        BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max);
                    }
                    else
                    {
                        armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6);
                        armor.Durability      = (ArmorDurabilityLevel)Utility.Random(6);
                    }

                    DropItem(item);
                }
                else if (item is BaseHat)
                {
                    BaseHat hat = (BaseHat)item;

                    if (Core.AOS)
                    {
                        int attributeCount = Utility.RandomMinMax(1, 5);
                        int min            = 20;
                        int max            = 80;

                        BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max);
                    }

                    DropItem(item);
                }
                else if (item is BaseJewel)
                {
                    int attributeCount = Utility.RandomMinMax(1, 5);
                    int min            = 20;
                    int max            = 80;

                    BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max);

                    DropItem(item);
                }
            }
        }