예제 #1
0
        public static bool CheckBookcase(Mobile from, Item item)
        {
            if (from is PlayerMobile)
            {
                GoingGumshoeQuest3 quest = QuestHelper.GetQuest <GoingGumshoeQuest3>((PlayerMobile)from);

                if (quest != null && !quest.FoundCipherBook)
                {
                    if (quest.BookCase == null)
                    {
                        quest.BookCase = quest.GetBookcase();
                    }

                    if (item == quest.BookCase)
                    {
                        quest.FoundCipherBook = true;

                        from.PrivateOverheadMessage(Server.Network.MessageType.Regular, 0x47E, 1158713, from.NetState);
                        // *You find the cipher text hidden among the books! Return to the Cryptologist to tell him where it is!*

                        Region region = Region.Find(from.Location, from.Map);

                        if (region is QuestRegion)
                        {
                            ((QuestRegion)region).ClearFromMessageTable(from);
                        }

                        return(true);
                    }
                }
            }

            return(false);
        }
예제 #2
0
        public override void OnDoubleClick(Mobile m)
        {
            if (m is PlayerMobile && InRange(m.Location, 5))
            {
                GoingGumshoeQuest3 quest = QuestHelper.GetQuest <GoingGumshoeQuest3>((PlayerMobile)m);

                if (quest != null)
                {
                    if (!quest.FoundCipherBook)
                    {
                        m.SendLocalizedMessage(1158620, null, 0x23); /*You've spoken to the Cryptologist who has agreed to help you if you acquire the Cipher Text.*/
                        m.SendGump(new InternalGump(1158619));
                    }
                    else
                    {
                        m.SendLocalizedMessage(1158621, null, 0x23); /*The Cytologist has successfully begun decrypting the copies of the books you found. He informs you he
                                                                      * will send them to Headquarters when he is finished. Return to Inspector Jasper to follow up on the case.*/
                        m.SendGump(new InternalGump(1158624));

                        m.PlaySound(quest.UpdateSound);
                        quest.BegunDecrypting = true;
                    }
                }
                else
                {
                    SayTo(m, 1073989, 1154);
                    Effects.PlaySound(Location, Map, 0x441);
                }
            }
        }
예제 #3
0
            public override void OnLocationChanged(Mobile m, Point3D oldLocation)
            {
                base.OnLocationChanged(m, oldLocation);

                if (m is PlayerMobile mobile)
                {
                    GoingGumshoeQuest3 quest = QuestHelper.GetQuest <GoingGumshoeQuest3>(mobile);

                    if (quest != null && !quest.FoundCipherBook && 0.2 > Utility.RandomDouble())
                    {
                        Rectangle2D rec = Bounds.FirstOrDefault(b => b.Contains(m.Location));

                        if (rec.Contains(quest.BookCase) && CanGiveMessage(mobile))
                        {
                            mobile.SendLocalizedMessage(1158714); // *Your keen senses detect the books in this library have been recently disturbed...*

                            _MessageTable[mobile] = DateTime.UtcNow + TimeSpan.FromSeconds(15);
                        }
                    }
                }
            }
예제 #4
0
        public override void OnDoubleClick(Mobile m)
        {
            if (m is PlayerMobile && m.InRange(Location, 5))
            {
                GoingGumshoeQuest quest = QuestHelper.GetQuest <GoingGumshoeQuest>((PlayerMobile)m);

                if (quest != null && quest.Completed)
                {
                    quest.GiveRewards();

                    BaseQuest newquest = QuestHelper.RandomQuest((PlayerMobile)m, new Type[] { typeof(GoingGumshoeQuest2) }, this);

                    if (newquest != null)
                    {
                        m.SendGump(new MondainQuestGump(newquest));
                    }
                }
                else
                {
                    GoingGumshoeQuest2 quest2 = QuestHelper.GetQuest <GoingGumshoeQuest2>((PlayerMobile)m);

                    if (quest2 != null)
                    {
                        if (quest2.IsComplete)
                        {
                            quest2.Objectives[0].CurProgress++;
                            quest2.GiveRewards(); // TODO: Does this quest end here?

                            BaseQuest newquest = QuestHelper.RandomQuest((PlayerMobile)m, new Type[] { typeof(GoingGumshoeQuest3) }, this);

                            if (newquest != null)
                            {
                                m.SendGump(new MondainQuestGump(newquest));
                            }
                        }
                        else
                        {
                            m.SendGump(new MondainQuestGump(quest2, MondainQuestGump.Section.InProgress, false));
                            quest2.InProgress();
                        }
                    }
                    else
                    {
                        GoingGumshoeQuest3 quest3 = QuestHelper.GetQuest <GoingGumshoeQuest3>((PlayerMobile)m);

                        if (quest3 != null)
                        {
                            if (quest3.IsComplete)
                            {
                                quest3.Objectives[0].CurProgress++;
                                quest3.GiveRewards(); // TODO: Does this quest end here?

                                BaseQuest newquest = QuestHelper.RandomQuest((PlayerMobile)m, new Type[] { typeof(GoingGumshoeQuest4) }, this);

                                if (newquest != null)
                                {
                                    m.SendGump(new MondainQuestGump(newquest));
                                }
                            }
                            else
                            {
                                m.SendGump(new MondainQuestGump(quest3, MondainQuestGump.Section.InProgress, false));
                                quest3.InProgress();
                            }
                        }
                        else
                        {
                            GoingGumshoeQuest4 quest4 = QuestHelper.GetQuest <GoingGumshoeQuest4>((PlayerMobile)m);

                            if (quest4 != null && !quest4.IsComplete)
                            {
                                m.SendGump(new MondainQuestGump(quest4, MondainQuestGump.Section.InProgress, false));
                                quest4.InProgress();
                            }
                            else if (quest4 == null)
                            {
                                SayTo(m, 1080107); // I'm sorry, I have nothing for you at this time.
                            }
                        }
                    }
                }
            }
        }