Пример #1
0
        public override void OnDoubleClick(Mobile m)
        {
            if (m is PlayerMobile mobile && mobile.InRange(Location, 5))
            {
                PaladinsOfTrinsic quest = QuestHelper.GetQuest(mobile, typeof(PaladinsOfTrinsic)) as PaladinsOfTrinsic;

                if (quest != null)
                {
                    quest.GiveRewards();
                }
                else
                {
                    PaladinsOfTrinsic2 quest2 = QuestHelper.GetQuest(mobile, typeof(PaladinsOfTrinsic2)) as PaladinsOfTrinsic2;

                    if (quest2 != null)
                    {
                        if (quest2.Completed)
                        {
                            quest2.CompleteQuest();
                        }
                        else
                        {
                            mobile.SendGump(new MondainQuestGump(quest2, MondainQuestGump.Section.InProgress, false));
                            quest2.InProgress();
                        }
                    }
                }
            }
        }
Пример #2
0
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (m is PlayerMobile mobile && InRange(mobile.Location, 5) && !InRange(oldLocation, 5))
            {
                PaladinsOfTrinsic2 quest = QuestHelper.GetQuest <PaladinsOfTrinsic2>(mobile);

                if (quest != null && !quest.SentMessage && quest.Completed)
                {
                    mobile.SendLocalizedMessage(1158111); // You have proven yourself Honorable, the Lord Commander looks overjoyed as you approach him triumphantly! Speak to him to claim your reward!
                    quest.SentMessage = true;
                }
            }
        }