Esempio n. 1
0
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (m is PlayerMobile && InLOS(m) && InRange(m.Location, 3) && !InRange(oldLocation, 3))
            {
                GoingGumshoeQuest quest = QuestHelper.GetQuest <GoingGumshoeQuest>((PlayerMobile)m);

                if (quest != null)
                {
                    quest.Objectives[0].CurProgress++;
                    quest.OnCompleted();
                }
                else
                {
                    GoingGumshoeQuest4 quest2 = QuestHelper.GetQuest <GoingGumshoeQuest4>((PlayerMobile)m);

                    if (quest2 != null && quest2.IsComplete)
                    {
                        quest2.Objectives[0].CurProgress++;

                        m.SendGump(new InternalGump());
                        m.PlaySound(quest2.CompleteSound);
                        quest2.GiveRewards();
                    }
                }
            }
        }
Esempio n. 2
0
        public bool OnSpiritSpeak(Mobile m)
        {
            if (m is PlayerMobile pm)
            {
                GoingGumshoeQuest4 quest = QuestHelper.GetQuest <GoingGumshoeQuest4>(pm);

                if (quest != null && !quest.IsComplete)
                {
                    /*You have successfully found Sage Humbolt who has opened you eyes to the entire conspiracy, and the danger that looms ahead
                     * if no steps are taken to alter the current course of events. Return to Inspector Jasper to report your findings.*/
                    m.SendLocalizedMessage(1158636, null, 0x23);
                    m.SendGump(new InternalGump());

                    m.PlaySound(quest.UpdateSound);
                    quest.IsComplete = true;

                    return(true);
                }
            }

            return(false);
        }
Esempio n. 3
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.
                            }
                        }
                    }
                }
            }
        }