Exemple #1
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."));
        }
    }
Exemple #2
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."));
		}
	}
Exemple #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.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."));
		}
	}
Exemple #4
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."));
            }
        }
    }