예제 #1
0
        public static void GenerateShipLoot(BaseShip ship)
        {
            if (ship == null)
            {
                return;
            }
            if (ship.Deleted)
            {
                return;
            }
            if (ship.Hold == null)
            {
                return;
            }
            if (ship.Hold.Deleted)
            {
                return;
            }

            int shipLevel = 1;

            if (ship is MediumShip || ship is MediumDragonShip)
            {
                shipLevel = 2;
            }
            if (ship is LargeShip || ship is LargeDragonShip)
            {
                shipLevel = 3;
            }
            if (ship is Carrack)
            {
                shipLevel = 4;
            }
            if (ship is Galleon)
            {
                shipLevel = 5;
            }

            int gold       = 0;
            int cannonShot = 0;
            int boards     = 0;
            int cloth      = 0;
            int ironIngots = 0;

            double rareChance              = 0;
            double prestigeScrollChance    = 0;
            double craftingComponentChance = 0;

            switch (ship.MobileFactionType)
            {
            case MobileFactionType.Fishing:
                gold                    = 500 + (Utility.RandomMinMax(200 * (shipLevel - 1), 300 * (shipLevel - 1)));
                boards                  = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cloth                   = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                ironIngots              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cannonShot              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                rareChance              = 0.0075 * shipLevel;
                prestigeScrollChance    = 0.02 * shipLevel;
                craftingComponentChance = 0.02 * shipLevel;
                break;

            case MobileFactionType.Pirate:
                gold                    = 2000 + (Utility.RandomMinMax(450 * (shipLevel - 1), 550 * (shipLevel - 1)));
                boards                  = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cloth                   = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                ironIngots              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cannonShot              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                rareChance              = 0.02 * shipLevel;
                prestigeScrollChance    = 0.06 * shipLevel;
                craftingComponentChance = 0.06 * shipLevel;
                break;

            case MobileFactionType.Britain:
                gold                    = 2000 + (Utility.RandomMinMax(450 * (shipLevel - 1), 550 * (shipLevel - 1)));
                boards                  = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cloth                   = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                ironIngots              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cannonShot              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                rareChance              = 0.02 * shipLevel;
                prestigeScrollChance    = 0.06 * shipLevel;
                craftingComponentChance = 0.06 * shipLevel;
                break;

            case MobileFactionType.Orc:
                gold                    = 2500 + (Utility.RandomMinMax(700 * (shipLevel - 1), 800 * (shipLevel - 1)));
                boards                  = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cloth                   = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                ironIngots              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cannonShot              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                rareChance              = 0.025 * shipLevel;
                prestigeScrollChance    = 0.07 * shipLevel;
                craftingComponentChance = 0.07 * shipLevel;
                break;

            case MobileFactionType.Orghereim:
                gold                    = 2500 + (Utility.RandomMinMax(700 * (shipLevel - 1), 800 * (shipLevel - 1)));
                boards                  = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cloth                   = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                ironIngots              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cannonShot              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                rareChance              = 0.025 * shipLevel;
                prestigeScrollChance    = 0.07 * shipLevel;
                craftingComponentChance = 0.07 * shipLevel;
                break;

            case MobileFactionType.Undead:
                gold                    = 3000 + (Utility.RandomMinMax(950 * (shipLevel - 1), 1050 * (shipLevel - 1)));
                boards                  = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cloth                   = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                ironIngots              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                cannonShot              = Utility.RandomMinMax(10 * shipLevel, 20 * shipLevel);
                rareChance              = 0.025 * shipLevel;
                prestigeScrollChance    = 0.08 * shipLevel;
                craftingComponentChance = 0.08 * shipLevel;
                break;
            }

            if (gold > 0)
            {
                ship.Hold.DropItem(new Gold(gold));
            }

            //if (cannonShot > 0)
            //ship.Hold.DropItem(new CannonShot(cannonShot));

            if (boards > 0)
            {
                ship.Hold.DropItem(new Board(boards));
            }

            if (cloth > 0)
            {
                ship.Hold.DropItem(new Cloth(cloth));
            }

            if (ironIngots > 0)
            {
                ship.Hold.DropItem(new IronIngot(ironIngots));
            }

            if (Utility.RandomDouble() < rareChance)
            {
                Item item = GetShipRare();

                if (item != null)
                {
                    ship.Hold.DropItem(item);
                }
            }

            if (Utility.RandomDouble() < craftingComponentChance)
            {
                ship.Hold.DropItem(CraftingComponent.GetRandomCraftingComponent(1));
            }
        }
예제 #2
0
        protected virtual void GenerateTreasure()
        {
            int MinGold = 1;
            int MaxGold = 2;

            int minRegs = 1;
            int maxRegs = 2;

            double craftingComponentChance = .02;
            double prestigeScrollChance    = .01;
            double researchMaterialsChance = .005;

            switch (m_TreasureLevel)
            {
            case TreasureLevel.Level1:
                minRegs = 1;
                maxRegs = 2;
                MinGold = 33;
                MaxGold = 100;

                craftingComponentChance = .02;
                prestigeScrollChance    = .01;
                researchMaterialsChance = .005;
                break;

            case TreasureLevel.Level2:
                minRegs = 1;
                maxRegs = 3;
                MinGold = 75;
                MaxGold = 225;

                craftingComponentChance = .04;
                prestigeScrollChance    = .02;
                researchMaterialsChance = .01;
                break;

            case TreasureLevel.Level3:
                minRegs = 2;
                maxRegs = 6;
                MinGold = 225;
                MaxGold = 335;

                craftingComponentChance = .08;
                prestigeScrollChance    = .04;
                researchMaterialsChance = .02;
                break;

            case TreasureLevel.Level4:
                minRegs = 4;
                maxRegs = 12;
                MinGold = 600;
                MaxGold = 900;

                craftingComponentChance = .10;
                prestigeScrollChance    = .05;
                researchMaterialsChance = .025;
                break;

            case TreasureLevel.Level5:
                minRegs = 4;
                maxRegs = 18;
                MinGold = 1000;
                MaxGold = 1500;

                craftingComponentChance = .15;
                prestigeScrollChance    = .075;
                researchMaterialsChance = .0375;
                break;

            case TreasureLevel.Level6:
                minRegs = 8;
                maxRegs = 20;
                MinGold = 1600;
                MaxGold = 2200;

                craftingComponentChance = .20;
                prestigeScrollChance    = .10;
                researchMaterialsChance = .05;
                break;
            }

            //potion
            AddRare((int)m_TreasureLevel + 1, 0.75, Loot.PotionTypes); //0.75% chance per level for a potion

            // gold
            DropItem(new Gold(MinGold, MaxGold));

            // gems
            AddGems((int)m_TreasureLevel * 2);
            AddGems((int)m_TreasureLevel * 2);

            // reagents
            Item ReagentLoot = Loot.RandomReagent();

            ReagentLoot.Amount = Utility.Random(minRegs, maxRegs - minRegs);
            DropItem(ReagentLoot);

            // clothing
            for (int i = Utility.Random(1, 2); i > 1; i--)
            {
                DropItem(Loot.RandomClothing());
            }

            //Crafting Component Scroll
            if (Utility.RandomDouble() <= craftingComponentChance)
            {
                DropItem(CraftingComponent.GetRandomCraftingComponent(1));
            }

            //Prestige Scroll
            if (Utility.RandomDouble() <= prestigeScrollChance)
            {
                DropItem(new PrestigeScroll());
            }

            //Research Materials
            if (Utility.RandomDouble() <= researchMaterialsChance)
            {
                DropItem(new ResearchMaterials());
            }

            // special cloth hues
            if (Level >= TreasureLevel.Level5 && Utility.Random(25) == 0)
            {
                DropItem(new RareCloth());
            }

            // lvl3+ has chance for weapon & armor
            if ((int)m_TreasureLevel >= (int)TreasureLevel.Level3)
            {
                int level = (int)m_TreasureLevel;
                // Equipment
                for (int i = Utility.Random(1, level - 1); i > 1; i--)
                {
                    Item item = Utility.RandomBool() ? Loot.RandomWeapon() as Item : Loot.RandomArmorOrShield() as Item;

                    if (item is BaseWeapon)
                    {
                        BaseWeapon weapon = (BaseWeapon)item;
                        weapon.DamageLevel     = (WeaponDamageLevel)Utility.Random(level);
                        weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(level);
                        weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(level);
                    }

                    else if (item is BaseArmor)
                    {
                        BaseArmor armor = (BaseArmor)item;
                        armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(level);
                        armor.DurabilityLevel = (ArmorDurabilityLevel)Utility.Random(level);
                        armor.Quality         = Quality.Regular;
                    }

                    DropItem(item);
                }
            }
        }
        public static void Fill(LockableContainer cont, int level)
        {
            cont.Movable = false;
            cont.Locked  = true;

            if (level == 0)
            {
                cont.LockLevel = 0;                 // Can't be unlocked

                cont.DropItem(new Gold(Utility.RandomMinMax(200, 300)));

                if (Utility.RandomDouble() < 0.75)
                {
                    cont.DropItem(new TreasureMap(0, Map.Felucca));
                }
            }
            else
            {
                cont.TrapType  = TrapType.ExplosionTrap;
                cont.TrapPower = level * 25;
                cont.TrapLevel = level;

                switch (level)
                {
                case 1: cont.RequiredSkill = 35; break;

                case 2: cont.RequiredSkill = 50; break;

                case 3: cont.RequiredSkill = 75; break;

                case 4: cont.RequiredSkill = 90; break;

                case 5: cont.RequiredSkill = 98; break;

                case 6: cont.RequiredSkill = 100; break;
                }

                cont.LockLevel    = cont.RequiredSkill - 10;
                cont.MaxLockLevel = cont.RequiredSkill + 40;

                var gold = new Gold(level * 500);
                if (level == 6)
                {
                    gold.Amount = 5000;
                }

                cont.DropItem(gold);

                int reagents = level == 0 ? 4 : 8;

                //TEST: FIX

                /*
                 * for (int i = 0; i < reagents; i++)
                 * {
                 *  Item item = Loot.RandomPossibleReagent();
                 *  item.Amount = RegsPerLevel[level];
                 *  cont.DropItem(item);
                 * }
                 *
                 * for (int i = 0; i < level * 3; ++i)
                 *  cont.DropItem(Loot.RandomScroll(0, Math.Min(47, (level + 1) * 8 - 1), SpellbookType.Regular));
                 * */

                int minimumMod = 1;
                int maximumMod = MaxModPerLevel[level];

                //Luthius Expansion
                double craftingComponentLoops = 4;
                double prestigeScrollLoops    = 3;
                double spellHueDeedLoops      = 1;

                double craftingComponentChance = .02;
                double prestigeScrollChance    = .1;
                double spellHueDeedChance      = .005;

                switch (level)
                {
                case 1:
                    craftingComponentChance = .10;
                    prestigeScrollChance    = .1;
                    spellHueDeedChance      = .005;
                    break;

                case 2:
                    craftingComponentChance = .15;
                    prestigeScrollChance    = .2;
                    spellHueDeedChance      = .01;
                    break;

                case 3:
                    craftingComponentChance = .20;
                    prestigeScrollChance    = .3;
                    spellHueDeedChance      = .015;
                    break;

                case 4:
                    craftingComponentChance = .25;
                    prestigeScrollChance    = .4;
                    spellHueDeedChance      = .02;
                    break;

                case 5:
                    craftingComponentChance = .30;
                    prestigeScrollChance    = .5;
                    spellHueDeedChance      = .025;
                    break;

                case 6:
                    craftingComponentChance = .40;
                    prestigeScrollChance    = .6;
                    spellHueDeedChance      = .03;
                    break;
                }

                for (int a = 0; a < craftingComponentLoops; a++)
                {
                    if (Utility.RandomDouble() <= craftingComponentChance)
                    {
                        cont.DropItem(CraftingComponent.GetRandomCraftingComponent(1));
                    }
                }

                for (int a = 0; a < spellHueDeedLoops; a++)
                {
                    if (Utility.RandomDouble() <= spellHueDeedChance)
                    {
                        cont.DropItem(new SpellHueDeed());
                    }
                }

                for (int i = 0; i < ItemsPerLevel[level]; ++i)
                {
                    if (Utility.RandomDouble() < 0.30)
                    {
                        //TEST: FIX

                        /*
                         * BaseWeapon weapon = Loot.RandomWeapon();
                         * weapon.DamageLevel = (WeaponDamageLevel)Utility.RandomMinMax(minimumMod, maximumMod);
                         * weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.RandomMinMax(minimumMod, maximumMod);
                         * weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.RandomMinMax(minimumMod, maximumMod);
                         *
                         * cont.DropItem(weapon);
                         * */
                    }

                    else
                    {
                        //TEST: FIX

                        /*
                         * BaseArmor armor = Loot.RandomArmorOrShield();
                         * armor.ProtectionLevel = (ArmorProtectionLevel)Utility.RandomMinMax(minimumMod, maximumMod);
                         * armor.DurabilityLevel = (ArmorDurabilityLevel)Utility.RandomMinMax(minimumMod, maximumMod);
                         *
                         * cont.DropItem(armor);
                         * */
                    }
                }
            }

            //TEST: FIX

            /*
             * for (int i = 0; i < level; i++)
             * {
             *  Item item = Loot.RandomGem();
             *  item.Amount = GemsPerLevel[level];
             *  cont.DropItem(item);
             * }
             * */

            // rares
            if (level == 6 && Utility.Random(50) == 0)
            {
                cont.DropItem(new SpecialHairDye());
            }

            switch (level)
            {
            case 6:
                if (Utility.RandomDouble() < 0.09)
                {
                    cont.DropItem(new SkillMasteryScroll());
                }
                break;

            case 5:
                break;

            case 4:
                if (Utility.RandomDouble() < 0.03)
                {
                    cont.DropItem(new BossCloth());
                }
                break;

            default:
                if (Utility.RandomDouble() < RareChancePerLevel[level])
                {
                    int index = Utility.Random(LootPack.RareCraftingIngredients.Length);
                    var rare  = LootPack.RareCraftingIngredients[index].Construct();
                    cont.DropItem(rare);
                }
                break;
            }

            int chance = 610 - (100 * level);

            if (Utility.Random(chance) == 0)
            {
                cont.DropItem(new RareCloth());
            }
        }
예제 #4
0
        public void ReceiveReward(Mobile from)
        {
            int TotalValues = 0;

            Item   item        = null;
            string rewardText  = "";
            int    rewardSound = 0x5AA;

            Dictionary <string, int> DictTemp = new Dictionary <string, int>();

            //Used to Determine Chance of Last Reward Item (GoldSmallAmount)
            int maxRandomValue = 1000;

            int ultraRareValue = 2;
            int rareValue      = 7;
            int uncommonValue  = 20;
            int commonValue    = 150;

            //Ultra Rares
            DictTemp.Add("PlayerCustomizationDeed", ultraRareValue);
            DictTemp.Add("AntiqueStandingClock", ultraRareValue);
            DictTemp.Add("CityLampPost", ultraRareValue);
            DictTemp.Add("LuniteIngots", ultraRareValue);
            DictTemp.Add("AquariumDeed", ultraRareValue);
            DictTemp.Add("LuxuriousFurniture", ultraRareValue);
            DictTemp.Add("MiniatureTownPiece", ultraRareValue);
            DictTemp.Add("UltraRareCloth", ultraRareValue);
            DictTemp.Add("DisplayCaseLargeAddon", ultraRareValue);
            DictTemp.Add("DisplayCaseMediumAddon", ultraRareValue);
            DictTemp.Add("LargeBenchAddon", ultraRareValue);
            DictTemp.Add("BarTopGlassMugs", ultraRareValue);
            DictTemp.Add("BarTopGoblets", ultraRareValue);
            DictTemp.Add("ExplodingBullvore", ultraRareValue);

            //Rares
            DictTemp.Add("UnfinishedFurniture", rareValue);
            DictTemp.Add("SpellHueDeed", rareValue);
            DictTemp.Add("MiniatureHome", rareValue);
            DictTemp.Add("CraftingComponentsLargeAmount", rareValue);
            DictTemp.Add("GoldHugeAmount", rareValue);
            DictTemp.Add("TableWithRunner", rareValue);
            DictTemp.Add("ExplodingLlama", rareValue);
            DictTemp.Add("MagicalWeapon", rareValue);
            DictTemp.Add("MagicalArmor", rareValue);
            DictTemp.Add("RareCloth", rareValue);
            DictTemp.Add("HideRack", rareValue);
            DictTemp.Add("HideRackLargeAddon", rareValue);
            DictTemp.Add("DisplayCaseSmall", rareValue);

            //Uncommon
            DictTemp.Add("CraftingComponentsMediumAmount", uncommonValue);
            DictTemp.Add("SpiderSilkFishingNet", uncommonValue);
            DictTemp.Add("CampingFirepit", uncommonValue);
            DictTemp.Add("GoldLargeAmount", uncommonValue);
            DictTemp.Add("ParagonWand", uncommonValue);
            DictTemp.Add("Lure", uncommonValue);
            DictTemp.Add("ResearchMaterials", uncommonValue);
            DictTemp.Add("AncientMysteryScroll", uncommonValue);
            DictTemp.Add("LavishPillow", uncommonValue);
            DictTemp.Add("VeterinarySalts", uncommonValue);
            DictTemp.Add("ExplodingSheep", uncommonValue);
            DictTemp.Add("DiamondHarvestingTool", uncommonValue);

            //Common
            DictTemp.Add("PrestigeScroll", commonValue);
            DictTemp.Add("GoldMediumAmount", commonValue);
            DictTemp.Add("CraftingComponentsSmallAmount", (int)Math.Round((double)commonValue / 2));
            DictTemp.Add("Reagents", commonValue);

            foreach (KeyValuePair <string, int> pair in DictTemp)
            {
                TotalValues += pair.Value;
            }

            int remainderItemChance = maxRandomValue - TotalValues;

            if (remainderItemChance < 1)
            {
                remainderItemChance = 1;
            }

            //Last Reward Item (Chance = maxRandomValue - Sum of All Item Values Combined)
            DictTemp.Add("GoldSmallAmount", remainderItemChance);

            TotalValues += remainderItemChance;

            double ItemCheck = Utility.RandomDouble();

            double CumulativeAmount = 0.0;
            double AdditionalAmount = 0.0;

            //Determine Reward
            foreach (KeyValuePair <string, int> pair in DictTemp)
            {
                AdditionalAmount = (double)pair.Value / (double)TotalValues;

                if (ItemCheck >= CumulativeAmount && ItemCheck < (CumulativeAmount + AdditionalAmount))
                {
                    Bag bag;

                    switch (pair.Key)
                    {
                    //Ultra Rares
                    case "PlayerCustomizationDeed":
                        item       = new Custom.PlayerCustomizationDeed();
                        rewardText = "You receive a player customization deed.";
                        break;

                    case "AntiqueStandingClock":
                        item       = new AntiqueStandingClock();
                        rewardText = "You receive an antique standing clock.";
                        break;

                    case "CityLampPost":
                        item       = new CityLampPost();
                        rewardText = "You receive a city lamp post.";
                        break;

                    case "LuniteIngots":
                        item       = new LuniteIngot(Utility.RandomMinMax(25, 50));
                        rewardText = "You receive some lunite ingots.";
                        break;

                    case "AquariumDeed":
                        if (Utility.RandomDouble() <= .5)
                        {
                            item = new AquariumEastDeed();
                        }
                        else
                        {
                            item = new AquariumNorthDeed();
                        }

                        rewardText = "You receive an aquarium deed";
                        break;

                    case "LuxuriousFurniture":
                        switch (Utility.RandomMinMax(1, 12))
                        {
                        case 1: item = new LuxuriousBookstand(); break;

                        case 2: item = new LuxuriousCouch(); break;

                        case 3: item = new LuxuriousOvalTable(); break;

                        case 4: item = new LuxuriousChair(); break;

                        case 5: item = new LuxuriousTable(); break;

                        case 6: item = new LargeLuxuriousChest(); break;

                        case 7: item = new LargeLuxuriousChair(); break;

                        case 8: item = new LuxuriousBookshelf(); break;

                        case 9: item = new LuxuriousChest(); break;

                        case 10: item = new LuxuriousStorageBox(); break;

                        case 11: item = new LuxuriousReadingDesk(); break;

                        case 12: item = new LuxuriousAlchemyTable(); break;
                        }

                        rewardText = "You receive some luxurious furniture.";
                        break;

                    case "MiniatureTownPiece":
                        item       = new MiniatureTownPiece();
                        rewardText = "You receive a miniature town piece.";
                        break;

                    case "UltraRareCloth":
                        item       = new UltraRareCloth();
                        rewardText = "You receive some ultra rare cloth.";
                        break;

                    case "DisplayCaseLargeAddon":
                        switch (Utility.RandomMinMax(1, 2))
                        {
                        case 1: item = new DisplayCaseLargeEastAddonDeed(); break;

                        case 2: item = new DisplayCaseLargeNorthAddonDeed(); break;
                        }

                        rewardText = "You receive a large display case.";
                        break;

                    case "DisplayCaseMediumAddon":
                        switch (Utility.RandomMinMax(1, 2))
                        {
                        case 1: item = new DisplayCaseMediumEastAddonDeed(); break;

                        case 2: item = new DisplayCaseMediumNorthAddonDeed(); break;
                        }

                        rewardText = "You receive a medium display case.";
                        break;

                    case "LargeBenchAddon":
                        switch (Utility.RandomMinMax(1, 2))
                        {
                        case 1: item = new LargeBenchEastAddonDeed(); break;

                        case 2: item = new LargeBenchNorthAddonDeed(); break;
                        }

                        rewardText = "You receive a large bench.";
                        break;

                    case "BarTopGlassMugs":
                        item       = new BarTopGlassMugs();
                        rewardText = "You receive bar top glass mugs.";
                        break;

                    case "BarTopGoblets":
                        item       = new BarTopGoblets();
                        rewardText = "You receive bar top goblets.";
                        break;

                    case "ExplodingBullvore":
                        item       = new ExplodingBullvore();
                        rewardText = "You receive an exploding bullvore.";
                        break;

                    //Rares
                    case "UnfinishedFurniture":
                        switch (Utility.RandomMinMax(1, 5))
                        {
                        case 1: item = new UnfinishedWoodenChair(); break;

                        case 2: item = new UnfinishedDresser(); break;

                        case 3: item = new UnfinishedTableLegs(); break;

                        case 4: item = new UnfinishedTablePieces(); break;

                        case 5: item = new UnfinishedBookshelf(); break;
                        }

                        rewardText = "You receive some unfinished furniture.";
                        break;

                    case "SpellHueDeed":
                        item       = new Custom.SpellHueDeed();
                        rewardText = "You receive a spell hue deed.";
                        break;

                    case "MiniatureHome":
                        item       = new MiniatureHome();
                        rewardText = "You receive a miniature home.";
                        break;

                    case "CraftingComponentsLargeAmount":
                        item       = CraftingComponent.GetRandomCraftingComponent(10);
                        rewardText = "You receive a large number of crafting components.";
                        break;

                    case "GoldHugeAmount":
                        item       = new Gold(Utility.RandomMinMax(2500, 10000));
                        rewardText = "You receive a very large amount of gold.";
                        break;

                    case "TableWithRunner":
                        item       = new TableWithRunner();
                        rewardText = "You receive a small table with runner.";
                        break;

                    case "ExplodingLlama":
                        item       = new ExplodingLlama();
                        rewardText = "You receive an exploding llama.";
                        break;

                    case "MagicalWeapon":
                        BaseWeapon weapon = Loot.RandomWeapon();

                        if (weapon != null)
                        {
                            weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.RandomMinMax(3, 5);
                            weapon.DamageLevel     = (WeaponDamageLevel)Utility.RandomMinMax(3, 5);
                            weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.RandomMinMax(3, 5);
                        }

                        item       = weapon;
                        rewardText = "You receive a magical weapon.";
                        break;

                    case "MagicalArmor":
                        BaseArmor armor = Loot.RandomArmor();

                        if (armor != null)
                        {
                            armor.ProtectionLevel = (ArmorProtectionLevel)Utility.RandomMinMax(4, 5);
                            armor.DurabilityLevel = (ArmorDurabilityLevel)Utility.RandomMinMax(4, 5);
                        }

                        item       = armor;
                        rewardText = "You receive some magical armor.";
                        break;

                    case "RareCloth":
                        item       = new RareCloth();
                        rewardText = "You receive some rare cloth.";
                        break;

                    case "HideRack":
                        item       = new HideRack();
                        rewardText = "You receive a hide rack.";
                        break;

                    case "HideRackLargeAddon":
                        switch (Utility.RandomMinMax(1, 2))
                        {
                        case 1: item = new HideRackLargeEastAddonDeed(); break;

                        case 2: item = new HideRackLargeNorthAddonDeed(); break;
                        }

                        rewardText = "You receive a large hide rack.";
                        break;

                    case "DisplayCaseSmall":
                        item       = new DisplayCaseSmall();
                        rewardText = "You receive a small display case.";
                        break;

                    //Uncommon
                    case "CraftingComponentsMediumAmount":
                        item       = CraftingComponent.GetRandomCraftingComponent(6);
                        rewardText = "You receive a moderate number of crafting components.";
                        break;

                    case "SpiderSilkFishingNet":
                        item       = new Custom.SpidersilkFishingNet();
                        rewardText = "You receive a spidersilk fishing net.";
                        break;

                    case "CampingFirepit":
                        item       = new Custom.CampingFirepit();
                        rewardText = "You receive a camping firepit.";
                        break;

                    case "GoldLargeAmount":
                        item       = new Gold(Utility.RandomMinMax(1000, 2500));
                        rewardText = "You receive a large amount of gold.";
                        break;

                    case "ParagonWand":
                        item       = new ParagonWand();
                        rewardText = "You receive a paragon wand.";
                        break;

                    case "Lure":
                        if (Utility.RandomDouble() <= .66)
                        {
                            item = new Custom.FaintLure();
                        }
                        else
                        {
                            item = new Custom.PotentLure();
                        }

                        rewardText = "You receive a lure.";
                        break;

                    case "ResearchMaterials":
                        item       = new Custom.ResearchMaterials();
                        rewardText = "You receive some research materials.";
                        break;

                    case "AncientMysteryScroll":
                        item       = new Custom.AncientMystery.AncientMysteryScroll();
                        rewardText = "You receive an ancient mystery scroll.";
                        break;

                    case "LavishPillow":
                        item       = new LavishPillow();
                        rewardText = "You receive a lavish pillow.";
                        break;

                    case "VeterinarySalts":
                        item       = new Custom.Items.VeterinarySalts();
                        rewardText = "You receive some veterinary salts.";
                        break;

                    case "ExplodingSheep":
                        item       = new ExplodingSheep();
                        rewardText = "You receive an exploding sheep.";
                        break;

                    case "DiamondHarvestingTool":
                        switch (Utility.RandomMinMax(1, 2))
                        {
                        case 1: item = new DiamondPickaxe(); break;

                        case 2: item = new DiamondShovel(); break;
                        }

                        rewardText = "You receive a diamond-coated harvesting tool.";
                        break;

                    //Common
                    case "PrestigeScroll":
                        item       = new PrestigeScroll();
                        rewardText = "You receive a prestige scroll.";
                        break;

                    case "GoldMediumAmount":
                        item       = new Gold(Utility.RandomMinMax(500, 1000));
                        rewardText = "You receive a moderate amount of gold.";
                        break;

                    case "CraftingComponentsSmallAmount":
                        item       = CraftingComponent.GetRandomCraftingComponent(3);
                        rewardText = "You receive a small number of crafting components.";
                        break;

                    case "Reagents":
                        int reagentsAmount = Utility.RandomMinMax(150, 250);

                        switch (Utility.RandomMinMax(1, 8))
                        {
                        case 1: item = new BlackPearl(reagentsAmount); break;

                        case 2: item = new Bloodmoss(reagentsAmount); break;

                        case 3: item = new MandrakeRoot(reagentsAmount); break;

                        case 4: item = new Garlic(reagentsAmount); break;

                        case 5: item = new Ginseng(reagentsAmount); break;

                        case 6: item = new SpidersSilk(reagentsAmount); break;

                        case 7: item = new SulfurousAsh(reagentsAmount); break;

                        case 8: item = new Nightshade(reagentsAmount); break;
                        }

                        rewardText = "You receive some reagents.";
                        break;

                    //Remainder
                    case "GoldSmallAmount":
                        item       = new Gold(Utility.RandomMinMax(250, 500));
                        rewardText = "You receive a small amount of gold.";
                        break;
                    }

                    break;
                }

                CumulativeAmount += AdditionalAmount;
            }

            if (item != null)
            {
                if (from.TotalWeight >= 390 && from.AccessLevel == AccessLevel.Player)
                {
                    item.Delete();
                    from.SendMessage("You are carrying too much weight to be able to accept any rewards.");

                    inUse = false;

                    return;
                }

                if (!from.AddToBackpack(item))
                {
                    item.Delete();
                    from.SendMessage("You don't have enough room in your backpack. Please make room and try again.");

                    inUse = false;

                    return;
                }

                else
                {
                    if (from.NetState != null)
                    {
                        from.PrivateOverheadMessage(MessageType.Regular, 0, false, rewardText, from.NetState);
                    }

                    if (rewardSound != -1)
                    {
                        from.SendSound(rewardSound);
                    }

                    Delete();
                }
            }

            else
            {
                inUse = false;
            }
        }