public void AddMonster(Type type, bool champ, int count)
        {
            for (int i = 0; i < count; ++i)
            {
                object monster = Activator.CreateInstance(type);

                if (monster != null && monster is Mobile)
                {
                    Point3D      location = FindSpawnLocation();
                    BaseCreature from     = (BaseCreature)monster;

                    from.MoveToWorld(location, this.Map);
                    from.Home    = location;
                    from.Tamable = false;

                    if (m_Waypoint != null)
                    {
                        from.CurrentWayPoint = m_Waypoint;
                    }

                    m_Spawned.Add(from);

                    if (m_RewardsEnabled)
                    {
                        if (champ && m_ArtifactChance > Utility.Random(100))
                        {
                            Item item = (Item)Activator.CreateInstance(Artifacts[Utility.Random(Artifacts.Length)]);

                            from.AddItem(item);
                        }

                        if (champ && m_BlessDeedChance > Utility.Random(100))
                        {
                            ClothingBlessDeed cbd = new ClothingBlessDeed();
                            cbd.LootType = LootType.Cursed;
                            cbd.Name     = "a cursed clothing bless deed";
                            cbd.Hue      = 1157;
                            from.AddItem(cbd);
                        }
                    }
                }
            }
        }
        public void AddItemTest()
        {
            BaseCreature target     = CreateBaseCreature(); // TODO: 初始化为适当的值
            Serial       itemSerial = new Serial();         // TODO: 初始化为适当的值
            BaseItem     addItem    = null;                 // TODO: 初始化为适当的值
            bool         expected   = false;                // TODO: 初始化为适当的值
            bool         actual;

            actual = target.AddItem(itemSerial, addItem);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }
Exemple #3
0
        // THERE SHOULD ONLY BE ONE SUCH CREATURE IN EACH DUNGEON AND THEY SHOULD BE UNIQUE SOMEHOW SO ADVENTURERS CAN FIND THEM

        public static int SummonCarriers(Mobile m, BaseCreature b, int Heat)
        {
            Region reg = Region.Find(m.Location, m.Map);

            if (reg.IsPartOf("Stonegate Castle") && m is AshDragon)
            {
                m.EmoteHue = 123;
                Item ashheart = new SummonItems();
                ashheart.Name   = "heart of ash";
                ashheart.ItemID = 0xF91;
                ashheart.Hue    = 0x76C;
                b.PackItem(ashheart);
            }
            else if (reg.IsPartOf("the Vault of the Black Knight") && m is WaxSculpture && IsInLocation(b.Home.X, b.Home.Y, m.Map, 6421, 237, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "a mystical wax golem";

                Item wax = new SummonItems();
                wax.Name   = "mystical wax";
                wax.ItemID = 0x1422;
                wax.Hue    = 0x490;
                b.PackItem(wax);
            }
            else if (reg.IsPartOf("the Crypts of Dracula") && m is VampirePrince && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5741, 2788, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Title    = "the son of Dracula";
                Server.Misc.MorphingTime.VampireDressUp(m, 605);
                Heat = 4;

                Item fang = new SummonItems();
                fang.Name   = "vampire teeth";
                fang.ItemID = 0x5738;
                fang.Hue    = 0x47E;
                b.PackItem(fang);
            }
            else if (reg.IsPartOf("the Lodoria Catacombs") && m is RottingCorpse && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5502, 1806, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Title    = "of the ancient king";

                Item head = new SummonItems();
                head.Name   = "face of the ancient king";
                head.ItemID = 0x1CE1;
                head.Hue    = 0;
                b.PackItem(head);
            }
            else if (reg.IsPartOf("Dungeon Deceit") && m is LichLord && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5318, 749, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "Talosh";
                m.Title    = "the wizard of fear";
                Heat       = 4;

                Item wand = new SummonItems();
                wand.Name   = "wand of Talosh";
                wand.ItemID = 0xDF4;
                wand.Hue    = 0;
                b.PackItem(wand);
            }
            else if (reg.IsPartOf("Dungeon Despise") && m is Troll && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5503, 921, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "Urg";
                m.Title    = "the troll warlord";
                m.Hue      = 0xA50;
                Heat       = 6;

                Item urg = new SummonItems();
                urg.Name   = "head of Urg";
                urg.ItemID = 0x0919;
                urg.Hue    = 0xA50;
                b.PackItem(urg);
            }
            else if (reg.IsPartOf("Dungeon Destard") && m is ShadowWyrm && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5128, 847, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "Dramulox";
                m.Title    = "of the shadows";

                Item fire = new SummonItems();
                fire.Name   = "flame of Dramulox";
                fire.ItemID = 0xDE3;
                fire.Hue    = 0;
                b.PackItem(fire);
            }
            else if (reg.IsPartOf("the City of Embers") && m is LichLord && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5667, 1314, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "Vorgol";
                m.Title    = "the baron of flame";
                m.Hue      = 0x9C6;
                Heat       = 4;

                Item crown = new SummonItems();
                crown.Name   = "crown of Vorgol";
                crown.ItemID = 0x3166;
                crown.Hue    = 0x9C6;
                b.PackItem(crown);
            }
            else if (reg.IsPartOf("Dungeon Hythloth") && m is Daemon && IsInLocation(b.Home.X, b.Home.Y, m.Map, 6111, 84, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "Saramon";
                m.Title    = "the slayer of souls";
                m.Hue      = 0x9C6;
                Heat       = 4;

                Item claw = new SummonItems();
                claw.Name   = "claw of Saramon";
                claw.ItemID = 0x5721;
                claw.Hue    = 0x9C6;
                b.PackItem(claw);
            }
            else if (reg.IsPartOf("the Ice Fiend Lair") && m is IceFiend && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5672, 326, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Title    = "of the frozen hells";
                m.Body     = 88;
                Heat       = 4;

                Item horn = new SummonItems();
                horn.Name   = "horn of the frozen hells";
                horn.ItemID = 0x2DB7;
                horn.Hue    = 0x480;
                b.PackItem(horn);
            }
            else if (reg.IsPartOf("Dungeon Shame") && m is WaterElemental && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5596, 219, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "a salt water elemental";
                m.Hue      = 0x48D;
                Heat       = 4;

                Item salt = new SummonItems();
                salt.Name   = "elemental salt";
                salt.ItemID = 0x423A;
                salt.Hue    = 0x47E;
                b.PackItem(salt);
            }
            else if (reg.IsPartOf("Terathan Keep") && m is BlackDragon && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5307, 1611, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = NameList.RandomName("dragon");
                m.Title    = "the dragon of blight";
                m.Hue      = 0x9C4;
                Heat       = 4;

                Item plague = new SummonItems();
                plague.Name   = "eye of plagues";
                plague.ItemID = 0x3199;
                plague.Hue    = 0x9C9;
                b.PackItem(plague);
            }
            else if (reg.IsPartOf("the Halls of Undermountain") && m is WeedElemental && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5332, 478, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "a tangle weed";

                Item weed = new SummonItems();
                weed.Name   = "hair of the earth";
                weed.ItemID = 0xCB0;
                b.PackItem(weed);
            }
            else if (reg.IsPartOf("the Volcanic Cave") && m is FireGiant && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5994, 3414, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "Turlox";
                m.Title    = "the warlord of the sun";
                m.Hue      = 0x54F;

                Item skullsun = new SummonItems();
                skullsun.Name   = "skull of Turlox";
                skullsun.ItemID = 0x2203;
                skullsun.Hue    = 0x54F;
                b.PackItem(skullsun);
            }
            else if (reg.IsPartOf("the Mausoleum") && m is AncientLich && IsInLocation(b.Home.X, b.Home.Y, m.Map, 3827, 3299, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Name     = "Mezlo";
                m.Title    = "of the green death";
                m.Hue      = 0x58B;

                Item mezlo = new SummonItems();
                mezlo.Name   = "tattered robe of Mezlo";
                mezlo.ItemID = 0x3174;
                mezlo.Hue    = 0x54F;
                b.PackItem(mezlo);
            }
            else if (reg.IsPartOf("the Tower of Brass") && m is ForestDemon && IsInLocation(b.Home.X, b.Home.Y, m.Map, 6519, 3572, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Title    = "of the dark forest";
                m.Hue      = 0xA60;

                Item glood = new SummonItems();
                glood.Name   = "blood of the forest";
                glood.ItemID = 0x122A;
                glood.Hue    = 0xA60;
                b.PackItem(glood);
            }
            else if (reg.IsPartOf("Vordo's Dungeon") && m is MagmaElemental && IsInLocation(b.Home.X, b.Home.Y, m.Map, 6470, 466, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Name     = "a wild inferno";
                m.Hue      = 0x550;

                Item inferno = new SummonItems();
                inferno.Name   = "cinders of life";
                inferno.ItemID = 0x223A;
                inferno.Hue    = 0x550;
                b.PackItem(inferno);
            }
            else if (reg.IsPartOf("the Dragon's Maw") && m is CrystalDragon && IsInLocation(b.Home.X, b.Home.Y, m.Map, 4498, 3924, Map.Trammel))
            {
                m.EmoteHue = 123;
                Item crysts = new SummonItems();
                crysts.Name   = "crystal scales";
                crysts.ItemID = 0x2248;
                crysts.Hue    = 0xA0B;
                b.PackItem(crysts);
            }
            else if (reg.IsPartOf("the Ancient Pyramid") && m is Lich && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5325, 957, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Title    = "the pharaoh of suffering";
                m.Hue      = 0x9C7;

                Item suffer = new SummonItems();
                suffer.Name   = "chest of suffering";
                suffer.ItemID = 0x1B17;
                suffer.Hue    = 0x9C7;
                b.PackItem(suffer);
            }
            else if (reg.IsPartOf("Dungeon Exodus") && m is Daemon && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5944, 628, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Title    = "the torturer from below";
                m.Hue      = 0x9D3;

                Item whip = new SummonItems();
                whip.Name   = "whip from below";
                whip.ItemID = 0x166E;
                whip.Hue    = 0;
                b.PackItem(whip);
            }
            else if (reg.IsPartOf("the Caverns of Poseidon") && m is WaterNaga && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5902, 1769, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Name     = NameList.RandomName("evil witch");
                m.Title    = "the naga from the deep";
                m.Hue      = 0xA09;

                Item scaly = new SummonItems();
                scaly.Name   = "scale of the sea";
                scaly.ItemID = 0x26B5;
                scaly.Hue    = 0xA09;
                b.PackItem(scaly);
            }
            else if (reg.IsPartOf("Dungeon Clues") && m is Titan && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5971, 2232, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Name     = "Marxas";
                m.Title    = "the titan of war";
                Heat       = 3;

                Item warb = new SummonItems();
                warb.Name   = "braclet of war";
                warb.ItemID = 0x4212;
                warb.Hue    = 0x9D3;
                b.PackItem(warb);
            }
            else if (reg.IsPartOf("Dardin's Pit") && m is WalkingReaper && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5616, 400, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Name     = NameList.RandomName("trees");
                m.Title    = "the ancient reaper";
                Heat       = 4;

                Item stump = new SummonItems();
                stump.Name   = "stump of the ancients";
                stump.ItemID = 0xE57;
                stump.Hue    = m.Hue;
                b.PackItem(stump);
            }
            else if (reg.IsPartOf("Dungeon Doom") && m is BloodElemental && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5325, 331, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Name     = "a dark blood elemental";
                m.Hue      = 0x5B5;

                Item dlood = new SummonItems();
                dlood.Name   = "dark blood";
                dlood.ItemID = 0x122D;
                dlood.Hue    = 0x5B5;
                b.PackItem(dlood);
            }
            else if (reg.IsPartOf("the Fires of Hell") && m is Drake && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5712, 1280, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Name     = "a firescale drake";
                m.Hue      = 0x54C;

                Item tooth = new SummonItems();
                tooth.Name   = "firescale tooth";
                tooth.ItemID = 0x5747;
                tooth.Hue    = 0x54C;
                b.PackItem(tooth);
            }
            else if (reg.IsPartOf("the Mines of Morinia") && m is AntaurKing)
            {
                m.EmoteHue = 123;

                Item ichor = new SummonItems();
                ichor.Name   = "ichor of Xthizx";
                ichor.ItemID = 0x2827;
                ichor.Hue    = 0xB96;
                b.PackItem(ichor);
            }
            else if (reg.IsPartOf("the Perinian Depths") && m is VampireLord && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5918, 419, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Title    = "the vampire queen";
                Server.Misc.MorphingTime.VampireDressUp(m, 606);
                Heat = 3;

                Item vamph = new SummonItems();
                vamph.Name   = "heart of a vampire queen";
                vamph.ItemID = 0x24B;
                vamph.Hue    = 0;
                b.PackItem(vamph);
            }
            else if (reg.IsPartOf("the Dungeon of Time Awaits") && m is Daemon && IsInLocation(b.Home.X, b.Home.Y, m.Map, 5736, 793, Map.Trammel))
            {
                m.EmoteHue = 123;
                m.Title    = "the daemon of ages";
                m.Hue      = 0xA65;
                Heat       = 2;

                Item hour = new SummonItems();
                hour.Name   = "hourglass of ages";
                hour.ItemID = 0x1810;
                hour.Hue    = 0xB90;
                b.PackItem(hour);
            }
            else if (reg.IsPartOf("the Ancient Prison") && m is DeadWizard && IsInLocation(b.Home.X, b.Home.Y, m.Map, 1928, 569, Map.Malas))
            {
                m.Body     = 0x190;
                m.EmoteHue = 123;
                m.Name     = "Saramak";
                m.Title    = "the forgotten prisoner";

                Item hour = new SummonItems();
                hour.Name   = "shackles of Saramak";
                hour.ItemID = 0x1262;
                hour.Hue    = 0;
                b.PackItem(hour);
            }
            else if (reg.IsPartOf("the Cave of Fire") && m is Dragon && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2052, 911, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Name     = NameList.RandomName("dragon");
                m.Title    = "the dragon of embers";
                m.Hue      = 0x501;
                Heat       = 4;

                Item emberh = new SummonItems();
                emberh.Name   = "mouth of embers";
                emberh.ItemID = 0x2DB4;
                emberh.Hue    = 0x501;
                b.PackItem(emberh);
            }
            else if (reg.IsPartOf("the Cave of Souls") && m is RottingCorpse && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2466, 153, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Name     = "a zombie";
                m.Title    = "of the shadegloom thief";

                Item shadeg = new SummonItems();
                shadeg.Name   = "cowl of shadegloom";
                shadeg.ItemID = 0x278F;
                shadeg.Hue    = 0;
                b.PackItem(shadeg);
            }
            else if (reg.IsPartOf("Dungeon Ankh") && m is DeadWizard && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2044, 174, Map.Malas))
            {
                m.Body     = 0x191;
                m.EmoteHue = 123;
                m.Name     = NameList.RandomName("female");
                m.Title    = "the dutchess of virtue";

                Item dress = new SummonItems();
                dress.Name   = "wedding dress of virtue";
                dress.ItemID = 0x267F;
                dress.Hue    = 0;
                b.PackItem(dress);
            }
            else if (reg.IsPartOf("Dungeon Bane") && m is ToxicElemental && IsInLocation(b.Home.X, b.Home.Y, m.Map, 1973, 224, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Name     = "a swamp elemental";
                m.Hue      = 0xA04;

                Item lilly = new SummonItems();
                lilly.Name   = "lilly pad of the bog";
                lilly.ItemID = 0xDBC;
                lilly.Hue    = 0;
                b.PackItem(lilly);
            }
            else if (reg.IsPartOf("Dungeon Hate") && m is VampireLord && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2229, 389, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Title    = "the immortal one";
                Server.Misc.MorphingTime.VampireDressUp(m, 605);
                Heat = 4;

                Item boni = new SummonItems();
                boni.Name   = "immortal bones";
                boni.ItemID = 0x1B10;
                boni.Hue    = 0x66C;
                b.PackItem(boni);
            }
            else if (reg.IsPartOf("Dungeon Scorn") && m is OphidianArchmage && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2237, 812, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Name     = "Sylpha";
                m.Title    = "the princess of scorn";

                Item stafs = new SummonItems();
                stafs.Name   = "staff of scorn";
                stafs.ItemID = 0x2556;
                stafs.Hue    = 0;
                b.PackItem(stafs);
            }
            else if (reg.IsPartOf("Dungeon Torment") && m is Succubus && IsInLocation(b.Home.X, b.Home.Y, m.Map, 1977, 839, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Name     = "Hertana";
                m.Title    = "of vile allurement";

                Item brain = new SummonItems();
                brain.Name   = "mind of allurement";
                brain.ItemID = 0x1CF0;
                brain.Hue    = 0;
                b.PackItem(brain);
            }
            else if (reg.IsPartOf("Dungeon Vile") && m is EvilMage && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2336, 495, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Title    = "the wanderer of mystics";
                Heat       = 4;

                Item masky = new WornHumanDeco();
                masky.Name   = "mask of the ghost";
                masky.ItemID = 0x154B;
                masky.Hue    = 0x47E;
                masky.Layer  = Layer.Ring;
                b.AddItem(masky);

                Item mask = new SummonItems();
                mask.Name   = "mask of the ghost";
                mask.ItemID = 0x154B;
                mask.Hue    = 0x47E;
                b.PackItem(mask);
            }
            else if (reg.IsPartOf("Dungeon Wicked") && m is PoisonElemental && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2180, 208, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Name     = "an insect swarm";
                m.Hue      = 0xA04;

                Item flies = new SummonItems();
                flies.Name   = "dead venom flies";
                flies.ItemID = 0xF34;
                flies.Hue    = 0xA04;
                b.PackItem(flies);
            }
            else if (reg.IsPartOf("Dungeon Wrath") && m is Reaper && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2334, 861, Map.Malas))                   // SWAMPY AREA
            {
                m.EmoteHue = 123;
                m.Name     = "a reaping willow";
                Heat       = 4;

                Item branch = new SummonItems();
                branch.Name   = "branch of the reaper";
                branch.ItemID = 0x3AD9;
                branch.Hue    = m.Hue;
                b.PackItem(branch);
            }
            else if (reg.IsPartOf("the Flooded Temple") && m is Kraken && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2447, 872, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Name     = "a deep sea squid";
                m.Hue      = 0xA1F;

                Item ink = new SummonItems();
                ink.Name   = "ink of the deep";
                ink.ItemID = 0x1D96;
                ink.Hue    = 0x969;
                b.PackItem(ink);
            }
            else if (reg.IsPartOf("the Gargoyle Crypts") && m is SpectralGargoyle && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2047, 548, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Name     = "a spirit";
                m.Title    = "of a gargoyle priest";

                Item ink = new SummonItems();
                ink.Name   = "amulet of the stygian abyss";
                ink.ItemID = 0x4210;
                ink.Hue    = 0;
                b.PackItem(ink);
            }
            else if (reg.IsPartOf("the Serpent Sanctum") && m is OphidianKnight && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2456, 498, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Name     = "Siluphtis";
                m.Title    = "the guardian of the sanctum";

                Item snakes = new SummonItems();
                snakes.Name   = "skin of the guardian";
                snakes.ItemID = 0x20FE;
                snakes.Hue    = 0x842;
                b.PackItem(snakes);
            }
            else if (reg.IsPartOf("the Tomb of the Fallen Wizard") && m is AncientLich && IsInLocation(b.Home.X, b.Home.Y, m.Map, 2334, 32, Map.Malas))
            {
                m.EmoteHue = 123;
                m.Title    = "the fallen wizard";

                Item orbo = new SummonItems();
                orbo.Name   = "orb of the fallen wizard";
                orbo.ItemID = 0xE2E;
                orbo.Hue    = 0x4A7;
                b.PackItem(orbo);
            }
            else if (reg.IsPartOf("the Blood Temple") && m is BloodElemental && IsInLocation(b.Home.X, b.Home.Y, m.Map, 701, 2537, Map.TerMur))
            {
                m.EmoteHue    = 123;
                m.Name        = "a bloody mist";
                m.Body        = 13;
                m.Hue         = 0x5B5;
                m.BaseSoundID = 655;

                Item bcry = new SummonItems();
                bcry.Name   = "bleeding crystal";
                bcry.ItemID = 0x1F1C;
                bcry.Hue    = 0x48E;
                b.PackItem(bcry);
            }
            else if (reg.IsPartOf("the Dungeon of the Mad Archmage") && m is Archmage && IsInLocation(b.Home.X, b.Home.Y, m.Map, 762, 1924, Map.TerMur))
            {
                m.EmoteHue = 123;
                Item jade = new SummonItems();
                jade.Name   = "jade idol of Nesfatiti";
                jade.ItemID = 0x1224;
                jade.Hue    = 0xB93;
                b.PackItem(jade);
            }
            else if (reg.IsPartOf("the Tombs") && m is AncientLich && IsInLocation(b.Home.X, b.Home.Y, m.Map, 114, 2687, Map.TerMur))
            {
                m.EmoteHue = 123;
                m.Title    = "the seeker of the words";

                Item scrab = new SummonItems();
                scrab.Name   = "scroll of Abraxus";
                scrab.ItemID = 0x227B;
                scrab.Hue    = 0;
                b.PackItem(scrab);
            }
            else if (reg.IsPartOf("the Dungeon of the Lich King") && m is Demon && IsInLocation(b.Home.X, b.Home.Y, m.Map, 342, 2179, Map.TerMur))
            {
                m.EmoteHue    = 123;
                m.Body        = 9;
                m.Name        = "Permaxumus";
                m.Title       = "the ruler of the dark circle";
                m.Hue         = 0xA3A;
                m.BaseSoundID = 0x47D;

                Heat = 4;

                Item circb = new SummonItems();
                circb.Name   = "sphere of the dark circle";
                circb.ItemID = 0x573E;
                circb.Hue    = 0;
                b.PackItem(circb);
            }
            else if (reg.IsPartOf("the Forgotten Halls") && m is LichKing && IsInLocation(b.Home.X, b.Home.Y, m.Map, 56, 3245, Map.TerMur))                   // Shadow Lich already mutated
            {
                m.EmoteHue = 123;
                m.Name     = "Ulmarek";

                Heat = 0;

                Item urn = new SummonItems();
                urn.Name   = "urn of Ulmarek's ashes";
                urn.ItemID = 0x42B3;
                urn.Hue    = 0xB92;
                b.PackItem(urn);
            }
            else if (reg.IsPartOf("the Ice Queen Fortress") && m is IceColossus && IsInLocation(b.Home.X, b.Home.Y, m.Map, 266, 2801, Map.TerMur))
            {
                m.EmoteHue = 123;
                m.Name     = "a greater ice elemental";

                Item frost = new SummonItems();
                frost.Name   = "crystal of everfrost";
                frost.ItemID = 0x1F19;
                frost.Hue    = 0x480;
                b.PackItem(frost);
            }
            else if (reg.IsPartOf("the Halls of Ogrimar") && m is OrkMage && IsInLocation(b.Home.X, b.Home.Y, m.Map, 950, 2335, Map.TerMur))
            {
                m.EmoteHue = 123;
                m.Title    = "of the war wizards";

                Item tablet = new SummonItems();
                tablet.Name   = "tablet of the wizard wars";
                tablet.ItemID = 0xED8;
                tablet.Hue    = 0xB8B;
                b.PackItem(tablet);
            }
            else if (reg.IsPartOf("Dungeon Rock") && m is GargoyleOnyx && IsInLocation(b.Home.X, b.Home.Y, m.Map, 645, 2193, Map.TerMur))                   // Obsidian Gargoyle?
            {
                m.EmoteHue = 123;
                m.Name     = NameList.RandomName("gargoyle name");
                m.Title    = "the gargoyle of night";

                Item garst = new SummonItems();
                garst.Name   = "stone of the night gargoyle";
                garst.ItemID = 0x364E;
                garst.Hue    = 0;
                b.PackItem(garst);
            }
            else if (reg.IsPartOf("the Scurvy Reef") && m is DeepSeaDevil && IsInLocation(b.Home.X, b.Home.Y, m.Map, 369, 3866, Map.TerMur))
            {
                m.EmoteHue = 123;
                m.Title    = "the defiler of the sea";

                Item pearl = new SummonItems();
                pearl.Name   = "pearl of Neptune";
                pearl.ItemID = 0x3199;
                pearl.Hue    = 0xA37;
                b.PackItem(pearl);
            }
            else if (reg.IsPartOf("the Undersea Castle") && m is SeaDragon && IsInLocation(b.Home.X, b.Home.Y, m.Map, 704, 3789, Map.TerMur))
            {
                m.EmoteHue = 123;
                m.Name     = NameList.RandomName("dragon");
                m.Title    = "the coral dragon";
                m.Hue      = 0xA07;

                Item brandy = new SummonItems();
                brandy.Name   = "Black Beard's brandy";
                brandy.ItemID = 0x4686;
                brandy.Hue    = 0;
                b.PackItem(brandy);
            }
            else if (reg.IsPartOf("the Tomb of Kazibal") && m is Daemon && IsInLocation(b.Home.X, b.Home.Y, m.Map, 438, 3298, Map.TerMur))                   //  already mutated sand demon
            {
                m.EmoteHue = 123;
                m.Name     = "Tutamak";
                m.Hue      = 0x83B;
                switch (Utility.Random(5))
                {
                case 0: m.Title = "the sand devil"; break;

                case 1: m.Title = "the desert daemon"; break;

                case 2: m.Title = "the fiend of the wastes"; break;

                case 3: m.Title = "the wasteland demon"; break;

                case 4: m.Title = "the devil of the barrens"; break;
                }

                Item lamp = new SummonItems();
                lamp.Name   = "lamp of the desert";
                lamp.ItemID = 0xA16;
                lamp.Hue    = 0x5B7;
                b.PackItem(lamp);
            }
            else if (reg.IsPartOf("the Azure Castle") && m is Ifreet)
            {
                m.EmoteHue = 123;
                m.Name     = NameList.RandomName("drakkul");
                m.Title    = "the soul of azure";
                m.Hue      = 0x538;

                Item azure = new SummonItems();
                azure.Name   = "azure dust";
                azure.ItemID = 0x2DB5;
                azure.Hue    = 0x532;
                b.PackItem(azure);
            }
            else if (reg.IsPartOf("the Catacombs of Azerok") && m is DeadWizard)
            {
                m.EmoteHue = 123;
                m.Name     = "Azerok";
                m.Body     = 0x190;
                m.Title    = "of the Deathly Veil";

                Item skullazerok = new SummonItems();
                skullazerok.Name   = "skull of Azerok";
                skullazerok.ItemID = 0x1AE0;
                skullazerok.Hue    = 0;
                b.PackItem(skullazerok);
            }
            else if (reg.IsPartOf("Dungeon Covetous") && m is HarpyHen)
            {
                m.EmoteHue = 123;

                Item harpyegg = new SummonItems();
                harpyegg.Name   = "egg of the harpy hen";
                harpyegg.ItemID = 0x41BF;
                harpyegg.Hue    = 0;
                b.PackItem(harpyegg);
            }
            else if (reg.IsPartOf("the Glacial Scar") && m is FrostGiant && IsInLocation(b.Home.X, b.Home.Y, m.Map, 1949, 1512, Map.Ilshenar))
            {
                m.EmoteHue = 123;
                m.Name     = "Murgor";
                m.Title    = "the frost giant chief";
                m.Body     = 325;

                Item bone = new SummonItems();
                bone.Name   = "bone of the frost giant";
                bone.ItemID = 0x2559;
                bone.Hue    = 0x482;
                b.PackItem(bone);
            }
            else if (reg.IsPartOf("the Temple of Osirus") && m is Drake && IsInLocation(b.Home.X, b.Home.Y, m.Map, 6143, 3607, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "a silver drake";
                m.Hue      = 0x430;

                Item bone = new SummonItems();
                bone.Name   = "mind of silver";
                bone.ItemID = 0x1CF0;
                bone.Hue    = 0x9C4;
                b.PackItem(bone);
            }
            else if (reg.IsPartOf("the Sanctum of Saltmarsh") && m is Sleestax && IsInLocation(b.Home.X, b.Home.Y, m.Map, 6132, 1337, Map.Felucca))
            {
                m.EmoteHue = 123;
                m.Name     = "Scarthis";
                m.Title    = "the kahn of saltmarsh";
                m.Hue      = 0xB51;

                Item scale = new SummonItems();
                scale.Name   = "scale of Scarthis";
                scale.ItemID = 0x26B2;
                scale.Hue    = 0xB53;
                b.PackItem(scale);
            }

            return(Heat);
        }
		private void EquipItems( BaseCreature bc )
		{
			bc.AddItem( new RingmailChest() );
			bc.AddItem( new RingmailLegs() );
			bc.AddItem( new RingmailArms() );
			bc.AddItem( new RingmailGloves() );
			bc.AddItem( new PlateGorget() );
			bc.AddItem( new LeatherCap() );

			switch( Utility.Random( 4 ) )
			{
				case 0: bc.AddItem( new Halberd() ); break;
				case 1: bc.AddItem( new Longsword() ); break;
				case 2: bc.AddItem( new VikingSword() ); break;
				case 3: bc.AddItem( new Broadsword() ); break;
			}

			if( bc.FindItemOnLayer( Layer.TwoHanded ) == null )
			{
				switch( Utility.Random( 4 ) )
				{
					case 0: bc.AddItem( new BronzeShield() ); break;
					case 1: bc.AddItem( new MetalKiteShield() ); break;
					case 2: bc.AddItem( new HeaterShield() ); break;
					case 3: bc.AddItem( new WoodenKiteShield() ); break;
				}
			}

			switch( Utility.Random( 3 ) )
			{
				case 0:
				case 1: bc.AddItem( new Boots() ); break;
				case 2: bc.AddItem( new ThighBoots() ); break;
			}

			if( Utility.RandomBool() )
				bc.AddItem( new Cloak( Utility.RandomDyedHue() ) );
		}
Exemple #5
0
        public void Generate( BaseCreature npc )
        {
            if ( npc == null || npc.Summoned )
                return;

            for ( int i = 0; i < m_Entries.Length; ++i )
            {
                LootPackEntry entry = m_Entries[i];
                if ( !( entry.Chance > Utility.Random( 10000 ) ) )
                    continue;

                Item item = entry.Construct();
                if ( item != null )
                {
                    if ( npc.Backpack == null )
                        npc.AddItem( new Backpack() );

                    if ( !item.Stackable || !npc.Backpack.TryDropItem( npc, item, false ) )
                        npc.Backpack.DropItem( item );
                }
            }
        }
Exemple #6
0
        public Mobile SpawnGuardian(string name, int level, double PlayersHidingSkill)
        {
            Type         type = ScriptCompiler.FindTypeByName(name);
            BaseCreature c    = null;

            if (type != null)
            {
                try
                {
                    object o = Activator.CreateInstance(type);

                    if (o is BaseCreature)
                    {
                        c = o as BaseCreature;

                        // decay time of a chest once it's opened
                        c.Lifespan = TimeSpan.FromMinutes(15);

                        // reset the alignment
                        c.IOBAlignment = IOBAlignment.None;

                        // Can chase you and can reveal you if you be hiding!
                        c.CanRun    = true;
                        c.CanReveal = true;

                        // stats based on chest level
                        double factor = 1.0;
                        if (level == 3)
                        {
                            factor = .3;
                        }
                        if (level == 4)
                        {
                            factor = .5;
                        }
                        if (level == 5)
                        {
                            factor = 1.0;
                        }

                        c.SetMana((int)(c.ManaMax * factor));
                        c.SetStr((int)(c.RawStr * factor));
                        c.SetDex((int)(c.RawDex * factor));
                        c.SetInt((int)(c.RawInt * factor));
                        c.SetHits((int)(((c.HitsMax / 100.0) * 60.0) * factor));

                        // these guys can reveal - set the Detect Hidden to match the players hiding so that they have a fighting chance
                        c.SetSkill(SkillName.DetectHidden, PlayersHidingSkill * factor);

                        // nerf their magery so that they
                        // Sixth	20	52.1	100
                        c.SetSkill(SkillName.Magery, 52.1 * factor);

                        // only attack aggressors
                        c.FightMode = FightMode.Aggressor;

                        // maybe 6 tiles? Keep him near by
                        c.RangeHome = 6;

                        // the chest is the home of the guardian
                        c.Home = this.Location;

                        // we are not bardable
                        c.BardImmune = true;

                        // make them a guardian
                        c.AddItem(new Property(Use.IsGuardian, null));

                        // give them s***e speak if they are calmed
                        c.AddItem(new Quip("Arr, but that be a pretty tune .. can you play me another?"));
                        c.AddItem(new Quip("Thar be no time for singing and dancin' now matey."));
                        c.AddItem(new Quip("That be a downright lovely tune ye be playing thar."));
                        c.AddItem(new Quip("Har! Me thinks a cutlass would be a better choice!"));

                        // show them
                        Point3D loc = (GetSpawnPosition(c.RangeHome));
                        c.MoveToWorld(loc, this.Map);

                        // teleport
                        Effects.SendLocationParticles(EffectItem.Create(c.Location, c.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
                        Effects.PlaySound(c.Location, c.Map, 0x1FE);

                        Timer.DelayCall(TimeSpan.FromSeconds(1.5), new TimerStateCallback(ShiteTalk_Callback), c);
                    }
                }
                catch (Exception exc)
                {
                    LogHelper.LogException(exc);
                    System.Console.WriteLine("Exception caught in Spawner.Refresh: " + exc.Message);
                    System.Console.WriteLine(exc.StackTrace);
                }
            }

            return(c as Mobile);
        }
        public static void DropArmor(BaseCreature bc)
        {
            HorseArmor armor = new HorseArmor();

            armor.Hue           = 0;
            armor.ArmorMaterial = null;
            if (bc.Hue == MaterialInfo.GetMaterialColor("dull copper", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("dull copper", "classic", 0);       armor.ArmorMaterial = "Dull Copper";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("shadow iron", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("shadow iron", "classic", 0);       armor.ArmorMaterial = "Shadow Iron";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("copper", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("copper", "classic", 0);            armor.ArmorMaterial = "Copper";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("bronze", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("bronze", "classic", 0);            armor.ArmorMaterial = "Bronze";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("gold", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("gold", "classic", 0);                      armor.ArmorMaterial = "Gold";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("agapite", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("agapite", "classic", 0);           armor.ArmorMaterial = "Agapite";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("verite", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("verite", "classic", 0);            armor.ArmorMaterial = "Verite";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("valorite", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("valorite", "classic", 0);          armor.ArmorMaterial = "Valorite";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("nepturite", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("nepturite", "classic", 0);         armor.ArmorMaterial = "Nepturite";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("obsidian", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("obsidian", "classic", 0);          armor.ArmorMaterial = "Obsidian";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("steel", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("steel", "classic", 0);             armor.ArmorMaterial = "Steel";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("brass", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("brass", "classic", 0);             armor.ArmorMaterial = "Brass";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("mithril", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("mithril", "classic", 0);           armor.ArmorMaterial = "Mithril";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("xormite", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("xormite", "classic", 0);           armor.ArmorMaterial = "Xormite";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("dwarven", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("dwarven", "classic", 0);           armor.ArmorMaterial = "Dwarven";
            }
            else if (bc.Hue == MaterialInfo.GetMaterialColor("silver", "classic", 0))
            {
                armor.Hue = MaterialInfo.GetMaterialColor("silver", "classic", 0);            armor.ArmorMaterial = "Silver";
            }

            if (armor.ArmorMaterial != null)
            {
                bc.AddItem(armor);
            }
            else
            {
                armor.Delete();
            }
        }