Ejemplo n.º 1
0
        public SunkenChest(int level, Mobile digger, int ancient) : base(0x455)
        {
            level = level + 4;
            if (level > 10)
            {
                level = 10;
            }

            ContainerFunctions.BuildContainer(this, 0, Utility.RandomList(1, 2), 0, 0);

            int xTraCash = Utility.RandomMinMax((level * 500), (level * 800));

            ContainerFunctions.AddGoldToContainer(xTraCash, this, 0, digger);

            if (level > 0)
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }
            if (level > 3)
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }
            if (level > 7)
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }
            if (GetPlayerInfo.LuckyPlayer(digger.Luck))
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }

            ContainerOwner  = ContainerFunctions.GetOwner("Sunken");
            ContainerDigger = digger.Name;

            Name = "sunken chest";

            // = ARTIFACTS
            int artychance = GetPlayerInfo.LuckyPlayerArtifacts(digger.Luck) + 10;

            if (Utility.RandomMinMax(0, 100) < ((level * 10) + artychance))
            {
                Item arty = ArtifactBuilder.CreateArtifact("random");
                switch (Utility.RandomMinMax(1, 20))
                {
                case 1: arty = ArtifactBuilder.CreateArtifact("driftwood");   break;

                case 2: arty = ArtifactBuilder.CreateArtifact("kelp");                break;

                case 3: arty = ArtifactBuilder.CreateArtifact("barnacle");    break;

                case 4: arty = ArtifactBuilder.CreateArtifact("neptune");             break;

                case 5: arty = ArtifactBuilder.CreateArtifact("bronzed");             break;
                }
                DropItem(arty);
                BaseContainer.DropItemFix(arty, digger, ItemID, GumpID);
            }

            int  giveRelics = level;
            Item relic      = Loot.RandomRelic();

            while (giveRelics > 0)
            {
                relic = Loot.RandomRelic();
                ContainerFunctions.RelicValueIncrease(level, relic);
                DropItem(relic);
                BaseContainer.DropItemFix(relic, digger, ItemID, GumpID);
                giveRelics = giveRelics - 1;
            }

            if (ancient > 0)
            {
                Name = "ancient sunken chest";
                Hue  = Utility.RandomList(0xB8E, 0xB8F, 0xB90, 0xB91, 0xB92, 0xB89, 0xB8B);
                Item net = new FabledFishingNet();
                DropItem(net);
                BaseContainer.DropItemFix(net, digger, ItemID, GumpID);
            }
            else
            {
                Item net = new FishingNet();
                if (Utility.RandomMinMax(1, 3) == 1)
                {
                    net = new SpecialFishingNet();
                }
                DropItem(net);
                BaseContainer.DropItemFix(net, digger, ItemID, GumpID);
                ItemID = Utility.RandomList(0x52E2, 0x52E3, 0x507E, 0x507F, 0x4910, 0x4911, 0x3332, 0x3333, 0x4FF4, 0x4FF5);
                Hue    = 0;
            }
        }
Ejemplo n.º 2
0
        public ParagonChest(string name, string title, int level, Mobile from) : base(Utility.RandomList(m_ItemIDs))
        {
            int tMapLevel = level;

            level = level + 4;
            if (level > 7)
            {
                level = 7;
            }

            m_Name = name;
            if (title != "" && title != null)
            {
                m_Name = name + " " + title;
            }

            Hue = Utility.RandomList(m_Hues);

            if (level > 0)
            {
                ContainerFunctions.FillTheContainer(level, this, from);
            }
            if (level > 3)
            {
                ContainerFunctions.FillTheContainer(level, this, from);
            }
            if (level > 7)
            {
                ContainerFunctions.FillTheContainer(level, this, from);
            }

            ContainerFunctions.LockTheContainer(level, this, 1);

            int xTraCash = Utility.RandomMinMax((level * 600), (level * 900));

            ContainerFunctions.AddGoldToContainer(xTraCash, this, 0);

            if (Utility.RandomMinMax(0, 100) < (level * 5))
            {
                Item arty = ArtifactBuilder.CreateArtifact("random");
                DropItem(arty);
            }

            Map tMap = Map.Trammel;

            switch (Utility.RandomMinMax(0, 4))
            {
            case 0: tMap = Map.Trammel; break;

            case 1: tMap = Map.Felucca; break;

            case 2: tMap = Map.Malas; break;

            case 3: tMap = Map.Tokuno; break;

            case 4: tMap = Map.TerMur; break;

            case 5: tMap = Map.Ilshenar; break;
            }

            Point3D loc = new Point3D(200, 200, 0);

            DropItem(new TreasureMap(tMapLevel, tMap, loc, 200, 200));

            int  giveRelics = level;
            Item relic      = Loot.RandomRelic();

            while (giveRelics > 0)
            {
                relic = Loot.RandomRelic();
                ContainerFunctions.RelicValueIncrease(level, relic);
                DropItem(relic);
                giveRelics = giveRelics - 1;
            }
        }
Ejemplo n.º 3
0
        public TreasureMapChest(Mobile owner, int level, bool temporary) : base(0xE40)
        {
            level = level + 4;
            if (level > 10)
            {
                level = 10;
            }

            m_Owner      = owner;
            m_Level      = level;
            m_DeleteTime = DateTime.UtcNow + TimeSpan.FromHours(3.0);

            m_Temporary = temporary;
            m_Guardians = new List <Mobile>();

            m_Timer = new DeleteTimer(this, m_DeleteTime);
            m_Timer.Start();

            Movable = false;
            Locked  = true;

            if (level > 0)
            {
                ContainerFunctions.FillTheContainer(level, this, owner);
            }
            if (level > 3)
            {
                ContainerFunctions.FillTheContainer(level, this, owner);
            }
            if (level > 7)
            {
                ContainerFunctions.FillTheContainer(level, this, owner);
            }
            if (GetPlayerInfo.LuckyPlayer(owner.Luck))
            {
                ContainerFunctions.FillTheContainer(level, this, owner);
            }

            ContainerFunctions.LockTheContainer(level, this, 1);

            int xTraCash = Utility.RandomMinMax((level * 700), (level * 1000));

            ContainerFunctions.AddGoldToContainer(xTraCash, this, 0);

            string sChest = "grand treasure chest";

            switch (level)
            {
            case 0: sChest = "meager treasure chest";               break;

            case 1: sChest = "simple treasure chest";               break;

            case 2: sChest = "good treasure chest";                 break;

            case 3: sChest = "great treasure chest";                break;

            case 4: sChest = "excellent treasure chest";    break;

            case 5: sChest = "superb treasure chest";               break;
            }

            Name = ContainerFunctions.GetOwner("Treasure Chest");
            Name = "the " + sChest + " of " + Name;

            // = SCROLL OF TRANCENDENCE
            if (level >= 4 && Utility.RandomDouble() > 0.9)
            {
                DropItem(ScrollofTranscendence.CreateRandom(level, level * 5));
            }

            // = ARTIFACTS
            int artychance = GetPlayerInfo.LuckyPlayerArtifacts(owner.Luck);

            if (Utility.RandomMinMax(0, 100) < ((level * 17) + artychance))
            {
                Item arty = ArtifactBuilder.CreateArtifact("random");
                DropItem(arty);
            }

            // = SCROLL OF ALACRITY or POWERSCROLL
            if (level > 1)
            {
                if (Utility.RandomDouble() < (0.02 + (level / 200)))
                {
                    SkillName WhatS = (SkillName)Utility.Random(SkillInfo.Table.Length);
                    DropItem(PowerScroll.CreateRandomNoCraft(5, 5));
                }
                else if (Utility.RandomDouble() < 0.075)
                {
                    SkillName WhatS = (SkillName)Utility.Random(SkillInfo.Table.Length);
                    DropItem(new ScrollofAlacrity(WhatS));
                }
            }

            int  giveRelics = level;
            Item relic      = Loot.RandomRelic();

            while (giveRelics > 0)
            {
                relic = Loot.RandomRelic();
                ContainerFunctions.RelicValueIncrease(level, relic);
                DropItem(relic);
                giveRelics = giveRelics - 1;
            }
        }
Ejemplo n.º 4
0
        public ParagonChest(string name, string title, int level, Mobile from) : base(Utility.RandomList(m_ItemIDs))
        {
            int tMapLevel = level;

            level = level + 4;
            if (level > 7)
            {
                level = 7;
            }

            m_Name = name;
            if (title != "" && title != null)
            {
                m_Name = name + " " + title;
            }

            Hue = Utility.RandomList(m_Hues);

            if (level > 0)
            {
                ContainerFunctions.FillTheContainer(level, this, from);
            }
            if (level > 3)
            {
                ContainerFunctions.FillTheContainer(level, this, from);
            }
            if (level > 7)
            {
                ContainerFunctions.FillTheContainer(level, this, from);
            }

            ContainerFunctions.LockTheContainer(level, this, 1);

            int xTraCash = Utility.RandomMinMax((level * 600), (level * 900));

            ContainerFunctions.AddGoldToContainer(xTraCash, this, 0, from);

            if (Utility.RandomMinMax(0, 100) < (level * 5))
            {
                Item arty = ArtifactBuilder.CreateArtifact("random");
                DropItem(arty);
                BaseContainer.DropItemFix(arty, from, ItemID, GumpID);
            }

            Map tMap = Map.Sosaria;

            switch (Utility.RandomMinMax(0, 4))
            {
            case 0: tMap = Map.Sosaria; break;

            case 1: tMap = Map.Lodor; break;

            case 2: tMap = Map.SerpentIsland; break;

            case 3: tMap = Map.IslesDread; break;

            case 4: tMap = Map.SavagedEmpire; break;

            case 5: tMap = Map.Underworld; break;
            }

            Point3D loc = new Point3D(200, 200, 0);
            Item    map = new TreasureMap(tMapLevel, tMap, loc, 200, 200);

            DropItem(map);
            BaseContainer.DropItemFix(map, from, ItemID, GumpID);

            int  giveRelics = level;
            Item relic      = Loot.RandomRelic();

            while (giveRelics > 0)
            {
                relic = Loot.RandomRelic();
                ContainerFunctions.RelicValueIncrease(level, relic);
                BaseContainer.DropItemFix(relic, from, ItemID, GumpID);
                DropItem(relic);
                giveRelics = giveRelics - 1;
            }
        }