コード例 #1
0
            public DracolichSkullGump(Mobile from, DracolichSkull skull) : base(25, 25)
            {
                string sText = "This skull contains the essence of an undead dragon. Necromancers would take these skulls and combine it with four rare artifacts of the dead. The heart of the dead god, the eye of the mad king, the orb of the astral lich, and the mind of the planar ghost are the four relics used in this process. Once these items are merged with the skull, it could be used to reanimate the bones of a long dead dragon to serve the necromancer. You have heard many rumors of these items being seen in various places. If you could get them, and bring the skull to a powerful necromancer, they may be able to help you perform the ritual needed. The necromancer will require some gold (placed onto the skull) as payment for such a spell. When reanimated, these creatures will become your bonded servant. You will have to feed it moon crystals and stable it when required. You can also perform some animal lore on it without having any proficiency in the skill. This will help you with information about them. If you later feed them a ruby, they will change their skeletal form of a different style of dragon.";

                string sRumor = skull.PieceRumor + " " + skull.PieceLocation;

                if (skull.HavePotionA == 0)
                {
                    sRumor = "The heart of the dead god " + sRumor;
                }
                else if (skull.HavePotionB == 0)
                {
                    sRumor = "The eye of the mad king " + sRumor;
                }
                else if (skull.HavePotionC == 0)
                {
                    sRumor = "The orb of the astral lich " + sRumor;
                }
                else if (skull.HavePotionD == 0)
                {
                    sRumor = "The mind of the planar ghost " + sRumor;
                }
                else if (skull.HaveGold < skull.NeedGold)
                {
                    sRumor = "You have obtained everything except the gold.";
                }
                else
                {
                    sRumor = "You have obtained everything you need.";
                }

                this.Closable   = true;
                this.Disposable = true;
                this.Dragable   = true;
                this.Resizable  = false;

                AddPage(0);
                AddImage(0, 0, 154);
                AddImage(300, 0, 154);
                AddImage(0, 300, 154);
                AddImage(300, 300, 154);
                AddImage(600, 0, 154);
                AddImage(600, 300, 154);
                AddImage(2, 2, 129);
                AddImage(302, 2, 129);
                AddImage(598, 2, 129);
                AddImage(2, 298, 129);
                AddImage(298, 298, 129);
                AddImage(598, 298, 129);
                AddImage(7, 9, 133);
                AddImage(183, 34, 162);
                AddImage(192, 35, 162);
                AddImage(205, 27, 162);
                AddImage(198, 33, 162);
                AddImage(193, 37, 162);
                AddImage(236, 48, 132);
                AddImage(529, 48, 132);
                AddImage(598, 48, 132);
                AddImage(567, 354, 147);
                AddImage(327, 564, 140);
                AddImage(34, 564, 140);
                AddImage(2, 564, 140);
                AddImage(597, 554, 162);
                AddImage(584, 554, 162);
                AddImage(577, 545, 162);
                AddImage(589, 545, 162);

                AddItem(586, 506, 7978, 0xB5E);
                AddItem(486, 506, 7978, 0xB5E);
                AddItem(386, 506, 7978, 0xB5E);
                AddItem(286, 506, 7978, 0xB5E);

                if (skull.HavePotionA > 0)
                {
                    AddItem(291, 500, 3985, 0xB1F);
                }                                                                               // HEART
                if (skull.HavePotionB > 0)
                {
                    AddItem(386, 506, 11418, 0xB71);
                }                                                                                // EYE
                if (skull.HavePotionC > 0)
                {
                    AddItem(488, 501, 11396, 0xB51);
                }                                                                                // ORB
                if (skull.HavePotionD > 0)
                {
                    AddItem(585, 504, 7408, 0xB3E);
                }                                                                               // BRAIN

                AddItem(24, 471, 5277);
                AddItem(23, 388, 6895, 0xB70);
                AddItem(112, 405, 15825, 0xB70);
                AddItem(836, 66, 15820, 0xB70);

                AddHtml(280, 415, 528, 63, @"<BODY><BASEFONT Color=#FFA200><BIG>Bring the Gathered Materials to the Black Magic Guildmaster</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(11, 12, 878, 31, @"<BODY><BASEFONT Color=#FBFBFB><BIG><CENTER>ENCHANTED DRAGON SKULL</CENTER></BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(113, 363, 694, 20, @"<BODY><BASEFONT Color=#FCFF00><BIG>" + sRumor + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(112, 139, 770, 203, @"<BODY><BASEFONT Color=#FFA200><BIG>" + sText + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);

                AddItem(100, 89, 3823);
                AddHtml(141, 91, 149, 20, @"<BODY><BASEFONT Color=#FCFF00><BIG>" + skull.HaveGold.ToString() + "/" + skull.NeedGold.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
            }
コード例 #2
0
        public override void OnComponentUsed(AddonComponent ac, Mobile from)
        {
            int monsters = 0;

            foreach (Mobile monster in this.GetMobilesInRange(5))
            {
                if (monster is BaseCreature)
                {
                    Mobile leader = ((BaseCreature)monster).GetMaster();
                    if (leader is PlayerMobile)
                    {
                    }
                    else
                    {
                        ++monsters;
                    }
                }
            }

            if (from.Blessed)
            {
                from.SendMessage("You cannot open that while in this state.");
            }
            else if (!from.InRange(GetWorldLocation(), 2))
            {
                from.SendMessage("You will have to get closer to open that.");
            }
            else if (monsters > 0)
            {
                from.SendMessage("You cannot open this with too many creatures around.");
            }
            else if (from.Backpack.FindItemByType(typeof(SearchPage)) != null ||
                     from.Backpack.FindItemByType(typeof(DDRelicTablet)) != null ||
                     from.Backpack.FindItemByType(typeof(VortexCube)) != null ||
                     from.Backpack.FindItemByType(typeof(AlienEgg)) != null ||
                     from.Backpack.FindItemByType(typeof(ResearchBag)) != null ||
                     from.Backpack.FindItemByType(typeof(DragonEgg)) != null ||
                     from.Backpack.FindItemByType(typeof(DracolichSkull)) != null ||
                     from.Backpack.FindItemByType(typeof(MuseumBook)) != null ||
                     from.Backpack.FindItemByType(typeof(QuestTome)) != null ||
                     from.Backpack.FindItemByType(typeof(DemonPrison)) != null ||
                     from.Backpack.FindItemByType(typeof(CourierMail)) != null)
            {
                int EmptyBox = 1;

                if (from.Backpack.FindItemByType(typeof(MuseumBook)) != null)
                {
                    if (MuseumBook.FoundItem(from, 2))
                    {
                        EmptyBox = 0;
                    }
                }

                if (from.Backpack.FindItemByType(typeof(QuestTome)) != null)
                {
                    if (QuestTome.FoundItem(from, 2, null))
                    {
                        EmptyBox = 0;
                    }
                }

                if (from.Backpack.FindItemByType(typeof(CourierMail)) != null)
                {
                    Item        mail     = from.Backpack.FindItemByType(typeof(CourierMail));
                    CourierMail envelope = (CourierMail)mail;

                    if (envelope.SearchDungeon == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && envelope.owner == from && envelope.DungeonMap == from.Map && envelope.MsgComplete == 0)
                    {
                        envelope.MsgComplete = 1;
                        from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the " + envelope.SearchItem + ".");
                        from.SendSound(0x3D);
                        EmptyBox = 0;
                    }
                }

                if (from.Backpack.FindItemByType(typeof(ResearchBag)) != null)
                {
                    ResearchBag bag = (ResearchBag)from.Backpack.FindItemByType(typeof(ResearchBag));

                    if (bag.BagOwner == from)
                    {
                        if (Server.Misc.Research.SearchResult(from, bag))
                        {
                            EmptyBox = 0;
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(VortexCube)) != null)
                {
                    Item       cubes = from.Backpack.FindItemByType(typeof(VortexCube));
                    VortexCube cube  = (VortexCube)cubes;

                    if (cube.CubeOwner == from)
                    {
                        if (cube.LocationKeyLaw == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && cube.HasKeyLaw == 0)
                        {
                            cube.HasKeyLaw = 1;
                            from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the Key of Law!");
                            from.SendSound(0x3D);
                            LoggingFunctions.LogGeneric(from, "has found the Key of Law.");
                            EmptyBox = 0;
                        }
                        if (cube.LocationKeyBalance == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && cube.HasKeyBalance == 0)
                        {
                            cube.HasKeyBalance = 1;
                            from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the Key of Balance!");
                            from.SendSound(0x3D);
                            LoggingFunctions.LogGeneric(from, "has found the Key of Balance.");
                            EmptyBox = 0;
                        }
                        if (cube.LocationKeyChaos == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && cube.HasKeyChaos == 0)
                        {
                            cube.HasKeyChaos = 1;
                            from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the Key of Chaos!");
                            from.SendSound(0x3D);
                            LoggingFunctions.LogGeneric(from, "has found the Key of Chaos.");
                            EmptyBox = 0;
                        }

                        int crystals = cube.HasCrystalRed + cube.HasCrystalBlue + cube.HasCrystalGreen + cube.HasCrystalYellow + cube.HasCrystalWhite + cube.HasCrystalPurple;

                        if (crystals < 6 && cube.LocationCrystal == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                        {
                            if (cube.HasCrystalRed == 0)
                            {
                                cube.HasCrystalRed = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the red Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the red Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalBlue == 0)
                            {
                                cube.HasCrystalBlue = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the blue Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the blue Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalBlue == 0)
                            {
                                cube.HasCrystalBlue = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the blue Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the blue Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalGreen == 0)
                            {
                                cube.HasCrystalGreen = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the green Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the green Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalYellow == 0)
                            {
                                cube.HasCrystalYellow = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the yellow Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the yellow Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalWhite == 0)
                            {
                                cube.HasCrystalWhite = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the white Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the white Void Crystal.");
                                EmptyBox = 0;
                            }
                            else if (cube.HasCrystalPurple == 0)
                            {
                                cube.HasCrystalPurple = 1;
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the purple Void Crystal!");
                                from.SendSound(0x3D);
                                LoggingFunctions.LogGeneric(from, "has found the purple Void Crystal.");
                                EmptyBox = 0;
                            }

                            cube.TextCrystal     = Server.Items.CubeOnCorpse.GetRumor();
                            cube.LocationCrystal = Server.Items.CubeOnCorpse.PickDungeon();

                            int crystal = cube.HasCrystalRed + cube.HasCrystalBlue + cube.HasCrystalGreen + cube.HasCrystalYellow + cube.HasCrystalWhite + cube.HasCrystalPurple;

                            if (crystal > 5)
                            {
                                cube.TextCrystal     = "";
                                cube.LocationCrystal = "";
                            }
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(AlienEgg)) != null)
                {
                    Item     eggs = from.Backpack.FindItemByType(typeof(AlienEgg));
                    AlienEgg egg  = (AlienEgg)eggs;

                    if (egg.PieceLocation == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                    {
                        bool pickNewEggSpot = false;
                        if (egg.HaveRod < 1)
                        {
                            pickNewEggSpot = true; egg.HaveRod = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the rod of amber!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HaveYellowCrystal < 1)
                        {
                            pickNewEggSpot = true; egg.HaveYellowCrystal = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the sun crystal!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HaveRedCrystal < 1)
                        {
                            pickNewEggSpot = true; egg.HaveRedCrystal = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the blood crystal!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HavePotion < 1)
                        {
                            pickNewEggSpot = true; egg.HavePotion = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the potion of growth!"); from.SendSound(0x3D); EmptyBox = 0;
                        }

                        if (pickNewEggSpot)
                        {
                            egg.PieceRumor    = Server.Items.CubeOnCorpse.GetRumor();
                            egg.PieceLocation = Server.Items.CubeOnCorpse.PickDungeon();
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(DragonEgg)) != null)
                {
                    Item      eggs = from.Backpack.FindItemByType(typeof(DragonEgg));
                    DragonEgg egg  = (DragonEgg)eggs;

                    if (egg.PieceLocation == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                    {
                        bool pickNewEggSpot = false;
                        if (egg.HavePotionA < 1)
                        {
                            pickNewEggSpot = true; egg.HavePotionA = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the elixir of the flame!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HavePotionB < 1)
                        {
                            pickNewEggSpot = true; egg.HavePotionB = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the potion of the earth!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HavePotionC < 1)
                        {
                            pickNewEggSpot = true; egg.HavePotionC = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the mixture of the sea!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (egg.HavePotionD < 1)
                        {
                            pickNewEggSpot = true; egg.HavePotionD = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the oil of the winds!"); from.SendSound(0x3D); EmptyBox = 0;
                        }

                        if (pickNewEggSpot)
                        {
                            egg.PieceRumor    = Server.Items.CubeOnCorpse.GetRumor();
                            egg.PieceLocation = Server.Items.CubeOnCorpse.PickDungeon();
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(DracolichSkull)) != null)
                {
                    Item           skulls = from.Backpack.FindItemByType(typeof(DracolichSkull));
                    DracolichSkull skull  = (DracolichSkull)skulls;

                    if (skull.PieceLocation == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                    {
                        bool pickNewSpot = false;
                        if (skull.HavePotionA < 1)
                        {
                            pickNewSpot = true; skull.HavePotionA = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the heart of the dead god!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (skull.HavePotionB < 1)
                        {
                            pickNewSpot = true; skull.HavePotionB = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the eye of the mad king!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (skull.HavePotionC < 1)
                        {
                            pickNewSpot = true; skull.HavePotionC = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the orb of the astral lich!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (skull.HavePotionD < 1)
                        {
                            pickNewSpot = true; skull.HavePotionD = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the mind of the planar ghost!"); from.SendSound(0x3D); EmptyBox = 0;
                        }

                        if (pickNewSpot)
                        {
                            skull.PieceRumor    = Server.Items.CubeOnCorpse.GetRumor();
                            skull.PieceLocation = Server.Items.CubeOnCorpse.PickDungeon();
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(DemonPrison)) != null)
                {
                    Item        prisons = from.Backpack.FindItemByType(typeof(DemonPrison));
                    DemonPrison prison  = (DemonPrison)prisons;

                    if (prison.PieceLocation == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                    {
                        bool pickNewprisonSpot = false;
                        if (prison.HaveShardA < 1)
                        {
                            pickNewprisonSpot = true; prison.HaveShardA = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the shard of hellfire!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (prison.HaveShardB < 1)
                        {
                            pickNewprisonSpot = true; prison.HaveShardB = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the shard of the abyss!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (prison.HaveShardC < 1)
                        {
                            pickNewprisonSpot = true; prison.HaveShardC = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the shard of souls!"); from.SendSound(0x3D); EmptyBox = 0;
                        }
                        else if (prison.HaveShardD < 1)
                        {
                            pickNewprisonSpot = true; prison.HaveShardD = 1; from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the shard of the void!"); from.SendSound(0x3D); EmptyBox = 0;
                        }

                        if (pickNewprisonSpot)
                        {
                            prison.PieceRumor    = Server.Items.CubeOnCorpse.GetRumor();
                            prison.PieceLocation = Server.Items.CubeOnCorpse.PickDungeon();
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(DDRelicTablet)) != null)
                {
                    Container pack = from.Backpack;

                    List <DDRelicTablet> rock = pack.FindItemsByType <DDRelicTablet>();

                    for (int i = 0; i < rock.Count; ++i)
                    {
                        DDRelicTablet stone = rock[i];

                        if (stone.SearchDungeon == Server.Misc.Worlds.GetRegionName(from.Map, from.Location))
                        {
                            if (stone.SearchReal >= Utility.RandomMinMax(1, 100))
                            {
                                Item   item     = null;
                                string itemName = stone.SearchType;
                                Type   itemType = ScriptCompiler.FindTypeByName(itemName);

                                if (itemType != null)
                                {
                                    item = (Item)Activator.CreateInstance(itemType);
                                    from.AddToBackpack(item);
                                    LoggingFunctions.LogFoundItemQuest(from, stone.SearchItem);
                                    from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the " + stone.SearchItem + ".");
                                    from.SendSound(0x3D);
                                }
                            }
                            else if (1 == Utility.RandomMinMax(1, 2))
                            {
                                Item   item     = null;
                                string itemName = stone.SearchType;
                                Type   itemType = ScriptCompiler.FindTypeByName(itemName);

                                if (itemType != null)
                                {
                                    item = (Item)Activator.CreateInstance(itemType);
                                    Item fake = new BrokenGear();
                                    fake.ItemID = item.ItemID;
                                    fake.Hue    = item.Hue;
                                    fake.Weight = item.Weight;
                                    fake.Name   = "Fake " + stone.SearchItem;
                                    item.Delete();
                                    from.AddToBackpack(fake);
                                }
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "The " + stone.SearchItem + " appears to be a fake.");
                                from.SendSound(0x5B3);
                            }
                            else
                            {
                                from.SendMessage("");
                                from.LocalOverheadMessage(MessageType.Emote, 0xB1F, true, "The tablet for the " + stone.SearchItem + " seems to be false.");
                                from.PlaySound(0x5B3);
                            }

                            from.SendMessage("The tablet crumbles to dust!");
                            stone.Delete();
                            EmptyBox = 0;
                        }
                    }
                }

                if (from.Backpack.FindItemByType(typeof(SearchPage)) != null)
                {
                    Item       scroll = from.Backpack.FindItemByType(typeof(SearchPage));
                    SearchPage page   = (SearchPage)scroll;

                    int LeadToAnotherSpot = 100 - page.LegendPercent;

                    if (page.SearchDungeon == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && page.owner == from && page.DungeonMap == from.Map)
                    {
                        if (LeadToAnotherSpot >= Utility.RandomMinMax(1, 100))
                        {
                            from.PlaySound(0x249);
                            SearchPage.PickSearchLocation(page, page.SearchDungeon, from);
                            from.SendMessage("You didn't find it, but you did get another clue.");
                            from.SendMessage("so you update your notes for the new place to search.");
                            EmptyBox = 0;
                        }
                        else
                        {
                            if (page.LegendReal == 1)
                            {
                                Item   item     = null;
                                string itemName = page.SearchType;
                                Type   itemType = ScriptCompiler.FindTypeByName(itemName);

                                if (itemType != null)
                                {
                                    item = (Item)Activator.CreateInstance(itemType);
                                    from.AddToBackpack(item);
                                    LoggingFunctions.LogFoundItemQuest(from, page.SearchItem);
                                    from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the " + page.SearchItem + ".");
                                    from.SendSound(0x3D);
                                }
                            }
                            else if (page.LegendPercent >= Utility.RandomMinMax(1, 200))
                            {
                                int    nGold = page.LegendPercent * 100;
                                string sGold = nGold.ToString();
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "The legend was false, but there was " + sGold + " gold in here.");
                                from.SendSound(0x2E6);
                                from.AddToBackpack(new Gold(nGold));
                            }
                            else if (1 == Utility.RandomMinMax(1, 2))
                            {
                                Item   item     = null;
                                string itemName = page.SearchType;
                                Type   itemType = ScriptCompiler.FindTypeByName(itemName);

                                if (itemType != null)
                                {
                                    item = (Item)Activator.CreateInstance(itemType);
                                    Item fake = new BrokenGear();
                                    fake.ItemID = item.ItemID;
                                    fake.Hue    = item.Hue;
                                    fake.Weight = item.Weight;
                                    fake.Name   = "Fake " + page.SearchItem;
                                    item.Delete();
                                    from.AddToBackpack(fake);
                                }
                                from.LocalOverheadMessage(MessageType.Emote, 1150, true, "The " + page.SearchItem + " appears to be a fake.");
                                from.SendSound(0x3D);
                            }
                            else
                            {
                                from.SendMessage("");
                                from.LocalOverheadMessage(MessageType.Emote, 0xB1F, true, "The legends of the " + page.SearchItem + " seemed to be false.");
                                from.PlaySound(0x249);
                            }
                            scroll.Delete();
                            SearchPage.ArtifactQuestTimeAllowed(from);
                            EmptyBox = 0;
                        }
                    }
                }

                if (EmptyBox == 1)
                {
                    from.SendMessage("The chest appears to be empty.");
                }
            }
            else
            {
                from.SendMessage("The chest appears to be empty.");
            }
        }
コード例 #3
0
        public static bool ProcessDracolichSkull(Mobile m, Mobile necro, Item dropped)
        {
            DracolichSkull skull = (DracolichSkull)dropped;

            int HaveIngredients = 0;

            if (skull.HavePotionB >= 0)
            {
                HaveIngredients++;
            }
            if (skull.HavePotionC >= 0)
            {
                HaveIngredients++;
            }
            if (skull.HavePotionD >= 0)
            {
                HaveIngredients++;
            }
            if (skull.HaveGold >= skull.NeedGold)
            {
                HaveIngredients++;
            }
            if (skull.HavePotionA >= 0)
            {
                HaveIngredients++;
            }

            if (HaveIngredients < 5)
            {
                return(false);
            }

            if ((m.Followers + 3) > m.FollowersMax)
            {
                necro.Say("You have too many followers with you right now.");
                return(false);
            }
            else if (m.Skills[SkillName.Necromancy].Base < 100)
            {
                necro.Say("You must be a pure grandmaster necromancer if you want my help.");
                return(false);
            }

            BaseCreature dragon = new SkeletonDragon();

            dragon.OnAfterSpawn();
            dragon.Controlled    = true;
            dragon.ControlMaster = m;
            dragon.IsBonded      = true;
            dragon.MoveToWorld(m.Location, m.Map);
            dragon.ControlTarget = m;
            dragon.Tamable       = true;
            dragon.MinTameSkill  = 29.1;
            dragon.ControlOrder  = OrderType.Follow;

            LoggingFunctions.LogGenericQuest(m, "has reanimated a skeletal dragon");
            m.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Your skeletal dragon has reanimated.", m.NetState);

            m.PlaySound(0x488);

            dropped.Delete();

            return(true);
        }