Exemplo n.º 1
0
        public static bool FoundItem(Mobile player, int type)
        {
            Item       item = player.Backpack.FindItemByType(typeof(MuseumBook));
            MuseumBook book = (MuseumBook)item;

            if (type == book.RumorGoal && book.RumorDungeon == Server.Misc.Worlds.GetRegionName(player.Map, player.Location) && book.ArtOwner == player && GetNext(book) < 100)
            {
                if (Utility.RandomMinMax(1, 3) != 1)
                {
                    int    thing = GetNext(book);
                    string say   = AntiqueInfo(thing, 4, book);

                    Museums relic = new Museums();
                    relic.ItemID = Int32.Parse(AntiqueInfo(thing, 1, book));
                    relic.Hue    = Int32.Parse(AntiqueInfo(thing, 3, book));

                    if (relic.ItemID == 0x4FA4)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x4FC9)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x5328)
                    {
                        relic.Hue = Utility.RandomList(0, 0x4A7, 0x747, 0x96C, 0x7DA, 0x415, 0x908, 0x712, 0x1CD, 0x9C2, 0x843, 0x750, 0xA94, 0x973, 0xA3A);
                    }
                    else if (relic.ItemID == 0x4FA9)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x4FBD)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x4FBB)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x4FBE)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x4FA7)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x4FC2)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x4FC6)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x0FF5)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x4B45)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x4FA6)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x4FAB)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x5327)
                    {
                        relic.Hue = Utility.RandomList(0, 0x4A7, 0x747, 0x96C, 0x7DA, 0x415, 0x908, 0x712, 0x1CD, 0x9C2, 0x843, 0x750, 0xA94, 0x973, 0xA3A);
                    }
                    else if (relic.ItemID == 0x47E6)
                    {
                        MaterialInfo.ColorMetal(relic, 0);
                    }
                    else if (relic.ItemID == 0x530A)
                    {
                        relic.Hue = Utility.RandomColor(0);
                    }

                    relic.Name            = AntiqueInfo(thing, 4, book);
                    relic.DiscoverName    = player.Name;
                    relic.DiscoverOwner   = player;
                    relic.ThisDescription = AntiqueInfo(thing, 5, book);
                    relic.ThisValue       = book.ItemValue;

                    if (AntiqueInfo(thing, 6, book) == "1")
                    {
                        relic.Light = LightType.Circle150;
                    }
                    else if (AntiqueInfo(thing, 6, book) == "2")
                    {
                        relic.Light = LightType.Circle300;
                    }
                    player.AddToBackpack(relic);

                    player.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found the " + say + ".");
                    player.SendSound(0x5B4);
                    book.RumorWorld   = "";
                    book.RumorDungeon = "";
                    book.RumorGoal    = 0;
                    book.RumorFrom    = "";
                    book.ItemValue    = 0;
                    SetInventory(book, thing);

                    return(true);
                }
                else
                {
                    player.LocalOverheadMessage(MessageType.Emote, 1150, true, book.RumorFrom + " was either wrong or they lied.");
                    player.SendSound(0x5B3);
                    book.RumorWorld   = "";
                    book.RumorDungeon = "";
                    book.RumorGoal    = 0;
                    book.RumorFrom    = "";
                    book.ItemValue    = 0;
                    return(false);
                }
            }

            return(false);
        }
Exemplo n.º 2
0
        public override void OnDoubleClick(Mobile e)
        {
            int pieces = 0;

            if (e.Backpack.FindItemByType(typeof(Dice4)) != null)
            {
                pieces++;
            }
            if (e.Backpack.FindItemByType(typeof(Dice6)) != null)
            {
                pieces++;
            }
            if (e.Backpack.FindItemByType(typeof(Dice8)) != null)
            {
                pieces++;
            }
            if (e.Backpack.FindItemByType(typeof(Dice10)) != null)
            {
                pieces++;
            }
            if (e.Backpack.FindItemByType(typeof(Dice12)) != null)
            {
                pieces++;
            }
            if (e.Backpack.FindItemByType(typeof(Dice20)) != null)
            {
                pieces++;
            }
            if (e.Backpack.FindItemByType(typeof(DungeonMastersGuide)) != null)
            {
                pieces++;
            }
            if (e.Backpack.FindItemByType(typeof(PlayersHandbook)) != null)
            {
                pieces++;
            }
            if (e.Backpack.FindItemByType(typeof(MonsterManual)) != null)
            {
                pieces++;
            }

            if (!IsChildOf(e.Backpack))
            {
                e.SendMessage("This must be in your backpack to use.");
                return;
            }
            else if (e.Map == Map.Lodor && e.X >= 6261 && e.Y >= 40 && e.X <= 6279 && e.Y <= 60 && pieces > 8)
            {
                e.Backpack.FindItemByType(typeof(Dice4)).Delete();
                e.Backpack.FindItemByType(typeof(Dice6)).Delete();
                e.Backpack.FindItemByType(typeof(Dice8)).Delete();
                e.Backpack.FindItemByType(typeof(Dice10)).Delete();
                e.Backpack.FindItemByType(typeof(Dice12)).Delete();
                e.Backpack.FindItemByType(typeof(Dice20)).Delete();
                e.Backpack.FindItemByType(typeof(DungeonMastersGuide)).Delete();
                e.Backpack.FindItemByType(typeof(PlayersHandbook)).Delete();
                e.Backpack.FindItemByType(typeof(MonsterManual)).Delete();

                StatueGygaxAddonDeed relic = new StatueGygaxAddonDeed();
                MaterialInfo.ColorMetal(relic, 0);
                relic.RelicColor     = relic.Hue;
                relic.Name           = "Statue of Gygax";
                relic.RelicGoldValue = Utility.RandomMinMax(120, 200) * 100;
                relic.RelicGoldValue = (int)(relic.RelicGoldValue * (MyServerSettings.GetGoldCutRate() * .01));

                e.AddToBackpack(relic);

                CharacterDatabase.SetKeys(e, "Gygax", true);

                e.LocalOverheadMessage(MessageType.Emote, 1150, true, "You claim the Statue of Gygax!");
                e.SendSound(0x3D);

                this.Delete();
            }
            else
            {
                e.CloseGump(typeof(GygaxGump));
                e.SendGump(new GygaxGump(e));
                e.PlaySound(0x249);
            }
        }