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 MagicDragonGloves()
        {
            Name = "scalemail gloves";

            string dColor = "red";

            switch (Utility.RandomMinMax(0, 5))
            {
            case 0: Resource = CraftResource.RedScales;             dColor = "red";         break;

            case 1: Resource = CraftResource.YellowScales;  dColor = "yellow";      break;

            case 2: Resource = CraftResource.BlackScales;   dColor = "black";       break;

            case 3: Resource = CraftResource.GreenScales;   dColor = "green";       break;

            case 4: Resource = CraftResource.WhiteScales;   dColor = "white";       break;

            case 5: Resource = CraftResource.BlueScales;    dColor = "blue";        break;
            }

            if (DragonFrom == null)
            {
                DragonFrom = DragonTypes.GetDragonType(dColor);
            }
            if (DragonKiller == null)
            {
                DragonKiller = "Slain by " + ContainerFunctions.GetOwner("property");
            }
        }
Exemplo n.º 3
0
        public override void Open(Mobile from)
        {
            if (this.Weight > 20)
            {
                int FillMeUpLevel = Utility.RandomList(5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1);

                if (GetPlayerInfo.LuckyPlayer(from.Luck))
                {
                    FillMeUpLevel = FillMeUpLevel + Utility.RandomMinMax(1, 2);
                }

                ContainerFunctions.FillTheContainer(FillMeUpLevel, this, from);

                this.Weight = 5.0;
                if (isBody(this.ItemID))
                {
                    LoggingFunctions.LogLoot(from, this.Name, "corpse");
                }
                else
                {
                    ContainerFunctions.FillTheContainer(FillMeUpLevel, this, from); LoggingFunctions.LogLoot(from, this.Name, "wagon");
                }
            }

            base.Open(from);

            Server.Items.CharacterDatabase.LootContainer(from, this);
        }
Exemplo n.º 4
0
        public override void Open(Mobile from)
        {
            if (this.Weight > 50)
            {
                int FillMeUpLevel = Utility.RandomList(5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1);

                if (GetPlayerInfo.LuckyPlayer(from.Luck))
                {
                    FillMeUpLevel = FillMeUpLevel + Utility.RandomMinMax(1, 2);
                }

                if (Utility.RandomBool())
                {
                    int[] list = new int[]
                    {
                        0xECA, 0xECB, 0xECC, 0xECD, 0xECE, 0xECF, 0xED0,
                        0xED1, 0xED2, 0x1B09, 0x1B0A, 0x1B0B, 0x1B0C,
                        0x1B0D, 0x1B0E, 0x1B0F, 0x1B10,
                    };

                    Item bones = new BodyPart(Utility.RandomList(list));
                    bones.Name = ContainerFunctions.GetOwner("BodySailor");
                    this.DropItem(bones);
                }

                ContainerFunctions.FillTheContainer(FillMeUpLevel, this, from);

                this.Weight = 5.0;
            }

            base.Open(from);

            Server.Items.CharacterDatabase.LootContainer(from, this);
        }
Exemplo n.º 5
0
        public CorpseSailor(int level) : base(0xe40)
        {
            if (level < 1)
            {
                level = Utility.RandomMinMax(1, 4);
            }

            string sCorpse = ContainerFunctions.GetOwner("BodySailor");

            Name    = sCorpse;
            Movable = true;
            Weight  = 11.0 + (double)level;
            GumpID  = 9;
            ItemID  = 3786 + Utility.Random(8);

            TrapType      = TrapType.None;
            TrapPower     = 0;
            TrapLevel     = 0;
            Locked        = false;
            LockLevel     = 0;
            MaxLockLevel  = 0;
            RequiredSkill = 0;

            Hue = Utility.RandomList(0xB97, 0xB98, 0xB99, 0xB9A, 0xB88);

            if (Weight > 10)
            {
                Movable = false;
            }                                                  // DON'T WANT THEM TO MOVE IT UNTIL THEY OPEN IT FIRST
        }
Exemplo n.º 6
0
        public BuriedBody(int level, string who, Mobile digger) : base(0xe40)
        {
            string sCorpse = ContainerFunctions.GetOwner("Body");

            if (who != "" && who != null)
            {
                sCorpse = "bones";
                switch (Utility.RandomMinMax(0, 3))
                {
                case 0: sCorpse = "bones"; break;

                case 1: sCorpse = "body"; break;

                case 2: sCorpse = "skeletal remains"; break;

                case 3: sCorpse = "skeletal bones"; break;
                }
                sCorpse = "The " + sCorpse + " of " + who;
            }

            Name    = sCorpse;
            Movable = true;
            Weight  = 5;
            GumpID  = 9;
            ItemID  = 3786 + Utility.Random(8);

            ContainerFunctions.FillTheContainer(level, this, digger);

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

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

            TrapType      = TrapType.None;
            TrapPower     = 0;
            TrapLevel     = 0;
            Locked        = false;
            LockLevel     = 0;
            MaxLockLevel  = 0;
            RequiredSkill = 0;
        }
Exemplo n.º 7
0
 public LandChest() : base(19290)
 {
     Name = "Corpse";
     ContainerFunctions.BuildContainer(this, 0, 0, 0, 4);
     Movable      = false;
     Weight       = 25.0;
     LiftOverride = true;
 }
Exemplo n.º 8
0
 public WaterChest() : base(0x2299)
 {
     Name = "Boat";
     ContainerFunctions.BuildContainer(this, 0, 0, 0, 10);
     Movable      = false;
     Weight       = 100.0;
     LiftOverride = true;
 }
Exemplo n.º 9
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.º 10
0
 public SummonChest(Mobile killer) : base()
 {
     Name   = "Metal Chest";
     ItemID = Utility.RandomList(0x9AB, 0xE40, 0xE41, 0xE7C);
     Hue    = Utility.RandomList(0x961, 0x962, 0x963, 0x964, 0x965, 0x966, 0x967, 0x968, 0x969, 0x96A, 0x96B, 0x96C, 0x96D, 0x96E, 0x96F, 0x970, 0x971, 0x972, 0x973, 0x974, 0x975, 0x976, 0x977, 0x978, 0x979, 0x97A, 0x97B, 0x97C, 0x97D, 0x97E, 0x4AA);
     if (killer is PlayerMobile)
     {
         ContainerFunctions.FillTheContainer(12, this, killer);
     }
     TrapType = TrapType.None;
     Locked   = false;
 }
Exemplo n.º 11
0
        public LandChest() : base(19290)
        {
            Name = "Corpse";
            ContainerFunctions.BuildContainer(this, 0, 0, 0, 4);
            Movable      = false;
            Weight       = 25.0;
            LiftOverride = true;
            GumpID       = 0x2A74;

            if (Utility.RandomMinMax(1, 4) == 1)
            {
                ItemID = Utility.RandomList(0x531C, 0x531D, 0x5534, 0x5535);
                Hue    = 0;
                Name   = "Wagon";
                GumpID = 0x2A77;
            }
        }
Exemplo n.º 12
0
        public override void Open(Mobile from)
        {
            if (this.Weight > 10)
            {
                Movable = true;
                int FillMeUpLevel = (int)(this.Weight - 11);
                this.Weight = 2.0;

                if (GetPlayerInfo.LuckyPlayer(from.Luck))
                {
                    FillMeUpLevel = FillMeUpLevel + Utility.RandomMinMax(1, 2);
                }

                ContainerFunctions.FillTheContainer(FillMeUpLevel, this, from);
            }

            base.Open(from);
        }
Exemplo n.º 13
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.º 14
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.º 15
0
        public override void Open(Mobile from)
        {
            if (this.Weight > 20)
            {
                int FillMeUpLevel = Utility.RandomList(5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1);

                if (GetPlayerInfo.LuckyPlayer(from.Luck))
                {
                    FillMeUpLevel = FillMeUpLevel + Utility.RandomMinMax(1, 2);
                }

                ContainerFunctions.FillTheContainer(FillMeUpLevel, this, from);

                this.Weight = 5.0;
            }

            base.Open(from);

            Server.Items.CharacterDatabase.LootContainer(from, this);
        }
Exemplo n.º 16
0
        public LootBag(int level) : base(0xe40)
        {
            Name = "chest";
            int nContainerLockable = ContainerFunctions.BuildContainer(this, 0, Utility.RandomList(7, 8), 0, 0);

            Weight = 11.0 + (double)level;

            TrapType      = TrapType.None;
            TrapPower     = 0;
            TrapLevel     = 0;
            Locked        = false;
            LockLevel     = 0;
            MaxLockLevel  = 0;
            RequiredSkill = 0;

            if (Weight > 10)
            {
                Movable = false;
            }                                                  // DON'T WANT THEM TO MOVE IT UNTIL THEY OPEN IT FIRST
        }
Exemplo n.º 17
0
        public override void Open(Mobile from)
        {
            if (from.Blessed)
            {
                from.SendMessage("You cannot open that while in this state.");
                return;
            }
            else if (from.Hidden && from is PlayerMobile && from.Skills[SkillName.Hiding].Value < Utility.RandomMinMax(1, 125))
            {
                from.RevealingAction();
            }

            if (CheckLocked(from))
            {
                return;
            }

            if (/* from.AccessLevel == AccessLevel.Player && */ ContainerTouched != 1 && !from.Blessed)
            {
                OpenCoffin(from, this.ItemID, ContainerLevel);

                int FillMeUpLevel = ContainerLevel;

                if (GetPlayerInfo.LuckyPlayer(from.Luck))
                {
                    FillMeUpLevel = FillMeUpLevel + Utility.RandomMinMax(1, 2);
                }

                string sWorld = Worlds.GetMyWorld(this.Map, this.Location, this.X, this.Y);
                ContainerFunctions.FillTheContainerByWorld(FillMeUpLevel, this, sWorld, from);
                ContainerFunctions.FillTheContainer(ContainerLevel, this, from);

                LoggingFunctions.LogLoot(from, this.Name, "box");
                StandardQuestFunctions.CheckTarget(from, null, this);
                ContainerTouched = 1;
                RemoveBox();
                Server.Items.CharacterDatabase.LootContainer(from, this);
            }

            base.Open(from);
        }
Exemplo n.º 18
0
        public CorpseChest(int level) : base(0xe40)
        {
            string sCorpse = ContainerFunctions.GetOwner("Body");

            Name    = sCorpse;
            Movable = true;
            Weight  = 11.0 + (double)level;
            GumpID  = 9;
            ItemID  = 3786 + Utility.Random(8);

            TrapType      = TrapType.None;
            TrapPower     = 0;
            TrapLevel     = 0;
            Locked        = false;
            LockLevel     = 0;
            MaxLockLevel  = 0;
            RequiredSkill = 0;

            if (Weight > 10)
            {
                Movable = false;
            }                                                  // DON'T WANT THEM TO MOVE IT UNTIL THEY OPEN IT FIRST
        }
Exemplo n.º 19
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.Blessed)
            {
                from.SendMessage("You cannot look through that while in this state.");
            }
            else if (!from.InRange(GetWorldLocation(), 3))
            {
                from.SendMessage("You will have to get closer to it!");
            }
            else if (m_Uses < 5)
            {
                m_Uses++;
                if (Server.Misc.GetPlayerInfo.LuckyPlayer(from.Luck) && Utility.RandomBool())
                {
                    m_Uses--;
                }

                from.PlaySound(0x2E5);
                from.SendMessage("You pull something from the treasure hoard!");

                Item item = null;

                switch (Utility.Random(17))
                {
                case 0:
                    item = Loot.RandomArty();
                    break;

                case 1:
                    item = DungeonLoot.RandomSlayer();
                    break;

                case 2:
                    item = Loot.RandomSArty();
                    break;

                case 3:
                    if (Server.Misc.GetPlayerInfo.EvilPlay(from) == true && Utility.RandomMinMax(0, 10) == 10)
                    {
                        item = DungeonLoot.RandomEvil();
                    }
                    else
                    {
                        item = Loot.RandomRelic();
                        if (item is DDRelicWeapon && Server.Misc.GetPlayerInfo.OrientalPlay(from) == true)
                        {
                            Server.Items.DDRelicWeapon.MakeOriental(item);
                        }
                        else if (item is DDRelicStatue && Server.Misc.GetPlayerInfo.OrientalPlay(from) == true)
                        {
                            Server.Items.DDRelicStatue.MakeOriental(item);
                        }
                        else if (item is DDRelicBanner && item.ItemID != 0x2886 && item.ItemID != 0x2887 && Server.Misc.GetPlayerInfo.OrientalPlay(from) == true)
                        {
                            Server.Items.DDRelicBanner.MakeOriental(item);
                        }
                    }
                    break;

                case 4:
                    item = DungeonLoot.RandomRare();
                    if (item.Stackable == true)
                    {
                        item.Amount = Utility.RandomMinMax(5, 20);
                    }
                    break;

                case 5:
                    item = DungeonLoot.RandomLoreBooks();
                    break;

                case 6:
                    if (Utility.Random(4) != 1)
                    {
                        item = Loot.RandomScroll(0, 7, SpellbookType.Regular);
                    }
                    else
                    {
                        item = Loot.RandomScroll(0, 17, SpellbookType.Necromancer);
                    }
                    break;

                case 7:
                    int luckMod = from.Luck; if (luckMod > 2000)
                    {
                        luckMod = 2000;
                    }

                    if ((Region.Find(from.Location, from.Map)).IsPartOf("the Ancient Crash Site") ||
                        (Region.Find(from.Location, from.Map)).IsPartOf("the Ancient Sky Ship"))
                    {
                        item = new DDXormite((luckMod + Utility.RandomMinMax(333, 666)));
                    }
                    else if (Worlds.GetMyWorld(from.Map, from.Location, from.X, from.Y) == "the Mines of Morinia")
                    {
                        item = new Crystals((luckMod + Utility.RandomMinMax(200, 400)));
                    }
                    else if (Worlds.GetMyWorld(from.Map, from.Location, from.X, from.Y) == "the Underworld")
                    {
                        item = new DDJewels((luckMod + Utility.RandomMinMax(500, 1000)));
                    }
                    else
                    {
                        item = new Gold((luckMod + Utility.RandomMinMax(1000, 2000)));
                    }
                    break;

                case 8:
                case 9:
                case 10:
                case 11:
                    item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(Server.LootPackEntry.IsInIslesDread(from));
                    ContainerFunctions.LootMutate(from, Server.LootPack.GetRegularLuckChance(from), item, from.Backpack, Utility.RandomMinMax(5, 10));
                    break;

                case 12:
                    item = Loot.RandomInstrument();

                    int attributeCount;
                    int min, max;
                    Server.Misc.ContainerFunctions.GetRandomAOSStats(out attributeCount, out min, out max, 6);

                    BaseInstrument instr = (BaseInstrument)item;

                    int cHue = 0;
                    int cUse = 0;

                    switch (instr.Resource)
                    {
                    case CraftResource.AshTree: cHue = MaterialInfo.GetMaterialColor("ash", "", 0); cUse = 20; break;

                    case CraftResource.CherryTree: cHue = MaterialInfo.GetMaterialColor("cherry", "", 0); cUse = 40; break;

                    case CraftResource.EbonyTree: cHue = MaterialInfo.GetMaterialColor("ebony", "", 0); cUse = 60; break;

                    case CraftResource.GoldenOakTree: cHue = MaterialInfo.GetMaterialColor("gold", "", 0); cUse = 80; break;

                    case CraftResource.HickoryTree: cHue = MaterialInfo.GetMaterialColor("hickory", "", 0); cUse = 100; break;

                    case CraftResource.MahoganyTree: cHue = MaterialInfo.GetMaterialColor("mahogany", "", 0); cUse = 120; break;

                    case CraftResource.DriftwoodTree: cHue = MaterialInfo.GetMaterialColor("driftwood", "", 0); cUse = 120; break;

                    case CraftResource.OakTree: cHue = MaterialInfo.GetMaterialColor("oak", "", 0); cUse = 140; break;

                    case CraftResource.PineTree: cHue = MaterialInfo.GetMaterialColor("pine", "", 0); cUse = 160; break;

                    case CraftResource.RosewoodTree: cHue = MaterialInfo.GetMaterialColor("rosewood", "", 0); cUse = 180; break;

                    case CraftResource.WalnutTree: cHue = MaterialInfo.GetMaterialColor("walnute", "", 0); cUse = 200; break;
                    }

                    if (!(Server.Misc.Worlds.IsOnSpaceship(from.Location, from.Map)))
                    {
                        if (cHue > 0)
                        {
                            item.Hue = cHue;
                        }
                        else if (Utility.RandomMinMax(1, 4) == 1)
                        {
                            item.Hue = Utility.RandomColor(0);
                        }
                        Server.Misc.MorphingTime.MakeOrientalItem(item, from);
                        item.Name = LootPackEntry.MagicItemName(item, from, Region.Find(from.Location, from.Map));
                    }
                    else
                    {
                        string newName = "odd alien";
                        switch (Utility.RandomMinMax(0, 6))
                        {
                        case 0: newName = "odd"; break;

                        case 1: newName = "unusual"; break;

                        case 2: newName = "bizarre"; break;

                        case 3: newName = "curious"; break;

                        case 4: newName = "peculiar"; break;

                        case 5: newName = "strange"; break;

                        case 6: newName = "weird"; break;
                        }

                        switch (Utility.RandomMinMax(1, 4))
                        {
                        case 1: item = new Pipes();             item.Name = newName + " " + Server.Misc.RandomThings.GetRandomAlienRace() + " pipes";           break;

                        case 2: item = new Pipes();             item.Name = newName + " " + Server.Misc.RandomThings.GetRandomAlienRace() + " pan flute";       break;

                        case 3: item = new Fiddle();    item.Name = newName + " " + Server.Misc.RandomThings.GetRandomAlienRace() + " violin";          break;

                        case 4: item = new Fiddle();    item.Name = newName + " " + Server.Misc.RandomThings.GetRandomAlienRace() + " fiddle";          break;
                        }

                        BaseInstrument lute = (BaseInstrument)item;
                        lute.Resource = CraftResource.None;

                        item.Hue = Utility.RandomColor(0);
                    }

                    instr.UsesRemaining = instr.UsesRemaining + cUse;

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

                    SlayerName slayer = BaseRunicTool.GetRandomSlayer();

                    instr.Quality = InstrumentQuality.Regular;
                    if (Utility.RandomMinMax(1, 4) == 1)
                    {
                        instr.Quality = InstrumentQuality.Exceptional;
                    }

                    if (Utility.RandomMinMax(1, 4) == 1)
                    {
                        instr.Slayer = slayer;
                    }

                    break;

                case 13:
                    item = Loot.RandomGem();
                    break;

                case 14:
                    item = Loot.RandomPotion();
                    break;

                case 15:
                    item = Loot.RandomWand(); Server.Misc.MaterialInfo.ColorMetal(item, 0); string wandOwner = ""; if (Utility.RandomMinMax(1, 3) == 1)
                    {
                        wandOwner = Server.LootPackEntry.MagicWandOwner() + " ";
                    }
                    item.Name = wandOwner + item.Name;
                    break;

                case 16:
                    m_Uses = 6;                             // STOP GIVING LOOT WHEN THEY GET A CONTAINER
                    int chestLuck = Server.Misc.GetPlayerInfo.LuckyPlayerArtifacts(from.Luck);
                    if (chestLuck < 3)
                    {
                        chestLuck = 3;
                    }
                    if (chestLuck > 8)
                    {
                        chestLuck = 8;
                    }
                    item        = new LootChest(Utility.RandomMinMax(3, chestLuck));
                    item.ItemID = Utility.RandomList(0x9AB, 0xE40, 0xE41, 0xE7C);
                    item.Hue    = Utility.RandomList(0x961, 0x962, 0x963, 0x964, 0x965, 0x966, 0x967, 0x968, 0x969, 0x96A, 0x96B, 0x96C, 0x96D, 0x96E, 0x96F, 0x970, 0x971, 0x972, 0x973, 0x974, 0x975, 0x976, 0x977, 0x978, 0x979, 0x97A, 0x97B, 0x97C, 0x97D, 0x97E, 0x4AA);

                    Region reg = Region.Find(from.Location, from.Map);

                    string box = "hoard chest";
                    switch (Utility.RandomMinMax(0, 7))
                    {
                    case 0: box = "hoard chest";            break;

                    case 1: box = "treasure chest";         break;

                    case 2: box = "secret chest";           break;

                    case 3: box = "fabled chest";           break;

                    case 4: box = "legendary chest";        break;

                    case 5: box = "mythical chest";         break;

                    case 6: box = "lost chest";                     break;

                    case 7: box = "stolen chest";           break;
                    }

                    if (Server.Misc.Worlds.IsOnSpaceship(from.Location, from.Map))
                    {
                        Server.Misc.ContainerFunctions.MakeSpaceCrate(((LockableContainer)item));
                        box = item.Name;
                    }

                    switch (Utility.RandomMinMax(0, 1))
                    {
                    case 0: item.Name = box + " from " + Server.Misc.Worlds.GetRegionName(from.Map, from.Location);       break;

                    case 1: item.Name = box + " of " + HoardName;   break;
                    }
                    int xTraCash = Utility.RandomMinMax(5000, 8000);

                    int zone = 0;
                    if (Worlds.IsOnSpaceship(from.Location, from.Map))
                    {
                        zone = 1;
                    }
                    else if (Worlds.GetMyWorld(from.Map, from.Location, from.X, from.Y) == "the Underworld")
                    {
                        zone = 2;
                    }

                    ContainerFunctions.AddGoldToContainer(xTraCash, (LootChest)item, zone, from);
                    int artychance = GetPlayerInfo.LuckyPlayerArtifacts(from.Luck) + 10;
                    if (Utility.RandomMinMax(0, 100) < artychance)
                    {
                        Item artys = Loot.RandomArty(); ((LootChest)item).DropItem(artys); BaseContainer.DropItemFix(artys, from, ((LootChest)item).ItemID, ((LootChest)item).GumpID);
                    }
                    break;
                }

                if (item != null)
                {
                    if (Worlds.IsOnSpaceship(from.Location, from.Map))
                    {
                        Server.Misc.MorphingTime.MakeSpaceAceItem(item, from);
                    }

                    if (item is Container)
                    {
                        item.MoveToWorld(from.Location, from.Map);
                    }
                    else
                    {
                        from.AddToBackpack(item);
                    }
                }
                else
                {
                    if (Worlds.IsOnSpaceship(from.Location, from.Map))
                    {
                        item = new DDXormite((from.Luck + Utility.RandomMinMax(333, 666)));
                    }
                    else if (Worlds.GetMyWorld(from.Map, from.Location, from.X, from.Y) == "the Underworld")
                    {
                        item = new DDJewels((from.Luck + Utility.RandomMinMax(500, 1000)));
                    }
                    else
                    {
                        item = new Gold((from.Luck + Utility.RandomMinMax(1000, 2000)));
                    }
                    if (item != null)
                    {
                        from.AddToBackpack(item);
                    }
                }
            }
            else
            {
                from.SendMessage("There is nothing else worth taking from this pile!");
                this.Delete();
            }
        }
Exemplo n.º 20
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.º 21
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;
            }
        }
Exemplo n.º 22
0
        public override void OnComponentUsed(AddonComponent ac, Mobile from)
        {
            if (from.Blessed)
            {
                from.SendMessage("You cannot drink from the pool while in this state.");
            }
            else if (!from.InRange(GetWorldLocation(), 3))
            {
                from.SendMessage("You will have to get closer to drink from the magical pool!");
            }
            else if (m_Uses > 0)
            {
                if (m_Pool == 1)                   // GAIN STATS
                {
                    if (from.StatCap > (from.RawStatTotal))
                    {
                        from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                        int water = Utility.RandomMinMax(1, 3);
                        int up    = 1;

                        int chance = Utility.RandomMinMax(1, 100);

                        if (chance >= 98)
                        {
                            up = AvailPoints(from, 5);
                        }
                        else if (chance >= 87)
                        {
                            up = AvailPoints(from, 4);
                        }
                        else if (chance >= 75)
                        {
                            up = AvailPoints(from, 3);
                        }
                        else if (chance >= 50)
                        {
                            up = AvailPoints(from, 2);
                        }

                        if (water == 1)
                        {
                            from.RawInt = from.RawInt + up; from.SendMessage("You drink from the pool and you feel much smarter!");
                        }
                        else if (water == 2)
                        {
                            from.RawStr = from.RawStr + up; from.SendMessage("You drink from the pool and you feel much stronger!");
                        }
                        else
                        {
                            from.RawDex = from.RawDex + up; from.SendMessage("You drink from the pool and you feel much quicker!");
                        }

                        this.m_Uses = 0;
                    }
                    else
                    {
                        from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                        from.SendMessage("You drink from the pool and nothing happens!");
                        this.m_Uses = this.m_Uses - 1;
                    }
                }
                else if (m_Pool == 2)                   // CURE
                {
                    from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                    if (from.Poisoned)
                    {
                        from.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
                        from.CurePoison(from);
                        from.SendMessage("You feel much better after drinking from the pool!");
                        this.m_Uses = this.m_Uses - 1;
                    }
                    else
                    {
                        from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                        from.SendMessage("You drink from the pool and nothing happens!");
                        this.m_Uses = this.m_Uses - 1;
                    }
                }
                else if (m_Pool == 3)                   // HEAL
                {
                    from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                    if (from.Hits < from.HitsMax)
                    {
                        if (from.Poisoned || MortalStrike.IsWounded(from))
                        {
                            from.SendMessage("You drink from the pool and nothing happens!");
                            this.m_Uses = this.m_Uses - 1;
                        }
                        else
                        {
                            from.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
                            int min = 50;
                            int max = 75;
                            if (m_Bonus > 8)
                            {
                                min = 125; max = 175;
                            }
                            else if (m_Bonus > 5)
                            {
                                min = 75; max = 125;
                            }
                            from.Heal(Utility.RandomMinMax(min, max));
                            from.SendMessage("You drink from the pool and your wounds magically heal!");
                            this.m_Uses = this.m_Uses - 1;
                        }
                    }
                    else
                    {
                        from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                        from.SendMessage("You drink from the pool and nothing happens!");
                        this.m_Uses = this.m_Uses - 1;
                    }
                }
                else if (m_Pool == 4)                   // WATER ELEMENTAL
                {
                    from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                    try
                    {
                        Map          map = this.Map;
                        BaseCreature bc  = (BaseCreature)Activator.CreateInstance(typeof(WaterElemental));

                        Point3D spawnLoc = this.Location;

                        for (int i = 0; i < 10; i++)
                        {
                            int x = Location.X + Utility.Random(4);
                            int y = Location.Y + Utility.Random(4);
                            int z = Map.GetAverageZ(x, y);

                            if (Map.CanSpawnMobile(new Point2D(x, y), this.Z))
                            {
                                spawnLoc = new Point3D(x, y, this.Z);
                            }
                            else if (Map.CanSpawnMobile(new Point2D(x, y), z))
                            {
                                spawnLoc = new Point3D(x, y, z);
                            }
                        }

                        Timer.DelayCall(TimeSpan.FromSeconds(1), delegate()
                        {
                            bc.Home      = Location;
                            bc.RangeHome = 5;
                            bc.FightMode = FightMode.Closest;
                            bc.MoveToWorld(spawnLoc, map);
                            bc.ForceReacquire();
                        });
                    }
                    catch
                    {
                    }
                    from.SendMessage("A water elemental emerges from the pool!");
                    this.m_Uses = this.m_Uses - 1;
                }
                else if (m_Pool == 5)                   // GOLD TO LEAD
                {
                    from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                    Container cont  = from.Backpack;
                    int       nDull = 0;

                    int m_gAmount = from.Backpack.GetAmount(typeof(Gold));
                    int m_cAmount = from.Backpack.GetAmount(typeof(DDCopper));
                    int m_sAmount = from.Backpack.GetAmount(typeof(DDSilver));
                    int m_xAmount = from.Backpack.GetAmount(typeof(DDXormite));

                    if (cont.ConsumeTotal(typeof(Gold), m_gAmount))
                    {
                        from.AddToBackpack(new LeadCoin(m_gAmount));
                        nDull = 1;
                    }
                    if (cont.ConsumeTotal(typeof(DDCopper), m_cAmount))
                    {
                        from.AddToBackpack(new LeadCoin(m_cAmount));
                        nDull = 1;
                    }
                    if (cont.ConsumeTotal(typeof(DDSilver), m_sAmount))
                    {
                        from.AddToBackpack(new LeadCoin(m_sAmount));
                        nDull = 1;
                    }
                    if (cont.ConsumeTotal(typeof(DDXormite), m_xAmount))
                    {
                        from.AddToBackpack(new LeadCoin(m_xAmount));
                        nDull = 1;
                    }
                    if (nDull > 0)
                    {
                        from.SendMessage("After drinking from the pool, you notice all of your coins has turned to lead!");
                        Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);

                        LoggingFunctions.LogGenericQuest(from, "had all of their coins turn to lead after drinking from a strange pool");
                    }
                    else
                    {
                        from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                        from.SendMessage("You drink from the pool and nothing happens!");
                    }
                    this.m_Uses = this.m_Uses - 1;
                }
                else if (m_Pool == 6)                   // EQUIPPED ITEM DISAPPEARS
                {
                    from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                    this.m_Uses = this.m_Uses - 1;
                    int  mReturn = 0;
                    Item ILost   = HiddenTrap.GetMyItem(from);
                    if (ILost != null)
                    {
                        ILost.Delete(); mReturn = 1;
                    }
                    if (mReturn != 1)
                    {
                        from.SendMessage("After drinking from the pool, you notice one of your equipped items disappears!");
                        Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);

                        LoggingFunctions.LogGenericQuest(from, "had an item vanish after drinking from a strange pool");
                    }
                }
                else if (m_Pool == 7)                   // LOSE A STAT POINT
                {
                    from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                    this.m_Uses = this.m_Uses - 1;
                    int mCurse = 1;

                    if (m_Bonus > 8)
                    {
                        if (from.RawStr > 10)
                        {
                            from.RawStr = from.RawStr - 1; from.SendMessage("You feel weaker after drinking from the pool!");
                        }
                        else
                        {
                            from.SendMessage("You drink from the pool and nothing happens!"); mCurse = 0;
                        }
                    }
                    else if (m_Bonus > 5)
                    {
                        if (from.RawDex > 10)
                        {
                            from.RawDex = from.RawDex - 1; from.SendMessage("You feel sluggish after drinking from the pool!");
                        }
                        else
                        {
                            from.SendMessage("You drink from the pool and nothing happens!"); mCurse = 0;
                        }
                    }
                    else
                    {
                        if (from.RawInt > 10)
                        {
                            from.RawInt = from.RawInt - 1; from.SendMessage("Your mind is foggy after drinking from the pool!");
                        }
                        else
                        {
                            from.SendMessage("You drink from the pool and nothing happens!"); mCurse = 0;
                        }
                    }

                    if (mCurse == 1)
                    {
                        from.FixedParticles(0x3779, 1, 15, 9905, 32, 2, EffectLayer.Head);
                        from.FixedParticles(0x37B9, 1, 14, 9502, 32, 5, (EffectLayer)255);
                    }
                }
                else if (m_Pool == 8)                   // TREASURE CHEST
                {
                    from.PlaySound(0x364);
                    from.SendMessage("You pull a mystical chest out from the pool!");
                    this.m_Uses = 0;
                    LootChest MyChest = new LootChest(6);
                    MyChest.ItemID = Utility.RandomList(0x2823, 0x2824, 0x4FE6, 0x4FE7, 0x281F, 0x2820);
                    MyChest.Hue    = Utility.RandomList(0x961, 0x962, 0x963, 0x964, 0x965, 0x966, 0x967, 0x968, 0x969, 0x96A, 0x96B, 0x96C, 0x96D, 0x96E, 0x96F, 0x970, 0x971, 0x972, 0x973, 0x974, 0x975, 0x976, 0x977, 0x978, 0x979, 0x97A, 0x97B, 0x97C, 0x97D, 0x97E, 0x4AA);
                    Region reg = Region.Find(from.Location, from.Map);
                    MyChest.Name = "mystical chest from " + Server.Misc.Worlds.GetRegionName(from.Map, from.Location);
                    int xTraCash = Utility.RandomMinMax(5000, 8000);
                    ContainerFunctions.AddGoldToContainer(xTraCash, MyChest, 0, from);
                    int artychance = GetPlayerInfo.LuckyPlayerArtifacts(from.Luck) + 10;
                    if (Utility.RandomMinMax(0, 100) < artychance)
                    {
                        Item arty = ArtifactBuilder.CreateArtifact("random");
                        MyChest.DropItem(arty); BaseContainer.DropItemFix(arty, from, MyChest.ItemID, MyChest.GumpID);
                    }
                    from.AddToBackpack(MyChest);

                    LoggingFunctions.LogGenericQuest(from, "found a chest full of treasure in some strange pool");
                }
                else if (m_Pool == 9)                   // COPPER SILVER TO GOLD
                {
                    from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                    Container cont   = from.Backpack;
                    int       nShine = 0;

                    int m_cAmount = from.Backpack.GetAmount(typeof(DDCopper));
                    int m_sAmount = from.Backpack.GetAmount(typeof(DDSilver));
                    int m_dAmount = from.Backpack.GetAmount(typeof(LeadCoin));

                    if (cont.ConsumeTotal(typeof(DDCopper), m_cAmount))
                    {
                        from.AddToBackpack(new Gold(m_cAmount));
                        nShine = 1;
                    }
                    if (cont.ConsumeTotal(typeof(DDSilver), m_sAmount))
                    {
                        from.AddToBackpack(new Gold(m_sAmount));
                        nShine = 1;
                    }
                    if (cont.ConsumeTotal(typeof(LeadCoin), m_dAmount))
                    {
                        from.AddToBackpack(new Gold(m_dAmount));
                        nShine = 1;
                    }
                    if (nShine > 0)
                    {
                        from.SendMessage("After drinking from the pool, you notice your meager coins turn to gold!");
                        Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);

                        LoggingFunctions.LogGenericQuest(from, "had all of their meager coins turn to gold after drinking from a strange pool");
                    }
                    else
                    {
                        from.SendMessage("You drink from the pool and nothing happens!");
                    }
                    this.m_Uses = 0;
                }
                else                 // POISON
                {
                    if (from.Poisoned)
                    {
                        from.SendMessage("You are too sick to drink from this pool!");
                    }
                    else
                    {
                        Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 63, 7, 9915, 0);
                        from.PlaySound(Utility.RandomList(0x30, 0x2D6));
                        if (m_Bonus > 9)
                        {
                            from.ApplyPoison(from, Poison.Deadly);
                        }
                        else if (m_Bonus > 7)
                        {
                            from.ApplyPoison(from, Poison.Greater);
                        }
                        else if (m_Bonus > 4)
                        {
                            from.ApplyPoison(from, Poison.Regular);
                        }
                        else
                        {
                            from.ApplyPoison(from, Poison.Lesser);
                        }
                        from.SendMessage("You feel more sick after drinking from the pool!");
                        this.m_Uses = this.m_Uses - 1;
                    }
                }
            }
            else
            {
                from.SendMessage("The magic from the pool seems to be drained!");
            }
        }
Exemplo n.º 23
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.º 24
0
        public static void SetupNote(ThiefNote note, Mobile m)
        {
            note.Hue    = Utility.RandomList(0x95E, 0x95D, 0x95B, 0x952, 0x957, 0x94D, 0x944, 0x945, 0x940, 0x93D, 0xB79);
            note.ItemID = Utility.RandomList(0x2DD, 0x201A);

            note.NoteOwner = m;

            note.NoteItemCategory = "";
            note.NoteItem         = QuestCharacters.QuestItems(true);
            note.NoteItemGot      = 0;
            note.NoteItemPerson   = ContainerFunctions.GetOwner("Pilfer");
            note.NoteDeliverType  = Utility.RandomMinMax(1, 2);

            if (Utility.RandomBool())               // STEAL FROM TOWN
            {
                int    rewardMod      = 1;
                string searchLocation = "the Land of Sosaria";
                switch (Utility.RandomMinMax(0, 13))
                {
                case 0:         searchLocation = "the Land of Sosaria";                 break;

                case 1:         searchLocation = "the Land of Sosaria";                 break;

                case 2:         searchLocation = "the Land of Sosaria";                 break;

                case 3:         searchLocation = "the Land of Lodoria";                 rewardMod = 2;  if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 4:         searchLocation = "the Land of Lodoria";                 rewardMod = 2;  if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 5:         searchLocation = "the Land of Lodoria";                 rewardMod = 2;  if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 6:         searchLocation = "the Serpent Island";                  rewardMod = 3;  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 7:         searchLocation = "the Serpent Island";                  rewardMod = 3;  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 8:         searchLocation = "the Serpent Island";                  rewardMod = 3;  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 9:         searchLocation = "the Isles of Dread";                  rewardMod = 4;  if (!(CharacterDatabase.GetDiscovered(m, "the Isles of Dread")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 10:        searchLocation = "the Savaged Empire";                  rewardMod = 5;  if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 11:        searchLocation = "the Savaged Empire";                  rewardMod = 5;  if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 12:        searchLocation = "the Island of Umber Veil";    rewardMod = 2;  if (!(CharacterDatabase.GetDiscovered(m, "the Island of Umber Veil")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 13:        searchLocation = "the Bottle World of Kuldar";  rewardMod = 4;  if (!(CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;
                }

                if (!(CharacterDatabase.GetDiscovered(m, "the Land of Sosaria")) && searchLocation == "the Land of Sosaria")
                {
                    if (m.Skills.Cap == 11000)
                    {
                        searchLocation = "the Savaged Empire";
                    }
                    else
                    {
                        searchLocation = "the Land of Lodoria";
                    }
                }

                if (searchLocation == "the Land of Sosaria")
                {
                    rewardMod = 1;
                }

                int       aCount  = 0;
                ArrayList targets = new ArrayList();
                foreach (Item target in World.Items.Values)
                {
                    if (target is Coffer && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                    {
                        targets.Add(target); aCount++;
                    }
                }

                aCount = Utility.RandomMinMax(1, aCount);

                int xCount = 0;
                for (int i = 0; i < targets.Count; ++i)
                {
                    xCount++;

                    if (xCount == aCount)
                    {
                        Item   finding = ( Item )targets[i];
                        Coffer coffer  = (Coffer)finding;
                        note.NoteItemArea     = coffer.CofferTown;
                        note.NoteItemCategory = coffer.CofferType;
                        note.NoteReward       = (rewardMod * 500) + (Utility.RandomMinMax(0, 10) * 50);
                        note.NoteReward       = (int)((Server.Misc.MyServerSettings.QuestRewardModifier() * 0.01) * note.NoteReward);
                    }
                }
            }
            else             // STEAL FROM DUNGEON
            {
                string searchLocation = "the Land of Sosaria";
                switch (Utility.RandomMinMax(0, 15))
                {
                case 0:         searchLocation = "the Land of Sosaria";                 break;

                case 1:         searchLocation = "the Land of Sosaria";                 break;

                case 2:         searchLocation = "the Land of Sosaria";                 break;

                case 3:         searchLocation = "the Land of Lodoria";                 if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 4:         searchLocation = "the Land of Lodoria";                 if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 5:         searchLocation = "the Land of Lodoria";                 if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 6:         searchLocation = "the Serpent Island";                  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 7:         searchLocation = "the Serpent Island";                  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 8:         searchLocation = "the Serpent Island";                  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 9:         searchLocation = "the Isles of Dread";                  if (!(CharacterDatabase.GetDiscovered(m, "the Isles of Dread")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 10:        searchLocation = "the Savaged Empire";                  if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 11:        searchLocation = "the Savaged Empire";                  if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 12:        searchLocation = "the Island of Umber Veil";    if (!(CharacterDatabase.GetDiscovered(m, "the Island of Umber Veil")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 13:        searchLocation = "the Bottle World of Kuldar";  if (!(CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 14:        searchLocation = "the Underworld";                              if (!(CharacterDatabase.GetDiscovered(m, "the Underworld")))
                    {
                        searchLocation = "the Underworld";
                    }
                    break;

                case 15:        searchLocation = "the Land of Ambrosia";                if (!(CharacterDatabase.GetDiscovered(m, "the Land of Ambrosia")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;
                }

                if (!(CharacterDatabase.GetDiscovered(m, "the Land of Sosaria")) && searchLocation == "the Land of Sosaria")
                {
                    if (m.Skills.Cap == 11000)
                    {
                        searchLocation = "the Savaged Empire";
                    }
                    else
                    {
                        searchLocation = "the Land of Lodoria";
                    }
                }

                int       aCount  = 0;
                ArrayList targets = new ArrayList();
                foreach (Item target in World.Items.Values)
                {
                    if (target is StealBase && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                    {
                        targets.Add(target); aCount++;
                    }
                }

                aCount = Utility.RandomMinMax(1, aCount);

                int xCount = 0;
                for (int i = 0; i < targets.Count; ++i)
                {
                    xCount++;

                    if (xCount == aCount)
                    {
                        Item finding = ( Item )targets[i];
                        note.NoteItemArea = Server.Misc.Worlds.GetRegionName(finding.Map, finding.Location);
                        int difficult = Server.Misc.Worlds.GetDifficultyLevel(finding.Location, finding.Map) + 2;
                        if (difficult < 2)
                        {
                            difficult = 2;
                        }
                        note.NoteReward = (difficult * 500) + (Utility.RandomMinMax(0, 10) * 50);
                    }
                }
            }

            string dropLocation = "the Land of Sosaria";

            switch (Utility.RandomMinMax(0, 13))
            {
            case 0:         dropLocation = "the Land of Sosaria";                   break;

            case 1:         dropLocation = "the Land of Sosaria";                   break;

            case 2:         dropLocation = "the Land of Sosaria";                   break;

            case 3:         dropLocation = "the Land of Lodoria";                   if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 4:         dropLocation = "the Land of Lodoria";                   if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 5:         dropLocation = "the Land of Lodoria";                   if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 6:         dropLocation = "the Serpent Island";                    if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 7:         dropLocation = "the Serpent Island";                    if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 8:         dropLocation = "the Serpent Island";                    if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 9:         dropLocation = "the Isles of Dread";                    if (!(CharacterDatabase.GetDiscovered(m, "the Isles of Dread")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 10:        dropLocation = "the Savaged Empire";                    if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 11:        dropLocation = "the Savaged Empire";                    if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 12:        dropLocation = "the Island of Umber Veil";              if (!(CharacterDatabase.GetDiscovered(m, "the Island of Umber Veil")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 13:        dropLocation = "the Bottle World of Kuldar";    if (!(CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;
            }

            if (!(CharacterDatabase.GetDiscovered(m, "the Land of Sosaria")) && dropLocation == "the Land of Sosaria")
            {
                if (m.Skills.Cap == 11000)
                {
                    dropLocation = "the Savaged Empire";
                }
                else
                {
                    dropLocation = "the Land of Lodoria";
                }
            }

            int       dCount = 0;
            ArrayList drops  = new ArrayList();

            foreach (Item target in World.Items.Values)
            {
                if (((note.NoteDeliverType == 1 && target is HollowStump) || (note.NoteDeliverType == 2 && target is HayCrate)) && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == dropLocation)
                {
                    drops.Add(target); dCount++;
                }
            }

            dCount = Utility.RandomMinMax(1, dCount);

            int sCount = 0;

            for (int i = 0; i < drops.Count; ++i)
            {
                sCount++;

                if (sCount == dCount)
                {
                    Item finding = ( Item )drops[i];

                    if (finding is HayCrate)
                    {
                        HayCrate hay = (HayCrate)finding;
                        note.NoteDeliverTo = hay.HayTown;
                    }
                    else if (finding is HollowStump)
                    {
                        HollowStump stump = (HollowStump)finding;
                        note.NoteDeliverTo = stump.StumpTown;
                    }
                }
            }

            string action = "recover";

            switch (Utility.RandomMinMax(0, 4))
            {
            case 0: action = "recover"; break;

            case 1: action = "steal"; break;

            case 2: action = "acquire"; break;

            case 3: action = "find"; break;

            case 4: action = "get"; break;
            }

            string drop = "drop";

            switch (Utility.RandomMinMax(0, 4))
            {
            case 0: drop = "leave"; break;

            case 1: drop = "place"; break;

            case 2: drop = "set"; break;

            case 3: drop = "put"; break;

            case 4: drop = "drop"; break;
            }

            string container = "crate of hay in";

            if (note.NoteDeliverType == 1)
            {
                container = "hollow stump near";
            }

            string location = note.NoteItemArea;

            if (note.NoteItemCategory != "" && note.NoteItemCategory != null)
            {
                location = "the " + note.NoteItemCategory + " in " + note.NoteItemArea;
            }

            note.NoteStory = note.NoteItemPerson + " wants you to " + action + " " + note.NoteItem + " from " + location + ".";
            note.NoteStory = note.NoteStory + " Once you have it, " + drop + " it in the " + container + " " + note.NoteDeliverTo + ".";
            note.NoteStory = note.NoteStory + " There you will also find your payment of " + note.NoteReward + " gold and instructions for your next job.";

            note.InvalidateProperties();
        }
Exemplo n.º 25
0
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public static string QuestItems(bool addQuotes)
        {
            string qte = "";

            if (addQuotes)
            {
                qte = "'";
            }

            string OwnerName = OwnerName = RandomThings.GetRandomName();

            if (OwnerName.EndsWith("s"))
            {
                OwnerName = OwnerName + "'";
            }
            else
            {
                OwnerName = OwnerName + "'s";
            }

            string[] xItem = new string[] { "Amulet", "Armor", "Axe", "Bag", "Belt", "Blade", "Bones", "Book", "Boots", "Bottle", "Bow", "Bracelet", "Candle", "Cape", "Chalice", "Cloak", "Club", "Codex", "Crossbow", "Crown", "Crystal Ball", "Cutlass", "Dagger", "Drum", "Dust", "Earrings", "Elixir", "Flute", "Gem", "Gloves", "Goblet", "Halberd", "Hat", "Helm", "Horn", "Key", "Knife", "Kryss", "Lantern", "Lexicon", "Lute", "Mace", "Mirror", "Necklace", "Parchment", "Portrait", "Potion", "Pouch", "Ring", "Robe", "Rod", "Rope", "Scabbard", "Sceptre", "Scimitar", "Scroll", "Shackles", "Shield", "Skull", "Spellbook", "Staff", "Stone", "Sword", "Tablet", "Tome", "Trident", "Wand", "Warhammer" };
            string   name  = xItem[Utility.RandomMinMax(0, (xItem.Length - 1))];

            string[] xAdj       = new string[] { "Exotic", "Mysterious", "Enchanted", "Marvelous", "Amazing", "Astonishing", "Mystical", "Astounding", "Magical", "Divine", "Excellent", "Magnificent", "Phenomenal", "Fantastic", "Incredible", "Extraordinary", "Fabulous", "Wondrous", "Glorious", "Lost", "Fabled", "Legendary", "Mythical", "Missing", "Ancestral", "Ornate", "Ultimate", "Rare", "Wonderful", "Sacred", "Almighty", "Supreme", "Mighty", "Unspeakable", "Unknown", "Forgotten", "Cursed", "Glowing", "Dark", "Evil", "Holy", "Vile", "Ethereal", "Demonic", "Burning", "Angelic", "Burning", "Frozen", "Icy", "Blackened", "Lunar", "Solar", "Bright", "Electrical", "Deathly", "Hexed", "Unholy", "Blessed", "Infernal", "Damned", "Doomed" };
            string   sAdjective = xAdj[Utility.RandomMinMax(0, (xAdj.Length - 1))];

            string eAdjective = "Might";

            switch (Utility.RandomMinMax(0, 116))
            {
            case 0: eAdjective = "the Light";                       break;

            case 1: eAdjective = "the Dark";                        break;

            case 2: eAdjective = "the Spirits";             break;

            case 3: eAdjective = "the Dead";                        break;

            case 4: eAdjective = "the Fowl";                        break;

            case 5: eAdjective = "Hades";                           break;

            case 6: eAdjective = "Fire";                            break;

            case 7: eAdjective = "Ice";                                     break;

            case 8: eAdjective = "the Void";                        break;

            case 9: eAdjective = "Venom";                           break;

            case 10: eAdjective = "the Planes";                     break;

            case 11: eAdjective = "the Demon";                      break;

            case 12: eAdjective = "the Angel";                      break;

            case 13: eAdjective = "the Devil";                      break;

            case 14: eAdjective = "Death";                          break;

            case 15: eAdjective = "Life";                           break;

            case 16: eAdjective = "Illusions";                      break;

            case 17: eAdjective = "the Other World";        break;

            case 18: eAdjective = "Negative Energy";        break;

            case 19: eAdjective = "Reality";                        break;

            case 20: eAdjective = "the Sky";                        break;

            case 21: eAdjective = "the Moon";                       break;

            case 22: eAdjective = "the Sun";                        break;

            case 23: eAdjective = "the Stars";                      break;

            case 24: eAdjective = "the Earth";                      break;

            case 25: eAdjective = "the Dungeon";            break;

            case 26: eAdjective = "the Tomb";                       break;

            case 27: eAdjective = "the Ghost";                      break;

            case 28: eAdjective = "Ultimate Evil";          break;

            case 29: eAdjective = "Pure Evil";                      break;

            case 30: eAdjective = "Demonic Power";          break;

            case 31: eAdjective = "Holy Light";             break;

            case 32: eAdjective = "the Cursed";             break;

            case 33: eAdjective = "the Damned";             break;

            case 34: eAdjective = "the Vile";                       break;

            case 35: eAdjective = "Evil";                           break;

            case 36: eAdjective = "Darkness";                       break;

            case 37: eAdjective = "Purity";                         break;

            case 38: eAdjective = "Might";                          break;

            case 39: eAdjective = "Power";                          break;

            case 40: eAdjective = "Greatness";                      break;

            case 41: eAdjective = "Magic";                          break;

            case 42: eAdjective = "Supremacy";                      break;

            case 43: eAdjective = "the Almighty";           break;

            case 44: eAdjective = "the Sacred";             break;

            case 45: eAdjective = "Magnificence";           break;

            case 46: eAdjective = "Excellence";             break;

            case 47: eAdjective = "Glory";                          break;

            case 48: eAdjective = "Mystery";                        break;

            case 49: eAdjective = "the Divine";             break;

            case 50: eAdjective = "the Forgotten";          break;

            case 51: eAdjective = "Legend";                         break;

            case 52: eAdjective = "the Lost";                       break;

            case 53: eAdjective = "the Ancients";           break;

            case 54: eAdjective = "Wonder";                         break;

            case 55: eAdjective = "the Mighty";             break;

            case 56: eAdjective = "Marvel";                         break;

            case 57: eAdjective = "Nobility";                       break;

            case 58: eAdjective = "Mysticism";                      break;

            case 59: eAdjective = "Enchantment";            break;

            case 60: eAdjective = "the Templar";            break;

            case 61: eAdjective = "the Thief";                      break;

            case 62: eAdjective = "the Illusionist";        break;

            case 63: eAdjective = "the Princess";           break;

            case 64: eAdjective = "the Invoker";            break;

            case 65: eAdjective = "the Priestess";          break;

            case 66: eAdjective = "the Conjurer";           break;

            case 67: eAdjective = "the Bandit";                     break;

            case 68: eAdjective = "the Baroness";           break;

            case 69: eAdjective = "the Wizard";                     break;

            case 70: eAdjective = "the Cleric";                     break;

            case 71: eAdjective = "the Monk";                       break;

            case 72: eAdjective = "the Minstrel";           break;

            case 73: eAdjective = "the Defender";           break;

            case 74: eAdjective = "the Cavalier";           break;

            case 75: eAdjective = "the Magician";           break;

            case 76: eAdjective = "the Witch";                      break;

            case 77: eAdjective = "the Fighter";            break;

            case 78: eAdjective = "the Seeker";                     break;

            case 79: eAdjective = "the Slayer";                     break;

            case 80: eAdjective = "the Ranger";                     break;

            case 81: eAdjective = "the Barbarian";          break;

            case 82: eAdjective = "the Explorer";           break;

            case 83: eAdjective = "the Heretic";            break;

            case 84: eAdjective = "the Gladiator";          break;

            case 85: eAdjective = "the Sage";                       break;

            case 86: eAdjective = "the Rogue";                      break;

            case 87: eAdjective = "the Paladin";            break;

            case 88: eAdjective = "the Bard";                       break;

            case 89: eAdjective = "the Diviner";            break;

            case 90: eAdjective = "the Lady";                       break;

            case 91: eAdjective = "the Outlaw";                     break;

            case 92: eAdjective = "the Prophet";            break;

            case 93: eAdjective = "the Mercenary";          break;

            case 94: eAdjective = "the Adventurer";         break;

            case 95: eAdjective = "the Enchantress";        break;

            case 96: eAdjective = "the Queen";                      break;

            case 97: eAdjective = "the Scout";                      break;

            case 98: eAdjective = "the Mystic";                     break;

            case 99: eAdjective = "the Mage";                       break;

            case 100: eAdjective = "the Traveler";          break;

            case 101: eAdjective = "the Summoner";          break;

            case 102: eAdjective = "the Warrior";           break;

            case 103: eAdjective = "the Sorcereress";       break;

            case 104: eAdjective = "the Seer";                      break;

            case 105: eAdjective = "the Hunter";            break;

            case 106: eAdjective = "the Knight";            break;

            case 107: eAdjective = "the Necromancer";       break;

            case 108: eAdjective = "the Shaman";            break;

            case 109: eAdjective = "the Prince";            break;

            case 110: eAdjective = "the Priest";            break;

            case 111: eAdjective = "the Baron";                     break;

            case 112: eAdjective = "the Warlock";           break;

            case 113: eAdjective = "the Lord";                      break;

            case 114: eAdjective = "the Enchanter";         break;

            case 115: eAdjective = "the King";                      break;

            case 116: eAdjective = "the Sorcerer";          break;
            }

            int FirstLast = 0;

            if (Utility.RandomMinMax(0, 1) == 1)
            {
                FirstLast = 1;
            }

            if (FirstLast == 0)               // FIRST COMES ADJECTIVE
            {
                switch (Utility.RandomMinMax(0, 5))
                {
                case 0: name = "the " + qte + sAdjective + " " + name + " of " + ContainerFunctions.GetOwner("property") + qte + "";  break;

                case 1: name = "the " + qte + name + " of " + ContainerFunctions.GetOwner("property") + qte + "";                                     break;

                case 2: name = "the " + qte + sAdjective + " " + name + qte + "";                                                                                                               break;

                case 3: name = "the " + qte + sAdjective + " " + name + " of " + ContainerFunctions.GetOwner("property") + qte + "";  break;

                case 4: name = "the " + qte + name + " of " + ContainerFunctions.GetOwner("property") + qte + "";                                     break;

                case 5: name = "the " + qte + sAdjective + " " + name + qte + "";                                                                                                               break;
                }
            }
            else             // FIRST COMES OWNER
            {
                switch (Utility.RandomMinMax(0, 3))
                {
                case 0: name = "" + qte + OwnerName + " " + name + " of " + eAdjective + qte + "";                                                                              break;

                case 1: name = "the " + qte + name + " of " + eAdjective + qte + "";                                                                                                    break;

                case 2: name = "" + qte + OwnerName + " " + name + qte + "";                                                                                                                    break;

                case 3: name = "" + qte + OwnerName + " " + sAdjective + " " + name + qte + "";                                                                                 break;
                }
            }

            name = name.Replace(" the the ", " the ");

            return(name);
        }
Exemplo n.º 26
0
        public static string MakeThisTask()
        {
            string task = null;

            switch (Utility.RandomMinMax(1, 10))
            {
            case 1: task = "Repair"; break;

            case 2: task = "Fix"; break;

            case 3: task = "Buff"; break;

            case 4: task = "Modify"; break;

            case 5: task = "Polish"; break;

            case 6: task = "Engrave"; break;

            case 7: task = "Adjust"; break;

            case 8: task = "Improve"; break;

            case 9: task = "Smooth the dents from"; break;

            case 10: task = "Remove the dents from"; break;
            }

            Item item = null;

            switch (Utility.RandomMinMax(1, 79))
            {
            case 1: item = new AssassinSpike(); break;

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

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

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

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

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

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

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

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

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

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

            case 12: item = new ChainCoif(); break;

            case 13: item = new ChainLegs(); break;

            case 14: item = new ChampionShield(); break;

            case 15: item = new Cleaver(); break;

            case 16: item = new CloseHelm(); break;

            case 17: item = new CloseHelm(); break;

            case 18: item = new CrescentBlade(); break;

            case 19: item = new CrestedShield(); break;

            case 20: item = new Cutlass(); break;

            case 21: item = new Dagger(); break;

            case 22: item = new DarkShield(); break;

            case 23: item = new DiamondMace(); break;

            case 24: item = new DoubleAxe(); break;

            case 25: item = new DoubleBladedStaff(); break;

            case 26: item = new DreadHelm(); break;

            case 27: item = new ElvenMachete(); break;

            case 28: item = new ElvenShield(); break;

            case 29: item = new ElvenSpellblade(); break;

            case 30: item = new ExecutionersAxe(); break;

            case 31: item = new FemalePlateChest(); break;

            case 32: item = new GuardsmanShield(); break;

            case 33: item = new Halberd(); break;

            case 34: item = new HammerPick(); break;

            case 35: item = new HeaterShield(); break;

            case 36: item = new Helmet(); break;

            case 37: item = new Helmet(); break;

            case 38: item = new JeweledShield(); break;

            case 39: item = new Katana(); break;

            case 40: item = new Kryss(); break;

            case 41: item = new Lance(); break;

            case 42: item = new LargeBattleAxe(); break;

            case 43: item = new Leafblade(); break;

            case 44: item = new Longsword(); break;

            case 45: item = new Mace(); break;

            case 46: item = new Maul(); break;

            case 47: item = new MetalKiteShield(); break;

            case 48: item = new MetalShield(); break;

            case 49: item = new NorseHelm(); break;

            case 50: item = new NorseHelm(); break;

            case 51: item = new OrnateAxe(); break;

            case 52: item = new Pickaxe(); break;

            case 53: item = new Pike(); break;

            case 54: item = new Pitchfork(); break;

            case 55: item = new PlateArms(); break;

            case 56: item = new PlateChest(); break;

            case 57: item = new PlateGloves(); break;

            case 58: item = new PlateGorget(); break;

            case 59: item = new PlateHelm(); break;

            case 60: item = new PlateHelm(); break;

            case 61: item = new PlateLegs(); break;

            case 62: item = new RadiantScimitar(); break;

            case 63: item = new RingmailArms(); break;

            case 64: item = new RingmailChest(); break;

            case 65: item = new RingmailGloves(); break;

            case 66: item = new RingmailLegs(); break;

            case 67: item = new RuneBlade(); break;

            case 68: item = new Scimitar(); break;

            case 69: item = new Scythe(); break;

            case 70: item = new ShortSpear(); break;

            case 71: item = new SkinningKnife(); break;

            case 72: item = new Spear(); break;

            case 73: item = new ThinLongsword(); break;

            case 74: item = new TwoHandedAxe(); break;

            case 75: item = new VikingSword(); break;

            case 76: item = new WarAxe(); break;

            case 77: item = new WarCleaver(); break;

            case 78: item = new WarHammer(); break;

            case 79: item = new WarMace(); break;
            }

            if (Utility.RandomMinMax(1, 5) == 1)
            {
                bool evil   = false;
                bool orient = false;

                switch (Utility.RandomMinMax(1, 8))
                {
                case 1: evil = true; break;

                case 2: orient = true; break;
                }

                string sAdjective = "unusual";
                string eAdjective = "might";

                sAdjective = Server.LootPackEntry.MagicItemAdj("start", orient, evil, item.ItemID);
                eAdjective = Server.LootPackEntry.MagicItemAdj("end", orient, evil, item.ItemID);

                string name  = "item";
                string xName = ContainerFunctions.GetOwner("property");

                if (item.Name != null && item.Name != "")
                {
                    name = item.Name.ToLower();
                }
                if (name == "item")
                {
                    name = MorphingItem.AddSpacesToSentence((item.GetType()).Name).ToLower();
                }

                switch (Utility.RandomMinMax(0, 5))
                {
                case 0: name = sAdjective + " " + name + " of " + xName;        break;

                case 1: name = name + " of " + xName;                                           break;

                case 2: name = sAdjective + " " + name;                                         break;

                case 3: name = sAdjective + " " + name + " of " + xName;        break;

                case 4: name = name + " of " + xName;                                           break;

                case 5: name = sAdjective + " " + name;                                         break;
                }

                task = task + " their " + name;
            }
            else
            {
                string[] sMetals = new string[] { "iron ", "dull copper ", "shadow iron ", "copper ", "bronze ", "gold ", "agapite ", "verite ", "valorite ", "nepturite ", "obsidian ", "steel ", "brass ", "mithril ", "xormite ", "dwarven " };
                string   sMetal  = sMetals[Utility.RandomMinMax(0, (sMetals.Length - 1))];

                string name = "item";
                if (item.Name != null && item.Name != "")
                {
                    name = item.Name.ToLower();
                }
                if (name == "item")
                {
                    name = MorphingItem.AddSpacesToSentence((item.GetType()).Name).ToLower();
                }

                task = task + " their " + sMetal + name;
            }

            item.Delete();

            return(task);
        }
Exemplo n.º 27
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.º 28
0
        public SunkenBag(int level) : base(0xe40)
        {
            if (level < 1)
            {
                level = Utility.RandomMinMax(1, 4);
            }
            Movable = true;
            Hue     = Utility.RandomList(0xB97, 0xB98, 0xB99, 0xB9A, 0xB88);

            ItemID = 0xE76;
            GumpID = 0x3D;
            switch (Utility.RandomMinMax(0, 2))
            {
            case 0: Name = "bag"; break;

            case 1: Name = "sack"; break;

            case 2: Name = "pouch"; break;
            }

            if (Utility.Random(2) == 1)
            {
                ItemID = Utility.RandomList(0xE75, 0x9B2);
                GumpID = 0x3C;
                switch (Utility.RandomMinMax(0, 2))
                {
                case 0: Name = "pack"; break;

                case 1: Name = "backpack"; break;

                case 2: Name = "satchel"; break;
                }
            }

            string sAdjective = "wet";

            switch (Utility.RandomMinMax(0, 6))
            {
            case 0: sAdjective = "soggy"; break;

            case 1: sAdjective = "wet"; break;

            case 2: sAdjective = "soaked"; break;

            case 3: sAdjective = "sopping"; break;

            case 4: sAdjective = "dripping"; break;

            case 5: sAdjective = "waterlogged"; break;

            case 6: sAdjective = "drenched"; break;
            }

            string sSack = ContainerFunctions.GetOwner("SunkenBag");

            Name = "The " + sAdjective + " " + Name + " of " + sSack;

            TrapType      = TrapType.None;
            TrapPower     = 0;
            TrapLevel     = 0;
            Locked        = false;
            LockLevel     = 0;
            MaxLockLevel  = 0;
            RequiredSkill = 0;
            Weight        = 11.0 + (double)level;

            if (Weight > 10)
            {
                Movable = false;
            }                                                  // DON'T WANT THEM TO MOVE IT UNTIL THEY OPEN IT FIRST
        }
Exemplo n.º 29
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.º 30
0
        public static string MakeThisTask()
        {
            string task = null;

            switch (Utility.RandomMinMax(1, 10))
            {
            case 1: task = "Repair"; break;

            case 2: task = "Fix"; break;

            case 3: task = "Enhance"; break;

            case 4: task = "Modify"; break;

            case 5: task = "Restring"; break;

            case 6: task = "Engrave"; break;

            case 7: task = "Adjust"; break;

            case 8: task = "Improve"; break;

            case 9: task = "Align"; break;

            case 10: task = "Balance"; break;
            }

            if (Utility.RandomMinMax(1, 5) == 1)
            {
                Item item = null;

                switch (Utility.RandomMinMax(1, 7))
                {
                case 1: item = new Bow(); break;

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

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

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

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

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

                case 7: item = new ElvenCompositeLongbow(); break;
                }

                bool evil   = false;
                bool orient = false;

                switch (Utility.RandomMinMax(1, 8))
                {
                case 1: evil = true; break;

                case 2: orient = true; break;
                }

                string sAdjective = "unusual";
                string eAdjective = "might";

                sAdjective = Server.LootPackEntry.MagicItemAdj("start", orient, evil, item.ItemID);
                eAdjective = Server.LootPackEntry.MagicItemAdj("end", orient, evil, item.ItemID);

                string name  = "item";
                string xName = ContainerFunctions.GetOwner("property");

                if (item.Name != null && item.Name != "")
                {
                    name = item.Name.ToLower();
                }
                if (name == "item")
                {
                    name = MorphingItem.AddSpacesToSentence((item.GetType()).Name).ToLower();
                }

                switch (Utility.RandomMinMax(0, 5))
                {
                case 0: name = sAdjective + " " + name + " of " + xName;        break;

                case 1: name = name + " of " + xName;                                           break;

                case 2: name = sAdjective + " " + name;                                         break;

                case 3: name = sAdjective + " " + name + " of " + xName;        break;

                case 4: name = name + " of " + xName;                                           break;

                case 5: name = sAdjective + " " + name;                                         break;
                }

                item.Delete();

                task = task + " their " + name;
            }
            else
            {
                string[] sWoods = new string[] { " ", " ash wood ", " cherry wood ", " ebony wood ", " golden oak ", " hickory ", " mahogany ", " oak ", " pine ", " ghost wood ", " rosewood ", " walnut wood ", " petrified wood ", " diftwood ", " elven wood " };
                string   sWood  = sWoods[Utility.RandomMinMax(0, (sWoods.Length - 1))];

                task = task + " their" + sWood;

                switch (Utility.RandomMinMax(1, 8))
                {
                case 1: task = task + "bow"; break;

                case 2: task = task + "crossbow"; break;

                case 3: task = task + "longbow"; break;

                case 4: task = task + "shortbow"; break;

                case 5: task = task + "repeating crossbow"; break;

                case 6: task = task + "heavy crossbow"; break;

                case 7: task = task + "composite longbow"; break;

                case 8: task = task + "composite shortbow"; break;
                }
            }

            return(task);
        }