Exemplo n.º 1
0
        private static Item GetRandomSpecial(int level, Map map)
        {
            Item special;

            switch (Utility.Random(8))
            {
            default:
            case 0: special = new CreepingVine(); break;

            case 1: special = new MessageInABottle(); break;

            case 2: special = new ScrollOfAlacrity(PowerScroll.Skills[Utility.Random(PowerScroll.Skills.Count)]); break;

            case 3: special = new Skeletonkey(); break;

            case 4: special = new TastyTreat(5); break;

            case 5: special = new TreasureMap(Utility.RandomMinMax(level, Math.Min(7, level + 1)), map); break;

            case 6: special = GetRandomRecipe(); break;

            case 7: special = ScrollOfTranscendence.CreateRandom(1, 5); break;
            }

            return(special);
        }
Exemplo n.º 2
0
            public InternalGump(Mobile mobile, ScrollOfAlacrity scroll)
                : base(25, 50)
            {
                m_Mobile = mobile;
                m_Scroll = scroll;

                AddPage(0);

                AddBackground(25, 10, 420, 200, 5054);

                AddImageTiled(33, 20, 401, 181, 2624);
                AddAlphaRegion(33, 20, 401, 181);

                AddHtmlLocalized(40, 48, 387, 100, InfoMsg, true, true);

                AddHtmlLocalized(125, 148, 200, 20, QuestionMsg, 0xFFFFFF, false, false);

                AddHtmlLocalized(135, 172, 120, 20, 1046362, 0xFFFFFF, false, false);                   // Yes
                AddHtmlLocalized(310, 172, 120, 20, 1046363, 0xFFFFFF, false, false);                   // No

                AddButton(100, 172, 4005, 4007, 1, GumpButtonType.Reply, 0);
                AddButton(275, 172, 4005, 4007, 0, GumpButtonType.Reply, 0);

                AddHtmlLocalized(40, 20, 260, 20, TitleMsg, 0xFFFFFF, false, false);

                AddHtmlLocalized(310, 20, 120, 20, 1044060 + (int)scroll.m_Skill, 0xFFFFFF, false, false);
            }
Exemplo n.º 3
0
        public static void Fill(LockableContainer cont, int level, Map map)
        {
            cont.Movable = false;
            cont.Locked  = true;

            #region Lock & Trap
            cont.TrapType    = TrapType.ExplosionTrap;
            cont.TrapPower   = level * 25;
            cont.TrapLevel   = level;
            cont.TrapEnabled = true;

            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 = 100;
                break;

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

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

            #region Gold
            cont.DropItem(new Gold(level * 5000));
            #endregion

            #region Reagents
            int reagentStackCount = level + 3;

            for (int i = 0; i < reagentStackCount; i++)
            {
                Item item = Loot.RandomPossibleReagent();
                item.Amount = Utility.RandomMinMax(40, 60);
                cont.DropItem(item);
            }
            #endregion

            #region Magic Items
            int magicItemCount = 24 + (8 * level);

            for (int i = 0; i < magicItemCount; ++i)
            {
                Item item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();

                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 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 Gems
            int gemCount = level * 3;

            for (int i = 0; i < gemCount; i++)
            {
                Item item = Loot.RandomGem();
                cont.DropItem(item);
            }
            #endregion

            #region Essences
            if (level >= 2)
            {
                int essenceCount = level;

                for (int i = 0; i < essenceCount; i++)
                {
                    Item item = Loot.RandomEssence();
                    cont.DropItem(item);
                }
            }
            #endregion

            #region Special loot
            if (map == Map.Felucca && (level * 0.15) > Utility.RandomDouble())
            {
                Item item = ScrollOfTranscendence.CreateRandom(5);
                cont.DropItem(item);
            }

            if ((level * 0.1) > Utility.RandomDouble())
            {
                cont.DropItem(new TastyTreat());
            }

            if ((level * 0.05) > Utility.RandomDouble())
            {
                cont.DropItem(new CreepingVine());
            }

            if ((level * 0.05) > Utility.RandomDouble())
            {
                cont.DropItem(Server.Engines.Quests.BaseReward.RandomRecipe());
            }

            if (0.5 > Utility.RandomDouble())
            {
                cont.DropItem(new TreasureMap(level < 6 && 0.25 > Utility.RandomDouble() ? level + 1 : level));
            }

            if (0.25 > Utility.RandomDouble())
            {
                cont.DropItem(new SkeletonKey());
            }

            if (0.2 > Utility.RandomDouble())
            {
                cont.DropItem(ScrollOfAlacrity.CreateRandom());
            }

            if (0.2 > Utility.RandomDouble())
            {
                cont.DropItem(new MessageInABottle());
            }

            if (level >= 5)
            {
                if (0.1 > Utility.RandomDouble())
                {
                    cont.DropItem(new ForgedPardon());
                }

                if (0.09 > Utility.RandomDouble())
                {
                    cont.DropItem(new ManaPhasingOrb());
                }

                if (0.09 > Utility.RandomDouble())
                {
                    cont.DropItem(new RunedSashOfWarding());
                }

                if (0.09 > Utility.RandomDouble())
                {
                    cont.DropItem(map == Map.TerMur ? new GargishSurgeShield() : new SurgeShield());
                }
            }
            #endregion

            #region Artifacts
            if (level >= 6)
            {
                Item item = (Item)Activator.CreateInstance(m_Artifacts[Utility.Random(m_Artifacts.Length)]);
                cont.DropItem(item);
            }
            #endregion
        }
Exemplo n.º 4
0
            public InternalGump( Mobile mobile, ScrollOfAlacrity scroll )
                : base(25, 50)
            {
                m_Mobile = mobile;
                m_Scroll = scroll;

                AddPage( 0 );

                AddBackground( 25, 10, 420, 200, 5054 );

                AddImageTiled( 33, 20, 401, 181, 2624 );
                AddAlphaRegion( 33, 20, 401, 181 );

                AddHtmlLocalized( 40, 48, 387, 100, InfoMsg, true, true );

                AddHtmlLocalized( 125, 148, 200, 20, QuestionMsg, 0xFFFFFF, false, false );

                AddHtmlLocalized( 135, 172, 120, 20, 1046362, 0xFFFFFF, false, false ); // Yes
                AddHtmlLocalized( 310, 172, 120, 20, 1046363, 0xFFFFFF, false, false ); // No

                AddButton( 100, 172, 4005, 4007, 1, GumpButtonType.Reply, 0 );
                AddButton( 275, 172, 4005, 4007, 0, GumpButtonType.Reply, 0 );

                AddHtmlLocalized( 40, 20, 260, 20, TitleMsg, 0xFFFFFF, false, false );

                AddHtmlLocalized( 310, 20, 120, 20, 1044060 + (int) scroll.m_Skill, 0xFFFFFF, false, false );
            }