public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.Player.IsDoingPtjNotFor(npc.NPC)) { npc.Msg(L("Are you working on a different part-time job?<br/>Well, then. Please help me in the future when you have a chance.")); return; } // Check if PTJ is in progress if (npc.Player.IsDoingPtjFor(npc.NPC)) { var result = npc.Player.GetPtjResult(); // Check if report time if (!ErinnHour(Report, Deadline)) { if (result == QuestResult.Perfect) { npc.Msg(L("Ah, you are here already?<br/>It's a little bit too early. Can you come back around the deadline?")); } else { npc.Msg(L("I hope you didn't forget what I asked you to do.<p/>Please have it done by the deadline.")); } return; } // Report? npc.Msg(L("Did you complete the task I requested?<br/>You can report now and finish it up,<br/>or you may report it later if you're not done yet."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later")); if (await npc.Select() != "@report") { npc.Msg(L("Please report before the deadline is over.<br/>Even if the work is not done, you should still report.<br/>Then I can pay you for what you've completed.")); return; } // Nothing done if (result == QuestResult.None) { npc.Player.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Ha ha. This is a little disappointing.<br/>I don't think I can pay you for this.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("You are quite skillful, <username/>.<br/>Now there's nothing to worry about even if I get too much work. Ha ha.<br/>Please choose what you want. You deserve it.<br/>I'd like to give it to you as a compensation for your hard work."), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result)); var reply = await npc.Select(); // Report later if (!reply.StartsWith("@reward:")) { npc.Msg(L("Please report before the deadline is over.<br/>Even if the work is not done, you should still report.<br/>Then I can pay you for what you've completed.")); return; } // Complete npc.Player.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Great! You have done well as I requested.<br/>I hope you can help me again next time.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Thank you. Although you didn't complete the job, you've done enough so far.<br/>But I'm sorry to tell you I must deduct a little from your pay.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Hmm... It's not exactly what I expected, but thank you.<br/>I'm afraid this is all I can pay you.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!ErinnHour(Start, Deadline)) { npc.Msg(L("Hmm... It's not a good time for this.<br/>Can you come back when it is time for part-time jobs?")); return; } // Check if not done today and if there are jobs remaining if (!npc.Player.CanDoPtj(JobType, remaining)) { npc.Msg(L("I'm all set for today.<br/>Will you come back tomorrow?")); return; } // Offer PTJ var randomPtj = GetRandomPtj(npc.Player, JobType, QuestIds); // Msg is kinda unofficial, she currently says the following, and then // tells you you'd get Homestead seeds. npc.Msg(L("Are you here for a part-time job at my Inn again?"), npc.PtjDesc(randomPtj, L("Piaras's Inn Part-time Job"), L("Looking for help with delivering goods to Inn."), PerDay, remaining, npc.Player.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { npc.Msg(L("I'll be counting on you as usual.")); npc.Player.StartPtj(randomPtj, npc.NPC.Name); } else { npc.Msg(L("You want to sleep on it?<br/>Alright, then.<br/>But report on time please.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.Player.IsDoingPtjNotFor(npc.NPC)) { 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.Player.IsDoingPtjFor(npc.NPC)) { var result = npc.Player.GetPtjResult(); // Check if report time if (!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.Player.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.Player.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.Player.GetPtjSuccessCount(JobType) >= 10 && !npc.Player.HasSkill(SkillId.Herbalism) && !npc.Player.HasQuest(200042) && !npc.Player.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.Player.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 (!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.Player.CanDoPtj(JobType, remaining)) { npc.Msg(L("Come back tomorrow.")); return; } // Offer PTJ var randomPtj = GetRandomPtj(npc.Player, JobType, QuestIds); var msg = ""; if (npc.Player.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.Player.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.Player.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.Player.StartPtj(randomPtj, npc.NPC.Name); } else { if (npc.Player.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.")); } } }
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.")); } }
public async Task AboutArbeit(NpcScript npc) { if (npc.DoingPtjForOtherNpc()) { npc.Msg("You have other things to do, right?<br/>If you need the Holy Water of Lymilark, can you come back after you are finished with your work?"); return; } if (npc.DoingPtjForNpc()) { var result = npc.GetPtjResult(); if (!npc.ErinnHour(Report, Deadline)) { if (result == QuestResult.Perfect) { npc.Msg("It seems you took care of your end of the bargain.<br/>I'm a little busy right now, but come back later so I can compensate you for your work."); } else { npc.Msg("How are you doing with the part-time job for the Church today?<br/>I have the utmost faith in you, <username/>."); } return; } npc.Msg("Did you finish the part-time job I gave you?<br/>If you are done, you can report the results to me. Do you want to do so now?<button title='Report Now' keyword='@report' /><button title='Report Later' keyword='@later' />"); if (await npc.Select() != "@report") { npc.Msg("You don't want to report yet?<br/>Please make sure to come back and report before the deadline."); return; } if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), "I'm sorry,<br/>but I cannot give you the Holy Water of Lymilark unless you complete the task I've asked you to take care of.<br/>Please work harder next time."); npc.ModifyRelation(0, -Random(3), 0); } else { npc.Msg("Well done, <username/>. I feel very relieved thanks to you.<br/>In appreciation of all the hard work you've put in for the Church,<br/>I prepared some things for you.<br/>I'd love to give you all these if I could, but I can't. Please pick one.<button title='Report Later' keyword='@later' />" + npc.GetPtjReportXml(result)); var reply = await npc.Select(); if (!reply.StartsWith("@reward:")) { npc.Msg("You don't want to report yet?<br/>Please make sure to come back and report before the deadline."); return; } npc.CompletePtj(reply); remaining--; if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), "Thanks. You took care of everything I've asked for.<br/>As promised, I will give you the Holy Water of Lymilark."); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), "It's a bit short of what I asked for,<br/>but I appreciate your help.<br/>I will give you the Holy Water of Lymilark in return."); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), "Did you run out of time?<br/>You completed only a portion of what I asked for.<br/>I'm sorry, but that's not good enough for me to give you the Holy Water of Lymilark."); npc.ModifyRelation(0, -Random(2), 0); } } return; } if (!npc.ErinnHour(Start, Deadline)) { npc.Msg("Are you willing to help the Church?<br/>It's a bit early, though. Please come back at a later time."); return; } if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg("Today's part-time jobs are all taken.<br/>If you need some Holy Water of Lymilark, please come back tomorrow."); return; } var randomPtj = npc.RandomPtj(JobType, QuestIds); var ptjXml = npc.GetPtjXml(randomPtj, "Endelyon's Church Part-Time Job", "Looking for help with delivering goods to Church.", PerDay, remaining); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) { msg = "Our Church is looking for a kind soul to help take care of our crops.<br/>The main job is to harvest wheat or barley from the farmland located south of the Church.<br/>One thing to note: because of our tight budget, we cannot afford to pay in gold.<p/>Instead, anyone who completes the job will receive some Holy Water of Lymilark,<br/>which can be used to bless items.<br/>Blessed items do not fall to the ground<br/>when its owner is knocked unconscious.<br/>Now, what do you say?"; } else { msg = "Are you here for the Holy Water of Lymilark again?<br/>Please take a look at today's part-time job and tell me if you want it."; } npc.Msg(msg + ptjXml); if (await npc.Select() == "@accept") { npc.Msg("Thank you.<br/>Please take care of this on time."); npc.StartPtj(randomPtj); } else { npc.Msg("If you don't want to do it, then I guess that's that."); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Do you need holy water?<br/>If you come after you have finished the work that you are doing now, I will give you a task that's related to holy water.")); 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 will have to wait a little longer for the deadline today.")); } else { npc.Msg(L("It is not the deadline yet.<br/>Anyway, are you doing the work I have asked you to do?")); } return; } // Report? npc.Msg(L("It is the deadline.<br/>Shall we see whether you have completed your tasks?"), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Very well.<br/>But, please do report to me before the deadline.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("If you ignore the tasks you promised to carry out,<br/>I cannot help you much, either.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Thank you for a job well done.<br/>For that, I have prepared a few things.<br/>I cannot part with all of them, but<br/>why don't you pick one that you like?"), 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("Hmm? Would you rather do it next time?<br/>Whatever works for you, then.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Thank you.<br/>You have not disappointed me, as expected.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("It seems that you have not completely finished the given tasks.<br/>But, you also seem to have done your best, <username/>,<br/>so I will give you a reward for that.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Pardon my criticism,<br/>but you seem to have neglected your tasks and focused on something else.<br/>I will give you a partial compensation.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("I appreciate your willingness to help,<br/>but it is not time yet for me to assign tasks.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("There doesn't seem to be much else you can help with today.<br/>Let's talk again tomorrow.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) { msg = L("As you can see, I am in need of financial assistance,<br/>not in a position to help financially.<br/>But if you help with the tasks, I can at least give you some holy water."); } else { msg = L("Do you need holy water again today?"); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Comgan's Monster-Hunting Part-Time Job"), L("Looking for monster hunters in Church."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Please do come back to report before the deadline.")); } else { npc.Msg(L("Please be careful not to miss the deadline.")); } npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Don't like the given work, do you?")); } else { npc.Msg(L("I am sorry, but if you won't help with the tasks,<br/>I cannot really help you, either.")); } } }
public async Task AboutArbeit(NpcScript npc) { int report, deadline; // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Are you working for someone else?<br/>Can you help me later with this job?")); return; } // Check if PTJ is in progress if (npc.DoingPtjForNpc()) { var result = npc.GetPtjResult(); // Check if report time GetPersonalReportAndDeadline(npc, out report, out deadline); if (!npc.ErinnHour(report, deadline)) { if (result == QuestResult.Perfect) { npc.Msg(L("Hmm... Can you come back closer to the deadline?<br/>I will pay you then.")); } else { npc.Msg(L("How's the work going?")); } return; } // Report? npc.Msg(L("Did you complete what I've asked of you?<br/>You can report to me even if it's not complete<br/>and I will pay you for the work you've done."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Good, I trust your work.<br/>Please make sure to report back to me 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 overworking yourself.<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("Well done. <username/>.<br/>I hope that you will keep up the good work.<br/>I've prepared these items as a reward for the job.<br/>Pick what you need.."), 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("You can think about it a little more. Excuse me...")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Good. Just as I asked you to do.<br/>Thank you very much.")); npc.ModifyRelation(0, Random(3), 0); } else { // Eeavan doesn't have any PTJ quests that could yield // mid/low results. } } return; } // Check if PTJ time GetPersonalReportAndDeadline(npc, out report, out deadline); 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 that great, but I will definitely pay you for your work.<br/>The pay will be adjusted depending on how long you've worked for me.<p/>Would you like to try?"); } else { msg = L("Ah, <username/>. Can you help me today?"); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Eavan's Adven. Assoc. Part-Time Job"), L("Looking for help with delivery of goods in Adventurers' Association."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Thank you. I know you will be of great help to me.<br/>I want to make one thing clear before we start, though.<br/>You must report to me before the deadline whether or not your job is complete.")); } else { npc.Msg(L("Thank you for your help in advance.")); } npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Do you have something else to do?<br/>Then, I will find someone else.")); } else { npc.Msg(L("You seem busy today.")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("The Church also needs workers.<br/>Please pay a visit here once you finish the current task.")); 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 have finished already?<br/>It is a little too early, so would you mind returning later?")); } else { npc.Msg(L("I trust that the assigned task is going well?<br/>The deadline is not past yet, so please do your best.")); } return; } // Report? npc.Msg(L("It seems that you have completed the given task.<br/>If you would like, we can call it a day here."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("If not right now, please make sure to report to me before the deadline.<br/>You have to at least report back to me even if you do not completely finish your task.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Oh, good heavens!<br/><username/>, I trusted you with this and this is all you have done. How disappointing.<br/>I cannot pay you for this.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Mmm? I did not know you would do such a good job.<br/>You are a very meticulous worker, <username/>.<br/>I know this does not do justice for the excellent work you have done, but<br/>I have prepared a few things as a token of my gratitude. Please, take your pick."), 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("You seem to be busy all the time, <username/>.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Great! You have done very well.<br/>Here is the Holy Water as promised.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Thank you for your help.<br/>But, it is a little less than what was asked for.<br/>Anyway, I will pay you for what has been completed.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Hmm. You have not adequately completed your work.<br/>Did you not have enough time?<br/>I cannot give you the Holy Water, then.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("Oh, no. It is not time for Church duties yet.<br/>Would you return later?")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("Today's work has been completed.<br/>Only one task is given to one person per day.<br/>Please return tomorrow.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("(missing): first time worker PTJ inquiry"); else msg = L("Do you want to work at the Church again today?<br/>Please take a look at the work details before you decide."); npc.Msg(msg, npc.PtjDesc(randomPtj, L("Kristell's Church Part-Time Job"), L("Looking for help with delivering goods to the Church."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("(missing): first time accepting PTJ offer")); else npc.Msg(L("Thank you.<br/>I hope you finish it in time.")); npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("(missing): first time declining PTJ offer")); else npc.Msg(L("Are you busy with something else?<br/>If not today, please give me a hand later.")); } }
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.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("You seem to be working on something else already....<br/>It's probably a good idea to finish what you're working on 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("I'm a little busy right now. Would you mind coming back later?")); } else { npc.Msg(L("How's the work going? You'll be fine.")); } return; } // Report? npc.Msg(L("Are you done with the task I gave you?<br/>If not, you can come back later."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Then please come back later.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("You didn't want to work, did you?<br/>I can't pay you, then.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("So... How shall I put this?<br/>This is a way of saying thank you for all the hard work you've done for me...<br/>Please pick something that you'll find useful."), 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("Yes, you can do it next time.<br/>I'll see you later.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Wow, thank you!<br/>Can you help me out again tomorrow?")); npc.ModifyRelation(0, Random(3), 0); } else { // Aeira doesn't have any PTJ quests that could yield // mid/low results. } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("Oh no. It's not time for a part-time job, yet.<br/>Please come back later.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("I'm done for today!<br/>Please come again tomorrow.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("It must be your first time working at a bookstore.<br/>It's actually more of my personal business than work. Hehe.<br/>Will you do it?"); else msg = L("Oh, can you help me today, too?"); npc.Msg(msg, npc.PtjDesc(randomPtj, L("Aeira's Bookstore Part-time Job"), L("Looking for help with delivery of goods in Bookstore."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Thank you. Please be on time for the deadline.<br/>Even if you don't get to finish everything, please come back and report.<br/>I'll pay you for the amount of work you've accomplished.")); else npc.Msg(L("I believe in you.")); npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Well, if you don't want to, then I can't force you.")); else npc.Msg(L("You must be pretty busy, aren't you?")); } }
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.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.Player.IsDoingPtjNotFor(npc.NPC)) { npc.Msg(L("Are you doing a part-time job?<br/>I guess you can help me next time.")); return; } // Check if PTJ is in progress if (npc.Player.IsDoingPtjFor(npc.NPC)) { var result = npc.Player.GetPtjResult(); // Check if report time if (!ErinnHour(Report, Deadline)) { if (result == QuestResult.Perfect) { npc.Msg(L("What? Did you finish the job?<br/>I'm busy now. Come back to me closer to the deadline.")); } else { npc.Msg(L("How's it going?<p/>Make sure to report back to me before the deadline.")); } return; } // Report? npc.Msg(L("Let's see how you did.<br/>If you're not finished, you can report later.<br/>What are you going to do?"), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Haha.<br/>If you don't finish the work by the deadline, you will be in big trouble.")); return; } // Nothing done if (result == QuestResult.None) { npc.Player.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("......")); npc.Msg(L("What!<p/>Are you joking with me?<br/>Once you take my offer, you have to do it right!<br/>If you're not interested, then don't even start!")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Haha. You are quite diligent.<br/>Alright, I'll let you pick one of these.<br/>Just get whatever you want. It's all because you've worked very hard for me. Go ahead."), 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("It's alright if you have other things to do.<br/>Go ahead. I'll see you later.")); return; } // Complete npc.Player.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("You may not look the part, but you're quite dilligent in your work.<br/>Here's your pay for the day.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("(missing): 3 star response")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Is this all you did?<br/>It's far from enough. This is all I can give you.<br/>Remember this. It's not easy to earn money out of others' pockets.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!ErinnHour(Start, Deadline)) { npc.Msg(L("What? Part-time job?<br/>There's nothing. You can come back later.")); return; } // Check if not done today and if there are jobs remaining if (!npc.Player.CanDoPtj(JobType, remaining)) { npc.Msg(L("Hey, they're all taken for the day.<br/>And don't come here tomorrow. I don't want to work with you any more.<p/>...<p/>Haha. I'm joking, I'm joking.<br/>Of course you can come back tomorrow.")); return; } // Offer PTJ var randomPtj = GetRandomPtj(npc.Player, JobType, QuestIds); var msg = ""; if (npc.Player.GetPtjDoneCount(JobType) == 0) { msg = L("Are you looking for a job?<br/>You'd get sweaty, hot and tired working at the Blacksmith's Shop.<br/>I guess you are not really up to it.<br/>How about doing some simple part-time work?<p/>I'll see how much I can pay you depending on how you do."); } else { msg = L("Let's see, you want to work at the Blacksmith's Shop for a day?"); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Ferghus's Blacksmith Shop Part-Time Job"), L("Looking for help with delivery of goods in Blacksmith Shop."), PerDay, remaining, npc.Player.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.Player.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Oh, good then.<br/>I'll keep watching you.<br/>You're not a lazy kid who doesn't even bother<br/>to work or report before the deadline, are you?")); } else { npc.Msg(L("Alright. Good idea.")); } npc.Player.StartPtj(randomPtj, npc.NPC.Name); } else { if (npc.Player.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("If you don't want it, then forget it.<br/>Young people these days don't even bother to think of doing anything difficult.")); } else { npc.Msg(L("You can't really hire someone who doesn't want to work for you.")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Tasks at the Blacksmith's Shop aren't as easy as you think.<br/>Come back after you finish what you're doing.")); 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("Did you finish early?<br/>I'm busy right now. Come see me after the deadline.")); } else { npc.Msg(L("Are you doing what you're supposed to be doing?<p/>Don't get lazy now. Make sure you take care of your work.")); } return; } // Report? npc.Msg(L("Did you finish today's work?<br/>Yeah? Then give me a report and wrap it up.<br/>Let's see how well you did."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("If you have time to waste talking to me,<br/>hurry up and finish your work.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Leave.<br/>Don't ever come work for me again.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Wow, I'm impressed. Well done.<br/>Good work deserves a reward. Here, pick the item you want."), 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("I'm working. Don't bother me if you've got nothing to say.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("This'll do.<br/>Good job.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Not great...<br/>But that's probably the best someone of your age could do.<br/>You did okay, but I can't pay you the entire amount I promised.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("They say you can tell a lot about a person by the type of armor they wear.<br/>I guess they're right in this case.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("Come back at the deadline.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("That's enough for today.<br/>Come back tomorrow.")); return; } // Get quests only for player's Blacksmithing skill level (or whatever's closest) // http://wiki.mabinogiworld.com/view/Thread:Talk:Edern/Part-time_job_requests var playerSkills = npc.Player.Skills; var skillRank = playerSkills.Has(SkillId.Blacksmithing) ? playerSkills.Get(SkillId.Blacksmithing).Info.Rank : SkillRank.RF; // Default to RF jobs if player does not know Blacksmithing. // Restrict ranks to one of the following: F, C, B, A if (skillRank > SkillRank.RA) { skillRank = SkillRank.RA; } else if (skillRank < SkillRank.RC) { skillRank = SkillRank.RF; } int[] questIds = QuestIdSkillRankList .FindAll(e => e.Item2 == skillRank) .ConvertAll <int>(e => e.Item1) .ToArray(); // Offer PTJ var randomPtj = npc.RandomPtj(JobType, questIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) { msg = L("(missing): first time worker PTJ inquiry"); } else { msg = L("Are you looking for work? I just happen to have the perfect job for you."); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Edern's Blacksmith's Shop Part-Time Job"), L("Looking for help with crafting items needed for Blacksmith Shop."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("(missing): first time accepting PTJ offer")); } else { npc.Msg(L("Do it right.")); } npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("(missing): first time declining PTJ offer")); } else { npc.Msg(L("Don't bother me. I'm a busy person.")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("You can do only one part-time job per day.<br/>You're done for the day, so find something else to do.")); 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("What? Already finished everything?<br/>Man, that's the spirit.<br/>But there's still time left before the deadline.<br/>Come back a little later. Haha...")); else npc.Msg(L("Chopping enough firewood?")); return; } // Report? npc.Msg(L("Got enough firewood?<br/>Report to me later if you need more time.<br/>If you want to finish it now, I can pay for what you did so far."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Right. That's it.<br/>Things done by halves are never done right!<br/>Just finish it before the deadline.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("What is this? A joke?<br/>Don't even think about a payment!")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Hear, Hear! <username/> just did another wonderful job!<br/>Outstanding, you are a lucky guy today. Just take anything you want from here. Haha!"), 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("What's this? Are you saying you don't like the reward<br/>Tracy the Lumberjack prepared for you?")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Hmm...<br/>Good! That's good enough.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Well, not bad.<br/>Put a little more effort next time.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("What... You think this is a joke?<br/>That's all I can pay.<br/>And I won't accept results like this next time.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("You want a logging job?<br/>This is not the right time. Come back later.<br/>When the shadow's in the northwest... I think 7 o'clock in the morning will do.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("You can do only one part-time job per day.<br/>You're done for the day, so find something else to do.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("Good. You want a logging job?<br/>I was actually a little bored working alone.<br/>I can use some help. If you're good enough, I can pay you more.<p/>Want to give it a try?"); else msg = L("Want to play lumberjack again?"); npc.Msg(msg, npc.PtjDesc(randomPtj, L("Tracy's Firewood-Chopping PTJ"), L("Looking for material collectors."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("(missing): first time accepting PTJ offer")); else npc.Msg(L("Outstanding! Go on, man.")); npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("(missing): first time declining PTJ offer")); else npc.Msg(L("Well... if you're not interested...")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Hmm... You seem to be on a different job.<br/>Why don't you finish that first and come back later?")); 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("Did you finish all the work I requested?<br/>It's a bit early for that now.<br/>Please come back at the deadline.")); else npc.Msg(L("How's it going?<br/>")); return; } // Report? npc.Msg(L("Are you ready to show me what you've got?<br/>Or if you haven't finished it yet, you can report later."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later")); if (await npc.Select() != "@report") { npc.Msg(L("Okay then, I'll see you later.<br/>You know you have to report back even if you don't finish the job, right?")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Are you here to work or what? Why did you even ask for the job in the first place?<br/>Sorry, but I can't pay you anything.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Wow! What a fine job! Thank you so much.<br/>This is a token of my gratitude.<br/>Take any one of these.<br/>Ahem! Taking more than one would be greedy..."), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result)); var reply = await npc.Select(); // Report later if (!reply.StartsWith("@reward:")) { npc.Msg(L("Okay then, I'll see you later.<br/>You know you have to report back even if you don't finish the job, right?")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Oh, thank you so much! You're really good!<br/>Can you help me again tomorrow?")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Oh... A bit short... But thanks anyway.<br/>I'll have to pay you a little less, though.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Huh?! This is less than I asked for! Well...<br/>I can only pay you this much.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("I'm sorry... This isn't the right time for a part-time job.<br/>Please come back later.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("That's it for today's Grocery Store work.<br/>I'll give you a new task when you come tomorrow.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); // Msg is kinda unofficial, she currently says the following, and then // tells you you'd get Homestead seeds. npc.Msg(L("Ah, <username/>! Are you here for part-time work as usual?"), npc.PtjDesc(randomPtj, L("Caitin's Grocery Store Part-Time Job"), L("Looking for help with delivery of goods in Grocery Store."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { npc.Msg(L("I'm counting on you.")); npc.StartPtj(randomPtj); } else { npc.Msg(L("Do you have something else to do?")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Just finish what you're doing.")); 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 time yet.")); } else { npc.Msg(L("Is everything alright?")); } return; } // Report? npc.Msg(L("Have you finished your work?"), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later")); if (await npc.Select() != "@report") { npc.Msg(L("Come when you're finished.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Don't ever come here again!")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Phew... Well done.<br/>Take your pick."), 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("Hah...")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Good!")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("This is not enough...")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("What is this!")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("It's not the right time.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("That's it for today.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("Is this your first time? Good luck."); else msg = L("I'm counting on you as usual."); var ptjTitle = ""; if ((randomPtj / 100) % 10 == 5) // Poll third least significant digit ptjTitle = L("Looking for weavers."); else ptjTitle = L("Looking for help with delivery of goods in General Shop."); npc.Msg(msg, npc.PtjDesc(randomPtj, L("Walter's General Shop Part-Time Job"), ptjTitle, PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("You have to finish your work before the deadline and come back to me.<br/>")); else npc.Msg(L("Well, then.")); npc.StartPtj(randomPtj); } else { npc.Msg(L("I got it.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.Player.IsDoingPtjNotFor(npc.NPC)) { npc.Msg(L("Are you doing what you're supposed to be doing?<p/>Don't get lazy now. Make sure you take care of your work.")); return; } // Check if PTJ is in progress if (npc.Player.IsDoingPtjFor(npc.NPC)) { var result = npc.Player.GetPtjResult(); // Check if report time if (!ErinnHour(Report, Deadline)) { if (result == QuestResult.Perfect) { npc.Msg(L("Are you done already?<br/>It's not the deadline yet. Please come back later.")); } else { npc.Msg(L("You'd better be doing the work I asked you to do!<br/>Please finish it before the deadline.")); } return; } // Report? npc.Msg(L("Did you finish today's tasks?<br/>If not, you can report to me later."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Alright then, please report later.")); return; } // Nothing done if (result == QuestResult.None) { npc.Player.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("All you did was waste time<br/>and you got nothing done.<br/>I can't pay you for this.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Wow. You've done a meticulous job, <username/>.<br/>I've prepared a few things to thank you.<br/>And, thought I might as well give you some choices.<br/>Make sure to pick something you really need."), 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("Huh? Do you have an emergency?<br/>Well, what can you do. Please come back later.")); return; } // Complete npc.Player.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Thank you.<br/>Please keep up this good work.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("(missing): 3 star response")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("(missing): 1 star response")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!ErinnHour(Start, Deadline)) { npc.Msg(L("I'm busy with my own work right now. Would you come back later?")); return; } // Check if not done today and if there are jobs remaining if (!npc.Player.CanDoPtj(JobType, remaining)) { npc.Msg(L("Today's work has been finished.<br/>Please come again tomorrow.")); return; } // Offer PTJ var randomPtj = GetRandomPtj(npc.Player, JobType, QuestIds); var msg = ""; if (npc.Player.GetPtjDoneCount(JobType) == 0) { msg = L("Are you interested in some part-time work at the Bangor Blacksmith's Shop?<br/>If you complete the work before<br/>the deadline, I'll pay you."); } else { msg = L("Would you like to see today's work agenda?"); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Elen's Iron Ingot-Refining Part-Time Job"), L("Looking for refiners."), PerDay, remaining, npc.Player.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.Player.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Even if you finish the work early,<br/>you can't report until the deadline. Don't forget.")); } else { npc.Msg(L("Alright. Good luck with your work.")); } npc.Player.StartPtj(randomPtj, npc.NPC.Name); } else { if (npc.Player.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Don't underestimate blacksmith work<br/>or you might come to regret it.")); } else { npc.Msg(L("I see.<br/>Then I'll assign this task to someone else..")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Are you working for someone else right now?<br/>If you want to help me, go finish that job first, then come back.")); 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 have to wait until the deadline.<br/>You're gonna have to wait a little more.")); else npc.Msg(L("It's not the deadline yet.<br/>By the way, are you doing the work that I asked you to do?<br/>I need you to do a good job.")); return; } // Report? npc.Msg(L("I hope you finished your work.<br/>Let's see how you did."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Let me know when you're done, Ok?")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("What is this! If you agreed to work, then you should keep your promise!<br/>What do you take me for?")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Hehe... Thank you for your hard work..<br/>I have a few things I want to show you...<br/>Why don't you pick something you like?"), 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("Don't tell me you don't like what I prepared for you?<br/>Hehe... I'm kidding.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Oh, thanks.<br/>I'll give you the reward that I promised.")); npc.ModifyRelation(0, Random(3), 0); } else { npc.Msg(npc.FavorExpression(), L("Hmm...<br/>Even a kid like me could do better than this.<br/>You should be ashamed of yourself.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("It's too early for work.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("Hmm... That's enough for today.<br/>Can you come back tomorrow?")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("Alright, if you've heard about my family,<br/>then I take it that you know what kind of work you'll be doing?<br/>You're going to need a good grip on that Pickaxe."); else msg = L("You brought your Pickaxe, right?"); npc.Msg(msg, npc.PtjDesc(randomPtj, L("Sion's Iron Ore-Mining Part-time Job"), L("Looking for miners."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Please come back to report before the deadline ends.")); else npc.Msg(L("Alright! Don't be late for the deadline!")); npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Hmm. Are you scared?")); else npc.Msg(L("I guess you don't feel like working today.<br/>Well, you can just help me next time then.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("You seem to have another job. Don't you think you should finish that 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("Now is not the time. Want to come back later?")); } else { npc.Msg(L("I trust that the work is going well?<p/>I'm getting worried for no reason.")); } return; } // Report? npc.Msg(L("Did you finish today's work?<br/>If so, would you like to report now and wrap it up?"), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("I look forward to your work.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("*Sigh*<br/>If you're going to be like this, don't even start working next time.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Wow, you're not bad at all. I thought it would be rather difficult for you.<br/>Ha. Then take your pick among these items.<br/>Thank you for the hard work, <username/>."), 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("Well, then I guess I'll see you next time.<br/>Someone else might take away all the good stuff in the meantime, though.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Wow, it's perfect!<br/>Thanks for the help.")); npc.ModifyRelation(0, Random(3), 0); } else { // Nerys doesn't have any PTJ quests that could yield // mid/low results. } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("Come back during the business hours.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("Today's work is done. Come back tomorrow.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) { msg = L("Need work, do you?<br/>Would you like to give me a hand? I'll pay you, too.<br/>Interested?"); } else { msg = L("Here to help out again?"); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Nerys's Weapons Shop Part-time Job"), L("Looking for help with delivery of goods in Weapons Shop."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Alright. Finish the work and report back to me before the deadline.")); } else { npc.Msg(L("Alright. I'll see you before the deadline.")); } npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Mmm? Are you giving up?")); } else { npc.Msg(L("Oh well, then. Maybe next time.")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Are you trying to do this while working on another part-time job?<br/>Hahaha, that's greedy!")); 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("I'm sorry, but I'm really busy right now...<br/>Can you please come back in a bit?")); } else { npc.Msg(L("How's work going along so far?<br/>You haven't found anyone that claims to have lost the book, though, right?")); } return; } // Report? npc.Msg(L("Did you get all the books?"), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Please come back after you're done collecting books.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("This is not good...<br/>Hope you'll get the job done another time.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Thank you for a job well done.<br/>Would you like to choose your reward?"), 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("Having a hard time choosing?<br/>Please take your time and think carefully about your reward...")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Great Job. Thank you very much.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("I don't think you got all of them.<br/>Oh well...<br/>Hopefully you can do better another time.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Hmmm... did you just skip the whole thing? This isn't good...")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("I'm sorry, but I can't give you work right now.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("You've already done this today...<br/>Did you forget that? Haha...")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("You must be here for the first time...<br/>the job is pretty simple, actually.<br/>All you have to do is retrieve books that have been borrowwed, but haven't been returned yet."); else msg = L("Thanks, and good luck.<br/>It would have been so much easier if people retured books on time."); npc.Msg(msg, npc.PtjDesc(randomPtj, L("Stewart's Library Delivery Part-time Job"), L("Looking for help with delivery of goods in Library."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("All you have to do is retrieve the books before deadline, and return them to me. You'll have plenty of time.")); else npc.Msg(L("Okay, now please take care of it. Don't forget it just because it's an easy task!")); npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Ah... That's too bad.<br/>It could have been really nice if you could help me.")); else npc.Msg(L("It's an easy task... well, no can do.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("You can do only one part-time job per day.<br/>You're done for the day, so find something else to do.")); 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("What? Already finished everything?<br/>Man, that's the spirit.<br/>But there's still time left before the deadline.<br/>Come back a little later. Haha...")); } else { npc.Msg(L("Chopping enough firewood?")); } return; } // Report? npc.Msg(L("Got enough firewood?<br/>Report to me later if you need more time.<br/>If you want to finish it now, I can pay for what you did so far."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Right. That's it.<br/>Things done by halves are never done right!<br/>Just finish it before the deadline.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("What is this? A joke?<br/>Don't even think about a payment!")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Hear, Hear! <username/> just did another wonderful job!<br/>Outstanding, you are a lucky guy today. Just take anything you want from here. Haha!"), 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("What's this? Are you saying you don't like the reward<br/>Tracy the Lumberjack prepared for you?")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Hmm...<br/>Good! That's good enough.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Well, not bad.<br/>Put a little more effort next time.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("What... You think this is a joke?<br/>That's all I can pay.<br/>And I won't accept results like this next time.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("You want a logging job?<br/>This is not the right time. Come back later.<br/>When the shadow's in the northwest... I think 7 o'clock in the morning will do.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("You can do only one part-time job per day.<br/>You're done for the day, so find something else to do.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Good. You want a logging job?<br/>I was actually a little bored working alone.<br/>I can use some help. If you're good enough, I can pay you more.")); msg = L("Want to give it a try?"); } else { msg = L("Want to play lumberjack again?"); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Tracy's Firewood-Chopping PTJ"), L("Looking for material collectors."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("(missing): first time accepting PTJ offer")); } else { npc.Msg(L("Outstanding! Go on, man.")); } npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("(missing): first time declining PTJ offer")); } else { npc.Msg(L("Well... if you're not interested...")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Well, you seem to be involved in another part-time job right now.<br/>Is that right?")); 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("My, someone's in a hurry.<br/>It's not the deadline yet, so why don't you come back later?<p/>Now, I'll see you back here by the deadline.")); } else { npc.Msg(L("How's the work going?")); } return; } // Report? npc.Msg(L("Do you want to call it a day?<br/>You can report later if you're not finished yet."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Still have some work left to do, do you?<br/>Either way, please make sure to report by the deadline.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("You know what? It's ok.<br/>If you didn't do your work, I won't need to pay you. Simple as that.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Mmm? I didn't know you would do such a good job.<br/>You are a very meticulous worker, <username/>.<br/>I know this doesn't do justice for the excellent work you've done, but<br/>I've prepared a few things as a token of my gratitude. Take your pick."), 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("Hahaha. It must be a difficult choice.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Great! 10 out of 10!<br/>Please keep up the good work next time, too.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("I'd say... 6 out of 10.<br/>Your pay will only be that much, too.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Did you put in any effort at all?<br/>My, my!")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("Are you here for work?<br/>Sorry, but it's not business hours yet.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("Didn't you just work here?<br/>You have to take care of yourself. Don't overwork yourself.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) { msg = L("Are you looking for work?<br/>You don't seem to have any experience in this line of work. Are you sure you can handle it?<br/>Well, why don't you get started on this now?<br/>Any type of work is difficult at first, but you get used to it as you gain more experience, you see.<p/>Well, how about it?"); } else { msg = L("Are you looking for work?"); //<br/>You can get a seed for your Homestead."); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Glenis's Grocery Store Part-Time Job"), L("Looking for help with delivering goods to Grocery Store."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Yes, yes. Good idea.<br/>Now, I'll see you by the deadline.<br/>Even if you don't finish everything, at least come file a report.")); } else { npc.Msg(L("I'll be waiting for you.")); } npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Ha ha. You don't have to get so intimidated.<br/>All right. Come by next time.")); } else { npc.Msg(L("If today's not a good day, I'm sure we'll do this some other time.")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("You have some other job?<br/>Shearing is the best part-time job.<br/>You'll understand once you try it.")); 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 still have time left.<br/>Come back later.")); } else { npc.Msg(L("How's everything going?<br/>")); } return; } // Report? npc.Msg(L("Did you finish shearing the sheep?<br/>Let me see if you're done.<br/>If not, you can report it to me later."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later")); if (await npc.Select() != "@report") { npc.Msg(L("You can show me later if you're not done.<br/>But even if you are not done, don't forget to report it before the deadline.<br/>I'll just pay for what you have.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Hey, this isn't enough...<br/>I won't pay you a penny.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Wow, <username/>, you are quite a worker. Nicely done.<br/>I will give you anything you want from here as a bonus.<br/>But you'd better not complain about the selections!"), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result)); var reply = await npc.Select(); // Report later if (!reply.StartsWith("@reward:")) { npc.Msg(L("You can show me later if you're not done.<br/>But even if you are not done, don't forget to report it before the deadline.<br/>I'll just pay for what you have.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Nice!<br/>Keep up the good work.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("It's a little less than what you promised,<br/>but I guess it's not that bad. Good enough.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Hey, this is it?<br/>There's no more? Then this is all I can give you.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("It's not time for part-time jobs yet.<br/>Come back later.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("Ah, I have enough wool for the day.<br/>Want to try again tomorrow?")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); // Msg is kinda unofficial, she currently says the following, and then // tells you you'd get Homestead seeds. npc.Msg(L("Do you want a part-time shearing job?"), npc.PtjDesc(randomPtj, L("Shepherd Boy Deian's Shearing Part-Time Job"), L("Looking for material collectors."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { npc.Msg(L("Let's see what you've got.")); npc.StartPtj(randomPtj); } else { npc.Msg(L("Forget it if you don't want to do it.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Are you working on a different part-time job?<br/>Well, then. Please help me in the future when you have a chance.")); 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("Ah, you are here already?<br/>It's a little bit too early. Can you come back around the deadline?")); else npc.Msg(L("I hope you didn't forget what I asked you to do.<p/>Please have it done by the deadline.")); return; } // Report? npc.Msg(L("Did you complete the task I requested?<br/>You can report now and finish it up,<br/>or you may report it later if you're not done yet."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later")); if (await npc.Select() != "@report") { npc.Msg(L("Please report before the deadline is over.<br/>Even if the work is not done, you should still report.<br/>Then I can pay you for what you've completed.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Ha ha. This is a little disappointing.<br/>I don't think I can pay you for this.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("You are quite skillful, <username/>.<br/>Now there's nothing to worry about even if I get too much work. Ha ha.<br/>Please choose what you want. You deserve it.<br/>I'd like to give it to you as a compensation for your hard work."), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result)); var reply = await npc.Select(); // Report later if (!reply.StartsWith("@reward:")) { npc.Msg(L("Please report before the deadline is over.<br/>Even if the work is not done, you should still report.<br/>Then I can pay you for what you've completed.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Great! You have done well as I requested.<br/>I hope you can help me again next time.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Thank you. Although you didn't complete the job, you've done enough so far.<br/>But I'm sorry to tell you I must deduct a little from your pay.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Hmm... It's not exactly what I expected, but thank you.<br/>I'm afraid this is all I can pay you.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("Hmm... It's not a good time for this.<br/>Can you come back when it is time for part-time jobs?")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("I'm all set for today.<br/>Will you come back tomorrow?")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); // Msg is kinda unofficial, she currently says the following, and then // tells you you'd get Homestead seeds. npc.Msg(L("Are you here for a part-time job at my Inn again?"), npc.PtjDesc(randomPtj, L("Piaras's Inn Part-time Job"), L("Looking for help with delivering goods to Inn."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { npc.Msg(L("I'll be counting on you as usual.")); npc.StartPtj(randomPtj); } else { npc.Msg(L("You want to sleep on it?<br/>Alright, then.<br/>But report on time please.")); } }
public async Task AboutArbeit(NpcScript npc) { if(npc.DoingPtjForOtherNpc()) { npc.Msg("You have other things to do, right?<br/>If you need the Holy Water of Lymilark, can you come back after you are finished with your work?"); return; } if(npc.DoingPtjForNpc()) { var result = npc.GetPtjResult(); if(!npc.ErinnHour(Report, Deadline)) { if(result == QuestResult.Perfect) npc.Msg("It seems you took care of your end of the bargain.<br/>I'm a little busy right now, but come back later so I can compensate you for your work."); else npc.Msg("How are you doing with the part-time job for the Church today?<br/>I have the utmost faith in you, <username/>."); return; } npc.Msg("Did you finish the part-time job I gave you?<br/>If you are done, you can report the results to me. Do you want to do so now?<button title='Report Now' keyword='@report' /><button title='Report Later' keyword='@later' />"); if(await npc.Select() != "@report") { npc.Msg("You don't want to report yet?<br/>Please make sure to come back and report before the deadline."); return; } if(result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), "I'm sorry,<br/>but I cannot give you the Holy Water of Lymilark unless you complete the task I've asked you to take care of.<br/>Please work harder next time."); npc.ModifyRelation(0, -Random(3), 0); } else { npc.Msg("Well done, <username/>. I feel very relieved thanks to you.<br/>In appreciation of all the hard work you've put in for the Church,<br/>I prepared some things for you.<br/>I'd love to give you all these if I could, but I can't. Please pick one.<button title='Report Later' keyword='@later' />" + npc.GetPtjReportXml(result)); var reply = await npc.Select(); if(!reply.StartsWith("@reward:")) { npc.Msg("You don't want to report yet?<br/>Please make sure to come back and report before the deadline."); return; } npc.CompletePtj(reply); remaining--; if(result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), "Thanks. You took care of everything I've asked for.<br/>As promised, I will give you the Holy Water of Lymilark."); npc.ModifyRelation(0, Random(3), 0); } else if(result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), "It's a bit short of what I asked for,<br/>but I appreciate your help.<br/>I will give you the Holy Water of Lymilark in return."); npc.ModifyRelation(0, Random(1), 0); } else if(result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), "Did you run out of time?<br/>You completed only a portion of what I asked for.<br/>I'm sorry, but that's not good enough for me to give you the Holy Water of Lymilark."); npc.ModifyRelation(0, -Random(2), 0); } } return; } if(!npc.ErinnHour(Start, Deadline)) { npc.Msg("Are you willing to help the Church?<br/>It's a bit early, though. Please come back at a later time."); return; } if(!npc.CanDoPtj(JobType, remaining)) { npc.Msg("Today's part-time jobs are all taken.<br/>If you need some Holy Water of Lymilark, please come back tomorrow."); return; } var randomPtj = npc.RandomPtj(JobType, QuestIds); var ptjXml = npc.GetPtjXml(randomPtj, "Endelyon's Church Part-Time Job", "Looking for help with delivering goods to Church.", PerDay, remaining); var msg = ""; if(npc.GetPtjDoneCount(JobType) == 0) msg = "Our Church is looking for a kind soul to help take care of our crops.<br/>The main job is to harvest wheat or barley from the farmland located south of the Church.<br/>One thing to note: because of our tight budget, we cannot afford to pay in gold.<p/>Instead, anyone who completes the job will receive some Holy Water of Lymilark,<br/>which can be used to bless items.<br/>Blessed items do not fall to the ground<br/>when its owner is knocked unconscious.<br/>Now, what do you say?"; else msg = "Are you here for the Holy Water of Lymilark again?<br/>Please take a look at today's part-time job and tell me if you want it."; npc.Msg(msg + ptjXml); if(await npc.Select() == "@accept") { npc.Msg("Thank you.<br/>Please take care of this on time."); npc.StartPtj(randomPtj); } else { npc.Msg("If you don't want to do it, then I guess that's that."); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Do you need holy water?<br/>If you come after you have finished the work that you are doing now, I will give you a task that's related to holy water.")); 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 will have to wait a little longer for the deadline today.")); else npc.Msg(L("It is not the deadline yet.<br/>Anyway, are you doing the work I have asked you to do?")); return; } // Report? npc.Msg(L("It is the deadline.<br/>Shall we see whether you have completed your tasks?"), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Very well.<br/>But, please do report to me before the deadline.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("If you ignore the tasks you promised to carry out,<br/>I cannot help you much, either.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Thank you for a job well done.<br/>For that, I have prepared a few things.<br/>I cannot part with all of them, but<br/>why don't you pick one that you like?"), 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("Hmm? Would you rather do it next time?<br/>Whatever works for you, then.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Thank you.<br/>You have not disappointed me, as expected.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("It seems that you have not completely finished the given tasks.<br/>But, you also seem to have done your best, <username/>,<br/>so I will give you a reward for that.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Pardon my criticism,<br/>but you seem to have neglected your tasks and focused on something else.<br/>I will give you a partial compensation.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("I appreciate your willingness to help,<br/>but it is not time yet for me to assign tasks.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("There doesn't seem to be much else you can help with today.<br/>Let's talk again tomorrow.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("As you can see, I am in need of financial assistance,<br/>not in a position to help financially.<br/>But if you help with the tasks, I can at least give you some holy water."); else msg = L("Do you need holy water again today?"); npc.Msg(msg, npc.PtjDesc(randomPtj, L("Comgan's Monster-Hunting Part-Time Job"), L("Looking for monster hunters in Church."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Please do come back to report before the deadline.")); else npc.Msg(L("Please be careful not to miss the deadline.")); npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Don't like the given work, do you?")); else npc.Msg(L("I am sorry, but if you won't help with the tasks,<br/>I cannot really help you, either.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.Player.IsDoingPtjNotFor(npc.NPC)) { npc.Msg(L("Tasks at the Blacksmith's Shop aren't as easy as you think.<br/>Come back after you finish what you're doing.")); return; } // Check if PTJ is in progress if (npc.Player.IsDoingPtjFor(npc.NPC)) { var result = npc.Player.GetPtjResult(); // Check if report time if (!ErinnHour(Report, Deadline)) { if (result == QuestResult.Perfect) { npc.Msg(L("Did you finish early?<br/>I'm busy right now. Come see me after the deadline.")); } else { npc.Msg(L("Are you doing what you're supposed to be doing?<p/>Don't get lazy now. Make sure you take care of your work.")); } return; } // Report? npc.Msg(L("Did you finish today's work?<br/>Yeah? Then give me a report and wrap it up.<br/>Let's see how well you did."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("If you have time to waste talking to me,<br/>hurry up and finish your work.")); return; } // Nothing done if (result == QuestResult.None) { npc.Player.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Leave.<br/>Don't ever come work for me again.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Wow, I'm impressed. Well done.<br/>Good work deserves a reward. Here, pick the item you want."), 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("I'm working. Don't bother me if you've got nothing to say.")); return; } // Complete npc.Player.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("This'll do.<br/>Good job.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Not great...<br/>But that's probably the best someone of your age could do.<br/>You did okay, but I can't pay you the entire amount I promised.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("They say you can tell a lot about a person by the type of armor they wear.<br/>I guess they're right in this case.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!ErinnHour(Start, Deadline)) { npc.Msg(L("Come back at the deadline.")); return; } // Check if not done today and if there are jobs remaining if (!npc.Player.CanDoPtj(JobType, remaining)) { npc.Msg(L("That's enough for today.<br/>Come back tomorrow.")); return; } // Offer PTJ var randomPtj = RandomPtj(npc); var msg = ""; if (npc.Player.GetPtjDoneCount(JobType) == 0) { msg = L("(missing): first time worker PTJ inquiry"); } else { msg = L("Are you looking for work? I just happen to have the perfect job for you."); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Edern's Blacksmith's Shop Part-Time Job"), L("Looking for help with crafting items needed for Blacksmith Shop."), PerDay, remaining, npc.Player.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.Player.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("(missing): first time accepting PTJ offer")); } else { npc.Msg(L("Do it right.")); } npc.Player.StartPtj(randomPtj, npc.NPC.Name); } else { if (npc.Player.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("(missing): first time declining PTJ offer")); } else { npc.Msg(L("Don't bother me. I'm a busy person.")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Well, you seem to be involved in another part-time job right now.<br/>Is that right?")); 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("My, someone's in a hurry.<br/>It's not the deadline yet, so why don't you come back later?<p/>Now, I'll see you back here by the deadline.")); else npc.Msg(L("How's the work going?")); return; } // Report? npc.Msg(L("Do you want to call it a day?<br/>You can report later if you're not finished yet."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Still have some work left to do, do you?<br/>Either way, please make sure to report by the deadline.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("You know what? It's ok.<br/>If you didn't do your work, I won't need to pay you. Simple as that.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Mmm? I didn't know you would do such a good job.<br/>You are a very meticulous worker, <username/>.<br/>I know this doesn't do justice for the excellent work you've done, but<br/>I've prepared a few things as a token of my gratitude. Take your pick."), 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("Hahaha. It must be a difficult choice.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Great! 10 out of 10!<br/>Please keep up the good work next time, too.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("I'd say... 6 out of 10.<br/>Your pay will only be that much, too.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Did you put in any effort at all?<br/>My, my!")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("Are you here for work?<br/>Sorry, but it's not business hours yet.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("Didn't you just work here?<br/>You have to take care of yourself. Don't overwork yourself.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("Are you looking for work?<br/>You don't seem to have any experience in this line of work. Are you sure you can handle it?<br/>Well, why don't you get started on this now?<br/>Any type of work is difficult at first, but you get used to it as you gain more experience, you see.<p/>Well, how about it?"); else msg = L("Are you looking for work?");//<br/>You can get a seed for your Homestead."); npc.Msg(msg, npc.PtjDesc(randomPtj, L("Glenis's Grocery Store Part-Time Job"), L("Looking for help with delivering goods to Grocery Store."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Yes, yes. Good idea.<br/>Now, I'll see you by the deadline.<br/>Even if you don't finish everything, at least come file a report.")); else npc.Msg(L("I'll be waiting for you.")); npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Ha ha. You don't have to get so intimidated.<br/>All right. Come by next time.")); else npc.Msg(L("If today's not a good day, I'm sure we'll do this some other time.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("You have some other job?<br/>Shearing is the best part-time job.<br/>You'll understand once you try it.")); 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 still have time left.<br/>Come back later.")); else npc.Msg(L("How's everything going?<br/>")); return; } // Report? npc.Msg(L("Did you finish shearing the sheep?<br/>Let me see if you're done.<br/>If not, you can report it to me later."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later")); if (await npc.Select() != "@report") { npc.Msg(L("You can show me later if you're not done.<br/>But even if you are not done, don't forget to report it before the deadline.<br/>I'll just pay for what you have.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Hey, this isn't enough...<br/>I won't pay you a penny.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Wow, <username/>, you are quite a worker. Nicely done.<br/>I will give you anything you want from here as a bonus.<br/>But you'd better not complain about the selections!"), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result)); var reply = await npc.Select(); // Report later if (!reply.StartsWith("@reward:")) { npc.Msg(L("You can show me later if you're not done.<br/>But even if you are not done, don't forget to report it before the deadline.<br/>I'll just pay for what you have.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Nice!<br/>Keep up the good work.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("It's a little less than what you promised,<br/>but I guess it's not that bad. Good enough.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Hey, this is it?<br/>There's no more? Then this is all I can give you.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("It's not time for part-time jobs yet.<br/>Come back later.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("Ah, I have enough wool for the day.<br/>Want to try again tomorrow?")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); // Msg is kinda unofficial, she currently says the following, and then // tells you you'd get Homestead seeds. npc.Msg(L("Do you want a part-time shearing job?"), npc.PtjDesc(randomPtj, L("Shepherd Boy Deian's Shearing Part-Time Job"), L("Looking for material collectors."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { npc.Msg(L("Let's see what you've got.")); npc.StartPtj(randomPtj); } else { npc.Msg(L("Forget it if you don't want to do it.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("You seem to be working on something else already....<br/>It's probably a good idea to finish what you're working on 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("I'm a little busy right now. Would you mind coming back later?")); } else { npc.Msg(L("How's the work going? You'll be fine.")); } return; } // Report? npc.Msg(L("Are you done with the task I gave you?<br/>If not, you can come back later."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Then please come back later.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("You didn't want to work, did you?<br/>I can't pay you, then.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("So... How shall I put this?<br/>This is a way of saying thank you for all the hard work you've done for me...<br/>Please pick something that you'll find useful."), 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("Yes, you can do it next time.<br/>I'll see you later.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Wow, thank you!<br/>Can you help me out again tomorrow?")); npc.ModifyRelation(0, Random(3), 0); } else { // Aeira doesn't have any PTJ quests that could yield // mid/low results. } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("Oh no. It's not time for a part-time job, yet.<br/>Please come back later.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("I'm done for today!<br/>Please come again tomorrow.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) { msg = L("It must be your first time working at a bookstore.<br/>It's actually more of my personal business than work. Hehe.<br/>Will you do it?"); } else { msg = L("Oh, can you help me today, too?"); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Aeira's Bookstore Part-time Job"), L("Looking for help with delivery of goods in Bookstore."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Thank you. Please be on time for the deadline.<br/>Even if you don't get to finish everything, please come back and report.<br/>I'll pay you for the amount of work you've accomplished.")); } else { npc.Msg(L("I believe in you.")); } npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Well, if you don't want to, then I can't force you.")); } else { npc.Msg(L("You must be pretty busy, aren't you?")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.Player.IsDoingPtjNotFor(npc.NPC)) { npc.Msg(L("Hmm... You seem to be on a different job.<br/>Why don't you finish that first and come back later?")); return; } // Check if PTJ is in progress if (npc.Player.IsDoingPtjFor(npc.NPC)) { var result = npc.Player.GetPtjResult(); // Check if report time if (!ErinnHour(Report, Deadline)) { if (result == QuestResult.Perfect) { npc.Msg(L("Did you finish all the work I requested?<br/>It's a bit early for that now.<br/>Please come back at the deadline.")); } else { npc.Msg(L("How's it going?<br/>")); } return; } // Report? npc.Msg(L("Are you ready to show me what you've got?<br/>Or if you haven't finished it yet, you can report later."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later")); if (await npc.Select() != "@report") { npc.Msg(L("Okay then, I'll see you later.<br/>You know you have to report back even if you don't finish the job, right?")); return; } // Nothing done if (result == QuestResult.None) { npc.Player.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Are you here to work or what? Why did you even ask for the job in the first place?<br/>Sorry, but I can't pay you anything.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Wow! What a fine job! Thank you so much.<br/>This is a token of my gratitude.<br/>Take any one of these.<br/>Ahem! Taking more than one would be greedy..."), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result)); var reply = await npc.Select(); // Report later if (!reply.StartsWith("@reward:")) { npc.Msg(L("Okay then, I'll see you later.<br/>You know you have to report back even if you don't finish the job, right?")); return; } // Complete npc.Player.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Oh, thank you so much! You're really good!<br/>Can you help me again tomorrow?")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Oh... A bit short... But thanks anyway.<br/>I'll have to pay you a little less, though.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Huh?! This is less than I asked for! Well...<br/>I can only pay you this much.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!ErinnHour(Start, Deadline)) { npc.Msg(L("I'm sorry... This isn't the right time for a part-time job.<br/>Please come back later.")); return; } // Check if not done today and if there are jobs remaining if (!npc.Player.CanDoPtj(JobType, remaining)) { npc.Msg(L("That's it for today's Grocery Store work.<br/>I'll give you a new task when you come tomorrow.")); return; } // Offer PTJ var randomPtj = GetRandomPtj(npc.Player, JobType, QuestIds); // Msg is kinda unofficial, she currently says the following, and then // tells you you'd get Homestead seeds. npc.Msg(L("Ah, <username/>! Are you here for part-time work as usual?"), npc.PtjDesc(randomPtj, L("Caitin's Grocery Store Part-Time Job"), L("Looking for help with delivery of goods in Grocery Store."), PerDay, remaining, npc.Player.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { npc.Msg(L("I'm counting on you.")); npc.Player.StartPtj(randomPtj, npc.NPC.Name); } else { npc.Msg(L("Do you have something else to do?")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.Player.IsDoingPtjNotFor(npc.NPC)) { npc.Msg(L("The Church also needs workers.<br/>Please pay a visit here once you finish the current task.")); return; } // Check if PTJ is in progress if (npc.Player.IsDoingPtjFor(npc.NPC)) { var result = npc.Player.GetPtjResult(); // Check if report time if (!ErinnHour(Report, Deadline)) { if (result == QuestResult.Perfect) { npc.Msg(L("You have finished already?<br/>It is a little too early, so would you mind returning later?")); } else { npc.Msg(L("I trust that the assigned task is going well?<br/>The deadline is not past yet, so please do your best.")); } return; } // Report? npc.Msg(L("It seems that you have completed the given task.<br/>If you would like, we can call it a day here."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("If not right now, please make sure to report to me before the deadline.<br/>You have to at least report back to me even if you do not completely finish your task.")); return; } // Nothing done if (result == QuestResult.None) { npc.Player.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Oh, good heavens!<br/><username/>, I trusted you with this and this is all you have done. How disappointing.<br/>I cannot pay you for this.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Mmm? I did not know you would do such a good job.<br/>You are a very meticulous worker, <username/>.<br/>I know this does not do justice for the excellent work you have done, but<br/>I have prepared a few things as a token of my gratitude. Please, take your pick."), 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("You seem to be busy all the time, <username/>.")); return; } // Complete npc.Player.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Great! You have done very well.<br/>Here is the Holy Water as promised.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Thank you for your help.<br/>But, it is a little less than what was asked for.<br/>Anyway, I will pay you for what has been completed.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Hmm. You have not adequately completed your work.<br/>Did you not have enough time?<br/>I cannot give you the Holy Water, then.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!ErinnHour(Start, Deadline)) { npc.Msg(L("Oh, no. It is not time for Church duties yet.<br/>Would you return later?")); return; } // Check if not done today and if there are jobs remaining if (!npc.Player.CanDoPtj(JobType, remaining)) { npc.Msg(L("Today's work has been completed.<br/>Only one task is given to one person per day.<br/>Please return tomorrow.")); return; } // Offer PTJ var randomPtj = GetRandomPtj(npc.Player, JobType, QuestIds); var msg = ""; if (npc.Player.GetPtjDoneCount(JobType) == 0) { msg = L("(missing): first time worker PTJ inquiry"); } else { msg = L("Do you want to work at the Church again today?<br/>Please take a look at the work details before you decide."); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Kristell's Church Part-Time Job"), L("Looking for help with delivering goods to the Church."), PerDay, remaining, npc.Player.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.Player.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("(missing): first time accepting PTJ offer")); } else { npc.Msg(L("Thank you.<br/>I hope you finish it in time.")); } npc.Player.StartPtj(randomPtj, npc.NPC.Name); } else { if (npc.Player.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("(missing): first time declining PTJ offer")); } else { npc.Msg(L("Are you busy with something else?<br/>If not today, please give me a hand later.")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("You seem to have another job. Don't you think you should finish that 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("Now is not the time. Want to come back later?")); } else { npc.Msg(L("I trust that the work is going well?<p/>I'm getting worried for no reason.")); } return; } // Report? npc.Msg(L("Did you finish today's work?<br/>If so, would you like to report now and wrap it up?"), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("I look forward to your work.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("*Sigh*<br/>If you're going to be like this, don't even start working next time.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Wow, you're not bad at all. I thought it would be rather difficult for you.<br/>Ha. Then take your pick among these items.<br/>Thank you for the hard work, <username/>."), 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("Well, then I guess I'll see you next time.<br/>Someone else might take away all the good stuff in the meantime, though.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Wow, it's perfect!<br/>Thanks for the help.")); npc.ModifyRelation(0, Random(3), 0); } else { // Nerys doesn't have any PTJ quests that could yield // mid/low results. } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("Come back during the business hours.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("Today's work is done. Come back tomorrow.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("Need work, do you?<br/>Would you like to give me a hand? I'll pay you, too.<br/>Interested?"); else msg = L("Here to help out again?"); npc.Msg(msg, npc.PtjDesc(randomPtj, L("Nerys's Weapons Shop Part-time Job"), L("Looking for help with delivery of goods in Weapons Shop."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Alright. Finish the work and report back to me before the deadline.")); else npc.Msg(L("Alright. I'll see you before the deadline.")); npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Mmm? Are you giving up?")); else npc.Msg(L("Oh well, then. Maybe next time.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Are you working for someone else right now?<br/>If you want to help me, go finish that job first, then come back.")); 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 have to wait until the deadline.<br/>You're gonna have to wait a little more.")); } else { npc.Msg(L("It's not the deadline yet.<br/>By the way, are you doing the work that I asked you to do?<br/>I need you to do a good job.")); } return; } // Report? npc.Msg(L("I hope you finished your work.<br/>Let's see how you did."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Let me know when you're done, Ok?")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("What is this! If you agreed to work, then you should keep your promise!<br/>What do you take me for?")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Hehe... Thank you for your hard work..<br/>I have a few things I want to show you...<br/>Why don't you pick something you like?"), 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("Don't tell me you don't like what I prepared for you?<br/>Hehe... I'm kidding.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Oh, thanks.<br/>I'll give you the reward that I promised.")); npc.ModifyRelation(0, Random(3), 0); } else { npc.Msg(npc.FavorExpression(), L("Hmm...<br/>Even a kid like me could do better than this.<br/>You should be ashamed of yourself.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("It's too early for work.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("Hmm... That's enough for today.<br/>Can you come back tomorrow?")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) { msg = L("Alright, if you've heard about my family,<br/>then I take it that you know what kind of work you'll be doing?<br/>You're going to need a good grip on that Pickaxe."); } else { msg = L("You brought your Pickaxe, right?"); } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Sion's Iron Ore-Mining Part-time Job"), L("Looking for miners."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Please come back to report before the deadline ends.")); } else { npc.Msg(L("Alright! Don't be late for the deadline!")); } npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) { npc.Msg(L("Hmm. Are you scared?")); } else { npc.Msg(L("I guess you don't feel like working today.<br/>Well, you can just help me next time then.")); } } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("Are you doing a part-time job?<br/>I guess you can help me next time.")); 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("What? Did you finish the job?<br/>I'm busy now. Come back to me closer to the deadline.")); else npc.Msg(L("How's it going?<p/>Make sure to report back to me before the deadline.")); return; } // Report? npc.Msg(L("Let's see how you did.<br/>If you're not finished, you can report later.<br/>What are you going to do?"), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("Haha.<br/>If you don't finish the work by the deadline, you will be in big trouble.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("......")); npc.Msg(L("What!<p/>Are you joking with me?<br/>Once you take my offer, you have to do it right!<br/>If you're not interested, then don't even start!")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("Haha. You are quite diligent.<br/>Alright, I'll let you pick one of these.<br/>Just get whatever you want. It's all because you've worked very hard for me. Go ahead."), 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("It's alright if you have other things to do.<br/>Go ahead. I'll see you later.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("You may not look the part, but you're quite dilligent in your work.<br/>Here's your pay for the day.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("(missing): 3 star response")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("Is this all you did?<br/>It's far from enough. This is all I can give you.<br/>Remember this. It's not easy to earn money out of others' pockets.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("What? Part-time job?<br/>There's nothing. You can come back later.")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("Hey, they're all taken for the day.<br/>And don't come here tomorrow. I don't want to work with you any more.<p/>...<p/>Haha. I'm joking, I'm joking.<br/>Of course you can come back tomorrow.")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("Are you looking for a job?<br/>You'd get sweaty, hot and tired working at the Blacksmith's Shop.<br/>I guess you are not really up to it.<br/>How about doing some simple part-time work?<p/>I'll see how much I can pay you depending on how you do."); else msg = L("Let's see, you want to work at the Blacksmith's Shop for a day?"); npc.Msg(msg, npc.PtjDesc(randomPtj, L("Ferghus's Blacksmith Shop Part-Time Job"), L("Looking for help with delivery of goods in Blacksmith Shop."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Oh, good then.<br/>I'll keep watching you.<br/>You're not a lazy kid who doesn't even bother<br/>to work or report before the deadline, are you?")); else npc.Msg(L("Alright. Good idea.")); npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("If you don't want it, then forget it.<br/>Young people these days don't even bother to think of doing anything difficult.")); else npc.Msg(L("You can't really hire someone who doesn't want to work for you.")); } }
public async Task AboutArbeit(NpcScript npc) { // Check if already doing another PTJ if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("You seem to be on another job.<br/>You should finish it first.")); return; } // Check if PTJ is in progress if (npc.DoingPtjForNpc()) { var result = npc.GetPtjResult(); // Check if report time if (!npc.ErinnHour(GetPersonalReportTime(npc.Player), Deadline)) { if (result == QuestResult.Perfect) npc.Msg(L("Oh...<br/>Would you come after the deadline starts?<p/>Thanks for your help.")); else npc.Msg(L("How's it going?<p/>I'm expecting good things from you.")); return; } // Report? npc.Msg(L("Ah, did you finish the work?<br/>Would you like to report now?<br/>If you haven't finished the job, you can report later."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later") ); if (await npc.Select() != "@report") { npc.Msg(L("You can report any time before the deadline ends.")); return; } // Nothing done if (result == QuestResult.None) { npc.GiveUpPtj(); npc.Msg(npc.FavorExpression(), L("Did I ask too much of you?<br/>Sorry, but I can't pay you because you didn't work at all. Please understand.")); npc.ModifyRelation(0, -Random(3), 0); } // Low~Perfect result else { npc.Msg(L("To tell you the truth, I was worried.<br/>But... <username/>, I think I can count on you from here on out.<br/>This is just a token of my gratitude.<br/>Choose whatever you like."), 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("OK then. Come again later.<br/>... But don't be late.")); return; } // Complete npc.CompletePtj(reply); remaining--; // Result msg if (result == QuestResult.Perfect) { npc.Msg(npc.FavorExpression(), L("Oh... Thank you.<br/>I appreciate your help.")); npc.ModifyRelation(0, Random(3), 0); } else if (result == QuestResult.Mid) { npc.Msg(npc.FavorExpression(), L("Well... It is not enough,<br/>but I'm grateful for your help. However, I have to reduce your pay. I hope you'll understand.")); npc.ModifyRelation(0, Random(1), 0); } else if (result == QuestResult.Low) { npc.Msg(npc.FavorExpression(), L("I guess you were busy with something else...<br/>It's not much, but I'll pay you for what you've done.")); npc.ModifyRelation(0, -Random(2), 0); } } return; } // Check if PTJ time if (!npc.ErinnHour(Start, Deadline)) { npc.Msg(L("Sorry, but it is not time for part-time jobs.<br/>Would you come later?")); return; } // Check if not done today and if there are jobs remaining if (!npc.CanDoPtj(JobType, remaining)) { npc.Msg(L("I don't have anymore work to give you today.<br/>Would you come back tomorrow?")); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("Our town may be small, but running the General Shop<br/>can really get hectic since I'm running this all by myself.<br/>Fortunately, many people are helping me out, so it's a lot easier for me to handle.<br/>Are you also interested in working here, <username/>?<p/>I'll pay you if you can help me."); else msg = L("Are you here to work at the General Shop?"); var ptjDescTitle = ""; switch ((randomPtj / 100) % 10) // Extract third digit form the right { case 2: // Tailoring job ptjDescTitle = L("Looking for help with crafting items needed for General Shop."); break; case 5: // Weaving job ptjDescTitle = L("Looking for weavers."); break; default: // Delivery job / Fallback ptjDescTitle = L("Looking for help with delivery of goods in General Shop."); break; } npc.Msg(msg, npc.PtjDesc(randomPtj, L("Malcolm's General Shop Part-Time Job"), ptjDescTitle, PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Thank you.<br/>Then I'll see you when the deadline starts.<br/>Please report your work even if you couldn't finish it on time. That way, I can get on with other jobs without worry.")); else npc.Msg(L("Thanks, and good luck!")); npc.StartPtj(randomPtj); } else { if (npc.GetPtjDoneCount(JobType) == 0) npc.Msg(L("Oh, well.<br/>If you change your mind, let me know.")); else npc.Msg(L("Oh, I misunderstood.<br/>I'm sorry.")); } }