Exemplo n.º 1
0
        public GraveChest(int level, Mobile digger) : base()
        {
            Name = "graveyard chest";
            ContainerFunctions.FillTheContainer(level, this, digger);
            if (GetPlayerInfo.LuckyPlayer(digger.Luck))
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }

            ContainerFunctions.LockTheContainer(level, this, 1);

            Hue = Utility.RandomList(0x961, 0x962, 0x963, 0x964, 0x965, 0x966, 0x967, 0x968, 0x969, 0x96A, 0x96B, 0x96C, 0x973, 0x974, 0x975, 0x976, 0x977, 0x978, 0x497, 0x47E);

            string sBox = "coffin";

            switch (Utility.RandomMinMax(0, 3))
            {
            case 0: sBox = "casket";                        ItemID = Utility.RandomList(0x27E9, 0x27EA);                                  GumpID = 0x41D;                 Weight = 25.0;          break;

            case 1: sBox = "sarcophagus";           ItemID = Utility.RandomList(0x27E0, 0x280A, 0x2802, 0x2803);  GumpID = 0x1D;                  Weight = 100.0;         break;

            case 2: sBox = "coffin";                        ItemID = Utility.RandomList(0x2800, 0x2801);                                  GumpID = 0x41D;                 Weight = 25.0;          break;

            case 3: sBox = "chest"; break;
            }

            ContainerOwner  = ContainerFunctions.GetOwner(sBox);
            ContainerDigger = digger.Name;
        }
Exemplo n.º 2
0
        public LootChest(int level) : base(0xe40)
        {
            Name = "chest";
            ContainerFunctions.BuildContainer(this, 0, Utility.RandomList(1, 2), 0, 0);
            ContainerFunctions.LockTheContainer(level, this, 1);
            Weight = 51.0 + (double)level;

            if (Weight > 50)
            {
                Movable = false;
            }                                                  // DON'T WANT THEM TO MOVE IT UNTIL THEY OPEN IT FIRST
        }
Exemplo n.º 3
0
        public BuriedChest(int level, string who, Mobile digger) : base(0xe40)
        {
            if (who == "")
            {
                who = ContainerFunctions.GetOwner("Chest");
            }
            else
            {
                string[] vAdj = new string[] { "Exotic", "Mysterious", "Marvelous", "Amazing", "Astonishing", "Mystical", "Astounding", "Magnificent", "Phenomenal", "Fantastic", "Incredible", "Extraordinary", "Fabulous", "Wondrous", "Glorious", "Lost", "Fabled", "Legendary", "Mythical", "Missing", "Ancestral", "Ornate", "Wonderful", "Sacred", "Unspeakable", "Unknown", "Forgotten" };
                string   sAdj = vAdj[Utility.RandomMinMax(0, (vAdj.Length - 1))];
                who = "The " + sAdj + " Chest of " + who;
            }

            ContainerFunctions.BuildContainer(this, 0, Utility.RandomList(1, 2), 0, 0);
            Name = who;
            ContainerFunctions.FillTheContainer(level, this, digger);
            if (GetPlayerInfo.LuckyPlayer(digger.Luck))
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }

            if (level > 4)
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }
            if (level > 8)
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }

            ContainerFunctions.LockTheContainer(level, this, 1);

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

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

            if (Utility.RandomMinMax(0, 500) < (level))
            {
                Item arty = ArtifactBuilder.CreateArtifact("random");
                DropItem(arty);
                BaseContainer.DropItemFix(arty, digger, ItemID, GumpID);
            }
        }
Exemplo n.º 4
0
        public PirateChest(int level, string digger) : base()
        {
            Name = "pirate chest";

            ContainerFunctions.LockTheContainer(level, this, 1);

            if (digger == "null")
            {
                digger = "From An Unknown Pirate";
            }
            ContainerOwner = digger;

            Weight = 51.0 + (double)level;

            if (Weight > 50)
            {
                Movable = false;
            }                                                  // DON'T WANT THEM TO MOVE IT UNTIL THEY OPEN IT FIRST
        }
Exemplo n.º 5
0
        public HiddenBox(int level, string my_location, Mobile finder) : base()
        {
            ContainerLocation = my_location;

            string sOwner = "";

            Weight = 5.0;
            Name   = "treasure chest";

            int nOwner = 0;

            if (Server.Misc.Worlds.IsOnSpaceship(finder.Location, finder.Map))
            {
                nOwner = ContainerFunctions.BuildContainer(this, 0, 18, 0, 0);
            }
            else
            {
                nOwner = ContainerFunctions.BuildContainer(this, 0, 0, 0, 0);
            }

            ContainerFunctions.FillTheContainer(level, this, finder);
            if (GetPlayerInfo.LuckyPlayer(finder.Luck))
            {
                ContainerFunctions.FillTheContainer(level, this, finder);
            }

            ContainerFunctions.LockTheContainer(level, this, 1);

            if (nOwner == 1)
            {
                sOwner = "chest";
            }
            else if (nOwner == 2)
            {
                sOwner = "chest";
            }
            else if (nOwner == 3)
            {
                sOwner = "footlocker";
            }
            else if (nOwner == 4)
            {
                sOwner = "trunk";
            }
            else if (nOwner == 5)
            {
                sOwner = "box";
            }
            else if (nOwner == 6)
            {
                sOwner = "box";
            }
            else if (nOwner == 7)
            {
                sOwner = "bag"; Locked = false; LockLevel = 0; MaxLockLevel = 0; RequiredSkill = 0;
            }
            else if (nOwner == 8)
            {
                sOwner = "backpack"; Locked = false; LockLevel = 0; MaxLockLevel = 0; RequiredSkill = 0;
            }
            else if (nOwner == 9)
            {
                sOwner = "crate"; Locked = false; LockLevel = 0; MaxLockLevel = 0; RequiredSkill = 0;
            }
            else if (nOwner == 10)
            {
                sOwner = "crate"; Locked = false; LockLevel = 0; MaxLockLevel = 0; RequiredSkill = 0;
            }
            else if (nOwner == 18)
            {
                sOwner = "cargo";
            }
            else
            {
                sOwner = "barrel"; Locked = false; LockLevel = 0; MaxLockLevel = 0; RequiredSkill = 0;
            }

            ContainerID     = this.ItemID;
            ContainerGump   = this.GumpID;
            ContainerHue    = this.Hue;
            ContainerName   = this.Name;
            ContainerWeight = this.Weight;
            if (this.ItemID == 0xE3F)
            {
                ContainerFlip = 0xE3E;
            }
            else if (this.ItemID == 0xE3E)
            {
                ContainerFlip = 0xE3F;
            }
            else if (this.ItemID == 0xE3D)
            {
                ContainerFlip = 0xE3C;
            }
            else if (this.ItemID == 0xE75)
            {
                ContainerFlip = 0x9B2;
            }
            else if (this.ItemID == 0x9A8)
            {
                ContainerFlip = 0xE80;
            }
            else if (this.ItemID == 0x9AA)
            {
                ContainerFlip = 0xE7D;
            }
            else if (this.ItemID == 0x2813)
            {
                ContainerFlip = 0x2814;
            }
            else if (this.ItemID == 0x2811)
            {
                ContainerFlip = 0x2812;
            }
            else if (this.ItemID == 0xe40)
            {
                ContainerFlip = 0xe41;
            }
            else if (this.ItemID == 0xe42)
            {
                ContainerFlip = 0xe43;
            }
            else if (this.ItemID == 0xE3C)
            {
                ContainerFlip = 0xE3D;
            }
            else if (this.ItemID == 0x9B2)
            {
                ContainerFlip = 0xE75;
            }
            else if (this.ItemID == 0xE80)
            {
                ContainerFlip = 0x9A8;
            }
            else if (this.ItemID == 0xE7D)
            {
                ContainerFlip = 0x9AA;
            }
            else if (this.ItemID == 0x2814)
            {
                ContainerFlip = 0x2813;
            }
            else if (this.ItemID == 0x2812)
            {
                ContainerFlip = 0x2811;
            }
            else if (this.ItemID == 0xe41)
            {
                ContainerFlip = 0xe40;
            }
            else if (this.ItemID == 0xe43)
            {
                ContainerFlip = 0xe42;
            }
            else if (this.ItemID == 0xE76)
            {
                ContainerFlip = 0xE76;
            }
            else if (this.ItemID == 0x281D)
            {
                ContainerFlip = 0x281E;
            }
            else if (this.ItemID == 0x281F)
            {
                ContainerFlip = 0x2820;
            }
            else if (this.ItemID == 0x2821)
            {
                ContainerFlip = 0x2822;
            }
            else if (this.ItemID == 0x2825)
            {
                ContainerFlip = 0x2826;
            }
            else if (this.ItemID == 0x2823)
            {
                ContainerFlip = 0x2824;
            }
            else if (this.ItemID == 0x3330)
            {
                ContainerFlip = 0x3331;
            }
            else if (this.ItemID == 0x3332)
            {
                ContainerFlip = 0x3333;
            }
            else if (this.ItemID == 0x3334)
            {
                ContainerFlip = 0x3335;
            }
            else if (this.ItemID == 0x3336)
            {
                ContainerFlip = 0x3337;
            }
            else if (this.ItemID == 0x10EA)
            {
                ContainerFlip = 0x10EB;
            }
            else if (this.ItemID == 0x10EC)
            {
                ContainerFlip = 0x10ED;
            }
            else if (this.ItemID == 0x281E)
            {
                ContainerFlip = 0x281D;
            }
            else if (this.ItemID == 0x2820)
            {
                ContainerFlip = 0x281F;
            }
            else if (this.ItemID == 0x2822)
            {
                ContainerFlip = 0x2821;
            }
            else if (this.ItemID == 0x2826)
            {
                ContainerFlip = 0x2825;
            }
            else if (this.ItemID == 0x2824)
            {
                ContainerFlip = 0x2823;
            }
            else if (this.ItemID == 0x3331)
            {
                ContainerFlip = 0x3330;
            }
            else if (this.ItemID == 0x3333)
            {
                ContainerFlip = 0x3332;
            }
            else if (this.ItemID == 0x3335)
            {
                ContainerFlip = 0x3334;
            }
            else if (this.ItemID == 0x3337)
            {
                ContainerFlip = 0x3336;
            }
            else if (this.ItemID == 0x10EB)
            {
                ContainerFlip = 0x10EA;
            }
            else if (this.ItemID == 0x10ED)
            {
                ContainerFlip = 0x10EC;
            }
            else if (this.ItemID == 0x3866)
            {
                ContainerFlip = 0x3867;
            }
            else if (this.ItemID == 0x3867)
            {
                ContainerFlip = 0x3866;
            }
            else
            {
                ContainerFlip = this.ItemID;
            }

            ContainerOwner = ContainerFunctions.GetOwner(sOwner);
        }
Exemplo n.º 6
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;
            }
        }
Exemplo n.º 7
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;
            }
        }
Exemplo n.º 8
0
        public static void SetupChest(Item box)
        {
            Region reg = Region.Find(box.Location, box.Map);

            int          design = 0;
            DungeonChest chest  = (DungeonChest)box;

            if (Server.Misc.Worlds.IsIceDungeon(box.Location, box.Map))
            {
                design = 1;
            }
            else if (reg.IsPartOf("the Daemon's Crag") || reg.IsPartOf("Dungeon Covetous"))
            {
                design = 2;
            }                                                                                                                // CRATES, BARRELS, BODIES
            else if (reg.IsPartOf("the Ancient Sky Ship") && box.X > 879 && box.Y > 3613)
            {
                design = 14;
            }                                                                                                             // METAL CRATES
            else if (reg.IsPartOf("the Ancient Crash Site") || reg.IsPartOf("the Ancient Sky Ship"))
            {
                design = 13;
            }                                                                                                                          // METAL CRATES AND ALIEN BODIES
            else if (reg.IsPartOf("the Temple of Osirus"))
            {
                design = 4;
            }                                                                             // BODIES
            else if (reg.IsPartOf("the Lodoria Sewers") || reg.IsPartOf("the Montor Sewers") || reg.IsPartOf("the Sewers") || reg.IsPartOf("the Kuldara Sewers"))
            {
                design = 5;
            }                                                                                                                                                                                          // CRATES, BARRELS
            else if (Server.Misc.Worlds.IsFireDungeon(box.Location, box.Map))
            {
                design = 6;
            }                                                                                                // METAL CHESTS
            else if (reg.IsPartOf("Dungeon Hythloth") || reg.IsPartOf("the Ancient Pyramid") || reg.IsPartOf("the Tomb of the Fallen Wizard"))
            {
                design = 7;
            }                                                                                                                                                                     // METAL CHESTS/BOXES, BODIES, URNS
            else if (reg.IsPartOf("the Mines of Morinia"))
            {
                if (
                    (box.X >= 5859 && box.Y >= 1384 && box.X <= 5959 && box.Y <= 1477) ||
                    (box.X >= 5589 && box.Y >= 1445 && box.X <= 5711 && box.Y <= 1473) ||
                    (box.X >= 5611 && box.Y >= 1473 && box.X <= 5715 && box.Y <= 1530) ||
                    (box.X >= 5652 && box.Y >= 1525 && box.X <= 5717 && box.Y <= 1552)
                    )
                {
                    design = 0;
                }
                else
                {
                    design = 4;                     // BODIES
                }
            }
            else if (reg.IsPartOf(typeof(NecromancerRegion)))
            {
                design = 9;                 // CASKETS
            }
            else if (Server.Misc.Worlds.IsCrypt(box.Location, box.Map))
            {
                design = 8;                 // METAL CHESTS/BOXES, CASKETS, URNS
            }
            else if (Server.Misc.Worlds.IsSeaDungeon(box.Location, box.Map) || reg.IsPartOf("Argentrock Castle"))
            {
                design = 11;                 // WOOD CHESTS, METAL CHESTS, URNS, STONE CHESTS
            }
            else if (reg.IsPartOf("the Hall of the Mountain King"))
            {
                design = 12;                 // METAL/WOOD CHESTS, LEATHER BAGS, BODIES
            }
            else if (reg.IsPartOf("the Dragon's Maw") || reg.IsPartOf("Dungeon Destard"))
            {
                design = 15;                 // METAL/WOOD CHESTS, STONE CHESTS, BODIES
            }

            int nContainerLockable = ContainerFunctions.BuildContainer(((LockableContainer)box), 0, 0, 0, design);

            int LockWatch = ContainerFunctions.LockTheContainer(chest.ContainerLevel, ((LockableContainer)box), nContainerLockable);

            // THE CONTAINER FILLS WHEN IT IS OPENED
            // THIS KEEPS THE WORLD ITEM COUNT DOWN
            // AND ALSO ALLOWS FOR CHARACTER LUCK TO
            // INFLUENCE WHAT IS INSIDE THE CONTAINER

            chest.ContainerLockable = LockWatch;
            chest.ContainerID       = box.ItemID;
            chest.ContainerGump     = ((Container)box).GumpID;
            chest.ContainerHue      = box.Hue;
            chest.ContainerName     = box.Name;
            chest.ContainerWeight   = box.Weight;
            if (box.ItemID == 0xE3F)
            {
                chest.ContainerFlip = 0xE3E;
            }
            else if (box.ItemID == 0xE3E)
            {
                chest.ContainerFlip = 0xE3F;
            }
            else if (box.ItemID == 0xE3D)
            {
                chest.ContainerFlip = 0xE3C;
            }
            else if (box.ItemID == 0xE75)
            {
                chest.ContainerFlip = 0x53D5;
            }
            else if (box.ItemID == 0x9A8)
            {
                chest.ContainerFlip = 0xE80;
            }
            else if (box.ItemID == 0x9AA)
            {
                chest.ContainerFlip = 0xE7D;
            }
            else if (box.ItemID == 0x2813)
            {
                chest.ContainerFlip = 0x2814;
            }
            else if (box.ItemID == 0x2811)
            {
                chest.ContainerFlip = 0x2812;
            }
            else if (box.ItemID == 0xe40)
            {
                chest.ContainerFlip = 0xe41;
            }
            else if (box.ItemID == 0xe42)
            {
                chest.ContainerFlip = 0xe43;
            }
            else if (box.ItemID == 0xE3C)
            {
                chest.ContainerFlip = 0xE3D;
            }
            else if (box.ItemID == 0x53D5)
            {
                chest.ContainerFlip = 0xE75;
            }
            else if (box.ItemID == 0xE80)
            {
                chest.ContainerFlip = 0x9A8;
            }
            else if (box.ItemID == 0xE7D)
            {
                chest.ContainerFlip = 0x9AA;
            }
            else if (box.ItemID == 0x2814)
            {
                chest.ContainerFlip = 0x2813;
            }
            else if (box.ItemID == 0x2812)
            {
                chest.ContainerFlip = 0x2811;
            }
            else if (box.ItemID == 0xe41)
            {
                chest.ContainerFlip = 0xe40;
            }
            else if (box.ItemID == 0xe43)
            {
                chest.ContainerFlip = 0xe42;
            }
            else if (box.ItemID == 0xE76)
            {
                chest.ContainerFlip = 0xE76;
            }
            else if (box.ItemID == 0x281D)
            {
                chest.ContainerFlip = 0x281E;
            }
            else if (box.ItemID == 0x281F)
            {
                chest.ContainerFlip = 0x2820;
            }
            else if (box.ItemID == 0x2821)
            {
                chest.ContainerFlip = 0x2822;
            }
            else if (box.ItemID == 0x2825)
            {
                chest.ContainerFlip = 0x2826;
            }
            else if (box.ItemID == 0x2823)
            {
                chest.ContainerFlip = 0x2824;
            }
            else if (box.ItemID == 0x3330)
            {
                chest.ContainerFlip = 0x3331;
            }
            else if (box.ItemID == 0x3332)
            {
                chest.ContainerFlip = 0x3333;
            }
            else if (box.ItemID == 0x3334)
            {
                chest.ContainerFlip = 0x3335;
            }
            else if (box.ItemID == 0x3336)
            {
                chest.ContainerFlip = 0x3337;
            }
            else if (box.ItemID == 0x10EA)
            {
                chest.ContainerFlip = 0x10EB;
            }
            else if (box.ItemID == 0x10EC)
            {
                chest.ContainerFlip = 0x10ED;
            }
            else if (box.ItemID == 0x281E)
            {
                chest.ContainerFlip = 0x281D;
            }
            else if (box.ItemID == 0x2820)
            {
                chest.ContainerFlip = 0x281F;
            }
            else if (box.ItemID == 0x2822)
            {
                chest.ContainerFlip = 0x2821;
            }
            else if (box.ItemID == 0x2826)
            {
                chest.ContainerFlip = 0x2825;
            }
            else if (box.ItemID == 0x2824)
            {
                chest.ContainerFlip = 0x2823;
            }
            else if (box.ItemID == 0x3331)
            {
                chest.ContainerFlip = 0x3330;
            }
            else if (box.ItemID == 0x3333)
            {
                chest.ContainerFlip = 0x3332;
            }
            else if (box.ItemID == 0x3335)
            {
                chest.ContainerFlip = 0x3334;
            }
            else if (box.ItemID == 0x3337)
            {
                chest.ContainerFlip = 0x3336;
            }
            else if (box.ItemID == 0x10EB)
            {
                chest.ContainerFlip = 0x10EA;
            }
            else if (box.ItemID == 0x10ED)
            {
                chest.ContainerFlip = 0x10EC;
            }
            else if (box.ItemID == 0x3866)
            {
                chest.ContainerFlip = 0x3867;
            }
            else if (box.ItemID == 0x3867)
            {
                chest.ContainerFlip = 0x3866;
            }
            else
            {
                chest.ContainerFlip = box.ItemID;
            }
        }
Exemplo n.º 9
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;
            }
        }