Exemplo n.º 1
0
        protected static void TalkToMiri(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 (Inaksha.CanGiveQuest(typeof(Seer_50), player) <= 0)
            {
                return;
            }

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

            if (e == GameObjectEvent.Interact)
            {
                if (quest != null)
                {
                    Miri.SayTo(player, "Check your journal for instructions!");
                }
                else
                {
                    Miri.SayTo(player, "I need your help to seek out loken in raumarik Loc 47k, 25k, 4k, and kill him ");
                }
            }
        }
Exemplo n.º 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)
        {
            Seer_50 quest = player.IsDoingQuest(typeof(Seer_50)) as Seer_50;

            if (quest == null)
            {
                return;
            }

            if (response == 0x00)
            {
                SendSystemMessage(player, "Good, no go out there and finish your work!");
            }
            else
            {
                SendSystemMessage(player, "Aborting Quest " + questTitle + ". You can start over again if you want.");
                quest.AbortQuest();
            }
        }
Exemplo n.º 3
0
        protected static void TalkToInaksha(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 (Inaksha.CanGiveQuest(typeof(Seer_50), player) <= 0)
            {
                return;
            }

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

            if (e == GameObjectEvent.Interact)
            {
                // Nag to finish quest
                if (quest != null)
                {
                    Inaksha.SayTo(player, "Check your Journal for instructions!");
                }
                else
                {
                    Inaksha.SayTo(player, "Midgard needs your [services]");
                }
            }
            // The player whispered to the NPC
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                //Check player is already doing quest
                if (quest == null)
                {
                    switch (wArgs.Text)
                    {
                    case "services":
                        player.Out.SendQuestSubscribeCommand(Inaksha, QuestMgr.GetIDForQuestType(typeof(Seer_50)), "Will you help Inaksha [Seer Level 50 Epic]?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "dead":
                        if (quest.Step == 3)
                        {
                            Inaksha.SayTo(player, "Take this sealed pouch to Miri in Jordheim for your reward!");
                            GiveItem(Inaksha, player, sealed_pouch);
                            quest.Step = 4;
                        }
                        break;

                    case "abort":
                        player.Out.SendCustomDialog("Do you really want to abort this quest, \nall items gained during quest will be lost?", new CustomDialogResponse(CheckPlayerAbortQuest));
                        break;
                    }
                }
            }
        }