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("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("You're a little early.<br/>Report to me when it's closer to the deadline."); else npc.Msg("How's it going?"); return; } // Report? npc.Msg("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.<button title='Report Now' keyword='@report' /><button title='Report Later' keyword='@later' />"); if (await npc.Select() != "@report") { npc.Msg("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(), "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("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. <button title='Report Later' keyword='@later' /><arbeit_report result=\"0\"/>"); var reply = await npc.Select(); // Report later if (!reply.StartsWith("@reward:")) { npc.Msg("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(), "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(), "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(), "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("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.<button title='I will do it' keyword='@yes' /><button title='No, thanks' keyword='@no' />"); if (await npc.Select() == "@yes") { npc.StartQuest(200063); // Gather Base Herb (Dilys) npc.Msg("You sound really interested in becoming a healer...<br/>If you step outside, an owl will deliver my request to you."); } else { npc.Msg("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("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("There are no more jobs today.<br/>I will give you another job tomorrow."); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var ptjXml = npc.GetPtjXml(randomPtj, "Dilys's Healer's House Part-Time Job", "Looking for help with delivering goods in Healer's House.", PerDay, remaining); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = "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 = "Ah, <username/>. Can you help me today?"; npc.Msg(msg + ptjXml); if (await npc.Select() == "@accept") { npc.Msg("Thank you for your help in advance."); npc.StartPtj(randomPtj); } else { npc.Msg("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("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("You're a little early.<br/>Report to me when it's closer to the deadline."); } else { npc.Msg("How's it going?"); } return; } // Report? npc.Msg("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.<button title='Report Now' keyword='@report' /><button title='Report Later' keyword='@later' />"); if (await npc.Select() != "@report") { npc.Msg("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(), "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("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. <button title='Report Later' keyword='@later' /><arbeit_report result=\"0\"/>"); var reply = await npc.Select(); // Report later if (!reply.StartsWith("@reward:")) { npc.Msg("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(), "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(), "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(), "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("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.<button title='I will do it' keyword='@yes' /><button title='No, thanks' keyword='@no' />"); if (await npc.Select() == "@yes") { npc.StartQuest(200063); // Gather Base Herb (Dilys) npc.Msg("You sound really interested in becoming a healer...<br/>If you step outside, an owl will deliver my request to you."); } else { npc.Msg("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("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("There are no more jobs today.<br/>I will give you another job tomorrow."); return; } // Offer PTJ var randomPtj = npc.RandomPtj(JobType, QuestIds); var ptjXml = npc.GetPtjXml(randomPtj, "Dilys's Healer's House Part-Time Job", "Looking for help with delivering goods in Healer's House.", PerDay, remaining); var msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) { msg = "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 = "Ah, <username/>. Can you help me today?"; } npc.Msg(msg + ptjXml); if (await npc.Select() == "@accept") { npc.Msg("Thank you for your help in advance."); npc.StartPtj(randomPtj); } else { npc.Msg("You seem busy today."); } }