public void AddResearchMaterials(Mobile from, ResearchMaterials researchMaterial) { from.SendMessage("You apply your findings from the research materials towards the mystery held within the scroll."); from.SendSound(0x655); m_ResearchAdded++; researchMaterial.Delete(); CheckRevealMystery(from); }
public void FindResearchMaterials(Mobile from) { Item item = new ResearchMaterials(); if (item != null) { if (from.AddToBackpack(item)) { from.SendMessage("You retrieve some Research Materials safely stashed away within the shipwreck and place it in your backpack."); } else { from.SendMessage("You retrieve some Research Materials safely stashed away within the shipwreck, and place it at your feet."); item.MoveToWorld(from.Location, from.Map); } } }
protected override void OnTarget(Mobile from, object target) { if (from == null) { return; } if (from.Deleted) { return; } if (m_AncientMysteryScroll == null) { return; } if (m_AncientMysteryScroll.Deleted || m_AncientMysteryScroll.RootParent != from) { return; } PlayerMobile pm = from as PlayerMobile; if (pm == null) { return; } if (target is ResearchMaterials) { ResearchMaterials researchMaterials = target as ResearchMaterials; if (m_AncientMysteryScroll.ResearchAdded >= AncientMysteryScroll.ResearchRequired) { from.SendMessage("This mystery already has enough research materials contributed."); } else if (!researchMaterials.Researched) { from.SendMessage("Those research materials have not yet been evaluated."); } else { m_AncientMysteryScroll.AddResearchMaterials(from, researchMaterials); } } else if (target is ResearchedMasterScroll) { ResearchedMasterScroll researchedMasterScroll = target as ResearchedMasterScroll; if (m_AncientMysteryScroll.ResearchAdded >= AncientMysteryScroll.ResearchRequired) { from.SendMessage("This mystery already has enough research materials contributed."); } else { m_AncientMysteryScroll.AddResearchedMasterScroll(from, researchedMasterScroll); } } else if (target is TreasureMap) { TreasureMap treasureMap = target as TreasureMap; if (m_AncientMysteryScroll.m_Discoveries.Count >= AncientMysteryScroll.DiscoveriesRequired) { from.SendMessage("This mystery already has a sufficient number of discoveries."); } else if (!treasureMap.Completed) { from.SendMessage("That treasure map has not been completed yet."); } else { m_AncientMysteryScroll.AttemptDiscovery(from, treasureMap); } } else if (target is SOS) { SOS sos = target as SOS; if (m_AncientMysteryScroll.m_Discoveries.Count >= AncientMysteryScroll.DiscoveriesRequired) { from.SendMessage("This mystery already has a sufficient number of discoveries."); } else if (!sos.Completed) { from.SendMessage("That SOS map has not been completed yet."); from.CloseGump(typeof(AncientMysteryGump)); from.SendGump(new AncientMysteryGump(m_AncientMysteryScroll, from)); } else { m_AncientMysteryScroll.AttemptDiscovery(from, sos); } } else { from.SendMessage("That is not research materials, a treasure map, or an SOS."); } from.CloseGump(typeof(AncientMysteryGump)); from.SendGump(new AncientMysteryGump(m_AncientMysteryScroll, from)); }