public async Task<HookResult> TalkDuncan(NpcScript npc, params object[] args) { if(npc.QuestActive(this.Id, "talk_duncan")) { npc.FinishQuest(this.Id, "talk_duncan"); npc.Msg(Hide.Name, "(You hand Nao's Letter of Introduction to Duncan.)"); npc.Msg("Ah, a letter from Nao.<br/>Hard to believe that little<br/>tomboy's all grown up..."); npc.Msg(Hide.Name, "(Duncan folds the letter in half and puts it in his pocket.)"); npc.Msg("So, you're <username/>.<br/>I'm Duncan, the chief of this town.<br/>Welcome to Tir Chonaill."); npc.Msg("Would you like to learn how to complete quests?"); npc.Msg(npc.Image("npctalk_questwindow", true, 272, 235), npc.Text("Press the "), npc.Hotkey("QuestView"), npc.Text(" key or<br/>press the Quest button at the bottom of your screen.<br>The quest window will appear and display your current quests.")); while (true) { npc.Msg(npc.Text("Press the "), npc.Hotkey("QuestView"), npc.Text(" key or<br/>press the Quest button at the bottom of your screen."), npc.Button("I pressed the Quest button", "@pressed"), npc.Button("$hidden", "@quest_btn_clicked", "autoclick_QuestView")); if (await npc.Select() != "@pressed") break; npc.Msg("Hmm... Are you sure you pressed the Quest button?<br/>It's possible that the Quest Window was already open, so<br/>try pressing it again."); } npc.Msg("Well done. See the list of quests?<br/>Clicking on a quest brings up the quest's details.<br/>Quests will show a yellow Complete button<br/>next to their names when you finish them."); npc.Msg("Try pressing the Complete button now.<br/>As important as it is to complete quests,<br/>it's just as important to press the \"Complete\" button<br/>afterwards to recieve your rewards."); npc.Msg("(Duncan looks at you with his benevolent hazel eyes.)"); npc.Msg("You've just learned one very basic skill<br/>to survive in Erinn."); npc.Msg("Soon, you will recieve a quest from an owl.<br/>Then, you will be able to start your training for real."); return HookResult.Break; } return HookResult.Continue; }
public async Task<HookResult> DuncanBeforeKeywords(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword == "g1_glasgavelen") { if (npc.HasKeyword("g1_26")) { npc.RemoveKeyword("g1_26"); npc.GiveKeyword("g1_27"); npc.Msg(L("What? What did you just say?")); npc.Msg(L("G-Glas Ghaibhleann?<br/>This can't be... Where did you hear that name?")); npc.Msg(L("Does the third book of Fomors cover that?<br/>I'd like to read it. If you have it on you, please let me see it."), npc.Button(L("Here it is."), "@yes"), npc.Button(L("No"), "@no")); } else if (npc.HasKeyword("g1_27")) { npc.Msg(L("I'd like to read the third book of Fomors. If you have it on you, please let me see it."), npc.Button(L("Here it is."), "@yes"), npc.Button(L("No"), "@no")); } if (await npc.Select() != "@yes" || !npc.HasItem(BookOfRevenge3Translated)) { npc.Msg(L("Please come back immediately once you have the book on you.")); return HookResult.Break; } npc.RemoveKeyword("g1_glasgavelen"); npc.GiveKeyword("g1_book_of_glasgavelen"); npc.RemoveItem(BookOfRevenge3Translated); npc.Notice(L("You have given the Book of Revenge, Vol. 3 (Translated) to Duncan.")); npc.Msg(Hide.Name, L("(Duncan receives the book and carefully starts reading.)")); npc.Msg(L("This can't be!<br/>Things are a lot more serious than I'd thought.<br/>This is a problem. What should we do?")); npc.Msg(L("Glas Ghaibhleann is a legendary giant<br/>that destroyed everything within it's sight with hatred and anger.<br/>It's impossible to describe the fear this monster generates.")); npc.Msg(L("Once, Glas Ghaibhleann was commanded by an evil god<br/>to rampage all across Erinn.<br/>There was simply nothing we could do about it."), npc.Image("g1_ch24_glasgavelen")); npc.Msg(L("That's when our ancestor race, the Partholons, was decimated<br/>and sought refuge in this small mountainous area.")); npc.Msg(L("I'm sorry. I'm a bit dazed and it's hard to talk.<br/>It'd be more helpful for you to read a book written by our ancestors<br/>who fought against this monster.<br/>Let's see.")); npc.Msg(L("...<p/>...!!<p/>It's not here!<p/>Ah, don't give up now.<br/>I just forgot that<br/>I'd lent it to someone.<br/>He lives in Bangor and...what was his name?")); npc.Msg(L("B-Bri... That's right!<br/>Bryce is the person who borrowed it from me.")); npc.Msg(L("Tell Bryce about me to get the book and read it.<br/>There is so much more there than I can ever tell you<br/>that is written in that book.")); return HookResult.Break; } else if (keyword == "g1_book_of_glasgavelen") { npc.Msg(L("Tell Bryce about me to get the book and read it.<br/>There is so much more there than I can ever tell you<br/>that is written in that book.")); return HookResult.Break; } return HookResult.Continue; }
public async Task <HookResult> TarlachBeforeKeywords(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword == "g1_dulbrau1") { if (npc.HasItem(FomorMedal)) { if (npc.HasKeyword("g1_13")) { npc.RemoveKeyword("g1_13"); npc.GiveKeyword("g1_14"); npc.Msg(L("'Goddess, lend me the moonlight...'<br/>That's what Goro said it means?<br/>The line 'Dul Brau Dairam Shanon?'")); npc.Msg(L("I can't say for sure that's it's a wrong interpretation but...<br/>it's slightly different from what I remember.")); } npc.Msg(L("Could I take a look at this medal?"), npc.Button(L("Yes"), "@yes"), npc.Button(L("No"), "@no")); if (await npc.Select() != "@yes") { npc.Msg(L("I won't be able to teach you the meaning of this line without seeing the medal.")); return(HookResult.Break); } npc.RemoveItem(FomorMedal); npc.RemoveKeyword("g1_dulbrau1"); npc.GiveKeyword("g1_dulbrau2"); npc.Msg(L("Thank you, let's take a look.<br/>Hm... I see.")); npc.Msg(L("The reason I am human during the night,<br/>is because of Eweca's moonlight and its magic power...")); npc.Msg(L("'Dul Brau Dairam Shanon' means,<br/>'Oh, Goddess. Please bestow me with your powers.'")); npc.Msg(L("This story...<br/>is straight from a Fomor who was practicing magic,<br/>so I am sure of it.<br/>...")); npc.Msg(L("Anyway, now you should know what this means.<br/>Fomors are coming to Erinn with the help of the Goddess.<br/>Yes, with the very power of the Goddess.")); npc.Msg(L("Morrighan is assisting Fomors with their infiltration.<br/>Which is an unforgivable act.<br/>If you don't believe me, why don't you go ask Goro again?")); } else { npc.Msg(L("'Goddess, lend me the moonlight...'<br/>That's what Goro said it means?<br/>The line 'Dul Brau Dairam Shanon?'")); npc.Msg(L("I can't say for sure that's it's a wrong interpretation but...<br/>it's slightly different from what I remember.")); } return(HookResult.Break); } else if (keyword == "g1_dulbrau2") { npc.Msg(L("If you don't believe me, why don't you go ask Goro again?")); return(HookResult.Break); } return(HookResult.Continue); }
public async Task<HookResult> TalkTrefor(NpcScript npc, params object[] args) { if(npc.QuestActive(this.Id, "talk_trefor")) { npc.FinishQuest(this.Id, "talk_trefor"); if(!npc.Player.Skills.Has(SkillId.Smash, SkillRank.Novice)) npc.Player.Skills.Give(SkillId.Smash, SkillRank.Novice); npc.Msg("Welcome, I am Trefor, the guard.<br/>Someone from the town went into Alby Dungeon a while ago, but hasn't returned yet.<br/>I wish I could go there myself, but I can't leave my post. I'd really appreciate it if you can go and look for in Alby Dungeon."); npc.Msg("Since the dungeon is a dangerous place to be in, I'll teach you a skill that will help you in an emergency situation.<br/>It's called the Smash skill. If you use it, you can knock down a monster with a single blow!<br/>It is also highly effective when you sneak up on a target and deliver the blow without warning."); npc.Msg("Against monsters that are using the Defense skill,<br/>Smash will be the only way to penetrate that skill and deliver a killer blow."); npc.Msg("However... looking at the way you're holding your sword, I'm not sure if you are up to the task.<br/>Let me test your skills first. Do you see those brown foxes wandering in front of me?<br/>They're quite a nuisance, praying on those roosters in town.<br/>I want you to go and hunt 5 Young Brown Foxes right now."); npc.Msg("Foxes use the Defense Skill a lot, and as I told you before, regular attacks do not work against defending targets.<br/>That's then the Smash skill comes in handy.<br/><br/>Watch how I do it, and try picking up the important parts so you can use it too.<br/>You don't need to overstrain yourself by going for the Brown Foxes. Young Brown Foxes will do just fine.", npc.Movie("skillbar_guide_us.wmv", 500, 300), npc.Button("Continue")); await npc.Select(); npc.Close2(); var scene = new Cutscene("tuto_smash", npc.Player); scene.AddActor("me", npc.Player); scene.AddActor("#trefor", npc.NPC); scene.AddActor("#brownfox", 50001); scene.Play(); return HookResult.End; } else if(npc.QuestActive(this.Id, "talk_trefor2")) { npc.FinishQuest(this.Id, "talk_trefor2"); npc.Msg("Good, I see that you're getting the hang of it.<br/>Well, I was able to do that when I was 8, but whatever...<br/>It is now time for you to go and search for the missing Villager."); npc.Msg("Follow the road up and turn right and you'll find the Alby Dungeon.<br/>You can enter the dungeon by dropping this item on the altar.<br/>If you either lose it or fail to rescue her, come back to me so I can give you another one. Please be careful.", npc.Image("dungeonpass", 128, 128)); npc.GiveItem(63180, 1); return HookResult.Break; } else if(npc.QuestActive(this.Id, "talk_trefor3")) { npc.FinishQuest(this.Id, "talk_trefor3"); npc.Msg("You did it! Good job.<br/>Good thing I asked for your help.<br/>For your great work, I will now teach you how to properly use the Smash skill.<br/>If you open your Skill window and press the 'LEARN' button, you will be able to use a more powerful Smash skill.<br/>I can always use some help here, so drop by often, okay?"); if(npc.Player.Skills.Is(SkillId.Smash, SkillRank.Novice)) npc.Player.Skills.Train(SkillId.Smash, 1); return HookResult.Break; } return HookResult.Continue; }
public async Task<HookResult> TalkNpc(NpcScript npc, params object[] args) { if (npc.QuestActive(this.Id, "talk_endelyon")) { npc.FinishQuest(this.Id, "talk_endelyon"); npc.Msg("Ah, you're here.<br/>May the blessings of Lymilark be with you in every step of the way. There are some people who think it to be difficult.<br/>Just hold on to the instrument, and you'll be able to play a semblance of music.<br/>Of course, it requires hours of practice if you plan on bringing tears to your special someone.", npc.Button("End Conversation", "@end")); await npc.Select(); npc.AcquireItem(40004); // Lute npc.End(); return HookResult.End; } return HookResult.Continue; }
public async Task <HookResult> ShelfAfterIntro(NpcScript npc, params object[] args) { if (npc.Player.QuestActive(this.Id, "talk_shelf")) { npc.Msg(Hide.Name, L("(Manus said he placed Stewart's book here, so I'd better look for it.)")); npc.Msg(Hide.Name, L("(......)"), npc.Button(L("Continue"), "@continue")); await npc.Select(); npc.Player.FinishQuestObjective(this.Id, "talk_shelf"); npc.Player.GiveItem(StewartsBook); npc.Player.Notice(L("Found Stewart's book inside the bookshelf.")); npc.Msg(Hide.Name, L("(Found Stewart's book.)")); return(HookResult.Break); } return(HookResult.Continue); }
public async Task <HookResult> LassarBeforeKeyword(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword == "g1_black_rose") { if (npc.Player.HasKeyword("g1_17_2")) { npc.Player.RemoveKeyword("g1_17_2"); npc.Player.GiveKeyword("g1_17_3"); npc.Msg(L("Hmm. Priest Meven's favor?<br/>Why would he need something like that? Hehehe.")); npc.Msg(L("Hmm, I don't know how this will sound<br/>but I need some Holy Water of Lymilark to grow this.<br/>Priest Meven used to supply me with it up until recently.")); npc.Msg(L("I guess he got caught by Priestess Endelyon.<br/>He hasn't given me any for the past few days.")); npc.Msg(L("If you have any Holy Water of Lymilark, could you give me a bottle?"), npc.Button(L("Here."), "@yes"), npc.Button(L("No"), "@no")); if (await npc.Select() != "@yes" || !npc.Player.HasItem(HolyWater)) { npc.Msg(L("I need some Holy Water of Lymilark to grow this, please come back once you have some.")); return(HookResult.Break); } LassarFinish(npc); return(HookResult.Break); } else if (npc.Player.HasKeyword("g1_17_3")) { npc.Msg(L("Did you get a bottle of Holy Water of Lymilark?"), npc.Button(L("Here."), "@yes"), npc.Button(L("No"), "@no")); if (await npc.Select() != "@yes" || !npc.Player.HasItem(HolyWater)) { npc.Msg(L("I need some Holy Water of Lymilark to grow this, please come back once you have some.")); return(HookResult.Break); } LassarFinish(npc); return(HookResult.Break); } } return(HookResult.Continue); }
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 <HookResult> TarlachBeforeKeywords(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword == "g1_mores_gwydion") { if (npc.HasKeyword("g1_19")) { npc.RemoveKeyword("g1_19"); npc.GiveKeyword("g1_20"); npc.Msg(L("Mores Gwydion...")); npc.Msg(L("...Yes, he's the author of that book.<br/>He's my mentor who's taught me<br/>...And also a Wizard who'd saved the world.")); npc.Msg(L("I had always thought that he had passed away but...<br/>he's apparently alive and has sided with the Fomors.")); npc.Msg(L("...Anyhow, give me the translated book.<br/>I would like to take a look at it."), npc.Button(L("Sure"), "@yes"), npc.Button(L("No"), "@no")); } else if (npc.HasKeyword("g1_20")) { npc.Msg(L("Give me the translated book.<br/>I would like to take a look at it."), npc.Button(L("Sure"), "@yes"), npc.Button(L("No"), "@no")); } if (await npc.Select() != "@yes" || !npc.HasItem(BookOfRevenge)) { npc.Msg(L("Don't you have it with you?")); return(HookResult.Break); } npc.RemoveItem(BookOfRevenge); npc.RemoveKeyword("g1_mores_gwydion"); npc.GiveKeyword("g1_memo_of_lost_thing"); npc.Msg(Hide.Name, L("(Tarlach flipped through the book.)")); npc.Msg(L("Just what I'd tought...<br/>Master had faked his own death<br/>for some reason and now he's helping the Fomors.")); npc.Msg(L("This must be what Kristell was talking about.")); npc.Msg(L("'...Okay, I admit it.<br/>Perhaps I didn't lose the token but<br/>I wanted to throw it away..."), npc.Image("g1_ch18_book")); npc.Msg(L("Hmm... apparently, Master was mulling over something<br/>after losing some item...<p/>I wonder what it was...")); npc.Msg(L("...!<p/>Dunbarton's Town Office<br/>collects lost items and returns them to their rightful owners.<br/>You might be able to find a clue if you<br/>can find what it is that Mores had lost.")); return(HookResult.Break); } return(HookResult.Continue); }
public async Task<HookResult> DougalBeforeKeywords(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword == "g1_revive_of_glasgavelen") { if (npc.HasKeyword("g1_37")) { npc.RemoveKeyword("g1_37"); npc.GiveKeyword("g1_37_2"); npc.Msg(L("There's a sudden change in the sky.<br/>What's happened?")); npc.Msg(L("...<p/>You finally rescued the Goddess.<br/>Congratulations.")); npc.Msg(Hide.Name, L("(You tell Dougal what you heard from the Goddess.)")); npc.Msg(L("...<p/>The Goddess told you that?<br/>But why are you telling me this?<p/>...<p/>...<p/>Ahh. I see.<p/>Heh. Hahaha.<p/>This explains quite a few things.")); npc.Msg(L("I didn't realize that the 'Added Soul Effect'<br/>that I had told you in order to make you stay here<br/>could have the same effect on me.")); npc.Msg(L("But you already seem to have guessed it.<br/>No, you must already know about it since that is essentially why you came here,<br/>to tell me this, right?")); npc.Msg(L("Right...<br/>I'm also a soul from another world just like yourself.<br/>I'm probably known to<br/>your people as Glas Ghaibhleann.")); npc.Msg(L("I came here to reclaim my body<br/>that was summoned by the people<br/>of this world against my will,")); npc.Msg(L("but I ended up in the body<br/>of the last remaining human in this world.<br/>My host body is weak.<br/>I cannot even walk properly in this weak Human form.")); npc.Msg(L("Now that you have learned all about me,<br/>I will proceed to pursue my original goal.<br/>The Goddess probably sent you to me fully<br/>aware of what my intentions are.")); npc.Msg(L("My goal?<br/>It's obvious, isn't it? I wish to reclaim the freedom of my real body.<br/>I need to free my body into the world I originally belonged to<br/>by breaking away from these shackles.")); npc.Msg(L("The Goddess Pendant is a key into another world.<br/>If you want, I can inscribe the pattern into<br/>the pendant so it will move you to my body, which is calling me.")); npc.Msg(L("However, my body that's being<br/>controlled by the summoner would be powerful enough to blow away mere humans.<br/>I'm not sure if I should trust you with this task.")); npc.Msg(L("Can you make me a promise?<br/>Can you promise you will defeat my body?<br/>And return it to where it belongs?"), npc.Button(L("Yes"), "@yes"), npc.Button(L("No"), "@no")); } else if (npc.HasKeyword("g1_37_2")) { npc.Msg(L("Can you promise you will defeat my body?<br/>And return it to where it belongs?"), npc.Button(L("Yes"), "@yes"), npc.Button(L("No"), "@no")); } else if (npc.HasKeyword("g1_38")) { if (!npc.HasItem(PendantOfTheGoddessBind)) npc.GiveItem(PendantOfTheGoddessBind); npc.Msg(L("Go to Albey Dungeon and offer the pendant there.<br/>If you succeed,<br/>it will only be a matter time before I free myself from being an Added Soul.")); return HookResult.Break; } else { return HookResult.Continue; } if (await npc.Select() != "@yes") { npc.Msg(L("Oh...")); return HookResult.Break; } else if (!npc.HasItem(PendantOfTheGoddess)) { npc.Msg(L("You don't have the pendant on you?")); return HookResult.Break; } npc.RemoveKeyword("g1_37"); npc.RemoveKeyword("g1_37_2"); npc.GiveKeyword("g1_38"); npc.RemoveItem(PendantOfTheGoddess); npc.GiveItem(PendantOfTheGoddessBind); npc.GiveItem(Item.CreateWarpScroll(63009, "TirNaNog_Dungeon")); npc.Msg(L("Okay, I'll trust you.<br/>I guess it might not be a bad idea to trust you since<br/>you rescued the Goddess.")); npc.Msg(L("Go to Albey Dungeon and offer this pendant there.<br/>You know how to use the Red Wings of a Goddess, right?<br/>If you succeed,<br/>it will only be a matter time before I free myself from being an Added Soul.")); } return HookResult.Continue; }
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 <HookResult> TalkDuncan(NpcScript npc, params object[] args) { if (npc.QuestActive(this.Id, "talk_duncan")) { npc.FinishQuest(this.Id, "talk_duncan"); npc.Msg(Hide.Name, "(You hand Nao's Letter of Introduction to Duncan.)"); npc.Msg("Ah, a letter from Nao.<br/>Hard to believe that little<br/>tomboy's all grown up..."); npc.Msg(Hide.Name, "(Duncan folds the letter in half and puts it in his pocket.)"); npc.Msg("So, you're <username/>.<br/>I'm Duncan, the chief of this town.<br/>Welcome to Tir Chonaill."); npc.Msg("Would you like to learn how to complete quests?"); npc.Msg(npc.Image("npctalk_questwindow", true, 272, 235), npc.Text("Press the "), npc.Hotkey("QuestView"), npc.Text(" key or<br/>press the Quest button at the bottom of your screen.<br>The quest window will appear and display your current quests.")); while (true) { npc.Msg(npc.Text("Press the "), npc.Hotkey("QuestView"), npc.Text(" key or<br/>press the Quest button at the bottom of your screen."), npc.Button("I pressed the Quest button", "@pressed"), npc.Button("$hidden", "@quest_btn_clicked", "autoclick_QuestView")); if (await npc.Select() != "@pressed") { break; } npc.Msg("Hmm... Are you sure you pressed the Quest button?<br/>It's possible that the Quest Window was already open, so<br/>try pressing it again."); } npc.Msg("Well done. See the list of quests?<br/>Clicking on a quest brings up the quest's details.<br/>Quests will show a yellow Complete button<br/>next to their names when you finish them."); npc.Msg("Try pressing the Complete button now.<br/>As important as it is to complete quests,<br/>it's just as important to press the \"Complete\" button<br/>afterwards to recieve your rewards."); npc.Msg("(Duncan looks at you with his benevolent hazel eyes.)"); npc.Msg("You've just learned one very basic skill<br/>to survive in Erinn."); npc.Msg("Soon, you will recieve a quest from an owl.<br/>Then, you will be able to start your training for real."); return(HookResult.Break); } return(HookResult.Continue); }
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.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("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.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("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.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("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.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("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 <HookResult> DuncanBeforeKeywords(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword == "g1_glasgavelen") { if (npc.Player.HasKeyword("g1_26")) { npc.Player.RemoveKeyword("g1_26"); npc.Player.GiveKeyword("g1_27"); npc.Msg(L("What? What did you just say?")); npc.Msg(L("G-Glas Ghaibhleann?<br/>This can't be... Where did you hear that name?")); npc.Msg(L("Does the third book of Fomors cover that?<br/>I'd like to read it. If you have it on you, please let me see it."), npc.Button(L("Here it is."), "@yes"), npc.Button(L("No"), "@no")); } else if (npc.Player.HasKeyword("g1_27")) { npc.Msg(L("I'd like to read the third book of Fomors. If you have it on you, please let me see it."), npc.Button(L("Here it is."), "@yes"), npc.Button(L("No"), "@no")); } if (await npc.Select() != "@yes" || !npc.Player.HasItem(BookOfRevenge3Translated)) { npc.Msg(L("Please come back immediately once you have the book on you.")); return(HookResult.Break); } npc.Player.RemoveKeyword("g1_glasgavelen"); npc.Player.GiveKeyword("g1_book_of_glasgavelen"); npc.Player.RemoveItem(BookOfRevenge3Translated); npc.Player.Notice(L("You have given the Book of Revenge, Vol. 3 (Translated) to Duncan.")); npc.Msg(Hide.Name, L("(Duncan receives the book and carefully starts reading.)")); npc.Msg(L("This can't be!<br/>Things are a lot more serious than I'd thought.<br/>This is a problem. What should we do?")); npc.Msg(L("Glas Ghaibhleann is a legendary giant<br/>that destroyed everything within it's sight with hatred and anger.<br/>It's impossible to describe the fear this monster generates.")); npc.Msg(L("Once, Glas Ghaibhleann was commanded by an evil god<br/>to rampage all across Erinn.<br/>There was simply nothing we could do about it."), npc.Image("g1_ch24_glasgavelen")); npc.Msg(L("That's when our ancestor race, the Partholons, was decimated<br/>and sought refuge in this small mountainous area.")); npc.Msg(L("I'm sorry. I'm a bit dazed and it's hard to talk.<br/>It'd be more helpful for you to read a book written by our ancestors<br/>who fought against this monster.<br/>Let's see.")); npc.Msg(L("...<p/>...!!<p/>It's not here!<p/>Ah, don't give up now.<br/>I just forgot that<br/>I'd lent it to someone.<br/>He lives in Bangor and...what was his name?")); npc.Msg(L("B-Bri... That's right!<br/>Bryce is the person who borrowed it from me.")); npc.Msg(L("Tell Bryce about me to get the book and read it.<br/>There is so much more there than I can ever tell you<br/>that is written in that book.")); return(HookResult.Break); } else if (keyword == "g1_book_of_glasgavelen") { npc.Msg(L("Tell Bryce about me to get the book and read it.<br/>There is so much more there than I can ever tell you<br/>that is written in that book.")); return(HookResult.Break); } return(HookResult.Continue); }
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 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 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<HookResult> LassarBeforeKeyword(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword == "g1_black_rose") { if (npc.HasKeyword("g1_17_2")) { npc.RemoveKeyword("g1_17_2"); npc.GiveKeyword("g1_17_3"); npc.Msg(L("Hmm. Priest Meven's favor?<br/>Why would he need something like that? Hehehe.")); npc.Msg(L("Hmm, I don't know how this will sound<br/>but I need some Holy Water of Lymilark to grow this.<br/>Priest Meven used to supply me with it up until recently.")); npc.Msg(L("I guess he got caught by Priestess Endelyon.<br/>He hasn't given me any for the past few days.")); npc.Msg(L("If you have any Holy Water of Lymilark, could you give me a bottle?"), npc.Button(L("Here."), "@yes"), npc.Button(L("No"), "@no")); if (await npc.Select() != "@yes" || !npc.HasItem(HolyWater)) { npc.Msg(L("I need some Holy Water of Lymilark to grow this, please come back once you have some.")); return HookResult.Break; } LassarFinish(npc); return HookResult.Break; } else if (npc.HasKeyword("g1_17_3")) { npc.Msg(L("Did you get a bottle of Holy Water of Lymilark?"), npc.Button(L("Here."), "@yes"), npc.Button(L("No"), "@no")); if (await npc.Select() != "@yes" || !npc.HasItem(HolyWater)) { npc.Msg(L("I need some Holy Water of Lymilark to grow this, please come back once you have some.")); return HookResult.Break; } LassarFinish(npc); return HookResult.Break; } } return HookResult.Continue; }
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) { if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("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(L("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(L("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(L("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?"), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later")); if (await npc.Select() != "@report") { npc.Msg(L("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(), L("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(L("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."), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result)); var reply = await npc.Select(); if (!reply.StartsWith("@reward:")) { npc.Msg(L("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(), L("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(), L("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(), L("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(L("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(L("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 msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) { msg = L("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 = L("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, npc.PtjDesc(randomPtj, L("Endelyon's Church Part-Time Job"), L("Looking for help with delivering goods to Church."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { npc.Msg(L("Thank you.<br/>Please take care of this on time.")); npc.StartPtj(randomPtj); } else { npc.Msg(L("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("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) { // 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("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 <HookResult> TalkNpc(NpcScript npc, params object[] args) { if (npc.QuestActive(this.Id, "talk_endelyon")) { npc.FinishQuest(this.Id, "talk_endelyon"); npc.Msg("Ah, you're here.<br/>May the blessings of Lymilark be with you in every step of the way. There are some people who think it to be difficult.<br/>Just hold on to the instrument, and you'll be able to play a semblance of music.<br/>Of course, it requires hours of practice if you plan on bringing tears to your special someone.", npc.Button("End Conversation", "@end")); await npc.Select(); npc.AcquireItem(40004); // Lute npc.End(); return(HookResult.End); } return(HookResult.Continue); }
public async Task AboutArbeit(NpcScript npc) { if (npc.DoingPtjForOtherNpc()) { npc.Msg(L("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(L("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(L("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(L("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?"), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later")); if (await npc.Select() != "@report") { npc.Msg(L("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(), L("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(L("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."), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result)); var reply = await npc.Select(); if (!reply.StartsWith("@reward:")) { npc.Msg(L("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(), L("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(), L("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(), L("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(L("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(L("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 msg = ""; if (npc.GetPtjDoneCount(JobType) == 0) msg = L("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 = L("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, npc.PtjDesc(randomPtj, L("Endelyon's Church Part-Time Job"), L("Looking for help with delivering goods to Church."), PerDay, remaining, npc.GetPtjDoneCount(JobType))); if (await npc.Select() == "@accept") { npc.Msg(L("Thank you.<br/>Please take care of this on time.")); npc.StartPtj(randomPtj); } else { npc.Msg(L("If you don't want to do it, then I guess that's that.")); } }
public async Task <HookResult> BeforeKeywords(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword != "about_skill") { return(HookResult.Continue); } // Continue if player has the skill already, so we reach other // hooks, for other skills. if (npc.Player.HasSkill(SkillId.Fireball)) { return(HookResult.Continue); } // Check prerequisites if (!IsEnabled("Fireball") || !npc.Player.IsUsingTitle(ElementalApprentice) || !npc.Player.HasEquipped("/fire_wand/")) { return(HookResult.Continue); } // Start quest if (!npc.Player.QuestActive(this.Id)) { if (!npc.Player.HasItem(this.ScrollId)) { npc.Msg(L("Hahaha... for an Elemental Master like you, <username/>, to<br/>ask someone like me for a skill...")); npc.Msg(L("...That must mean you're quite interested in<br/>the Fireball? Hahaha...")); npc.Msg(L("Ahhh, don't be surprised by my comments.<br/>A lot of people like you have been asking the same question lately.<br/>I mean, it's better for me to teach a spell like this to someone who's well-prepared for something like this, that is, someone like you.")); npc.Msg(L("Besides, Fireball is a dangerous spell...<br/>Have you ever heard of it before?<br/>If the Firebolt is a bullet, then<br/>the Fireball is a cannonball.")); npc.Msg(L("There's a big difference in the damage it can cause,<br/>and it's difficult to control that much ball of Mana energy, so...<br/>anyone wishing to learn the Fireball skill<br/>must first pass a test.")); npc.Msg(L("...If you, <username/>, are also interested in it, then<br/>you'll have to pass this test, too.<br/>You can't drop out in the middle, so you'll have to be really ready and committed to do this.<br/>Are you interested?"), npc.Button(L("Yes, I am!"), "@yes"), npc.Button(L("Maybe another time..."), "@no")); if (await npc.Select() == "@yes") { npc.Player.GiveItem(Aura.Channel.World.Entities.Item.CreateQuestScroll(this.Id)); npc.Player.GiveItem(BookOnFireball); npc.Msg(L("I knew you'd do it, <username/>.<br/>Take this first...")); npc.Msg(L("...It's not a difficult task.<br/>All you have to do is make a book.<br/>The catch is, this isn't one of those ordinary books that Aeira stores in her bookstore.")); npc.Msg(L("Follow the quest scroll and<br/>gather up each page of the Book of Fireball<br/>that's laden with magic power, and make a book out of it.")); } else { npc.Msg(L("Yes, I understand... it can seem quite daunting.<br/>If you ever change your mind,<br/>just let me know and I'll give you the quest.")); } return(HookResult.Break); } } // Finish quest else { // Check if book is complete and finish quest if it is var book = npc.Player.Inventory.GetItem(a => a.Info.Id == BookOnFireball && a.OptionInfo.Suffix == BookOnFireballPage10); if (book != null) { npc.Player.FinishQuestObjective(this.Id, "talk"); npc.Player.Inventory.Remove(book); npc.Msg(L("Wow, you found them all! Congratulations!<br/>Now, I suggest you step out and press 'Complete' to use the Fireball.<br/>Go ahead and try using it!")); } else { npc.Msg(L("Haha, <username/>, you seem to be a very curious person.<br/>This is not the right time, though...<br/>...I'll let you know when the time is right.")); } return(HookResult.Break); } return(HookResult.Continue); }
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.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.")); } }
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.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 <HookResult> TalkTrefor(NpcScript npc, params object[] args) { if (npc.QuestActive(this.Id, "talk_trefor")) { npc.FinishQuest(this.Id, "talk_trefor"); npc.Player.Skills.Give(SkillId.Smash, SkillRank.Novice); npc.Msg("Welcome, I am Trefor, the guard.<br/>Someone from the town went into Alby Dungeon a while ago, but hasn't returned yet.<br/>I wish I could go there myself, but I can't leave my post. I'd really appreciate it if you can go and look for in Alby Dungeon."); npc.Msg("Since the dungeon is a dangerous place to be in, I'll teach you a skill that will help you in an emergency situation.<br/>It's called the Smash skill. If you use it, you can knock down a monster with a single blow!<br/>It is also highly effective when you sneak up on a target and deliver the blow without warning."); npc.Msg("Against monsters that are using the Defense skill,<br/>Smash will be the only way to penetrate that skill and deliver a killer blow."); npc.Msg("However... looking at the way you're holding your sword, I'm not sure if you are up to the task.<br/>Let me test your skills first. Do you see those brown foxes wandering in front of me?<br/>They're quite a nuisance, praying on those roosters in town.<br/>I want you to go and hunt 5 Young Brown Foxes right now."); npc.Msg("Foxes use the Defense Skill a lot, and as I told you before, regular attacks do not work against defending targets.<br/>That's then the Smash skill comes in handy.<br/><br/>Watch how I do it, and try picking up the important parts so you can use it too.<br/>You don't need to overstrain yourself by going for the Brown Foxes. Young Brown Foxes will do just fine.", npc.Movie("skillbar_guide_us.wmv", 500, 300), npc.Button("Continue")); await npc.Select(); npc.Close2(); var scene = new Cutscene("tuto_smash", npc.Player); scene.AddActor("me", npc.Player); scene.AddActor("#trefor", npc.NPC); scene.AddActor("#brownfox", 50001); scene.Play(); return(HookResult.End); } else if (npc.QuestActive(this.Id, "talk_trefor2")) { npc.FinishQuest(this.Id, "talk_trefor2"); npc.Msg("Good, I see that you're getting the hang of it.<br/>Well, I was able to do that when I was 8, but whatever...<br/>It is now time for you to go and search for the missing Villager."); npc.Msg("Follow the road up and turn right and you'll find the Alby Dungeon.<br/>You can enter the dungeon by dropping this item on the altar.<br/>If you either lose it or fail to rescue her, come back to me so I can give you another one. Please be careful.", npc.Image("dungeonpass", 128, 128)); npc.GiveItem(63180, 1); return(HookResult.Break); } else if (npc.QuestActive(this.Id, "talk_trefor3")) { npc.FinishQuest(this.Id, "talk_trefor3"); npc.Msg("You did it! Good job.<br/>Good thing I asked for your help.<br/>For your great work, I will now teach you how to properly use the Smash skill.<br/>If you open your Skill window and press the 'LEARN' button, you will be able to use a more powerful Smash skill.<br/>I can always use some help here, so drop by often, okay?"); if (npc.Player.Skills.Is(SkillId.Smash, SkillRank.Novice)) { npc.Player.Skills.Train(SkillId.Smash, 1); } return(HookResult.Break); } return(HookResult.Continue); }
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("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 <HookResult> DougalBeforeKeywords(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword == "g1_revive_of_glasgavelen") { if (npc.HasKeyword("g1_37")) { npc.RemoveKeyword("g1_37"); npc.GiveKeyword("g1_37_2"); npc.Msg(L("There's a sudden change in the sky.<br/>What's happened?")); npc.Msg(L("...<p/>You finally rescued the Goddess.<br/>Congratulations.")); npc.Msg(Hide.Name, L("(You tell Dougal what you heard from the Goddess.)")); npc.Msg(L("...<p/>The Goddess told you that?<br/>But why are you telling me this?<p/>...<p/>...<p/>Ahh. I see.<p/>Heh. Hahaha.<p/>This explains quite a few things.")); npc.Msg(L("I didn't realize that the 'Added Soul Effect'<br/>that I had told you in order to make you stay here<br/>could have the same effect on me.")); npc.Msg(L("But you already seem to have guessed it.<br/>No, you must already know about it since that is essentially why you came here,<br/>to tell me this, right?")); npc.Msg(L("Right...<br/>I'm also a soul from another world just like yourself.<br/>I'm probably known to<br/>your people as Glas Ghaibhleann.")); npc.Msg(L("I came here to reclaim my body<br/>that was summoned by the people<br/>of this world against my will,")); npc.Msg(L("but I ended up in the body<br/>of the last remaining human in this world.<br/>My host body is weak.<br/>I cannot even walk properly in this weak Human form.")); npc.Msg(L("Now that you have learned all about me,<br/>I will proceed to pursue my original goal.<br/>The Goddess probably sent you to me fully<br/>aware of what my intentions are.")); npc.Msg(L("My goal?<br/>It's obvious, isn't it? I wish to reclaim the freedom of my real body.<br/>I need to free my body into the world I originally belonged to<br/>by breaking away from these shackles.")); npc.Msg(L("The Goddess Pendant is a key into another world.<br/>If you want, I can inscribe the pattern into<br/>the pendant so it will move you to my body, which is calling me.")); npc.Msg(L("However, my body that's being<br/>controlled by the summoner would be powerful enough to blow away mere humans.<br/>I'm not sure if I should trust you with this task.")); npc.Msg(L("Can you make me a promise?<br/>Can you promise you will defeat my body?<br/>And return it to where it belongs?"), npc.Button(L("Yes"), "@yes"), npc.Button(L("No"), "@no")); } else if (npc.HasKeyword("g1_37_2")) { npc.Msg(L("Can you promise you will defeat my body?<br/>And return it to where it belongs?"), npc.Button(L("Yes"), "@yes"), npc.Button(L("No"), "@no")); } else if (npc.HasKeyword("g1_38")) { if (!npc.HasItem(PendantOfTheGoddessBind)) { npc.GiveItem(PendantOfTheGoddessBind); } npc.Msg(L("Go to Albey Dungeon and offer the pendant there.<br/>If you succeed,<br/>it will only be a matter time before I free myself from being an Added Soul.")); return(HookResult.Break); } else { return(HookResult.Continue); } if (await npc.Select() != "@yes") { npc.Msg(L("Oh...")); return(HookResult.Break); } else if (!npc.HasItem(PendantOfTheGoddess)) { npc.Msg(L("You don't have the pendant on you?")); return(HookResult.Break); } npc.RemoveKeyword("g1_37"); npc.RemoveKeyword("g1_37_2"); npc.GiveKeyword("g1_38"); npc.RemoveItem(PendantOfTheGoddess); npc.GiveItem(PendantOfTheGoddessBind); npc.GiveItem(Item.CreateWarpScroll(63009, "tirnanog_dungeon")); npc.Msg(L("Okay, I'll trust you.<br/>I guess it might not be a bad idea to trust you since<br/>you rescued the Goddess.")); npc.Msg(L("Go to Albey Dungeon and offer this pendant there.<br/>You know how to use the Red Wings of a Goddess, right?<br/>If you succeed,<br/>it will only be a matter time before I free myself from being an Added Soul.")); } return(HookResult.Continue); }
public async Task <HookResult> StewartBeforeKeywords(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword != "about_skill") { return(HookResult.Continue); } // Continue if player has the skill already, so we reach other // hooks, for other skills. if (npc.Player.HasSkill(SkillId.Thunder)) { return(HookResult.Continue); } // Check prerequisites if (!IsEnabled("Thunder") || !npc.Player.HasSkill(SkillId.Lightningbolt) || !npc.Player.HasEquipped("/lightning_wand/")) { return(HookResult.Continue); } // Start quest if (!npc.Player.HasQuest(this.Id)) { npc.Msg(L("Ah, <username/>, you have the Lightning Wand.<br/>You seem to know of the Lightning Bolt magic...<br/>Do you also know the Thunder magic by any chance?")); npc.Msg(L("...Thunder is a very powerful, electric magic.<br/>It's a spell that is used by first freezing the enemy with a lightning bolt,<br/>followed by a huge thunder on the enemy's head.<br/>It's so much more powerful than the Lightning Bolt, that it's incomparable.")); npc.Msg(L("If you can help me out here once,<br/>I'll help you acquire the Thunder magic.<br/>Are you interested?"), npc.Button(L("Yes I am!"), "@yes"), npc.Button(L("Maybe another time..."), "@no")); if (await npc.Select() == "@yes") { npc.Player.StartQuest(this.Id); npc.Msg(L("I'd appreciate it if you can get this person, who borrowed a book from me, to return it.<br/>I'll give you the quest scroll through the owl,<br/>and your job will be to get the book back from the person written on the scroll.")); } else { npc.Msg(L("...if you ever change your mind,<br/>then can you please come see me with the Lightning Wand?")); } return(HookResult.Break); } return(HookResult.Continue); }
public async Task <HookResult> BeforeKeywords(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword != "about_skill") { return(HookResult.Continue); } // Arrow revolver can only be learned by humans if (!npc.Player.IsHuman) { npc.Msg(L("(Missing dialog: Aranwen about non-humans and bows? (Arrow Revolver)")); return(HookResult.Break); } // Aranwen can't do anything for you before AR is enabled if (!IsEnabled("ArrowRevolver")) { npc.Msg(L("I know a little bit about bows,<br/>but it's not quite the right time.")); npc.Msg(L("Please come back some other time.")); return(HookResult.Break); } // Check Fire Arrow title if (!npc.Player.IsUsingTitle(88)) { npc.Msg(L("...I am sorry, but someone that has yet to master the skill<br/>should not be bluntly asking questions about skills like this.")); npc.Msg(L("...if you are interested in high-leveled bowman skills, then<br/>you should at least master the Fire Arrow skill first.")); return(HookResult.Break); } // Check skill if (npc.Player.HasSkill(SkillId.ArrowRevolver2)) { // Unofficial npc.Msg(L("...You've learned Arrow Revolver. I hope you keep learning<br/>until you master it.")); return(HookResult.Break); } // Start quest if (!npc.Player.QuestActive(this.Id)) { if (!npc.Player.HasItem(this.ScrollId)) { npc.Msg(L("Hmmm... <username/>, you knew how to shoot a Fire Arrow?<br/>It seems like you are interested in bows, and...<br/>it's nice to meet someone who's talent is only surpassed by their work ethic.")); npc.Msg(L("I think it'll be very beneficial for you to learn this skill called the Arrow Revolver...")); npc.Msg(L("Arrow Revolver is a skill that lets you fire arrows consecutively.<br/>You'll fire multiple arrows in quick succession, not giving your enemy enough time to react..<br/>This skill will allow you to shoot up to 5 arrows at once.")); npc.Msg(L("Arrow Revolver is very effective against powerful enemies by applying multiple<br/>damages and wounds in the blink of an eye. It's also effective against groups of enemies.")); npc.Msg(L("...Are you interested in learning this skill?<br/>Yes, the Arrow Revolver...<br/>Please promise me that you will not quit on me midway through. Okay?"), npc.Button(L("Okay!"), "@yes"), npc.Button(L("No"), "@no")); if (await npc.Select() == "@yes") { npc.Player.GiveItem(Aura.Channel.World.Entities.Item.CreateQuestScroll(this.Id)); npc.Player.GiveItem(BookOnArrowRevolver); npc.Msg(L("Great, <username/>.<br/>I'll give you this book and the quest.<br/>Technically speaking, Arrow Revolver<br/>relies somewhat on the power of Mana.")); npc.Msg(L("Gather together all of the pages in this book.<br/>Our ancestors seperated them in hopes of preventing<br/>the reoccurrence of the same mistakes that had been made by inexperienced bowmen.")); npc.Msg(L("Read the scroll carefully, and once you complete the book,<br/>you'll be able to use Arrow Revolver.<br/>...Good luck.")); } else { npc.Msg(L("...I see.<br/>Please talk to me when you change your mind.")); } return(HookResult.Break); } } // Finish quest else { // Check if book is complete and finish quest if it is var book = npc.Player.Inventory.GetItem(a => a.Info.Id == BookOnArrowRevolver && a.OptionInfo.Suffix == BookOnArrowRevolverPage10); if (book != null) { npc.Player.FinishQuestObjective(this.Id, "talk"); npc.Player.Inventory.Remove(book); npc.Msg(L("Yes? Please don't block my view.")); } else { npc.Msg(L("...You're learning Arrow Revolver. I hope you keep trying<br/>until you master it.")); } return(HookResult.Break); } return(HookResult.Continue); }
public async Task<HookResult> TarlachBeforeKeywords(NpcScript npc, params object[] args) { var keyword = args[0] as string; if (keyword == "g1_dulbrau1") { if (npc.HasItem(FomorMedal)) { if (npc.HasKeyword("g1_13")) { npc.RemoveKeyword("g1_13"); npc.GiveKeyword("g1_14"); npc.Msg(L("'Goddess, lend me the moonlight...'<br/>That's what Goro said it means?<br/>The line 'Dul Brau Dairam Shanon?'")); npc.Msg(L("I can't say for sure that's it's a wrong interpretation but...<br/>it's slightly different from what I remember.")); } npc.Msg(L("Could I take a look at this medal?"), npc.Button(L("Yes"), "@yes"), npc.Button(L("No"), "@no")); if (await npc.Select() != "@yes") { npc.Msg(L("I won't be able to teach you the meaning of this line without seeing the medal.")); return HookResult.Break; } npc.RemoveItem(FomorMedal); npc.RemoveKeyword("g1_dulbrau1"); npc.GiveKeyword("g1_dulbrau2"); npc.Msg(L("Thank you, let's take a look.<br/>Hm... I see.")); npc.Msg(L("The reason I am human during the night,<br/>is because of Eweca's moonlight and its magic power...")); npc.Msg(L("'Dul Brau Dairam Shanon' means,<br/>'Oh, Goddess. Please bestow me with your powers.'")); npc.Msg(L("This story...<br/>is straight from a Fomor who was practicing magic,<br/>so I am sure of it.<br/>...")); npc.Msg(L("Anyway, now you should know what this means.<br/>Fomors are coming to Erinn with the help of the Goddess.<br/>Yes, with the very power of the Goddess.")); npc.Msg(L("Morrighan is assisting Fomors with their infiltration.<br/>Which is an unforgivable act.<br/>If you don't believe me, why don't you go ask Goro again?")); } else { npc.Msg(L("'Goddess, lend me the moonlight...'<br/>That's what Goro said it means?<br/>The line 'Dul Brau Dairam Shanon?'")); npc.Msg(L("I can't say for sure that's it's a wrong interpretation but...<br/>it's slightly different from what I remember.")); } return HookResult.Break; } else if (keyword == "g1_dulbrau2") { npc.Msg(L("If you don't believe me, why don't you go ask Goro again?")); return HookResult.Break; } return HookResult.Continue; }
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.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 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.")); } } }