Ejemplo n.º 1
0
        /* This is the method we declared as callback for the hooks we set to
         * masterGerol. It will be called whenever a player right clicks on Sir Quait
         * or when he whispers something to him.
         */

        protected static void TalkToMasterGerol(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 (masterGerol.CanGiveQuest(typeof(BoarStew), player) <= 0)
            {
                return;
            }

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

            masterGerol.TurnTo(player);
            //Did the player rightclick on masterGerol?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    //Player hasn't the quest:
                    masterGerol.SayTo(player, "Good day, my friend. I am Gerol, Master and Healer of horses. The guards stop here frequently for my services. I'm no miracle worker, but I suppose if you're hurt, I could patch you up a bit, as well.");
                    masterGerol.SayTo(player, "Goodness, more new faces in town. Are you here to help me with my wonderful [stew]?");
                    return;
                }
            }
            // The player whispered to Sir Quait (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;

                //We also check if the player is already doing the quest
                if (quest == null)
                {
                    switch (wArgs.Text)
                    {
                    case "stew":
                        masterGerol.SayTo(player, "Oh yes! It is my speciality and one of the key components to helping people out when they are sick. Everyone knows that my wonderful stew brings along a speedy recovery. I am running low on the main [ingredient], do you think you could help me out?");
                        break;

                    case "ingredient":
                        player.Out.SendQuestSubscribeCommand(masterGerol, QuestMgr.GetIDForQuestType(typeof(BoarStew)), "Will you help Master Gerol? [Levels 19-22]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    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;
                    }
                }
            }
        }
Ejemplo n.º 2
0
        protected static void TalkToMasrim(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 (Masrim.CanGiveQuest(typeof(Rogue_50), player) <= 0)
            {
                return;
            }

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

            if (e == GameObjectEvent.Interact)
            {
                // Nag to finish quest
                if (quest != null)
                {
                    Masrim.SayTo(player, "Check your Journal for instructions!");
                }
                else
                {
                    Masrim.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(Masrim, QuestMgr.GetIDForQuestType(typeof(Rogue_50)), "Will you help Masrim [Rogue Level 50 Epic]?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    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;
                    }
                }
            }
        }
Ejemplo n.º 3
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;
                }
            }
        }
Ejemplo n.º 4
0
        protected static void SubscribeQuest(DOLEvent e, object sender, EventArgs args)
        {
            QuestEventArgs qargs = args as QuestEventArgs;

            if (qargs == null)
            {
                return;
            }

            if (qargs.QuestID != QuestMgr.GetIDForQuestType(typeof(TraitorInMularn)))
            {
                return;
            }

            if (e == GamePlayerEvent.AcceptQuest)
            {
                CheckPlayerAcceptQuest(qargs.Player, 0x01);
            }
            else if (e == GamePlayerEvent.DeclineQuest)
            {
                CheckPlayerAcceptQuest(qargs.Player, 0x00);
            }
        }
Ejemplo n.º 5
0
        protected static void TalkToGuardAlakyrr(DOLEvent e, object sender, EventArgs args)
        {
            GamePlayer player = ((SourceEventArgs)args).Source as GamePlayer;

            if (player == null)
            {
                return;
            }

            if (GuardAlakyrr.CanGiveQuest(typeof(AidingGuardAlakyrr), player) <= 0)
            {
                return;
            }

            AidingGuardAlakyrr quest = player.IsDoingQuest(typeof(AidingGuardAlakyrr)) as AidingGuardAlakyrr;

            GuardAlakyrr.TurnTo(player);
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    GuardAlakyrr.SayTo(player, "You are new to this area aren't you? Yes, you look to be one of those from upper Albion. You will find that this lower realm is not as [familiar] as upper Albion and your Camelot.");
                    return;
                }
                else
                {
                    if (quest.Step == 1)
                    {
                        if (e == GameLivingEvent.WhisperReceive)
                        {
                            WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                            switch (wArgs.Text)
                            {
                            case "study":

                                GuardAlakyrr.SayTo(player, "You will need to slay tenebrae and then use an enchanted Tenebrous Flask, while inside the Tenebrous Quarter, to capture their essence. I need you to obtain a full flask of Tenebrous Essence. Return to me once you complete this duty and I will reward you for your efforts.");
                                quest.Step = 2;
                                break;
                            }
                        }
                    }
                    if (quest.Step == 10)
                    {
                        GuardAlakyrr.SayTo(player, "It was Arawn's will to allow your return. I am grateful that you made it back. Please give me the Full Flask of Tenebrous Essence.");
                        quest.Step = 11;
                    }
                    return;
                }
            }
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    switch (wArgs.Text)
                    {
                    case "familiar":
                        GuardAlakyrr.SayTo(player, "Everything here is quite unlike upper Albion, from the surroundings to the creatures. We, the chosen of Arawn, are not even familiar with some of the [creatures] which lurk in the Aqueducts.");
                        break;

                    case "creatures":
                        GuardAlakyrr.SayTo(player, "We have been trying to study some of these creatures so that we can learn more of their origins to better defend ourselves. Our forces are spread thin with the war against the evil army being [waged] below.");
                        break;

                    case "waged":
                        GuardAlakyrr.SayTo(player, "We have not had enough troops to spare to help us combat some of these hostile beings. The [tenebrae] are some of these creatures.");
                        break;

                    case "tenebrae":
                        GuardAlakyrr.SayTo(player, "They seem to hate all that is living, and it is an intense hate, indeed. Their origins are shrouded in mystery, but we do know that they were created out of [darkness].");
                        break;

                    case "darkness":
                        GuardAlakyrr.SayTo(player, "The attacks by the tenebrae have been numerous, and we need to cease some of these attacks. I am authorized to provide money to any who can slay these tenebrae and bring me proof of their deed. Will you [aid] us in this time of need?");
                        break;

                    case "aid":
                        player.Out.SendQuestSubscribeCommand(GuardAlakyrr, QuestMgr.GetIDForQuestType(typeof(AidingGuardAlakyrr)), "Will you slay the tenebrae for Guard Alakyrr? [Levels 1-4]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "study":
                        if (quest.Step == 1)
                        {
                            GuardAlakyrr.SayTo(player, "You will need to slay tenebrae and then use an enchanted Tenebrous Flask, while inside the Tenebrous Quarter, to capture their essence. I need you to obtain a full flask of Tenebrous Essence. Return to me once you complete this duty and I will reward you for your efforts.");
                            quest.Step = 2;
                        }
                        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;
                    }
                }
            }
        }
Ejemplo n.º 6
0
        /* This is the method we declared as callback for the hooks we set to
         * Sir Quait. It will be called whenever a player right clicks on Sir Quait
         * or when he whispers something to him.
         */

        protected static void TalkToMarlinThuler(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 (marlinThuler.CanGiveQuest(typeof(MarlinsSalesPitch), player) <= 0)
            {
                return;
            }

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

            marlinThuler.TurnTo(player);
            //Did the player rightclick on marlinThuler?
            if (e == GameObjectEvent.Interact)
            {
                //We check if the player is already doing the quest
                if (quest != null)
                {
                    if (quest.Step == 1)
                    {
                        marlinThuler.SayTo(player, "I'm glad to hear you're willing to answer your realm's call for help. Albion will remember your service. The local bandit leader is a fellow by the name of [Mostram].");
                    }
                    else if (quest.Step == 3)
                    {
                        marlinThuler.SayTo(player, "Welcome back, " + player.Name + ". Word travels quickly in these parts, and I have heard of your success. Some of the bandits have even started to retreat to their camps in the northeast. You've [done well].");
                    }
                }
                else
                {
                    //Player hasn't the quest:
                    marlinThuler.SayTo(player, "Oh woe is me! I have no idea how I can possibly hope to go on with [business] now? Please, you must help me!");
                    return;
                }
            }
            // The player whispered to Sir Jerem (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;

                //We also check if the player is already doing the quest
                if (quest == null)
                {
                    switch (wArgs.Text)
                    {
                    case "business":
                        marlinThuler.SayTo(player, "Those tomb raider scoundrels have stolen my favorite drum again. I use it to demonstrate the wondrous sound my instruments can produce! Never has a customer heard that beautiful sound and failed to buy something from me. Without that drum, I'm ruined! Will you get my [drum] back for me? I will reward you handsomely, I swear it.");
                        break;

                    case "drum":
                        player.Out.SendQuestSubscribeCommand(marlinThuler, QuestMgr.GetIDForQuestType(typeof(MarlinsSalesPitch)), "Will you help Marlin retrieve his lost drum? [Levels 17-20]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "abort":
                        player.Out.SendCustomDialog("Do you really want to abort this quest?", new CustomDialogResponse(CheckPlayerAbortQuest));
                        break;

                    case "Mostram":
                        if (quest.Step == 1)
                        {
                            marlinThuler.SayTo(player, "From what we've been able to find out, Mostram works from the fields south of the keep and across the river. Slay him and return to me when the deed is done.");
                            quest.Step = 2;
                        }
                        break;

                    case "done well":
                        if (quest.Step == 3)
                        {
                            marlinThuler.SayTo(player, "Now we must show the bandits that this is only the beginning of a long campaign. I've already begun planning our next moves to rid Camelot Hills of the bandit problem. Perhaps we can work together again in the [future].");
                        }
                        break;

                    case "future":
                        if (quest.Step == 3)
                        {
                            marlinThuler.SayTo(player, "It will be some time before my next plan is ready. For now, though, please take this money as payment for your services.");
                            quest.FinishQuest();
                        }
                        break;
                    }
                }
            }
        }
Ejemplo n.º 7
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToFarmerAsma(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 (farmerAsma.CanGiveQuest(typeof(GreenerPastures), player) <= 0)
            {
                return;
            }

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

            farmerAsma.TurnTo(player);
            //Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    //Player is not doing the quest...
                    farmerAsma.SayTo(player, "Good night. I wish I had time to talk, " + player.CharacterClass.Name + ", but I'm in the process of trying to find a new field to lease. I'd like to return to my life as a farmer. It's not that Cotswold isn't a nice village, but I feel more at home in the [field].");
                    return;
                }
                else
                {
                    if (quest.Step == 4)
                    {
                        farmerAsma.SayTo(player, "Ah, you've returned. I hope you were able to find the fields without too much difficulty. I'm still learning my way around the area.  Which field would you recommend renting?");
                        SendMessage(player, "[I'd recommend the first field.]", 0, eChatType.CT_Say, eChatLoc.CL_PopupWindow);
                        SendMessage(player, "[The second field is best.]", 0, eChatType.CT_Say, eChatLoc.CL_PopupWindow);
                        SendMessage(player, "[You should rent the third one.]", 0, eChatType.CT_Say, eChatLoc.CL_PopupWindow);
                    }
                    return;
                }
            }
            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    //Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "field":
                        farmerAsma.SayTo(player, "Ah, yes, Camelot Hills, where the wind comes sweepin' down the plain, and the wavin' barley can sure smell sweet when the wind comes right behind the rain. I have a lead on some fields that are up for lease, but I don't have time to [check them out].");
                        break;

                    case "check them out":
                        farmerAsma.SayTo(player, "Would you be willing to take a look at these fields for me and let me know if you think they are worth leasing?");
                        //If the player offered his help, we send the quest dialog now!
                        player.Out.SendQuestSubscribeCommand(farmerAsma, QuestMgr.GetIDForQuestType(typeof(GreenerPastures)), "Will you help Farmer Asma \nsearch for new farmland?\n[Level 2-5]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "them":
                        if (quest.Step < 4)
                        {
                            farmerAsma.SayTo(player, "When you're done taking a look at the fields, please return to me and let me know what you saw.");
                        }
                        break;

                    case "I'd recommend the first field.":
                    case "The second field is best.":
                    case "You should rent the third one.":
                        if (quest.Step == 4)
                        {
                            farmerAsma.SayTo(player, "Excellent. I'll speak to the owner tomorrow. May I have the map back?");
                        }
                        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;
                    }
                }
            }
        }
        /* This is the method we declared as callback for the hooks we set to
         * Sir Quait. It will be called whenever a player right clicks on Sir Quait
         * or when he whispers something to him.
         */

        protected static void TalkTosentinelMaitias(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 (sentinelMaitias.CanGiveQuest(typeof(TheDevilsintheDetails), player) <= 0)
            {
                return;
            }

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

            sentinelMaitias.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 (player.Inventory.GetFirstItemByID(boxTrain.Id_nb, eInventorySlot.FirstBackpack, eInventorySlot.LastBackpack) != null)
                    {
                        sentinelMaitias.SayTo(player, "Excellent. This crate of supplies must be delivered to my counterpart in Ardee, Sentinel Moya. The town is just a bit to the north, along the road. Without these new training swords, Moya would have difficulty drilling her recruits.");
                    }
                    else
                    {
                        sentinelMaitias.SayTo(player, "I see that you've returned. Did Sentinel Moya receive the supplies in [time]?");
                    }
                    return;
                }
                else
                {
                    sentinelMaitias.SayTo(player, "Good day to you, Guardian. Forgive me if I appear distracted, but my duties are many these days, and my staff keeps shrinking. In times past, Mag Mell formed the center of a vibrant elven community in Hibernia. Fagan dreams of [recreating] those days.");
                    return;
                }
            }
            // The player whispered to Sir Quait (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;

                //We also check if the player is already doing the quest
                if (quest == null)
                {
                    switch (wArgs.Text)
                    {
                    case "recreating":
                        sentinelMaitias.SayTo(player, "I don't blame him for being ambitious. Fagan has lived through tumultuous times and wants the best for his people, but I think that sometimes he focuses too much on the big picture. As a result, it falls to me to keep Mag Mell running on a daily [basis].");
                        break;

                    case "basis":
                        sentinelMaitias.SayTo(player, "There should be some around the area of this village, take a look near the road to Camelot. Kill any wolf pups you can find, and bring me its fur.");
                        player.Out.SendQuestSubscribeCommand(sentinelMaitias, QuestMgr.GetIDForQuestType(typeof(TheDevilsintheDetails)), "Do you accept The Devil's in the Details quest?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    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;

                    case "time":
                        sentinelMaitias.SayTo(player, "Thank you for taking care of that so quickly. Please take this coin as a reward for your efforts and perhaps we can work together again in the future. Be well.");
                        quest.FinishQuest();
                        break;
                    }
                }
            }
        }
Ejemplo n.º 9
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToDalikor(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 (dalikor.CanGiveQuest(typeof(TraitorInMularn), player) <= 0)
            {
                return;
            }

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

            dalikor.TurnTo(player);

            // Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    // Player is not doing the quest...
                    dalikor.SayTo(player, "Recruit Eeinken. It seems as though we have caught a traitor within the walls of Mularn! A man by the name of Njarmir has been conspiring with the Askefruer. He has recently told us of a [meeting] he was to have with them.");
                    return;
                }
                else
                {
                    switch (quest.Step)
                    {
                    case 1:
                        dalikor.SayTo(player, "Thank you recruit. Now, listen. The traitor has a necklace that allows him to change into the shape of an Askefruer. He says it makes them more comfortable with him. I [have] the necklace with me.");
                        break;

                    case 2:
                    case 3:
                        dalikor.SayTo(player, "The traitor described the location as a place between to the north-northeast from the griffin handler, near some small pine trees. I'm sorry there isn't more to go on, but that is all I have. Hurry now Eeinken.");
                        break;

                    case 4:
                        dalikor.SayTo(player, "Welcome back recruit. Have you met with success? Were you able to secure any information from the Askefruer?");
                        break;

                    case 5:
                        dalikor.SayTo(player, "Ah! The plans of the Askefruer. Ah, but they are in a language I do not understand. I will have to take this to the elders of Mularn for further study. Before I do that, though, I have [something] here for you.");
                        break;
                    }

                    return;
                }
            }

            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    // Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "meeting":
                        dalikor.SayTo(player, "He was to get further instructions from the Askefruer about his mission to help their queen. Now that he is in custody, we need to be sure we do not tip our hand to the Askefruer too quickly. I am asking you to go in his [stead].");
                        break;

                    case "stead":
                        dalikor.SayTo(player, "Will you do this for Mularn Eeinken? Will you go in this traitor's place and get the [information] we need to stop the Askefruer from continuing to make trouble for us?");
                        break;

                    // If the player offered his "help", we send the quest dialog now!
                    case "information":
                        player.Out.SendQuestSubscribeCommand(dalikor, QuestMgr.GetIDForQuestType(typeof(TraitorInMularn)), "Will you help Mularn by taking on this vital mission?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "have":
                        dalikor.SayTo(player, "The traitor described the location as a place between to the north-northeast from the griffin handler, near some small pine trees. I'm sorry there isn't more to go on, but that is all I have. Hurry now Eeinken.");
                        if (quest.Step == 1)
                        {
                            quest.Step = 2;
                        }

                        break;

                    // step 5
                    case "something":
                        dalikor.SayTo(player, "You did such an excellent job going to the meeting and posing as an Askefruer that I have this for you. It isn't much, but it will help to protect you from the elements. Now, if you'll excuse me, I must be off to speak with the elders.");
                        if (quest.Step == 5)
                        {
                            quest.FinishQuest();
                        }

                        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;
                    }
                }
            }
        }
Ejemplo n.º 10
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToEowylnAstos(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 (eowylnAstos.CanGiveQuest(typeof(HeartOfSephucoth), player) <= 0)
            {
                return;
            }

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

            eowylnAstos.TurnTo(player);

            // Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    // Player is not doing the quest...
                    eowylnAstos.SayTo(player, "Hail traveler! I may have a bit of [profitable information] for you!");
                    return;
                }
                else
                {
                    switch (quest.Step)
                    {
                    case 1:
                        eowylnAstos.SayTo(player, "You must seek out the monster Sephucoth! Slay it and bring me its heart!");
                        break;

                    case 2:
                        eowylnAstos.SayTo(player, "Hand to me the heart needed for this construct.");
                        break;

                    case 4:
                        eowylnAstos.SayTo(player, "Hand to me the polished bone needed for this construct.");
                        break;
                    }
                }
            }

            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    // Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "profitable information":
                        eowylnAstos.SayTo(player, "I have learned how to [fashion a pendant] of immense value.");
                        break;

                    case "fashion a pendant":
                        eowylnAstos.SayTo(player, "I can do so, but I would require the heart from a [terrible beast].");
                        break;

                    // If the player offered his help, we send the quest dialog now!
                    case "terrible beast":
                        player.Out.SendQuestSubscribeCommand(eowylnAstos, QuestMgr.GetIDForQuestType(typeof(HeartOfSephucoth)), "Do you accept the \nHeart of Sephucoth quest? \n[Levels 7-10]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    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;
                    }
                }
            }
        }
Ejemplo n.º 11
0
        /* This is the method we declared as callback for the hooks we set to
         * Sir Quait. It will be called whenever a player right clicks on Sir Quait
         * or when he whispers something to him.
         */

        protected static void TalkToArgusBowman(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 (argusBowman.CanGiveQuest(typeof(ArgussArrows), player) <= 0)
            {
                return;
            }

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

            argusBowman.TurnTo(player);

            // Did the player rightclick on argusBowman?
            if (e == GameObjectEvent.Interact)
            {
                // We check if the player is already doing the quest
                if (quest != null)
                {
                    if (quest.Step == 3)
                    {
                        argusBowman.SayTo(player, "Welcome back. Did you have any luck?");
                    }
                    else if (quest.Step == 4)
                    {
                        argusBowman.SayTo(player, "Excellent! Did you get anymore wood?");
                    }
                    else if (quest.Step == 5)
                    {
                        argusBowman.SayTo(player, "Excellent! This will do nicely. Now wait, I have a [reward] for you somewhere around here.");
                    }

                    return;
                }
                else
                {
                    // Player hasn't the quest:
                    argusBowman.SayTo(player, "Welcome to my shop friend. I don't suppose you're here about the [job], are you?");
                    return;
                }
            }

            // The player whispered to Sir Jerem (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;

                // We also check if the player is already doing the quest
                if (quest == null)
                {
                    switch (wArgs.Text)
                    {
                    case "job":
                        argusBowman.SayTo(player, "Oh, I thought maybe all the money I paid to the criers had paid off. Anyhow, let me [tell] you about the job I have.");
                        break;

                    case "tell":
                        argusBowman.SayTo(player, "I am on the verge of making a new type of arrow, lighter, faster and more deadly than any other arrow ever made. The only problem is that I can't get a hold of anymore of the wood I need. You see, it's [magical].");
                        break;

                    case "magical":
                        argusBowman.SayTo(player, "The young cutpurses on the south-east hill are cutting down the last of the magical trees that reside around these parts. Ludlow didn't even know they were magical until a [sample] was brought in by another adventurer.");
                        break;

                    case "sample":
                        argusBowman.SayTo(player, "I whittled on it for a while and made it into an arrow. I shot it and it went so far, I was, frankly, astonished. I ran towards where I had lost sight of it and finally found it. Normally, you can't recover arrows, but this one was [perfect].");
                        break;

                    case "perfect":
                        argusBowman.SayTo(player, "It wasn't bent or cracked or anything! I guess now you know why I want more of that wood! So, if you go and kill a few of those cutpurses and get me a good solid stack of the wood, I'll reward you. You [up] for it?");
                        break;

                    case "up":
                        player.Out.SendQuestSubscribeCommand(argusBowman, QuestMgr.GetIDForQuestType(typeof(ArgussArrows)), "Will you help Argus in his quest to make a new type of arrow? [Level 4]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "abort":
                        player.Out.SendCustomDialog("Do you really want to abort this quest?", new CustomDialogResponse(CheckPlayerAbortQuest));
                        break;

                    case "reward":
                        if (quest.Step == 5)
                        {
                            argusBowman.SayTo(player, "Ah yes. For the brave adventurer, I have this jewel I got in trade one time. I have never had a use for it, so I think you'll find it more useful than I. Good luck my friend. I'll be sure to let you know when my arrows are available.");
                            quest.FinishQuest();
                        }

                        break;
                    }
                }
            }
        }
Ejemplo n.º 12
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToAddrir(DOLEvent e, object sender, EventArgs args)
        {
            // We get the player from the event arguments and check if he qualifies
            // for the quest!
            GamePlayer player = ((SourceEventArgs)args).Source as GamePlayer;

            if (player == null)
            {
                return;
            }

            if (addrir.CanGiveQuest(typeof(ImportantDelivery), player) <= 0)
            {
                return;
            }

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

            addrir.TurnTo(player);

            // Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    // Player is not doing the quest...
                    addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.Greetings"));
                    return;
                }
                else
                {
                    switch (quest.Step)
                    {
                    case 1:
                        addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.Journal"));
                        break;

                    case 2:
                        addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.OneStepCloser"));
                        break;

                    case 3:
                        addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.HorseTicket"));
                        break;
                    }

                    return;
                }
            }

            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;

                if (quest == null)
                {
                    // Do some small talk :)
                    if (wArgs.Text == LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.CaseQuestion"))
                    {
                        addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.Question"));
                    }

                    // If the player offered his "help", we send the quest dialog now!
                    if (wArgs.Text == LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.CaseTraining"))
                    {
                        player.Out.SendQuestSubscribeCommand(addrir, QuestMgr.GetIDForQuestType(typeof(ImportantDelivery)), LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.Training"));
                    }
                }
                else
                {
                    if (wArgs.Text == LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.CaseCharSheet"))
                    {
                        addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.CharSheet"));
                    }

                    if (wArgs.Text == LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.CaseInformation"))
                    {
                        addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.Information"));
                        if (quest.Step == 1)
                        {
                            quest.Step = 2;
                        }
                    }

                    if (wArgs.Text == LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.CaseJournal"))
                    {
                        addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.Journal"));
                        GiveItem(addrir, player, recruitsDiary);
                    }

                    if (wArgs.Text == LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.CaseExpedite"))
                    {
                        addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.Expedite"));
                        GiveItem(addrir, player, sackOfSupplies);
                    }

                    if (wArgs.Text == LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.CaseHorseTicket"))
                    {
                        addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.HorseTicket"));
                        if (quest.Step == 2)
                        {
                            GiveItem(addrir, player, ticketToTirnamBeo);
                            quest.Step = 3;
                        }
                    }

                    if (wArgs.Text == "abort")
                    {
                        addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.TalkToAddrir.Abort"));
                    }
                }
            }
        }
Ejemplo n.º 13
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToAddrir(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 (addrir.CanGiveQuest(typeof(Nuisances), player) <= 0)
            {
                return;
            }

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

            addrir.TurnTo(player);

            // Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    // Player is not doing the quest...
                    addrir.SayTo(player, "Ah, my friend. I'm afraid there is a [new problem] that we must deal with.");
                    return;
                }
                else
                {
                    switch (quest.Step)
                    {
                    case 1:
                        addrir.SayTo(player, "Excellent recruit! Now here, take this magical box. I have a feeling there is something out there, and I would like for you to catch it, as proof to Fagan that something needs to be done. When you find the spot that is the noisiest, USE the box and capture whatever it is. Good luck Lirone. Return to me as quickly as you can.");
                        break;

                    case 3:
                        addrir.SayTo(player, "Sluagh...These beasts are evil, evil creatures. I can't begin to imagine why they are here. I will have to bring this to Fagan's attention immediately. Thank you Lirone, for showing this to me. Please take this as a show of my appreciation for your bravery and dedication to not only Mag Mell, but to Hibernia. I shall go present this to Fagan straight away. Be safe until my return Lirone.");
                        quest.FinishQuest();
                        break;
                    }

                    return;
                }
            }

            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    // Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "new problem":
                        addrir.SayTo(player, "Aye Lirone. There is this hideously loud noise that is coming from somewhere to the North of Mag Mell. It is driving the citizens mad! Fagan has offered a reward to the first person who can [quell] the noise.");
                        break;

                    case "quell":
                        addrir.SayTo(player, "Will you do this for us recruit? Will you find out the cause of this noise and [stop] it?");
                        break;

                    // If the player offered his "help", we send the quest dialog now!
                    case "stop":
                        player.Out.SendQuestSubscribeCommand(addrir, QuestMgr.GetIDForQuestType(typeof(Nuisances)), "Will you help out Mag Mell and discover who or what is making this noise?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    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;
                    }
                }
            }
        }
Ejemplo n.º 14
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToMasterFrederick(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 (masterFrederick.CanGiveQuest(typeof(TraitorInCotswold), player) <= 0)
            {
                return;
            }

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

            masterFrederick.TurnTo(player);

            // Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    // Player is not doing the quest...
                    masterFrederick.SayTo(player, "Vinde! I have some important news regarding the recent capture of the [ire fairies].");
                    return;
                }
                else
                {
                    if (quest.Step == 4)
                    {
                        masterFrederick.SayTo(player, "Vinde, you've returned. I'm sure you were successful with your mission. Come come my friend. Hand over the information.");
                    }
                    else if (quest.Step == 5)
                    {
                        masterFrederick.SayTo(player, "Hrm...These plans are sketchy, at best. I wonder if Shaemus was supposed to add in his two coppers. Interesting nonetheless. Thank you for helping us out Vinde. I have [something] here for you.");
                    }
                    else
                    {
                        masterFrederick.SayTo(player, "I know, it's not our speciality, but it's something we have to do for the betterment of the realm! Now, according to Shaemus, he was meeting them at a [small grove] to the south of Cotswold.");
                    }

                    return;
                }
            }

            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    // Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "ire fairies":
                        masterFrederick.SayTo(player, "I managed to have a little chat with some of the guardsmen, and it turns out there is a [traitor] here in Cotswold!");
                        break;

                    case "traitor":
                        masterFrederick.SayTo(player, "I know, it's shocking. I can hardly believe it myself. The guards were more than happy to share their information, so I wanted to pass it along to you. Apparently, this man named Shaemus was in [league] with the fairies.");
                        break;

                    case "league":
                        masterFrederick.SayTo(player, "His deal with them was to share in the profits of their stealing. I can't believe someone's greed would allow them to make deals with ire fairies! Well, anyhow, he gave us some further information on his [dealings] with them.");
                        break;

                    case "dealings":
                        masterFrederick.SayTo(player, "Shaemus uses a necklace that changes his appearance so he looks like one of the ire fairies. He said it's easier to deal with them that way. The guards confiscated it and it's currently in my possession. I was wondering if you would help us with this severe [problem]. What do you say Vinde, will you help us?");
                        break;

                    // If the player offered his "help", we send the quest dialog now!
                    case "problem":
                        player.Out.SendQuestSubscribeCommand(masterFrederick, QuestMgr.GetIDForQuestType(typeof(TraitorInCotswold)), "Will you help Cotswold by taking on this vital mission?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "infiltrate":
                        masterFrederick.SayTo(player, "I know, it's not our speciality, but it's something we have to do for the betterment of the realm! Now, according to Shaemus, he was meeting them at a [small grove] to the south of Cotswold.");
                        break;

                    case "small grove":
                        masterFrederick.SayTo(player, "He was supposed to be getting more information on their plans, so you shouldn't need to say much. Make your way to the grove and wait for the ire fairies. Return to me when you've gotten the information we're looking for.");
                        if (quest.Step == 1)
                        {
                            quest.Step = 2;
                        }

                        break;

                    // step 5
                    case "something":
                        masterFrederick.SayTo(player, "Here you are my friend. These boots will help keep your feet dry and warm on those days when you think the weather in Albion is against you. Be well my friend. We will talk again soon.");
                        if (quest.Step == 5)
                        {
                            quest.FinishQuest();
                        }

                        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;
                    }
                }
            }
        }
Ejemplo n.º 15
0
        /* This is the method we declared as callback for the hooks we set to
         * Sir Quait. It will be called whenever a player right clicks on Sir Quait
         * or when he whispers something to him.
         */

        protected static void TalkToStewardWillie(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 (stewardWillie.CanGiveQuest(typeof(WolfPeltCloak), player) <= 0)
            {
                return;
            }

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

            stewardWillie.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 (player.Inventory.GetFirstItemByID(wolfFur.Id_nb, eInventorySlot.FirstBackpack, eInventorySlot.LastBackpack) != null)
                    {
                        stewardWillie.SayTo(player, "Ah, well done! His Lordship will be pleased to know there is one less mongrel in the pack! Give me the fur so I can throw it with the others.");
                    }
                    else if (player.Inventory.GetFirstItemByID(wolfHeadToken.Id_nb, eInventorySlot.FirstBackpack, eInventorySlot.LastBackpack) != null)
                    {
                        stewardWillie.SayTo(player, "Give the token to Seamstress Lynnet in Ludlow, she'll give ye your reward. Thank ye for your fine services to His Lordship.");
                    }
                    else
                    {
                        stewardWillie.SayTo(player, "Good! I know we ca'count on ye. I will reward ye for the pelt ye bring me from one of those vile beasts!");
                    }

                    return;
                }
                else
                {
                    stewardWillie.SayTo(player, "Aye, hello there! Have ye been sent t'help with our [problem]");
                    return;
                }
            }

            // The player whispered to Sir Quait (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;

                // We also check if the player is already doing the quest
                if (quest == null)
                {
                    switch (wArgs.Text)
                    {
                    case "problem":
                        stewardWillie.SayTo(player, "What? Ye haven't heard? Hhhmm, then I wonder if ye would [like to help]");
                        break;

                    case "pack of wolves":
                        stewardWillie.SayTo(player, "There should be some around the area of this village, take a look near the road to Camelot. Kill any wolf pups you can find, and bring me its fur.");
                        break;

                    case "like to help":
                        stewardWillie.SayTo(player, "That's wonderful! We've been havin' a serious problem with a [pack of wolves]. His Lordship wants'em eliminated because they have been a-bothering the people here about. His Lordship has authorized me to reward those who [serve him well].");
                        break;

                    // If the player offered his "help", we send the quest dialog now!
                    case "serve him well":
                        player.Out.SendQuestSubscribeCommand(stewardWillie, QuestMgr.GetIDForQuestType(typeof(WolfPeltCloak)), "Do you accept the Wolf Pelt Cloak quest?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    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;
                    }
                }
            }
        }
Ejemplo n.º 16
0
        protected static void TalkToRoben(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 (Roben.CanGiveQuest(typeof(Church_50), player) <= 0)
            {
                return;
            }

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

            Roben.TurnTo(player);
            if (e == GameObjectEvent.Interact)
            {
                // Nag to finish quest
                if (quest == null)
                {
                    Roben.SayTo(player, "It appears that those present when the glyph was made whole received a [vision].");
                }
                else
                {
                    switch (quest.Step)
                    {
                    case 1:
                        Roben.SayTo(player, "You must not let this occur " + player.GetName(0, false) + "! I am familar with [Lyonesse]. I suggest that you gather a strong group of adventurers in order to succeed in this endeavor!");
                        break;

                    case 2:
                        Roben.SayTo(player, "Were you able to defeat the cult of the dark lord Arawn?");
                        break;
                    }
                }
            }

            // 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 "vision":
                        Roben.SayTo(player, "They speak of a broken cathedral located within the borders of Lyonesse. The glyph was able to show the new [occupants] of this cathedral.");
                        break;

                    case "occupants":
                        Roben.SayTo(player, "Occupants that worship not the church of Albion, but the dark lord Arawn! Magess Axton requests that you gather a group and destroy the leader of these dark disciples. She believes these worshippers of Arawan strive to [break the light of camelot] and establish their own religion within our realm.");
                        break;

                    case "break the light of camelot":
                        player.Out.SendQuestSubscribeCommand(Roben, QuestMgr.GetIDForQuestType(typeof(Church_50)), "Will you help Roben [Church Level 50 Epic]?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "Lyonesse":
                        Roben.SayTo(player, "The cathedral that Axton speaks of lies deep at the heart of that land, behind the Pikeman, across from the Trees. Its remaining walls can be seen at great distances during the day so you should not miss it. I would travel with thee, but my services are required elswhere. Fare thee well " + player.CharacterClass.Name + ".");
                        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;
                    }
                }
            }
        }
Ejemplo n.º 17
0
        /* This is the method we declared as callback for the hooks we set to
         * palune. It will be called whenever a player right clicks on Sir Quait
         * or when he whispers something to him.
         */

        protected static void TalkToPalune(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 (palune.CanGiveQuest(typeof(Disenchanted), player) <= 0)
            {
                return;
            }

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

            palune.TurnTo(player);

            // Did the player rightclick on palune?
            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 look if he has the items:
                    if (quest.Step == 3)
                    {
                        palune.SayTo(player, "You've returned! Excell...hey, wait a minute. Why do you still have the halberd with you? Were you not able to find Guard Cynon or West [Downs]?");
                    }

                    return;
                }
                else
                {
                    // Player hasn't the quest:
                    palune.SayTo(player, "Greetings. I hope your day has gone better than mine. It seems the courier I normally use has fallen ill, and I've been left without anyone to deliver this equipment. I'm able to get some of the weapons and armor to my local [customers].");
                    return;
                }
            }

            // The player whispered to Sir Quait (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;

                // We also check if the player is already doing the quest
                if (quest == null)
                {
                    switch (wArgs.Text)
                    {
                    case "customers":
                        palune.SayTo(player, "Unfortunately, I also have a number of deliveries to customers in other parts of the realm. I'd ask one of the squires or the stableboys to deliver some of these, but everyone seems to have their own [responsibilities].");
                        break;

                    case "responsibilities":
                        palune.SayTo(player, "If I paid you for your time, would you be willing to deliver a polearm I recently enchanted for a member of the Defenders of Albion?");
                        player.Out.SendQuestSubscribeCommand(palune, QuestMgr.GetIDForQuestType(typeof(Disenchanted)), "Will you deliver the polearm for Palune? [Levels 7-10]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    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;

                    case "Downs":
                        if (quest.Step == 3)
                        {
                            SendSystemMessage(player, "You tell Palune that you delivered the polearm to Guard Cynon, as asked, but he was not satisfied with it. You describe what happened when he tried to wield the weapon. Palune's face pales as you relate the story.");
                            palune.SayTo(player, "Oh my! I couldn't have done that, could I? Oh, no, what if I did put the wrong enchantment on it? I'll bet Guard Cynon is so angry at me...May I have the polearm back?");
                        }

                        break;
                    }
                }
            }
        }
Ejemplo n.º 18
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToDalikor(DOLEvent e, object sender, EventArgs args)
        {
            // We get the player from the event arguments and check if he qualifies
            // for the quest!
            GamePlayer player = ((SourceEventArgs)args).Source as GamePlayer;

            if (player == null)
            {
                return;
            }

            if (dalikor.CanGiveQuest(typeof(ImportantDelivery), player) <= 0)
            {
                return;
            }

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

            dalikor.TurnTo(player);

            // Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    // Player is not doing the quest...
                    dalikor.SayTo(player, "Greetings to you my young friend. I am Dalikor. I'm here to help you find your way around this vast realm. In the process, you'll have the ability to earn weapons, armor, coin and some levels. Would you like to start [training] now?");
                    return;
                }
                else
                {
                    switch (quest.Step)
                    {
                    case 2:
                        dalikor.SayTo(player, "This journal will help you from time to time while you are doing various tasks for me. I like to call it a smart journal. It was made by one of the runemasters for new recruits like you. It will help to [expedite] your training.");
                        break;

                    case 3:
                        dalikor.SayTo(player, "All you need to do is take this horse ticket to Gularg in Mularn. Hand him the ticket and you'll be on your way to Haggerfel. Be swift my young recruit. Time is of the essence.");
                        break;
                    }

                    return;
                }
            }

            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;

                if (quest == null)
                {
                    // Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "training":
                        dalikor.SayTo(player, "I thought you would. What I am here to do is to guide you through your first few seasons, until I feel you're confident and skilled enough to make it on your own in Albion. If you aren't properly trained, then what good are you to the realm? None, of course. Now, I will start your training off by asking you a simple quesion, whether or not you wish to [proceed] with your training. A dialogue box will pop up. Either press the Accept or Decline button.");
                        break;

                    // If the player offered his "help", we send the quest dialog now!
                    case "proceed":
                        player.Out.SendQuestSubscribeCommand(dalikor, QuestMgr.GetIDForQuestType(typeof(ImportantDelivery)), "Are you ready to begin your training?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "character sheet":
                        dalikor.SayTo(player, "Your character sheet houses all of your character's information, such as attributes, weapon skill, base class and profession. If at any time you want to see your character's statistics, press the far left icon on the menu bar (it looks like a person with a circle around them) for more [information].");
                        break;

                    case "information":
                        dalikor.SayTo(player, "I know this all seems a little overwhelming, but I have a special item here that will make this transition a smooth one. Please, take this [journal].");
                        if (quest.Step == 1)
                        {
                            quest.Step = 2;
                        }

                        break;

                    case "journal":
                        dalikor.SayTo(player, "This journal will help you from time to time while you are doing various tasks for me. I like to call it a smart journal. It was made by one of the runemasters for new recruits like you. It will help to [expedite] your training.");
                        break;

                    case "expedite":
                        dalikor.SayTo(player, "Now that I've given you a small introduction to the world of Midgard, let's get started with your first task. I need for you to deliver this package of supplies to Abohas in Haggerfel. Don't worry, I have a special [horse ticket] for you.");
                        break;

                    case "horse ticket":
                        dalikor.SayTo(player, "All you need to do is take this horse ticket to Gularg in Mularn. Hand him the ticket and you'll be on your way to Haggerfel. Be swift my young recruit. Time is of the essence.");
                        if (quest.Step == 2)
                        {
                            GiveItem(dalikor, player, ticketToHaggerfel);
                            GiveItem(dalikor, player, sackOfSupplies);
                            quest.Step = 3;
                        }

                        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;
                    }
                }
            }
        }
Ejemplo n.º 19
0
        protected override void SendQuestWindow(GameNPC questNPC, GamePlayer player, RewardQuest quest, bool offer)
        {
            using (GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.Dialog)))
            {
                ushort QuestID = QuestMgr.GetIDForQuestType(quest.GetType());
                pak.WriteShort((offer) ? (byte)0x22 : (byte)0x21);                 // Dialog
                pak.WriteShort(QuestID);
                pak.WriteShort((ushort)questNPC.ObjectID);
                pak.WriteByte(0x00);                              // unknown
                pak.WriteByte(0x00);                              // unknown
                pak.WriteByte(0x00);                              // unknown
                pak.WriteByte(0x00);                              // unknown
                pak.WriteByte((offer) ? (byte)0x02 : (byte)0x01); // Accept/Decline or Finish/Not Yet
                pak.WriteByte(0x01);                              // Wrap
                pak.WritePascalString(quest.Name);

                String personalizedSummary = BehaviourUtils.GetPersonalizedMessage(quest.Summary, player);
                if (personalizedSummary.Length > 255)
                {
                    pak.WritePascalString(personalizedSummary.Substring(0, 255));                     // Summary is max 255 bytes !
                }
                else
                {
                    pak.WritePascalString(personalizedSummary);
                }

                if (offer)
                {
                    String personalizedStory = BehaviourUtils.GetPersonalizedMessage(quest.Story, player);

                    if (personalizedStory.Length > ServerProperties.Properties.MAX_REWARDQUEST_DESCRIPTION_LENGTH)
                    {
                        pak.WriteShort((ushort)ServerProperties.Properties.MAX_REWARDQUEST_DESCRIPTION_LENGTH);
                        pak.WriteStringBytes(personalizedStory.Substring(0, ServerProperties.Properties.MAX_REWARDQUEST_DESCRIPTION_LENGTH));
                    }
                    else
                    {
                        pak.WriteShort((ushort)personalizedStory.Length);
                        pak.WriteStringBytes(personalizedStory);
                    }
                }
                else
                {
                    if (quest.Conclusion.Length > (ushort)ServerProperties.Properties.MAX_REWARDQUEST_DESCRIPTION_LENGTH)
                    {
                        pak.WriteShort((ushort)ServerProperties.Properties.MAX_REWARDQUEST_DESCRIPTION_LENGTH);
                        pak.WriteStringBytes(quest.Conclusion.Substring(0, (ushort)ServerProperties.Properties.MAX_REWARDQUEST_DESCRIPTION_LENGTH));
                    }
                    else
                    {
                        pak.WriteShort((ushort)quest.Conclusion.Length);
                        pak.WriteStringBytes(quest.Conclusion);
                    }
                }

                pak.WriteShort(QuestID);
                pak.WriteByte((byte)quest.Goals.Count);                 // #goals count
                foreach (RewardQuest.QuestGoal goal in quest.Goals)
                {
                    pak.WritePascalString(String.Format("{0}\r", goal.Description));
                }
                pak.WriteInt((uint)(quest.Rewards.Money));                 // unknown, new in 1.94
                pak.WriteByte((byte)quest.Rewards.ExperiencePercent(player));
                pak.WriteByte((byte)quest.Rewards.BasicItems.Count);
                foreach (ItemTemplate reward in quest.Rewards.BasicItems)
                {
                    WriteItemData(pak, GameInventoryItem.Create <ItemTemplate>(reward));
                }
                pak.WriteByte((byte)quest.Rewards.ChoiceOf);
                pak.WriteByte((byte)quest.Rewards.OptionalItems.Count);
                foreach (ItemTemplate reward in quest.Rewards.OptionalItems)
                {
                    WriteItemData(pak, GameInventoryItem.Create <ItemTemplate>(reward));
                }
                SendTCP(pak);
            }
        }
Ejemplo n.º 20
0
        /* This is the method we declared as callback for the hooks we set to
         * Sir Quait. It will be called whenever a player right clicks on Sir Quait
         * or when he whispers something to him.
         */

        protected static void TalkToKealan(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 (kealan.CanGiveQuest(typeof(HuntForArachneida), player) <= 0)
            {
                return;
            }

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

            kealan.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 qualifies, we begin talking...
                    kealan.SayTo(player, "Aye, hello there! Have ye come to hunt the [giant spider] deep down in the [forrest]?");
                    return;
                }
                else
                {
                    //If the player is already doing the quest, we ask if he found the fur!
                    if (player.Inventory.GetFirstItemByID(bloatedFang.Id_nb, eInventorySlot.FirstBackpack, eInventorySlot.LastBackpack) != null)
                    {
                        kealan.SayTo(player, "Good, you managed to retrieve a bloated spider fang, but did you also slay Arachneida?");
                    }
                    else if (player.Inventory.GetFirstItemByID(spiderChitin.Id_nb, eInventorySlot.FirstBackpack, eInventorySlot.LastBackpack) != null)
                    {
                        kealan.SayTo(player, "Ah, I see you killed her, I knew you were other than the rest. Now hand me over the chitin and fang so that I can give you your reward.");
                    }
                    else
                    {
                        kealan.SayTo(player, "Go now, and bring back her chitin as prof of your success.");
                    }
                    return;
                }
            }
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                //We also check if the player is already doing the quest
                if (quest == null)
                {
                    //Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "giant spider":
                        kealan.SayTo(player, "Ay, she's that big she even got her own name, everybody calls her \"Arachneida\". But take care nobody who went out to [hunt] her ever returned.");
                        break;

                    case "forrest":
                        kealan.SayTo(player, "She lives in the forrest east of here. It's a dark forrest full of bloated spiders so take care of yourself if you go there.");
                        break;

                    //If the player offered his "help", we send the quest dialog now!
                    case "hunt":
                        player.Out.SendQuestSubscribeCommand(kealan, QuestMgr.GetIDForQuestType(typeof(HuntForArachneida)), "Do you want to hunt Arachneida?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "bloated spider fang":
                        kealan.SayTo(player, "There should be lots of them out there near Arachneida's lair.");
                        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;
                    }
                }
            }
        }
Ejemplo n.º 21
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToHughGallen(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 (hughGallen.CanGiveQuest(typeof(ClericMulgrut), player) <= 0)
            {
                return;
            }

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

            hughGallen.TurnTo(player);

            // Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    // Player is not doing the quest...
                    hughGallen.SayTo(player, "I have a [bit of information] you might be interested in should you wish to hear it.");
                    return;
                }
            }

            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    // Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "bit of information":
                        hughGallen.SayTo(player, "Listen close! Lord Prydwen once had a faithful cleric known as Mulgrut. His service to our realm was unparalleled, yet, during Arthur's siege on Lancelot, Mulgrut's son Durren [was slain].");
                        break;

                    case "was slain":
                        hughGallen.SayTo(player, "Yes! Mulgrut [never recovered] from that. He turned his eyes from God and never looked back.");
                        break;

                    case "never recovered":
                        hughGallen.SayTo(player, "Aye! Even in death his soul never rests. If you are interested, I can tell you how to [make a profit] from this!");
                        break;

                    // If the player offered his help, we send the quest dialog now!
                    case "make a profit":
                        player.Out.SendQuestSubscribeCommand(hughGallen, QuestMgr.GetIDForQuestType(typeof(ClericMulgrut)), "Do you accept the Cleric Mulgrut quest? \n[Levels 5-10]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    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;
                    }
                }
            }
        }
Ejemplo n.º 22
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToMasterFrederick(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 (masterFrederick.CanGiveQuest(typeof(Collection), player) <= 0)
            {
                return;
            }

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

            masterFrederick.TurnTo(player);

            // Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    // Player is not doing the quest...
                    masterFrederick.SayTo(player, "My young recruit. You are advancing very quickly, but now I have a somewhat [difficult assignment] I need for you to undertake.");
                    return;
                }
                else
                {
                    if (quest.Step == 1)
                    {
                        masterFrederick.SayTo(player, "Alright recruit, let's get started. You will need to find and defeat three key ire fairy generals, so to speak. According to my map, there is a [camp] to the north of this tower, to the northeast and to the south, near the stable across the road.");
                    }
                    else if (quest.Step == 5)
                    {
                        masterFrederick.SayTo(player, "Welcome back Vinde. I take it you were successful in your mission. If so, hand me the first fairie wing.");
                        quest.Step = 6;
                    }
                    else if (quest.Step == 9)
                    {
                        masterFrederick.SayTo(player, "For you, a pair of rugged sleeves, great for protecting your arms from the wildlife around here. Thank you again Vinde. I promise my next task will be a little easier on the fighting. *hehe*");
                        quest.FinishQuest();
                    }

                    return;
                }
            }

            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    // Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "difficult assignment":
                        masterFrederick.SayTo(player, "The plans I had translated by Scryer Alice revealed more of what the ire fairies plan on doing to and with Cotswold. I'm afraid we need to [teach them a lesson].");
                        break;

                    case "teach them a lesson":
                        masterFrederick.SayTo(player, "We need to curb these issues before they get out of hand. Will you assist me with this [situation]?");
                        break;

                    // If the player offered his "help", we send the quest dialog now!
                    case "situation":
                        player.Out.SendQuestSubscribeCommand(masterFrederick, QuestMgr.GetIDForQuestType(typeof(Collection)), "Will you find and slay these three ire fairies?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "camp":
                        masterFrederick.SayTo(player, "You will need to use your compass in order to find your way to these locations. If your compass is not yet visible on your screen, use your shift + C keys to display it. Good luck.recruit. We're counting on you.");
                        if (quest.Step == 1)
                        {
                            GiveItem(masterFrederick, player, dustyOldMap);
                            quest.Step = 2;
                        }

                        break;

                    case "reward":
                        masterFrederick.SayTo(player, "For you, a pair of rugged sleeves, great for protecting your arms from the wildlife around here. Thank you again Vinde. I promise my next task will be a little easier on the fighting. *hehe*");
                        if (quest.Step == 9)
                        {
                            quest.FinishQuest();
                        }

                        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;
                    }
                }
            }
        }
Ejemplo n.º 23
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToSirJerem(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 (sirJerem.CanGiveQuest(typeof(ShakenSquire), player) <= 0)
            {
                return;
            }

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

            sirJerem.TurnTo(player);
            //Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    //Player is not doing the quest...
                    sirJerem.SayTo(player, "Good day, " + player.CharacterClass.Name + ".  I'm sorry that I can't spare much time for idle chatter, but I've got a number of things on my mind right now.  Keeping track of a keep full of squires certainly isn't easy [work].");
                    return;
                }
                else
                {
                    if (quest.Step == 4)
                    {
                        sirJerem.SayTo(player, "Ah, you've returned. Were you able to track down Squire [Galune]?");
                    }
                    return;
                }
            }
            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    //Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "work":
                        sirJerem.SayTo(player, "They're good lads, mostly, but they tend to get a little overeager at times.  In fact, one of my youngest squires has gone missing. I suspect he heard rumors from the locals and went to [investigate] them.");
                        break;

                    //If the player offered his help, we send the quest dialog now!
                    case "investigate":
                        sirJerem.SayTo(player, "This happens every time we get a new squire. The merchants fill his head with nonsense about becoming a hero and then the boy goes off exploring and gets himself into trouble.  Will you help me locate my missing squire?");
                        player.Out.SendQuestSubscribeCommand(sirJerem, QuestMgr.GetIDForQuestType(typeof(ShakenSquire)), "Will you help Sir Jerem find \nthe missing squire? \n[Levels 6-9]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "once":
                        if (quest.Step == 1)
                        {
                            sirJerem.SayTo(player, "I think Graent envies them, in a way. The squires are still young enough to have a bright-eyed enthusiasm for exploration and danger, and he feeds that with his stories.  I think the Tomb of Mithra is probably the best place to start your [search].");
                        }
                        break;

                    case "search":
                        if (quest.Step == 1)
                        {
                            sirJerem.SayTo(player, "The Tomb can be found to the east of here, past the bridge, and across the road.  If you need help finding it, don't forget that you can always consult your map. The name of the squire you're looking for is Galune. Good luck.");
                            quest.Step = 2;
                        }
                        break;

                    case "Galune":
                        if (quest.Step == 4)
                        {
                            SendMessage(player, "You tell Sir Jerem that you found Squire Galune in the Tomb, and that he is making his way back to the keep.  You decide not to mention the spider, but you get the sense that Sir Jerem will find out anyway.", 0, eChatType.CT_Say, eChatLoc.CL_PopupWindow);
                            sirJerem.SayTo(player, "I'm glad to hear that you found the squire before he got himself into too much trouble. Most likely, he fainted at the sight of some rat or spider, and decided to wait for someone to [rescue him].");
                        }
                        break;

                    case "rescue him":
                        if (quest.Step == 4)
                        {
                            sirJerem.SayTo(player, "I won't give him too much trouble over it. I have a feeling that he's learned a good lesson from all of this and won't be nearly so adventurous in the future. Here's a bit of money for your efforts.");
                            quest.FinishQuest();
                        }
                        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;
                    }
                }
            }
        }
Ejemplo n.º 24
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToAndrewWyatt(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 (andrewWyatt.CanGiveQuest(typeof(AndrewsSkins), player) <= 0)
            {
                return;
            }

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

            andrewWyatt.TurnTo(player);

            // Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    // Player is not doing the quest...
                    andrewWyatt.SayTo(player, "Greetings friend.  I am Andrew Wyatt, local hunter in these parts.  You must be a fresh, young adventurer, aren't you?  Well then, I might have an [errand] for you to run.");
                    return;
                }
                else
                {
                    if (quest.Step == 4)
                    {
                        andrewWyatt.SayTo(player, "Ah, back so soon friend?  Well then, I take it you [finished] my errand?");
                    }

                    return;
                }
            }

            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    // Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "errand":
                        andrewWyatt.SayTo(player, "Aye friend.  I hunt all manner of creatures, but my specialty is bears.  I hunt every type of bear out there.  I use every part of them too.  I need to run my next shipment of skins to Geor Nadren in [Camelot].");
                        break;

                    case "Camelot":
                        andrewWyatt.SayTo(player, "I'll tell you what.  If you take my skins to him, I'll set you up with a little reward for your troubles.  I'm enjoying my time here in the tavern, and I'd like to stay a little longer.  What do you say?  Are you [up] for it or not?");
                        break;

                    // If the player offered his help, we send the quest dialog now!
                    case "up":
                        player.Out.SendQuestSubscribeCommand(andrewWyatt, QuestMgr.GetIDForQuestType(typeof(AndrewsSkins)), "Will you deliver these skins to \nGeor Nadren in Camelot City?\n[Level " + player.Level + "]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "finished":
                        if (quest.Step == 4)
                        {
                            andrewWyatt.SayTo(player, "I knew I could count on you.  All right then, as promised, a small reward for your troubles.  Use it well, and good luck " + player.Name + ".  Perhaps I'll have some other work for you in the future.");
                            quest.FinishQuest();
                        }

                        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;
                    }
                }
            }
        }
Ejemplo n.º 25
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;
                    }
                }
            }
        }
Ejemplo n.º 26
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToDalikor(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 (dalikor.CanGiveQuest(typeof(Collection), player) <= 0)
            {
                return;
            }

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

            dalikor.TurnTo(player);

            //Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    //Player is not doing the quest...
                    dalikor.SayTo(player, "Recruit, we have received further intelligence that the Askefruer are trying to [make a move] on Mularn.");
                    return;
                }
                else
                {
                    switch (quest.Step)
                    {
                    case 1:
                        dalikor.SayTo(player, "Alright recruit, we haven't much time. Njarmir was unsure of exactly when the Askefruer would be sending their troops to these locations. I have a [map] that will assist you in finding these areas.");
                        break;

                    case 5:
                        dalikor.SayTo(player, "Eeinken, you've returned safely. If you have successfully defeated the Askefruer, please, hand their wings to me.");
                        quest.Step = 6;
                        break;

                    case 9:
                        dalikor.SayTo(player, "These sleeves will come in handy while you're out fighting. A Viking is always in need of sturdy armor to protect his somewhat fragile hide as he battles the enemies of his realm. Thank you again for your assistance in this matter. Be safe.");
                        quest.FinishQuest();
                        break;
                    }
                    return;
                }
            }
            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    //Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "make a move":
                        dalikor.SayTo(player, "There are three prominent Askefruer generals, so to speak, within the Askefruer community. Their names are Mitan, Ostadi and Seiki. They are rumored to be very successful [military leaders] within the Askefruer.");
                        break;

                    case "military leaders":
                        dalikor.SayTo(player, "We got all of this information from the traitor we caught a few days ago. We have been leaning on him for more information, and he finally cracked and told us all he knew. But we can't allow the Askefruer to make a multi-frontal [attack].");
                        break;

                    case "attack":
                        dalikor.SayTo(player, "Njarmir has said these three Askefruer have not yet received their troops. They have scouted out their locations and are awaiting for others to come to them. I believe this is the perfect time to [strike].");
                        break;

                    case "strike":
                        dalikor.SayTo(player, "If we can take down these leaders, the Askefruer will be signifigantly weakened. Perhaps it will stave off any future attacks. I'm asking you, Eeinken, to find these three Askefruer and destroy them. Will you [do it]?");
                        break;

                    //If the player offered his "help", we send the quest dialog now!
                    case "do it":
                        player.Out.SendQuestSubscribeCommand(dalikor, QuestMgr.GetIDForQuestType(typeof(Collection)), "Will you find and slay these three Fallen Askefruer and return their wings to Dalikor?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "map":
                        dalikor.SayTo(player, "Njarmir has provided us with a rough location of where he thinks the Askefruer are. He is not one hundred percent certain though, so you will need to do most of the searching on your own. USE the map from time to time to help you find these hidden camps. Remember, slay the Askefruer there. If you can, get their wings as proof of their demise. Be swift Eeinken. There isn't much time.");
                        if (quest.Step == 1)
                        {
                            GiveItem(dalikor, player, dustyOldMap);
                            quest.Step = 2;
                        }
                        break;

                    case "reward":
                        dalikor.SayTo(player, "These sleeves will come in handy while you're out fighting. A Viking is always in need of sturdy armor to protect his somewhat fragile hide as he battles the enemies of his realm. Thank you again for your assistance in this matter. Be safe.");
                        if (quest.Step == 9)
                        {
                            quest.FinishQuest();
                        }
                        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;
                    }
                }
            }
        }
Ejemplo n.º 27
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToAddrir(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 (addrir.CanGiveQuest(typeof(TraitorInMagMell), player) <= 0)
            {
                return;
            }

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

            addrir.TurnTo(player);

            // Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    // Player is not doing the quest...
                    addrir.SayTo(player, "Lirone, this Sluagh problem has its roots deeper into Mag Mell than I originally thought! We have apprehended a [traitor]!");
                    return;
                }
                else
                {
                    switch (quest.Step)
                    {
                    case 1:
                        addrir.SayTo(player, "Go west from Mag Mell towards Tir na Nog. You will come to the base of the foot hills. Head southwest-south along the base of the hills. The necklace will alert you when you are in the correct place. Hurry now. Time is wasting.");
                        break;

                    case 4:
                        addrir.SayTo(player, "Vinde, you've returned. I'm sure you were successful with your mission. Come come my friend. Hand over the information.");
                        break;

                    case 5:
                        addrir.SayTo(player, "For you, a nice pair of boots to help keep your feet dry and clean. Thank you again for the help you've given me in this matter Lirone. I shall report this to Fagan at once.");
                        if (quest.Step == 5)
                        {
                            quest.FinishQuest();
                        }

                        break;
                    }

                    return;
                }
            }

            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    // Do some small talk :)
                    switch (wArgs.Text)
                    {
                    // case "ire fairies": SendReply(player,"I managed to have a little chat with some of the guardsmen, and it turns out there is a [traitor] here in Cotswold!"); break;
                    case "traitor":
                        addrir.SayTo(player, "Aye Lirone. I could scarcely believe my ears when I heard the news. A man by the name of Samyr has been in [league] with the Sluagh for a while now.");
                        break;

                    case "league":
                        addrir.SayTo(player, "Samyr has given up some information, but not nearly as much as we hoped for. Fagan has asked me to recruit anyone I could to help deal with this problem. Are you up for the [challenge] Lirone?");
                        break;

                    // If the player offered his "help", we send the quest dialog now!
                    case "challenge":
                        player.Out.SendQuestSubscribeCommand(addrir, QuestMgr.GetIDForQuestType(typeof(TraitorInMagMell)), "Will you help Mag Mell by taking on this vital mission?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "necklace":
                        addrir.SayTo(player, "Aye. I am giving it to you to use for this meeting. You will not have to say anything, or so Samyr says. Just go to the [meeting location], use the necklace and wait for the Sluagh.");
                        break;

                    case "meeting location":
                        addrir.SayTo(player, "Go west from Mag Mell towards Tir na Nog. You will come to the base of the foot hills. Head southwest-south along the base of the hills. Hurry now. Time is wasting.");
                        if (quest.Step == 1)
                        {
                            quest.Step = 2;
                        }

                        break;

                    // step 5
                    case "reward":
                        addrir.SayTo(player, "For you, a nice pair of boots to help keep your feet dry and clean. Thank you again for the help you've given me in this matter Lirone. I shall report this to Fagan at once.");
                        if (quest.Step == 5)
                        {
                            quest.FinishQuest();
                        }

                        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;
                    }
                }
            }
        }
Ejemplo n.º 28
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToDalikor(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 (dalikor.CanGiveQuest(typeof(Nuisances), player) <= 0)
            {
                return;
            }

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

            dalikor.TurnTo(player);
            //Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    //Player is not doing the quest...
                    dalikor.SayTo(player, "Recruit Eeinken. I'm afraid we have a [serious problem] on our hands.");
                    return;
                }
                else
                {
                    if (quest.Step == 2)
                    {
                        dalikor.SayTo(player, "Welcome back recruit. Did you find out what was making all that racket?");
                    }
                    else if (quest.Step == 3)
                    {
                        dalikor.SayTo(player, "Hrm...Fallen Askefruer. This is what has been causing us our problems? Interesting. I want to thank you recruit for your hard work in helping us solve this problem. A [reward] is in store for you I think.");
                    }
                    return;
                }
            }
            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    //Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "serious problem":
                        dalikor.SayTo(player, "There has been this noise that has been keeping the residents of Mularn up at night. I haven't been able to locate the source of the noise, neither have any of the guards. I was hoping you could try to [find] the noise.");
                        break;

                    //If the player offered his "help", we send the quest dialog now!
                    case "find":
                        player.Out.SendQuestSubscribeCommand(dalikor, QuestMgr.GetIDForQuestType(typeof(Nuisances)), "Will you help out Mularn and discover who or what is making this noise?");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "reward":
                        dalikor.SayTo(player, "Yes, I think this will do quite nicely. Here you are Eeinken. Use it well, and I'm sure it will last you your first few seasons anyhow. Be sure to come and speak with me when you are ready for more adventure.");
                        if (quest.Step == 3)
                        {
                            quest.FinishQuest();
                            dalikor.SayTo(player, "Don't go far, I have need of your services again Eeinken.");
                        }
                        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;
                    }
                }
            }
        }
Ejemplo n.º 29
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToFarmerAsma(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 (farmerAsma.CanGiveQuest(typeof(RevengeTheOtherWhiteMeat), player) <= 0)
            {
                return;
            }

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

            farmerAsma.TurnTo(player);
            //Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    //Player is not doing the quest...
                    farmerAsma.SayTo(player, "Greetings, " + player.CharacterClass.Name + ".  You wouldn't believe how expensive it is to lease land here in the Camelot Hills area. Just the other day, I went to check out some fields, and the asking price is just too high.  Things were better in the Black [Mountains].");
                    return;
                }
                else
                {
                    if (quest.Step == 3)
                    {
                        farmerAsma.SayTo(player, "Did you really kill [Wilbur]?");
                    }
                    return;
                }
            }
            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    //Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "Mountains":
                        farmerAsma.SayTo(player, "It seemed like an ideal place for a farm.  It's shame those pig herders had to select it as the site for their new 'sport.' I still get angry just thinking about it. I mean, who do they think they are, tossing me out [like that]?.");
                        break;

                    case "like that":
                        farmerAsma.SayTo(player, "I wish I could give them a taste of their own medicine. If someone took something important away from them... Hey, that gives me an idea! Are you willing to help me get a little revenge on those pig herders?");
                        //If the player offered his help, we send the quest dialog now!
                        player.Out.SendQuestSubscribeCommand(farmerAsma, QuestMgr.GetIDForQuestType(typeof(RevengeTheOtherWhiteMeat)), "Will you help Farmer Asma get \nrevenge on the pig herders?\n[Level 5-8]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "mind":
                        if (quest.Step == 1)
                        {
                            farmerAsma.SayTo(player, "Just as a farmer's land is the source of her livelihood, the pig herders' prize pig must be the center of their game. If a little accident should befall their precious pig, they will know exactly how I felt when my farm was [taken away].");
                        }
                        break;

                    case "taken away":
                        if (quest.Step == 1)
                        {
                            farmerAsma.SayTo(player, "When the game isn't in session, they keep the pig in an area adjacent to the field.  To get there, travel through the city of Camelot and exit through the North Gate, near the main Church building. After exiting the city, you'll need to travel [west].");
                        }
                        break;

                    case "west":
                        if (quest.Step == 1)
                        {
                            farmerAsma.SayTo(player, "You'll see Vetusta Abbey in the distance. Keep running toward it, and you'll see a field and some stables. The pigs should be in that area. The pig you're looking for is one they've nicknamed Wilbur.");
                            quest.Step = 2;
                        }
                        break;

                    case "Wilbur":
                        if (quest.Step == 3)
                        {
                            SendMessage(player, "You tell Farmer Asma that you succeeded in killing Wilbur, but that one of the pig herders discovered you and chased you away.", 0, eChatType.CT_Say, eChatLoc.CL_PopupWindow);
                            farmerAsma.SayTo(player, "They saw you? Oh, no...what have I done? I feel terrible, Gwonn.  I shouldn't have asked you to kill Wilbur, but we can't undo what's been done.  If the guards come looking for you, I'll tell them that I'm the one who did [the deed].");
                        }
                        break;

                    case "the deed":
                        if (quest.Step == 3)
                        {
                            farmerAsma.SayTo(player, "You don't think they'll come after me, do you? I mean, pigs die all the time. We make food out of them, and they turn into pork and bacon and all kinds of good [things]...");
                        }
                        break;

                    case "things":
                        if (quest.Step == 3)
                        {
                            SendMessage(player, "Farmer Asma begins to ramble and soon becomes incoherent. When she realizes what's happened, she takes a deep breath and tries to compose herself.", 0, eChatType.CT_Say, eChatLoc.CL_PopupWindow);
                            farmerAsma.SayTo(player, "Oh, my. I'm so sorry, I just...well, I don't know what to do. I need a break from farming and pigs, and rural life. Maybe I'll take up something completely different...like brewing. Yes, brewing! Please take these coins and never speak of this again.");
                            quest.FinishQuest();
                        }
                        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;
                    }
                }
            }
        }
Ejemplo n.º 30
0
        /* This is the method we declared as callback for the hooks we set to
         * NPC. It will be called whenever a player right clicks on NPC
         * or when he whispers something to him.
         */

        protected static void TalkToElvarIronhand(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 (elvarIronhand.CanGiveQuest(typeof(BuildingABetterBow), player) <= 0)
            {
                return;
            }

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

            elvarIronhand.TurnTo(player);
            //Did the player rightclick on NPC?
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    //Player is not doing the quest...
                    elvarIronhand.SayTo(player, "Hello, adventurer. Are you here in response to the notice I posted in the [tavern]?");
                    return;
                }
                else
                {
                    if (quest.Step == 4)
                    {
                        elvarIronhand.SayTo(player, "You're back! I hope you were able to retrieve those bones without much trouble. I'm already drawing up the plans for the new bow.  May I have the bones?");
                    }
                    return;
                }
            }
            // The player whispered to NPC (clicked on the text inside the [])
            else if (e == GameLivingEvent.WhisperReceive)
            {
                WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args;
                if (quest == null)
                {
                    //Do some small talk :)
                    switch (wArgs.Text)
                    {
                    case "tavern":
                        elvarIronhand.SayTo(player, "I was hoping to get someone to help me with a little side project. You see, in my spare time, I collect texts on weaponsmithing and I recently came across one about weapons used in less civilized [lands].");
                        break;

                    case "lands":
                        elvarIronhand.SayTo(player, "It seems that some nomadic tribes have perfected the art of reinforcing their bows with thin pieces of bone or horn.  The text claims that bows constructed this way shoot farther and hit harder than the ones used by our [scouts].");
                        break;

                    //If the player offered his help, we send the quest dialog now!
                    case "scouts":
                        elvarIronhand.SayTo(player, "I think combining this technique with our longbows could help give our forces the edge in the war against Midgard and Hibernia. Will you help me gather some of the materials to build a prototype?");
                        player.Out.SendQuestSubscribeCommand(elvarIronhand, QuestMgr.GetIDForQuestType(typeof(BuildingABetterBow)), "Will you help Elvar gather the \nmaterials for his prototype bow? \n[Levels 3-6]");
                        break;
                    }
                }
                else
                {
                    switch (wArgs.Text)
                    {
                    case "first":
                        if (quest.Step == 1)
                        {
                            elvarIronhand.SayTo(player, "If you travel southeast from Cotswold, toward Prydwen keep, you should find some skeletons near the bend in the river.  Return to me when you've gathered two well-preserved bones from them.");
                            quest.Step = 2;
                        }
                        break;

                    case "technique":
                        if (quest.Step == 5)
                        {
                            elvarIronhand.SayTo(player, "Thank you for your help, " + player.CharacterClass.Name + ". Here's a bit of copper for your time. Keep your eyes open for a good source of horn in case the bone prototype doesn't work out.");
                            quest.FinishQuest();
                        }
                        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;
                    }
                }
            }
        }