Beispiel #1
0
    public async Task <HookResult> DougalAfterIntro(NpcScript npc, params object[] args)
    {
        if (!npc.HasQuest(this.Id) && !npc.HasKeyword("g1_37_1"))
        {
            npc.SendOwl(this.Id, OwlDelay);
            npc.GiveKeyword("g1_37_1");

            npc.Msg(L("You're quite brave to come to a place like this. I'm Dougal.<br/>I'm here... alone."));
            npc.Msg(L("I see that you're not from around here.<br/>I'm Dougal, the last remaining human here.<br/>I was pretty lonely. It's been a while since I've seen anyone."));
            npc.Msg(L("Why am I left here alone?<br/>It's complicated, but I didn't stay behind<br/>because I wanted to."));
            npc.Msg(L("..."));
            npc.Msg(L("What?<br/>This is Tir Na Nog?<br/>You mean the legendary paradise, Tir Na Nog?"));
            npc.Msg(L("Hah!<br/>Hahaha. I didn't expect to hear such a foolish statement from you."));
            npc.Msg(L("Look, if this truly is Tir Na Nog, the world where sickness and death don't exist,<br/>why would I have a leg like this?"));
            npc.Msg(L("Also, this town has turned into a wasteland<br/>after being invaded by the Fomors."));
            npc.Msg(L("You probably heard a false rumor somewhere.<br/>I'm sorry but this isn't the place you think it is."));
            npc.Msg(L("This is just another world that has become a land of the Fomors."));
            npc.Msg(L("But since you're here, take a look<br/>around as much as you want.<br/>Who knows?<br/>You might find this place similar to a place<br/>you are familiar with. Haha."));

            return(HookResult.Break);
        }
        else if (npc.QuestActive(this.Id, "talk1"))
        {
            npc.FinishQuest(this.Id, "talk1");

            npc.Msg(L("You've come... I was waiting for you.<br/>Because you're not from around here,<br/>I thought that losing the freedom of your body<br/>might end up getting you into big trouble."));
            npc.Msg(L("...True... Nobody but your party can help you<br/>in here.<br/>Even if your life ends and you pass away..."));
            npc.Msg(L("When you can't move...<br/>You return to your world.<br/>I do think you have to endure that fact, only because you are a human of another world..."));
            npc.Msg(L("...I've called you because a good plan has come up."));
            npc.Msg(L("Do you...know about the added soul phenomenon?<br/>It is the phenomenon where the spirit doesn't go away from one's body...<br/>I thought maybe if you were to use this trick<br/>you could let your spirit stay near here."));
            npc.Msg(L("Yes... If your spirit does not go away from your fallen body and stays near it<br/>there wouldn't be such a thing as having to resurrect back from the world you were in<br/>even if you were to lose the freedom of your body."));
            npc.Msg(L("But... dealing with spirits is also a dangerous thing...<br/>With the slightest provocation you can turn into one of those zombies behind the graveyard..."));
            npc.Msg(L("...So, I'll have to see if my thoughts are correct.<br/>If you knock down the spiritless zombies<br/>I will measure the added soul phenomenon that happens around the zombies<br/>and see if you can resurrect in this place."));
            npc.Msg(L("What do you think? Would you like to give it a try?"));

            return(HookResult.Break);
        }
        else if (npc.QuestActive(this.Id, "talk2"))
        {
            npc.CompleteQuest(this.Id);

            npc.RemoveKeyword("g1_37_1");
            npc.GiveKeyword("g1_bind");

            npc.Msg(L("It's just as I'd thought. We can use the added soul phenomenon<br/>and have your spirit stay here.<br/>If you believe me, from now on,<br/>you won't ever be an undead even if you collapse here."));
            npc.Msg(L("...Yes. My body and soul<br/>are exchanging with you the amount of strength<br/>you need to resurrect here..."));
            npc.Msg(L("Oh no... Are you uncomfortable about exchanging such things with me?<br/>Ha ha, no need to act calm.<br/>But..."));
            npc.Msg(L("Even when you can't move<br/>you can come near me.<br/>You will make it through this world with more ease if you remember this."));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Beispiel #2
0
	public async Task<HookResult> DougalAfterIntro(NpcScript npc, params object[] args)
	{
		if (!npc.HasQuest(this.Id) && !npc.HasKeyword("g1_37_1"))
		{
			npc.SendOwl(this.Id, OwlDelay);
			npc.GiveKeyword("g1_37_1");

			npc.Msg(L("You're quite brave to come to a place like this. I'm Dougal.<br/>I'm here... alone."));
			npc.Msg(L("I see that you're not from around here.<br/>I'm Dougal, the last remaining human here.<br/>I was pretty lonely. It's been a while since I've seen anyone."));
			npc.Msg(L("Why am I left here alone?<br/>It's complicated, but I didn't stay behind<br/>because I wanted to."));
			npc.Msg(L("..."));
			npc.Msg(L("What?<br/>This is Tir Na Nog?<br/>You mean the legendary paradise, Tir Na Nog?"));
			npc.Msg(L("Hah!<br/>Hahaha. I didn't expect to hear such a foolish statement from you."));
			npc.Msg(L("Look, if this truly is Tir Na Nog, the world where sickness and death don't exist,<br/>why would I have a leg like this?"));
			npc.Msg(L("Also, this town has turned into a wasteland<br/>after being invaded by the Fomors."));
			npc.Msg(L("You probably heard a false rumor somewhere.<br/>I'm sorry but this isn't the place you think it is."));
			npc.Msg(L("This is just another world that has become a land of the Fomors."));
			npc.Msg(L("But since you're here, take a look<br/>around as much as you want.<br/>Who knows?<br/>You might find this place similar to a place<br/>you are familiar with. Haha."));

			return HookResult.Break;
		}
		else if (npc.QuestActive(this.Id, "talk1"))
		{
			npc.FinishQuest(this.Id, "talk1");

			npc.Msg(L("You've come... I was waiting for you.<br/>Because you're not from around here,<br/>I thought that losing the freedom of your body<br/>might end up getting you into big trouble."));
			npc.Msg(L("...True... Nobody but your party can help you<br/>in here.<br/>Even if your life ends and you pass away..."));
			npc.Msg(L("When you can't move...<br/>You return to your world.<br/>I do think you have to endure that fact, only because you are a human of another world..."));
			npc.Msg(L("...I've called you because a good plan has come up."));
			npc.Msg(L("Do you...know about the added soul phenomenon?<br/>It is the phenomenon where the spirit doesn't go away from one's body...<br/>I thought maybe if you were to use this trick<br/>you could let your spirit stay near here."));
			npc.Msg(L("Yes... If your spirit does not go away from your fallen body and stays near it<br/>there wouldn't be such a thing as having to resurrect back from the world you were in<br/>even if you were to lose the freedom of your body."));
			npc.Msg(L("But... dealing with spirits is also a dangerous thing...<br/>With the slightest provocation you can turn into one of those zombies behind the graveyard..."));
			npc.Msg(L("...So, I'll have to see if my thoughts are correct.<br/>If you knock down the spiritless zombies<br/>I will measure the added soul phenomenon that happens around the zombies<br/>and see if you can resurrect in this place."));
			npc.Msg(L("What do you think? Would you like to give it a try?"));

			return HookResult.Break;
		}
		else if (npc.QuestActive(this.Id, "talk2"))
		{
			npc.CompleteQuest(this.Id);

			npc.RemoveKeyword("g1_37_1");
			npc.GiveKeyword("g1_bind");

			npc.Msg(L("It's just as I'd thought. We can use the added soul phenomenon<br/>and have your spirit stay here.<br/>If you believe me, from now on,<br/>you won't ever be an undead even if you collapse here."));
			npc.Msg(L("...Yes. My body and soul<br/>are exchanging with you the amount of strength<br/>you need to resurrect here..."));
			npc.Msg(L("Oh no... Are you uncomfortable about exchanging such things with me?<br/>Ha ha, no need to act calm.<br/>But..."));
			npc.Msg(L("Even when you can't move<br/>you can come near me.<br/>You will make it through this world with more ease if you remember this."));

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #3
0
    public async Task AboutArbeit(NpcScript npc)
    {
        // Check if already doing another PTJ
        if (npc.DoingPtjForOtherNpc())
        {
            npc.Msg(L("Are you working for someone else?<br/>Can you help me after you're finished?"));
            return;
        }

        // Check if PTJ is in progress
        if (npc.DoingPtjForNpc())
        {
            var result = npc.GetPtjResult();

            // Check if report time
            if (!npc.ErinnHour(Report, Deadline))
            {
                if (result == QuestResult.Perfect)
                {
                    npc.Msg(L("You're a little early.<br/>Report to me when it's closer to the deadline."));
                }
                else
                {
                    npc.Msg(L("How's it going?"));
                }
                return;
            }

            // Report?
            npc.Msg(L("Did you complete the job I asked you to do?<br/>You can report to me even if you have not finished it<br/>and I will pay you for what you have done."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later"));

            if (await npc.Select() != "@report")
            {
                npc.Msg(L("Good, I trust you.<br/>Please make sure to report before the deadline."));
                return;
            }

            // Nothing done
            if (result == QuestResult.None)
            {
                npc.GiveUpPtj();

                npc.Msg(npc.FavorExpression(), L("Are you feeling sick?<br/>You should rest instead of working so hard.<br/>But, a promise is a promise. I am sorry, but I can't pay you this time."));
                npc.ModifyRelation(0, -Random(3), 0);
            }
            // Low~Perfect result
            else
            {
                npc.Msg(L("Nice job, <username/>. You did great.<br/>For now, this is all I can give you as a token of my gratitude.<br/>Please choose one."), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result));
                var reply = await npc.Select();

                // Report later
                if (!reply.StartsWith("@reward:"))
                {
                    npc.Msg(L("Yes, <username/>.<br/>even if you come back later, I will hold on to your pay.<br/>But don't be too late."));
                    return;
                }

                // Complete
                npc.CompletePtj(reply);
                remaining--;

                // Result msg
                if (result == QuestResult.Perfect)
                {
                    npc.Msg(npc.FavorExpression(), L("Fine job. Just what I asked!<br/>Thank you very much."));
                    npc.ModifyRelation(0, Random(3), 0);
                }
                else if (result == QuestResult.Mid)
                {
                    npc.Msg(npc.FavorExpression(), L("You didn't bring me enough this time.<br/>I am sorry, but I will have to deduct it from your pay."));
                    npc.ModifyRelation(0, Random(1), 0);
                }
                else if (result == QuestResult.Low)
                {
                    npc.Msg(npc.FavorExpression(), L("You don't seem to be at the top of your game today.<br/>Sorry, I can only pay you for what you've completed."));
                    npc.ModifyRelation(0, -Random(2), 0);
                }

                // Herbalism quest
                if (npc.GetPtjSuccessCount(JobType) >= 10 && !npc.HasSkill(SkillId.Herbalism) && !npc.HasQuest(200042) && !npc.HasQuest(200063))
                {
                    npc.Msg(L("Say, <username/>.  Do you have any interest in learning Herbalism?<br/>You've been such a great help to me here, I thought you might be interested in becoming a healer.<br/>If you're interested in Herbalism, I have a favor to ask you.<br/>If you do it, then I'll teach you."), npc.Button(L("I will do it"), "@yes"), npc.Button(L("No, thanks"), "@no"));
                    if (await npc.Select() == "@yes")
                    {
                        npc.StartQuest(200063);                         // Gather Base Herb (Dilys)
                        npc.Msg(L("You sound really interested in becoming a healer...<br/>If you step outside, an owl will deliver my request to you."));
                    }
                    else
                    {
                        npc.Msg(L("Really?<br/>Then, I will see you next time when you need another part-time job."));
                    }
                }
            }
            return;
        }

        // Check if PTJ time
        if (!npc.ErinnHour(Start, Deadline))
        {
            npc.Msg(L("It's not time to start work yet.<br/>Can you come back and ask for a job later?"));
            return;
        }

        // Check if not done today and if there are jobs remaining
        if (!npc.CanDoPtj(JobType, remaining))
        {
            npc.Msg(L("There are no more jobs today.<br/>I will give you another job tomorrow."));
            return;
        }

        // Offer PTJ
        var randomPtj = npc.RandomPtj(JobType, QuestIds);
        var msg       = "";

        if (npc.GetPtjDoneCount(JobType) == 0)
        {
            msg = L("Do you need some work to do?<br/>If you want, you can help me here.<br/>The pay is not great, but I will definitely pay you for your work.<br/>The pay also depends on how long you've worked for me.<br/>Would you like to try?");
        }
        else
        {
            msg = L("Ah, <username/>. Can you help me today?");
        }

        npc.Msg(msg, npc.PtjDesc(randomPtj, L("Dilys's Healer's House Part-Time Job"), L("Looking for help with delivering goods in Healer's House."), PerDay, remaining, npc.GetPtjDoneCount(JobType)));

        if (await npc.Select() == "@accept")
        {
            npc.Msg(L("Thank you for your help in advance."));
            npc.StartPtj(randomPtj);
        }
        else
        {
            npc.Msg(L("You seem busy today."));
        }
    }
Beispiel #4
0
    // Dialog pieced together from vague translations
    // and snippets of official dialog.
    public async Task <HookResult> KristellBeforeKeywords(NpcScript npc, params object[] args)
    {
        var keyword = args[0] as string;

        if (keyword == "g1_cichol")
        {
            npc.Msg(L("He's amongst one of the evil Gods that lead the Fomors.<br/>Yes, Fomors do worship Gods."));
            npc.Msg(L("I don't particularly feel up to talking about him.<br/>But, I'll tell you now, you should hurry if you think Cichol<br/>is somehow involved with GOddess Morrighan."));
            npc.Msg(L("He is cunning and meticulous, so he will<br/>be very difficult to stop by ourselves."));
        }
        else if (keyword == "g1_way_to_tirnanog1")
        {
            if (npc.Player.Level < 25)
            {
                npc.Msg(L("...<p/>I have heard people call your name...<br/>And I know what kind of person you are."));
                npc.Msg(L("...But, <username/>... Tir Na Nog is a bad place to be.<br/>In that place even your connection<br/>to the Soul Stream won't help you..."));
                npc.Msg(L("You don't have the experience to survive there."));
                npc.Msg(L("You should at least reach level 25...<br/>Otherwise, going there would be suicide."));

                return(HookResult.Break);
            }

            var hasSlayerTitle = (npc.Title == 79 || npc.Title == 80 || npc.Title == 81 || npc.Title == 82 || npc.Title == 83 || npc.Title == 85 || npc.Title == 53);
            if (!hasSlayerTitle)
            {
                npc.Msg(L("...<br/>If...<br/>If Tir Na Nog is..."));
                npc.Msg(L("If it really is the land of the Fomors, like Tarlach said..."));
                npc.Msg(L("I've already betrayed the Fomors. I supposed it doesn't hurt to tell you.<br/>The land of the Fomors is a dangerous place.<br/>There are no friendly faces or safe places...<br/>You have no one but yourself and your party members to rely on."));
                npc.Msg(L("Do you... think you have the strength to bear the pain...?"));
                npc.Msg(L("I can tell you how to reach Tir Na Nog."));
                npc.Msg(L("But... please show me that you're capable<br/>of fighting Erinn's powerful monsters."));
                npc.Msg(L("I can't tell you how to reach Tir Na Nog before that."));

                return(HookResult.Break);
            }

            if (npc.HasKeyword("g1_33"))
            {
                if (!npc.HasQuest(this.Id))
                {
                    npc.StartQuest(this.Id);
                }

                npc.Msg(L("That title above your head<br/>tells me that you're confident<br/>with your strength."));
                npc.Msg(L("If you're so strong,<br/>could I ask you for one favor?"));
                npc.Msg(L("I've betrayed the Fomors to become a Human.<br/>Fomors are always waiting for the chance to hurt me."));
                npc.Msg(L("Ever since I translated the book for Tarlach,<br/>I sensed someone stalking me."));
                npc.Msg(L("I'm really insecure because I feel the Fomors looking for me.<br/>I saw the Fomor Command Scroll and think I'm supposed to be the target.<br/>Can you help me so they can't come anywhere near here?"));
                npc.Msg(L("If you do that,<br/>I'll feel a bit more at ease."));
            }
            else
            {
                if (!npc.HasItem(BlackFomorPass))
                {
                    npc.GiveItem(BlackFomorPass);
                    npc.Msg(L("This is a Fomor Pass used only by high ranking Fomors.<br/>I pray that you won't lose it."));
                }
                else
                {
                    npc.Msg(L("Yes, offer the pass I gave you in Barri Dungeon.<br/>...<br/>Please be careful."));
                }
            }

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Beispiel #5
0
	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("Are you working for someone else?<br/>Can you help me after you're finished?"));
			return;
		}

		// Check if PTJ is in progress
		if (npc.DoingPtjForNpc())
		{
			var result = npc.GetPtjResult();

			// Check if report time
			if (!npc.ErinnHour(Report, Deadline))
			{
				if (result == QuestResult.Perfect)
					npc.Msg(L("You're a little early.<br/>Report to me when it's closer to the deadline."));
				else
					npc.Msg(L("How's it going?"));
				return;
			}

			// Report?
			npc.Msg(L("Did you complete the job I asked you to do?<br/>You can report to me even if you have not finished it<br/>and I will pay you for what you have done."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later"));

			if (await npc.Select() != "@report")
			{
				npc.Msg(L("Good, I trust you.<br/>Please make sure to report before the deadline."));
				return;
			}

			// Nothing done
			if (result == QuestResult.None)
			{
				npc.GiveUpPtj();

				npc.Msg(npc.FavorExpression(), L("Are you feeling sick?<br/>You should rest instead of working so hard.<br/>But, a promise is a promise. I am sorry, but I can't pay you this time."));
				npc.ModifyRelation(0, -Random(3), 0);
			}
			// Low~Perfect result
			else
			{
				npc.Msg(L("Nice job, <username/>. You did great.<br/>For now, this is all I can give you as a token of my gratitude.<br/>Please choose one."), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result));
				var reply = await npc.Select();

				// Report later
				if (!reply.StartsWith("@reward:"))
				{
					npc.Msg(L("Yes, <username/>.<br/>even if you come back later, I will hold on to your pay.<br/>But don't be too late."));
					return;
				}

				// Complete
				npc.CompletePtj(reply);
				remaining--;

				// Result msg
				if (result == QuestResult.Perfect)
				{
					npc.Msg(npc.FavorExpression(), L("Fine job. Just what I asked!<br/>Thank you very much."));
					npc.ModifyRelation(0, Random(3), 0);
				}
				else if (result == QuestResult.Mid)
				{
					npc.Msg(npc.FavorExpression(), L("You didn't bring me enough this time.<br/>I am sorry, but I will have to deduct it from your pay."));
					npc.ModifyRelation(0, Random(1), 0);
				}
				else if (result == QuestResult.Low)
				{
					npc.Msg(npc.FavorExpression(), L("You don't seem to be at the top of your game today.<br/>Sorry, I can only pay you for what you've completed."));
					npc.ModifyRelation(0, -Random(2), 0);
				}

				// Herbalism quest
				if (npc.GetPtjSuccessCount(JobType) >= 10 && !npc.HasSkill(SkillId.Herbalism) && !npc.HasQuest(200042) && !npc.HasQuest(200063))
				{
					npc.Msg(L("Say, <username/>. Do you have any interest in learning Herbalism?<br/>You've been such a great help to me here, I thought you might be interested in becoming a healer.<br/>If you're interested in Herbalism, I have a favor to ask you.<br/>If you do it, then I'll teach you."), npc.Button(L("I will do it"), "@yes"), npc.Button(L("No, thanks"), "@no"));
					if (await npc.Select() == "@yes")
					{
						npc.SendOwl(200063); // Gather Base Herb (Dilys)
						npc.Msg(L("You sound really interested in becoming a healer...<br/>If you step outside, an owl will deliver my request to you."));
					}
					else
					{
						npc.Msg(L("Really?<br/>Then, I will see you next time when you need another part-time job."));
					}
				}
			}
			return;
		}

		// Check if PTJ time
		if (!npc.ErinnHour(Start, Deadline))
		{
			npc.Msg(L("It's not time to start work yet.<br/>Can you come back and ask for a job later?"));
			return;
		}

		// Check if not done today and if there are jobs remaining
		if (!npc.CanDoPtj(JobType, remaining))
		{
			npc.Msg(L("There are no more jobs today.<br/>I will give you another job tomorrow."));
			return;
		}

		// Offer PTJ
		var randomPtj = npc.RandomPtj(JobType, QuestIds);
		var msg = "";

		if (npc.GetPtjDoneCount(JobType) == 0)
			msg = L("Do you need some work to do?<br/>If you want, you can help me here.<br/>The pay is not great, but I will definitely pay you for your work.<br/>The pay also depends on how long you've worked for me.<br/>Would you like to try?");
		else
			msg = L("Ah, <username/>. Can you help me today?");

		npc.Msg(msg, npc.PtjDesc(randomPtj, L("Dilys's Healer's House Part-Time Job"), L("Looking for help with delivering goods in Healer's House."), PerDay, remaining, npc.GetPtjDoneCount(JobType)));

		if (await npc.Select() == "@accept")
		{
			npc.Msg(L("Thank you for your help in advance."));
			npc.StartPtj(randomPtj);
		}
		else
		{
			npc.Msg(L("You seem busy today."));
		}
	}
	// Dialog pieced together from vague translations
	// and snippets of official dialog.
	public async Task<HookResult> KristellBeforeKeywords(NpcScript npc, params object[] args)
	{
		var keyword = args[0] as string;

		if (keyword == "g1_cichol")
		{
			npc.Msg(L("He's amongst one of the evil Gods that lead the Fomors.<br/>Yes, Fomors do worship Gods."));
			npc.Msg(L("I don't particularly feel up to talking about him.<br/>But, I'll tell you now, you should hurry if you think Cichol<br/>is somehow involved with GOddess Morrighan."));
			npc.Msg(L("He is cunning and meticulous, so he will<br/>be very difficult to stop by ourselves."));
		}
		else if (keyword == "g1_way_to_tirnanog1")
		{
			if (npc.Player.Level < 25)
			{
				npc.Msg(L("...<p/>I have heard people call your name...<br/>And I know what kind of person you are."));
				npc.Msg(L("...But, <username/>... Tir Na Nog is a bad place to be.<br/>In that place even your connection<br/>to the Soul Stream won't help you..."));
				npc.Msg(L("You don't have the experience to survive there."));
				npc.Msg(L("You should at least reach level 25...<br/>Otherwise, going there would be suicide."));

				return HookResult.Break;
			}

			var hasSlayerTitle = (npc.Title == 79 || npc.Title == 80 || npc.Title == 81 || npc.Title == 82 || npc.Title == 83 || npc.Title == 85 || npc.Title == 53);
			if (!hasSlayerTitle)
			{
				npc.Msg(L("...<br/>If...<br/>If Tir Na Nog is..."));
				npc.Msg(L("If it really is the land of the Fomors, like Tarlach said..."));
				npc.Msg(L("I've already betrayed the Fomors. I supposed it doesn't hurt to tell you.<br/>The land of the Fomors is a dangerous place.<br/>There are no friendly faces or safe places...<br/>You have no one but yourself and your party members to rely on."));
				npc.Msg(L("Do you... think you have the strength to bear the pain...?"));
				npc.Msg(L("I can tell you how to reach Tir Na Nog."));
				npc.Msg(L("But... please show me that you're capable<br/>of fighting Erinn's powerful monsters."));
				npc.Msg(L("I can't tell you how to reach Tir Na Nog before that."));

				return HookResult.Break;
			}

			if (npc.HasKeyword("g1_33"))
			{
				if (!npc.HasQuest(this.Id))
					npc.StartQuest(this.Id);

				npc.Msg(L("That title above your head<br/>tells me that you're confident<br/>with your strength."));
				npc.Msg(L("If you're so strong,<br/>could I ask you for one favor?"));
				npc.Msg(L("I've betrayed the Fomors to become a Human.<br/>Fomors are always waiting for the chance to hurt me."));
				npc.Msg(L("Ever since I translated the book for Tarlach,<br/>I sensed someone stalking me."));
				npc.Msg(L("I'm really insecure because I feel the Fomors looking for me.<br/>I saw the Fomor Command Scroll and think I'm supposed to be the target.<br/>Can you help me so they can't come anywhere near here?"));
				npc.Msg(L("If you do that,<br/>I'll feel a bit more at ease."));
			}
			else
			{
				if (!npc.HasItem(BlackFomorPass))
				{
					npc.GiveItem(BlackFomorPass);
					npc.Msg(L("This is a Fomor Pass used only by high ranking Fomors.<br/>I pray that you won't lose it."));
				}
				else
				{
					npc.Msg(L("Yes, offer the pass I gave you in Barri Dungeon.<br/>...<br/>Please be careful."));
				}
			}

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #7
0
	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("So, you want to work at a Healer's House, do you?<br/>I appreciate your enthusiasm, but finish the work you're doing first."));
			return;
		}

		// Check if PTJ is in progress
		if (npc.DoingPtjForNpc())
		{
			var result = npc.GetPtjResult();

			// Check if report time
			if (!npc.ErinnHour(Report, Deadline))
			{
				if (result == QuestResult.Perfect)
					npc.Msg(L("It's not the deadline yet. Come back later.<p/>Alright. I'll see you later!"));
				else
					npc.Msg(L("I trust that your work is going well?"));

				return;
			}

			// Report?
			npc.Msg(L("So, do you want to wrap up today's work here?<br/>You can report and finish the work without completing it,<br/>but it's good to finish something you've started."),
				npc.Button(L("Report Now"), "@report"),
				npc.Button(L("Report Later"), "@later")
				);

			if (await npc.Select() != "@report")
			{
				npc.Msg(L("Alright! Go for it!<br/>I look forward to your report!"));
				return;
			}

			// Nothing done
			if (result == QuestResult.None)
			{
				npc.GiveUpPtj();

				npc.Msg(npc.FavorExpression(), L("Weak.<br/>If you keep this up,<br/>you'll never get paid."));
				npc.ModifyRelation(0, -Random(3), 0);
			}
			// Low~Perfect result
			else
			{
				npc.Msg(L("Ha ha. I knew I was an excellent judge of character!<br/>Now, I should pay you for the work you have done, hmm? Take your pick here.<br/>I have to give to other workers, too, so don't even think about taking them all! Hahaha."),
					npc.Button(L("Report Later"), "@later"),
					npc.PtjReport(result)
					);
				var reply = await npc.Select();

				// Report later
				if (!reply.StartsWith("@reward:"))
				{
					npc.Msg(npc.FavorExpression(), L("Eh? What, are you going to just leave?"));
					return;
				}

				// Complete
				npc.CompletePtj(reply);
				remaining--;

				// Result msg
				if (result == QuestResult.Perfect)
				{
					npc.Msg(npc.FavorExpression(), L("Alright! Well done!<br/>You've worked hard."));
					npc.ModifyRelation(0, Random(3), 0);
				}
				else if (result == QuestResult.Mid)
				{
					npc.Msg(npc.FavorExpression(), L("Hmm. That's not quite enough.<br/>I'll deduct it from your pay."));
					npc.ModifyRelation(0, Random(1), 0);
				}
				else if (result == QuestResult.Low)
				{
					npc.Msg(npc.FavorExpression(), L("Is this the best you can do?<br/>Then I have no choice but to pay only a little."));
					npc.ModifyRelation(0, -Random(2), 0);
				}

				// Herbalism quest
				if (npc.GetPtjSuccessCount(JobType) >= 10 && !npc.HasSkill(SkillId.Herbalism) && !npc.HasQuest(200042) && !npc.HasQuest(200063))
				{
					// Unofficial/Copy of Dilys
					npc.Msg(L("Say, <username/>. Do you have any interest in learning Herbalism?<br/>You've been such a great help to me here, I thought you might be interested in becoming a healer.<br/>If you're interested in Herbalism, I have a favor to ask you.<br/>If you do it, then I'll teach you."), npc.Button(L("I will do it"), "@yes"), npc.Button(L("No, thanks"), "@no"));
					if (await npc.Select() == "@yes")
					{
						npc.SendOwl(200042); // Gather Base Herb (Manus)
						npc.Msg(L("You sound really interested in becoming a healer...<br/>If you step outside, an owl will deliver my request to you."));
					}
					else
					{
						npc.Msg(L("Really?<br/>Then, I will see you next time when you need another part-time job."));
					}
				}
			}
			return;
		}

		// Check if PTJ time
		if (!npc.ErinnHour(Start, Deadline))
		{
			npc.Msg(L("Try again later.<br/>It's not time for work yet."));
			return;
		}

		// Check if not done today and if there are jobs remaining
		if (!npc.CanDoPtj(JobType, remaining))
		{
			npc.Msg(L("Come back tomorrow."));
			return;
		}

		// Offer PTJ
		var randomPtj = npc.RandomPtj(JobType, QuestIds);
		var msg = "";

		if (npc.GetPtjDoneCount(JobType) == 0)
			msg = L("Looking for some work, are you?<br/>I happen to be in need of extra hands here,<br/>so help me out here and I'll pay you adequately.<br/>It's not much, though...<p/>So, are you interested?");
		else
			msg = L("So, you're here to help out again.");

		npc.Msg(msg, npc.PtjDesc(randomPtj,
			L("Manus's Healer's House part-time job"),
			L("Looking for help with delivering goods to Healer's House."),
			PerDay, remaining, npc.GetPtjDoneCount(JobType)));

		if (await npc.Select() == "@accept")
		{
			if (npc.GetPtjDoneCount(JobType) == 0)
				npc.Msg(L("Great. Good choice.<br/>Remember to report back to me before the deadline.<br/>"));
			else
				npc.Msg(L("I look forward to your job well done."));

			npc.StartPtj(randomPtj);
		}
		else
		{
			if (npc.GetPtjDoneCount(JobType) == 0)
				npc.Msg(L("If you don't want to report, though, I won't force you."));
			else
				npc.Msg(L("You must be feeling off today."));
		}
	}
Beispiel #8
0
    public async Task AboutArbeit(NpcScript npc)
    {
        // Check if already doing another PTJ
        if (npc.DoingPtjForOtherNpc())
        {
            npc.Msg(L("So, you want to work at a Healer's House, do you?<br/>I appreciate your enthusiasm, but finish the work you're doing first."));
            return;
        }

        // Check if PTJ is in progress
        if (npc.DoingPtjForNpc())
        {
            var result = npc.GetPtjResult();

            // Check if report time
            if (!npc.ErinnHour(Report, Deadline))
            {
                if (result == QuestResult.Perfect)
                {
                    npc.Msg(L("It's not the deadline yet. Come back later.<p/>Alright. I'll see you later!"));
                }
                else
                {
                    npc.Msg(L("I trust that your work is going well?"));
                }

                return;
            }

            // Report?
            npc.Msg(L("So, do you want to wrap up today's work here?<br/>You can report and finish the work without completing it,<br/>but it's good to finish something you've started."),
                    npc.Button(L("Report Now"), "@report"),
                    npc.Button(L("Report Later"), "@later")
                    );

            if (await npc.Select() != "@report")
            {
                npc.Msg(L("Alright! Go for it!<br/>I look forward to your report!"));
                return;
            }

            // Nothing done
            if (result == QuestResult.None)
            {
                npc.GiveUpPtj();

                npc.Msg(npc.FavorExpression(), L("Weak.<br/>If you keep this up,<br/>you'll never get paid."));
                npc.ModifyRelation(0, -Random(3), 0);
            }
            // Low~Perfect result
            else
            {
                npc.Msg(L("Ha ha. I knew I was an excellent judge of character!<br/>Now, I should pay you for the work you have done, hmm? Take your pick here.<br/>I have to give to other workers, too, so don't even think about taking them all! Hahaha."),
                        npc.Button(L("Report Later"), "@later"),
                        npc.PtjReport(result)
                        );
                var reply = await npc.Select();

                // Report later
                if (!reply.StartsWith("@reward:"))
                {
                    npc.Msg(npc.FavorExpression(), L("Eh? What, are you going to just leave?"));
                    return;
                }

                // Complete
                npc.CompletePtj(reply);
                remaining--;

                // Result msg
                if (result == QuestResult.Perfect)
                {
                    npc.Msg(npc.FavorExpression(), L("Alright! Well done!<br/>You've worked hard."));
                    npc.ModifyRelation(0, Random(3), 0);
                }
                else if (result == QuestResult.Mid)
                {
                    npc.Msg(npc.FavorExpression(), L("Hmm. That's not quite enough.<br/>I'll deduct it from your pay."));
                    npc.ModifyRelation(0, Random(1), 0);
                }
                else if (result == QuestResult.Low)
                {
                    npc.Msg(npc.FavorExpression(), L("Is this the best you can do?<br/>Then I have no choice but to pay only a little."));
                    npc.ModifyRelation(0, -Random(2), 0);
                }

                // Herbalism quest
                if (npc.GetPtjSuccessCount(JobType) >= 10 && !npc.HasSkill(SkillId.Herbalism) && !npc.HasQuest(200042) && !npc.HasQuest(200063))
                {
                    // Unofficial/Copy of Dilys
                    npc.Msg(L("Say, <username/>. Do you have any interest in learning Herbalism?<br/>You've been such a great help to me here, I thought you might be interested in becoming a healer.<br/>If you're interested in Herbalism, I have a favor to ask you.<br/>If you do it, then I'll teach you."), npc.Button(L("I will do it"), "@yes"), npc.Button(L("No, thanks"), "@no"));
                    if (await npc.Select() == "@yes")
                    {
                        npc.SendOwl(200042);                         // Gather Base Herb (Manus)
                        npc.Msg(L("You sound really interested in becoming a healer...<br/>If you step outside, an owl will deliver my request to you."));
                    }
                    else
                    {
                        npc.Msg(L("Really?<br/>Then, I will see you next time when you need another part-time job."));
                    }
                }
            }
            return;
        }

        // Check if PTJ time
        if (!npc.ErinnHour(Start, Deadline))
        {
            npc.Msg(L("Try again later.<br/>It's not time for work yet."));
            return;
        }

        // Check if not done today and if there are jobs remaining
        if (!npc.CanDoPtj(JobType, remaining))
        {
            npc.Msg(L("Come back tomorrow."));
            return;
        }

        // Offer PTJ
        var randomPtj = npc.RandomPtj(JobType, QuestIds);
        var msg       = "";

        if (npc.GetPtjDoneCount(JobType) == 0)
        {
            msg = L("Looking for some work, are you?<br/>I happen to be in need of extra hands here,<br/>so help me out here and I'll pay you adequately.<br/>It's not much, though...<p/>So, are you interested?");
        }
        else
        {
            msg = L("So, you're here to help out again.");
        }

        npc.Msg(msg, npc.PtjDesc(randomPtj,
                                 L("Manus's Healer's House part-time job"),
                                 L("Looking for help with delivering goods to Healer's House."),
                                 PerDay, remaining, npc.GetPtjDoneCount(JobType)));

        if (await npc.Select() == "@accept")
        {
            if (npc.GetPtjDoneCount(JobType) == 0)
            {
                npc.Msg(L("Great. Good choice.<br/>Remember to report back to me before the deadline.<br/>"));
            }
            else
            {
                npc.Msg(L("I look forward to your job well done."));
            }

            npc.StartPtj(randomPtj);
        }
        else
        {
            if (npc.GetPtjDoneCount(JobType) == 0)
            {
                npc.Msg(L("If you don't want to report, though, I won't force you."));
            }
            else
            {
                npc.Msg(L("You must be feeling off today."));
            }
        }
    }