public static string TellRumor(Mobile player, Mobile citizen) { string rumor = ""; if (citizen.Fame == 0 && player.Backpack.FindItemByType(typeof(MuseumBook)) != null) { MuseumBook book = ( MuseumBook )(player.Backpack.FindItemByType(typeof(MuseumBook))); if (book.ArtOwner == player) { int antique = GetNext(book); if (Utility.RandomMinMax(1, 10) > 1) { citizen.Fame = 1; } if (citizen.Fame == 0 && book.RumorFrom == "" && antique < 100) { citizen.Fame = 1; SetRumor(citizen, book); rumor = GetRumor(book, antique, true); } } } return(rumor); }
public static void SetInventory(MuseumBook book, int key) { string keys = book.ItemsFound; if (keys.Length > 0) { string[] discoveries = keys.Split('#'); string entry = ""; int nEntry = 1; foreach (string item in discoveries) { if (nEntry == key) { entry = entry + "1#"; } else { entry = entry + item + "#"; } nEntry++; } book.ItemsFound = entry; book.InvalidateProperties(); } }
public static int GetNext(MuseumBook book) { string keys = book.ItemsFound; int item = 0; if (keys.Length > 0) { string[] antiques = keys.Split('#'); foreach (string found in antiques) { item++; if (found == "0") { return(item); } } } return(100); }
public static int GetMuseums(int key, MuseumBook book) { string keys = book.ItemsFound; if (keys.Length > 0) { string[] antiques = keys.Split('#'); int nEntry = 1; foreach (string found in antiques) { if (nEntry == key) { return(Int32.Parse(found)); } nEntry++; } } return(0); }
public static string GetRumor(MuseumBook book, int item, bool talk) { int goal = book.RumorGoal; string locate = "held by a powerful creature"; if (goal == 2) { locate = "lost somewhere"; } string world = book.RumorWorld; string dungeon = book.RumorDungeon; string from = book.RumorFrom; if (talk) { string who = "I heard"; switch (Utility.RandomMinMax(0, 5)) { case 0: who = "I heard"; break; case 1: who = "I learned"; break; case 2: who = "I found out"; break; case 3: who = "The " + RandomThings.GetRandomJob() + " in " + RandomThings.GetRandomCity() + " told me"; break; case 4: who = "I overheard some " + RandomThings.GetRandomJob() + " say"; break; case 5: who = "My friend told me"; break; } return(who + " that the " + MuseumBook.AntiqueInfo(item, 4, book) + " may be " + locate + " within " + dungeon + " in " + world + "."); } if (world != "") { return("" + from + " has told you that the " + MuseumBook.AntiqueInfo(item, 4, book) + " may be " + locate + " within " + dungeon + " in " + world + "."); } return(""); }
public static int GetTotal(MuseumBook book) { string keys = book.ItemsFound; int value = 0; if (keys.Length > 0) { string[] antiques = keys.Split('#'); int nEntry = 1; foreach (string found in antiques) { if (found == "1") { value++; } nEntry++; } } return(value); }
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."); } }
public static string AntiqueInfo(int item, int slice, MuseumBook book) { string id = "0"; string hex = "0"; string hue = "0"; string name = ""; string desc = ""; string light = "0"; if (item == 1) { id = "20425"; hex = "0x4FC9"; name = "Dwarven Suit of Armor"; desc = "For Gimli of the Glittering Caves"; } else if (item == 2) { id = "8850"; hex = "0x2292"; name = "Boiling Blood"; desc = "Of the Salem Witch"; } else if (item == 3) { id = "20411"; hex = "0x4FBB"; name = "Shrine of Scorpius"; desc = "The Foe of Orion"; } else if (item == 4) { id = "20414"; hex = "0x4FBE"; name = "Trophy for Jousting"; desc = "Won by " + GetKnight(book.KnightTrophy); } else if (item == 5) { id = "20407"; hex = "0x4FB7"; name = "Mirror of Galadriel"; desc = "From the Land of Middle-Earth"; light = "2"; } else if (item == 6) { id = "20403"; hex = "0x4FB3"; name = "Anchor of the Jolly Roger"; desc = "Captain Hook's Ship"; } else if (item == 7) { id = "1167"; hex = "0x048F"; name = "Brazier of the Dead"; desc = "Forged in Dungeon Deceit"; light = "2"; } else if (item == 8) { id = "20415"; hex = "0x4FBF"; name = "Statue of Triton"; desc = "The Herald of Poseidon"; } else if (item == 9) { id = "21187"; hex = "0x52C3"; name = "Banner of Blackbeard"; desc = "Pirate of the Eastern Coast"; } else if (item == 10) { id = "8836"; hex = "0x2284"; name = "Brew of Magical Goo"; desc = "Belonged to Griselda the Witch"; } else if (item == 11) { id = "21189"; hex = "0x52C5"; name = "Head of Drachen"; desc = "The Sea Serpent King"; } else if (item == 12) { id = "20388"; hex = "0x4FA4"; name = "Statue of Razkarok"; desc = "The Beast of Valusia"; } else if (item == 13) { id = "21288"; hex = "0x5328"; name = "Axe of Perun"; desc = "Shrine of the God of Lightning"; } else if (item == 14) { id = "21355"; hex = "0x536B"; name = "Map of Britannia"; desc = "The Land of the Avatar"; } else if (item == 15) { id = "21323"; hex = "0x534B"; name = "Leaves of the Earthmother"; desc = "From the Moonshae Isles"; } else if (item == 16) { id = "20401"; hex = "0x4FB1"; name = "Statue of Neptune"; desc = "The Ruler of the Sea"; } else if (item == 17) { id = "20393"; hex = "0x4FA9"; name = "Dwarven Statue"; desc = "Thorin Oakenshield"; } else if (item == 18) { id = "21276"; hex = "0x531C"; name = "Chariot of Ben-Hur"; desc = "From the Circus Maximus"; } else if (item == 19) { id = "21256"; hex = "0x5308"; name = "Astrological Spyglass"; desc = "Of Zodiac the Star Master"; } else if (item == 20) { id = "20399"; hex = "0x4FAF"; name = "Head of Tuskrage"; desc = "The Giant Boar of Kuldara"; } else if (item == 21) { id = "20429"; hex = "0x4FCD"; name = "Wand of Wonder"; desc = "Belonged to Merlin the Wizard"; light = "2"; } else if (item == 22) { id = "8519"; hex = "0x2147"; name = "Symbol of Ultimate Wisdom"; desc = "From the Chamber of the Codex"; } else if (item == 23) { id = "20413"; hex = "0x4FBD"; name = "Trophy of David"; desc = "For Defeating the Goliath"; } else if (item == 24) { id = "8829"; hex = "0x227D"; name = "Cauldron of the Sea"; desc = "Belonged to Morwen the Hag"; } else if (item == 25) { id = "20420"; hex = "0x4FC4"; hue = "0x986"; name = "Statue of a Phoenix"; desc = "The Vermilion Bird"; } else if (item == 26) { id = "20384"; hex = "0x4FA0"; name = "Flower of the Fellowship"; desc = "Grown by Batlin the Druid"; } else if (item == 27) { id = "20391"; hex = "0x4FA7"; name = "Statue of a Knight"; desc = GetKnight(book.KnightStatue); } else if (item == 28) { id = "21191"; hex = "0x52C7"; name = "Head of Druk"; desc = "The Thunder Dragon"; } else if (item == 29) { id = "20387"; hex = "0x4FA3"; name = "Pipe of Mystical Smoke"; desc = "Belonged to Gandalf the Grey"; } else if (item == 30) { id = "18080"; hex = "0x46A0"; name = "Cornicopia of Feasting"; desc = "Horn of the Goat Amalthea"; } else if (item == 31) { id = "20418"; hex = "0x4FC2"; name = "Altar of Neptune"; desc = "The Ruler of the Sea"; } else if (item == 32) { id = "6247"; hex = "0x1867"; name = "Crystal of the Ruby Knight"; desc = "From King Sarak's Vault"; light = "2"; } else if (item == 33) { id = "20422"; hex = "0x4FC6"; name = "Statue of Athena"; desc = "The Daughter of Zeus"; } else if (item == 34) { id = "21333"; hex = "0x5355"; name = "Desk of Elminster"; desc = "The Sage of Shadowdale"; } else if (item == 35) { id = "20386"; hex = "0x4FA2"; name = "Flowers from the Silver River"; desc = "From the Land of Shannara"; } else if (item == 36) { id = "732"; hex = "0x02DC"; hue = "0xB1B"; name = "Lamp of the Genie"; desc = "From the Treasure of Aladdin"; } else if (item == 37) { id = "21244"; hex = "0x52FC"; name = "Stained Glass Lamp"; desc = "Belonged to Doctor Jekyll"; } else if (item == 38) { id = "20383"; hex = "0x4F9F"; name = "Mage Flower of D'Hara"; desc = "Grown by Zeddicus Zu'l Zorander"; } else if (item == 39) { id = "4085"; hex = "0x0FF5"; name = "Idol of Virtue"; desc = "Symbol of the Avatar"; light = "1"; } else if (item == 40) { id = "19724"; hex = "0x4D0C"; name = "Statue of Katalkotl"; desc = "Ruler of the Savaged Empire"; } else if (item == 41) { id = "20409"; hex = "0x4FB9"; name = "Looking Glass of Narnia"; desc = "From the Dream World"; light = "2"; } else if (item == 42) { id = "15283"; hex = "0x3BB3"; name = "Trophy of Sosaria"; desc = "Awarded by Lord British"; } else if (item == 43) { id = "20390"; hex = "0x4FA6"; name = "Eternal Flame"; desc = "Of the Achaemenid Empire"; light = "2"; } else if (item == 44) { id = "21395"; hex = "0x5393"; name = "Doomgiver and Soulcutter"; desc = "The Swords of Power"; } else if (item == 45) { id = "21280"; hex = "0x5320"; name = "Vulcan's Inferno"; desc = "The God of Volcanic Fire"; } else if (item == 46) { id = "21393"; hex = "0x5391"; name = "Serpent of the Stygian"; desc = "Thulsa Doom's Snake"; } else if (item == 47) { id = "21208"; hex = "0x52D8"; name = "Head of Xithizil"; desc = "The Insectoid From Another World"; } else if (item == 48) { id = "20430"; hex = "0x4FCE"; name = "Sword in the Stone"; desc = "For the King of Camelot"; light = "1"; } else if (item == 49) { id = "21332"; hex = "0x5354"; name = "Candelabrum of Zeus"; desc = "From Mount Olympus"; } else if (item == 50) { id = "20424"; hex = "0x4FC8"; name = "Brazier of Charon"; desc = "Ferryman of the Dead"; light = "2"; } else if (item == 51) { id = "20405"; hex = "0x4FB5"; name = "Magic Mirror"; desc = "Of the Queen Grimhilde"; light = "2"; } else if (item == 52) { id = "20395"; hex = "0x4FAB"; name = "Dwarven Shrine"; desc = "For the God Moradin"; } else if (item == 53) { id = "8843"; hex = "0x228B"; name = "Cauldron of Serpent Venom"; desc = "Of Ezmerelda the Enchantress"; } else if (item == 54) { id = "21347"; hex = "0x5363"; name = "Ancient Stove of Edesia"; desc = "The Goddess of Feasts"; } else if (item == 55) { id = "21171"; hex = "0x52B3"; name = "Monument of Death"; desc = "Statue of the Grim Reaper"; } else if (item == 56) { id = "20397"; hex = "0x4FAD"; name = "Large Gold Coins"; desc = "From the Cloud Giant's Fortress"; light = "1"; } else if (item == 57) { id = "21287"; hex = "0x5327"; name = "Blade of the Seeker"; desc = "Shrine of the Sword of Truth"; } else if (item == 58) { id = "21206"; hex = "0x52D6"; name = "Head of Proteus"; desc = "The Lord of the River"; } else if (item == 59) { id = "18406"; hex = "0x47E6"; name = "Egg of Stone"; desc = "From the Last Cockatrice"; } else if (item == 60) { id = "21258"; hex = "0x530A"; name = "Hourglass of Janus"; desc = "The God of Time"; light = "1"; } string value = ""; if (slice == 1) { value = id; } else if (slice == 2) { value = hex; } else if (slice == 3) { value = hue; } else if (slice == 4) { value = name; } else if (slice == 5) { value = desc; } else { value = light; } return(value); }
public static void SetRumor(Mobile m, MuseumBook book) { book.RumorGoal = Utility.RandomMinMax(1, 2); if (book.ItemValue < 1) { book.ItemValue = Utility.RandomMinMax(120, 200) * 100; book.ItemValue = (int)(book.ItemValue * (MyServerSettings.GetGoldCutRate() * .01)); } string searchLocation = "the Land of Sosaria"; switch (Utility.RandomMinMax(0, 10)) { case 0: searchLocation = "the Land of Sosaria"; break; case 1: searchLocation = "the Land of Lodoria"; break; case 2: searchLocation = "the Serpent Island"; break; case 3: searchLocation = "the Land of Sosaria"; break; case 4: searchLocation = "the Land of Lodoria"; break; case 5: searchLocation = "the Serpent Island"; break; case 6: searchLocation = "the Island of Umber Veil"; break; case 7: searchLocation = "the Land of Ambrosia"; break; case 8: searchLocation = "the Isles of Dread"; break; case 9: searchLocation = "the Savaged Empire"; break; case 10: searchLocation = "the Bottle World of Kuldar"; break; } string dungeon = "the Dungeon of Doom"; int aCount = 0; ArrayList targets = new ArrayList(); if (book.RumorGoal == 1) { foreach (Mobile target in World.Mobiles.Values) { if (target.Region is DungeonRegion && target.Fame >= 18000 && !(target is Exodus || target is CodexGargoyleA || target is CodexGargoyleB || target is Syth)) { if (Server.Misc.Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation) { targets.Add(target); aCount++; } } } } else { foreach (Item target in World.Items.Values) { if (target is SearchBase || target is StealBase) { if (Server.Misc.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) { if (book.RumorGoal == 1) { Mobile finding = ( Mobile )targets[i]; dungeon = Server.Misc.Worlds.GetRegionName(finding.Map, finding.Location); } else { Item finding = ( Item )targets[i]; dungeon = Server.Misc.Worlds.GetRegionName(finding.Map, finding.Location); } } } book.RumorWorld = searchLocation; book.RumorDungeon = dungeon; book.RumorFrom = "" + m.Name + " " + m.Title + ""; }
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); }