예제 #1
0
        protected static void TalkToEpona(DOLEvent e, object sender, EventArgs args)
        {
            //We get the player from the event arguments and check if he qualifies
            GamePlayer player = ((SourceEventArgs)args).Source as GamePlayer;

            if (player == null)
            {
                return;
            }

            if (Epona.CanGiveQuest(typeof(ChangelingTimes), player) <= 0)
            {
                return;
            }

            //We also check if the player is already doing the quest
            ChangelingTimes quest = player.IsDoingQuest(typeof(ChangelingTimes)) as ChangelingTimes;

            Epona.TurnTo(player);
            //Did the player rightclick on Sir Quait?
            if (e == GameObjectEvent.Interact)
            {
                //We check if the player is already doing the quest
                if (quest != null)
                {
                    //If the player is already doing the quest, we ask if he found the fur!
                    if (quest.Step != 3)
                    {
                        Epona.SayTo(player, "You have not found it yet?");
                    }
                    else if (quest.Step == 3)
                    {
                        quest.FinishQuest();
                    }
                    return;
                }
                else
                {
                    Epona.SayTo(player, "Hail, " + player.CharacterClass.Name + ". It's always good to see new adventurers willing to help out in the time of need. While it's understandable the garrison must be at the front lines, it's not acceptable to leave us defenseless.");
                    Epona.SayTo(player, "With King Lug in Tir Na Nog you'd think he'd be more sympathetic to our needs. He's completely pre-occupied with this realm war though. Speaking of the realm war, a breach leading into Darkness Falls appeared not far from here. This breach brings the realm war even closer to Mag Mell than ever expected, as reports are filing in stating that Midgard and Albion have access to the dungeon somehow. Along with Demons' Breach, many unexplained occurrences were noticed. After the discovery, the fae creatures, especially the minor changelings, began acting oddly. We're concerned they may turn hostile. We need help in culling the population as they are quickly becoming a treat to the people of Mag Mell.");
                    player.Out.SendQuestSubscribeCommand(Epona, QuestMgr.GetIDForQuestType(typeof(ChangelingTimes)), "Do you accept the quest? [Kill 2 minor changelings]");
                    return;
                }
            }
        }
예제 #2
0
        /* This is our callback hook that will be called when the player clicks
         * on any button in the quest offer dialog. We check if he accepts or
         * declines here...
         */

        private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
        {
            ChangelingTimes quest = player.IsDoingQuest(typeof(ChangelingTimes)) as ChangelingTimes;

            if (quest == null)
            {
                return;
            }

            if (response == 0x00)
            {
                SendSystemMessage(player, "Good, now go out there and finish your work!");
            }
            else
            {
                SendSystemMessage(player, "Aborting Quest " + questTitle + ". You can start over again if you want.");
                quest.AbortQuest();
            }
        }