Esempio n. 1
0
	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;
	}
Esempio n. 2
0
	public async Task<HookResult> TalkNpc(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk_dilys1"))
		{
			npc.FinishQuest(this.Id, "talk_dilys1");

			npc.Msg("There's been talk recently about how healthy berries are.<br/>Their qualities have peaked my interest, even about the weight!");
			npc.Msg("Can you bring me one berry? I'd be very grateful.");

			return HookResult.Break;
		}
		else if (npc.QuestActive(this.Id, "talk_dilys2") && npc.HasItem(50007))
		{
			npc.FinishQuest(this.Id, "talk_dilys2");

			npc.Msg("Oh thank you so much! I can't wait to try it!<br/>Here, as an exchange, take these potions I've been working on.<button title='Continue' keyword='@continue'/>");
			await npc.Select();

			npc.RemoveItem(50007); // Berry
			npc.CompleteQuest(this.Id);

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Esempio n. 3
0
    public async Task <HookResult> TalkDeian(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk_deian1") || npc.QuestActive(this.Id, "protect_sheep"))
        {
            npc.Msg("I'm glad to see you. I've been stuck here all day!<br/>Can you look after my sheep for a few minutes? I got some business to take care of.<br/>It should be easy, as long as the wolves don't show up.");
            npc.Msg("Just make sure to keep my sheep safe if wolves show up.<br/>The number of sheep and the time left will display<br/>on the top right corner.");
            npc.Msg("I hear you're pretty strong, so this should be pretty simple.<br/>Thanks!<button title='Look After Sheep' keyword='@protect'/><button title='Start Another Topic' keyword='@end'/>");
            var response = await npc.Select();

            if (response != "@protect")
            {
                return(HookResult.Break);
            }

            npc.Close2();
            npc.FinishQuest(this.Id, "talk_deian1");

            CreateRegionAndWarp(npc.Player);

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

            npc.Msg("Wow, good job.<br/>I got everything done thanks to you.<br/>You'll do this again next time, right? Thanks!");

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
    public async Task <HookResult> ElenKeywords(NpcScript npc, params object[] args)
    {
        var keyword = args[0] as string;

        if (keyword != "about_skill" || npc.Player.HasSkill(SkillId.Refining))
        {
            return(HookResult.Continue);
        }

        if (!npc.Player.QuestActive(this.Id))
        {
            npc.Msg("Did my grandpa send you over this way?<br/>Hehe.... Oh, nothing.<br/>Here, take this...");
            npc.Msg("Are you interested in refining by any chance?<br/>Refining is the first step in becoming a blacksmith...");
            npc.Msg("You can use ore in its raw form.<br/>You have to melt it to extract the pure metal from it.<br/>You can simply assume that you can use the ore as it is.");
            npc.Msg("We've been looking for more ore anyway,<br/>so why don't you go to Barri Dungeon and mine some ore for us?<br/>Bring some ore and I'll teach you how to refine metal. Tee hee...<br/>Of course, if you are going to mine, you will need at least a pickaxe.");
            await npc.Select();

            npc.Player.StartQuest(this.Id);
            npc.Close();
        }
        else
        {
            npc.Msg("Did you forget what I asked you?");
            npc.Msg("You can find ore inside Barri Dungeon over there.<br/>Of course, you can't mine with bare hands. You will need a pickaxe for that.");
        }

        return(HookResult.End);
    }
Esempio n. 5
0
    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);
    }
Esempio n. 6
0
	public async Task<HookResult> TalkDeian(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk_deian1") || npc.QuestActive(this.Id, "protect_sheep"))
		{
			// Unofficial
			npc.Msg("I'm glad to see you. I've been stuck here all day!<br/>Can you look after my sheep for a few minutes? I got some business to take care of.<br/>It should be easy, as long as the wolves don't show up.");
			npc.Msg("Just make sure to keep my sheep safe if wolves show up.<br/>The number of sheep and the time left will display<br/>on the top right corner.");
			npc.Msg("I hear you're pretty strong, so this should be pretty simple.<br/>Thanks!<button title='Look After Sheep' keyword='@protect'/><button title='Start Another Topic' keyword='@end'/>");
			var response = await npc.Select();

			if (response != "@protect")
				return HookResult.Break;

			npc.Close2();
			npc.FinishQuest(this.Id, "talk_deian1");

			CreateRegionAndWarp(npc.Player);

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

			npc.Msg("Wow, good job.<br/>I got everything done thanks to you.<br/>You'll do this again next time, right? Thanks!");

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Esempio n. 7
0
    public async Task <HookResult> TalkNpc(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk_dilys1"))
        {
            npc.FinishQuest(this.Id, "talk_dilys1");

            npc.Msg("There's been talk recently about how healthy berries are.<br/>Their qualities have peaked my interest, even about the weight!");
            npc.Msg("Can you bring me one berry? I'd be very grateful.");

            return(HookResult.Break);
        }
        else if (npc.QuestActive(this.Id, "talk_dilys2") && npc.HasItem(50007))
        {
            npc.FinishQuest(this.Id, "talk_dilys2");

            npc.Msg("Oh thank you so much! I can't wait to try it!<br/>Here, as an exchange, take these potions I've been working on.<button title='Continue' keyword='@continue'/>");
            await npc.Select();

            npc.RemoveItem(50007);             // Berry
            npc.CompleteQuest(this.Id);

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Esempio n. 8
0
	public async Task<HookResult> ElenKeywords(NpcScript npc, params object[] args)
	{
		var keyword = args[0] as string;

		if (keyword != "about_skill" || npc.HasSkill(SkillId.Refining))
			return HookResult.Continue;

		if (!npc.QuestActive(this.Id))
		{
			npc.Msg("Did my grandpa send you over this way?<br/>Hehe.... Oh, nothing.<br/>Here, take this...");
			npc.Msg("Are you interested in refining by any chance?<br/>Refining is the first step in becoming a blacksmith...");
			npc.Msg("You can use ore in its raw form.<br/>You have to melt it to extract the pure metal from it.<br/>You can simply assume that you can use the ore as it is.");
			npc.Msg("We've been looking for more ore anyway,<br/>so why don't you go to Barri Dungeon and mine some ore for us?<br/>Bring some ore and I'll teach you how to refine metal. Tee hee...<br/>Of course, if you are going to mine, you will need at least a pickaxe.");
			await npc.Select();
			npc.StartQuest(this.Id);
			npc.Close();
	}
		else
		{
			npc.Msg("Did you forget what I asked you?");
			npc.Msg("You can find ore inside Barri Dungeon over there.<br/>Of course, you can't mine with bare hands. You will need a pickaxe for that.");
		}

		return HookResult.End;
	}
Esempio n. 9
0
    public async Task <HookResult> KeywordsHook(NpcScript npc, params object[] args)
    {
        var keyword = args[0] as string;

        if (keyword != "about_skill" || npc.HasSkill(SkillId.Weaving))
        {
            return(HookResult.Continue);
        }

        if (!npc.QuestActive(this.Id))
        {
            npc.Msg("Have you heard of the Weaving skill?<br/>It is a skill of spinning yarn from natural materials and making fabric.");
            npc.Msg("Do you want to learn the Weaving skill?<br/>Actually, I'm out of thick yarn and can't meet all the orders for fabric...<br/>If you get me some wool, I'll teach you the Weaving skill in return.<br/>An owl will deliver you a note on how to find wool if you wait outside.");
            await npc.Select();

            npc.StartQuest(this.Id);
            npc.Close();
        }
        else
        {
            // Unofficial
            npc.Msg("If you get me some wool, I'll teach you the Weaving skill in return.");
        }

        return(HookResult.End);
    }
    public async Task <HookResult> TalkTrefor(NpcScript npc, params object[] args)
    {
        if (npc.Player.QuestActive(this.Id, "talk_trefor"))
        {
            npc.Player.FinishQuestObjective(this.Id, "talk_trefor");

            npc.Player.GiveSkill(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();

            Cutscene.Play("tuto_smash", npc.Player);

            return(HookResult.End);
        }
        else if (npc.Player.QuestActive(this.Id, "talk_trefor2"))
        {
            npc.Player.FinishQuestObjective(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.Player.GiveItem(63180, 1);

            return(HookResult.Break);
        }
        else if (npc.Player.QuestActive(this.Id, "clear_alby"))
        {
            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));

            if (!npc.Player.HasItem(63180))
            {
                npc.Player.GiveItem(63180, 1);
            }

            return(HookResult.Break);
        }
        else if (npc.Player.QuestActive(this.Id, "talk_trefor3"))
        {
            npc.Player.FinishQuestObjective(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);
    }
Esempio n. 11
0
    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<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> 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);
    }
Esempio n. 14
0
    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);
    }
Esempio n. 15
0
	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;
	}
Esempio n. 16
0
    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);
    }
Esempio n. 17
0
	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.<button title='End Conversatin' keyword='@end'/>");
			await npc.Select();

			npc.AcquireItem(40004); // Lute
			npc.End();

			return HookResult.End;
		}

		return HookResult.Continue;
	}
	public async Task<HookResult> TalkNpc(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk_bebhinn") && npc.HasItem(52004))
		{
			npc.FinishQuest(this.Id, "talk_bebhinn");

			npc.Msg("Oh hello! Looks like you got my message.");
			npc.Msg("Is that a Small Green Gem for me? Thank you!<br/>Now I can finish my necklace!<br/>I found this old guide book while waiting for your<br/>arrival. It's probably better in your hands.<button title='Continue' keyword='@continue'/>");
			await npc.Select();

			npc.RemoveItem(52004); // Small Green Gem
			npc.CompleteQuest(this.Id);

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
	public async Task<HookResult> TalkNpc(NpcScript npc, params object[] args)
	{
		if (npc.Player.QuestActive(this.Id, "talk_bebhinn") && npc.Player.HasItem(52004))
		{
			npc.Player.FinishQuestObjective(this.Id, "talk_bebhinn");

			npc.Msg("Oh hello! Looks like you got my message.");
			npc.Msg("Is that a Small Green Gem for me? Thank you!<br/>Now I can finish my necklace!<br/>I found this old guide book while waiting for your<br/>arrival. It's probably better in your hands.<button title='Continue' keyword='@continue'/>");
			await npc.Select();

			npc.Player.RemoveItem(52004); // Small Green Gem
			npc.Player.CompleteQuest(this.Id);

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Esempio n. 20
0
    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);
    }
Esempio n. 21
0
    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);
    }
Esempio n. 22
0
    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);
    }
Esempio n. 23
0
	public async Task<HookResult> RanaldKeywords(NpcScript npc, params object[] args)
	{
		var keyword = args[0] as string;
		
		if(keyword == "about_skill" && npc.HasSkill(SkillId.Defense) && !npc.HasSkill(SkillId.Windmill))
		{
			// Unofficial
			npc.Msg("You would like to learn more? That's the attitude!");
			npc.Msg("Unfortunately I'm a little busy right now, I've borrowed an armor from Ferghus that I have to get back to him. Unless...");
			npc.Msg("Could you deliver it to him for me? Afterwards I'll give you help with the Windmill skill.<button title='End Conversation' keyword='@end'/>");
			await npc.Select();
			npc.StartQuest(this.Id);
			//npc.GiveItem(70002); // Full Ring Mail to be Delivered (TODO: implement quest item handling)
			npc.Close();
			
			return HookResult.End;
		}
		
		return HookResult.Continue;
	}
Esempio n. 24
0
    public async Task <HookResult> RanaldKeywords(NpcScript npc, params object[] args)
    {
        var keyword = args[0] as string;

        if (keyword == "about_skill" && npc.HasSkill(SkillId.Defense) && !npc.HasSkill(SkillId.Windmill))
        {
            // Unofficial
            npc.Msg("You would like to learn more? That's the attitude!");
            npc.Msg("Unfortunately I'm a little busy right now, I've borrowed an armor from Ferghus that I have to get back to him. Unless...");
            npc.Msg("Could you deliver it to him for me? Afterwards I'll give you help with the Windmill skill.<button title='End Conversation' keyword='@end'/>");
            await npc.Select();

            npc.StartQuest(this.Id);
            //npc.GiveItem(70002); // Full Ring Mail to be Delivered (TODO: implement quest item handling)
            npc.Close();

            return(HookResult.End);
        }

        return(HookResult.Continue);
    }
Esempio n. 25
0
	public async Task<HookResult> KeywordsHook(NpcScript npc, params object[] args)
	{
		var keyword = args[0] as string;

		if (keyword != "about_skill" || npc.HasSkill(SkillId.Weaving))
			return HookResult.Continue;

		if (!npc.QuestActive(this.Id))
		{
			npc.Msg("Have you heard of the Weaving skill?<br/>It is a skill of spinning yarn from natural materials and making fabric.");
			npc.Msg("Do you want to learn the Weaving skill?<br/>Actually, I'm out of thick yarn and can't meet all the orders for fabric...<br/>If you get me some wool, I'll teach you the Weaving skill in return.<br/>An owl will deliver you a note on how to find wool if you wait outside.");
			await npc.Select();
			npc.StartQuest(this.Id);
			npc.Close();
		}
		else
		{
			// Unofficial
			npc.Msg("If you get me some wool, I'll teach you the Weaving skill in return.");
		}

		return HookResult.End;
	}
Esempio n. 26
0
	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("Are you working for someone else 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."));
		}
	}
Esempio n. 27
0
    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."));
        }
    }
Esempio n. 28
0
	public async Task<HookResult> BeforeKeywords(NpcScript npc, params object[] args)
	{
		var keyword = args[0] as string;
		if (keyword != "about_study")
			return HookResult.Continue;

		var stateName = "LassarClassState";
		var lastName = "LassarClassLast";
		var state = (int)npc.Player.Vars.Perm.Get(stateName, 0);
		var last = (string)npc.Player.Vars.Perm.Get(lastName, "never");
		var now = ErinnTime.Now;
		var today = now.ToString("yyyy-MM-dd");
		var start = 7;
		var end = 23;
		var remaintime = end - now.Hour;
		var lastState = 8;

		if (npc.QuestActiveUncompleted(200029))
		{
			npc.Msg(L("Haven't you finished the assignment I gave you?<br/>Well... Don't tell me you haven't received the assignment yet?<br/>It's been a long time since I sent it by an owl!"));
			npc.Msg(L("Well, this assignment has no deadline,<br/>so you can take your time."));
		}
		else if (state > lastState)
		{
			npc.Msg(L("<username/>, you have already completed the Basic Sorcery.<br/>From now on, you should find ways to study on your own."));
		}
		else if (last == today)
		{
			npc.Msg(L("Hmm... Now is not the right time to talk about it.<br/>Today's magic classes are all finished.<br/>Come back later. Shall we say... around when the shadow points north, northwest?"));
		}
		else if (now.Hour < start || now.Hour >= end)
		{
			npc.Msg(L("Class has started long ago.<br/>You should come back later."));
		}
		else
		{
			var exp = 0;
			var cost = 0;
			var msg = "";
			var name = "";
			var title = L("The Basics of Magic and Understanding of Mana");
			var paydesc = "";
			var reward = "";
			var desc = "";
			var func = (Func<NpcScript, Task>)null;

			switch (state)
			{
				case 0:
					exp = 30;
					cost = 4000;
					msg = L("Are you going to take a magic class?<br/>Then, how about this course?<br/>Tuition is a lump sum that includes three days of lessons including today.<br/>This tuition covers up to the end of Basic Sorcery Chapter One.");
					name = L("Basic Sorcery 1-1");
					paydesc = L("Total tuition for three days is 4000G.");
					reward = L("* Icebolt Spell<br/>* EXP Reward");
					desc = L("The first thing you learn about and use in the three classes in Basic Sorcery Chapter One is Mana, which is the most fundamental element in magic.");
					func = Class1_1;
					break;

				case 1:
					exp = 30;
					msg = L("Hee hee.<br/>You are here for a class. <username/>?<br/>How was the class yesterday?<br/>We'll start as soon as we're ready.");
					name = L("Basic Sorcery 1-2");
					paydesc = L("Already paid.");
					reward = L("* Icebolt Spell<br/>* EXP Reward");
					desc = L("The second of the three classes in Basic Sorcery Chapter One, you learn how to distinguish magic by its domain and learn about the Elementals.");
					func = Class1_2;
					break;

				case 2:
					exp = 100;
					msg = L("You're already here for the last class of the first chapter, <username/>.<br/>The class is not only for gaining spells.<br/>One of the advantages of taking classes is gaining knowledge and experiences to use magic correctly and effectively<br/>without additional training. Do you want to take the class?");
					name = L("Basic Sorcery 1-3");
					title = L("Icebolt Magic Practice");
					paydesc = L("Already paid.");
					reward = L("* Icebolt Spell<br/>* EXP Reward");
					desc = L("The last thing you learn in the three classes of Basic Sorcery Chapter One is how to cast Icebolt magic.");
					func = Class1_3;
					break;

				case 3:
					exp = 50;
					cost = 4000;
					msg = L("Oh. You took the first chapter of Basic Sorcery before.<br/>Was the class helpful?<br/>I hope you do well in this chapter too.<br/>To learn this chapter, you have to pay the tuition now. Hee hee.");
					name = L("Basic Sorcery 2-1");
					title = L("How to Cast Icebolt Consecutively");
					paydesc = L("Total tuition for three days is 4000G.");
					reward = L("* Firebolt Spell<br/>* EXP Reward");
					desc = L("In the first lesson of the three classes in Basic Sorcery Chapter Two, designed to improve the understanding of Ice elemental magic, you learn how to cast Icebolt magic consecutively and what to watch out for.");
					func = Class2_1;
					break;

				case 4:
					exp = 50;
					msg = L("Hee hee. You came here to take the class, right?");
					name = L("Basic Sorcery 2-2");
					title = L("Strategic Use of Icebolt Magic");
					paydesc = L("Already Paid.");
					reward = L("* Firebolt Spell<br/>* EXP Reward");
					desc = L("In the second lesson of the three classes in Basic Sorcery chapter two, you learn how to employ Icebolt spells effectively in real combat situations.");
					func = Class2_2;
					break;

				case 5:
					exp = 50;
					msg = L("It is already the last class of chapter two.<br/>Please remain focused until the end.");
					name = L("Basic Sorcery 2-3");
					title = L("StrategicApplications to Other Elemental Magic");
					paydesc = L("Already Paid.");
					reward = L("* Firebolt Spell<br/>* EXP Reward");
					desc = L("In the last lesson of the three classes in Basic Sorcery Chapter Two, you learn Elemental magic of other domains by utilizing the already-learned Icebolt spell.");
					func = Class2_3;
					break;

				case 6:
					exp = 100;
					cost = 7000;
					msg = L("Hee hee. You've come to learn Basic Sorcery Chapter Three.<br/>I knew, <username/>, that<br/>you would do this.<br/>So good to see you. I was right about you, it seems.");
					name = L("Basic Sorcery 3-1");
					title = L("How to Cast Firebolt Consecutively");
					paydesc = L("Total tuition for three days is 7000G.");
					reward = L("* Lightningbolt Spell<br/>* EXP Reward, Intelligence Increase");
					desc = L("They say that this chapter is fairly tough since it includes an assignment. In the first lesson of the three classes in Basic Sorcery Chapter Three, designed to improve the understanding of Fire elemental magic, you learn how to cast Firebolt consecutively and what to watch out for.");
					func = Class3_1;
					break;

				case 7:
					exp = 100;
					msg = L("I trust that your training is going well?<br/>I hope so. Haha.<br/>Let's start today's class, then.");
					name = L("Basic Sorcery 3-2");
					title = L("Strategic Use of Firebolt Magic");
					paydesc = L("Already Paid.");
					reward = L("* Lightningbolt Spell<br/>* EXP Reward, Intelligence Increase");
					desc = L("In the second lesson of the three classes in Basic Sorcery Chapter Three, you learn how to employ Firebolt spells effectively in real combat situations.");
					func = Class3_2;
					break;

				case 8:
					exp = 100;
					msg = L("Are you ready for the class?");
					name = L("Basic Sorcery 3-3");
					title = L("Using Icebolt and Firebolt in Combat");
					paydesc = L("Already Paid.");
					reward = L("* Lightningbolt Spell<br/>* EXP Reward, Intelligence Increase");
					desc = L("In the last lesson of the three classes in Basic Sorcery Chapter Three, you learn how to overcome the weaknesses of Firebolt and train in the casting of additional magic by doing assignments.");
					func = Class3_3;
					break;
			}

			var school = GetSchoolTag(name, title, paydesc, reward, desc, remaintime);

			npc.Msg(msg + school);
			if (await npc.Select() == "@accept")
			{
				if (cost > 0)
				{
					if (npc.Gold < cost)
					{
						npc.Msg(L("Hmm.<br/>The Magic School tuition is expensive.<br/>If you want to take the class, you should save up for tuition."));
						npc.End();
						return HookResult.End;
					}

					npc.Gold -= cost;
				}

				await func(npc);

				if (exp > 0)
					npc.Player.GiveExp(exp);

				npc.Player.Vars.Perm[stateName] = state + 1;
				npc.Player.Vars.Perm[lastName] = today;
			}
			else
			{
				npc.Msg(L("No one can force you to take a class you don't want to."));
			}
		}

		await npc.Conversation();
		npc.End();

		return HookResult.End;
	}
Esempio n. 29
0
	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."));
		}
	}
Esempio n. 30
0
    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?"));
        }
    }
Esempio n. 31
0
    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."));
            }
        }
    }
Esempio n. 32
0
    public async Task <HookResult> BeforeKeywords(NpcScript npc, params object[] args)
    {
        var keyword = args[0] as string;

        if (keyword != "about_study")
        {
            return(HookResult.Continue);
        }

        var stateName  = "RanaldClassState";
        var lastName   = "RanaldClassLast";
        var state      = (int)npc.Player.Vars.Perm.Get(stateName, 0);
        var last       = (string)npc.Player.Vars.Perm.Get(lastName, "never");
        var now        = ErinnTime.Now;
        var today      = now.ToString("yyyy-MM-dd");
        var start      = 7;
        var end        = 23;
        var remaintime = end - now.Hour;
        var lastState  = 10;

        if (npc.QuestActiveUncompleted(200040) || npc.QuestActiveUncompleted(200041) || npc.QuestActiveUncompleted(200028))
        {
            npc.Msg(L("Are you working on the assignment I gave you?<br/>You can't proceed to the next class unless you complete the assignment first."));
        }
        else if (state > lastState)
        {
            npc.Msg(L("I've got nothing more to teach you.<br/>But don't forget that you're still learning. Maintain your focus and keep up the good work."));
        }
        else if (last == today)
        {
            npc.Msg(L("Today's class is over.<br/>You can spend the rest of the day as you wish."));
        }
        else if (now.Hour < start || now.Hour >= end)
        {
            npc.Msg(L("This is not the time for class. Come back tomorrow morning."));
        }
        else
        {
            var exp     = 0;
            var cost    = 0;
            var msg     = "";
            var name    = "";
            var title   = L("A class for learning combat theory.");
            var paydesc = "";
            var reward  = "";
            var desc    = "";
            var func    = (Func <NpcScript, Task>)null;

            switch (state)
            {
            case 0:
                exp     = 30;
                cost    = 300;
                msg     = L("Are you interested in the combat class?<br/>If you're sick and tired of battles run by simple mouse clicks,<br/>my class is definitely worth spending some time and money on.");
                name    = L("Basic Combat 1-1");
                paydesc = L("3-day course. Total tuition of 300G");
                reward  = L("* STR Increase<br/>* EXP Reward");
                desc    = L("A class for the basics of combat. The complete class is 3 hours long with a simple assignment in the last hour.");
                func    = Class1_1;
                break;

            case 1:
                exp     = 30;
                msg     = L("Uh? Hey, you're in my class, aren't you?<br/>Ready for the next class?<br/>The tuition was already paid last time, so you don't owe anything.");
                name    = L("Basic Combat 1-2");
                paydesc = L("Total 300G for Tuition of 3-day Coursework (Already paid)");
                reward  = L("* STR Increase<br/>* EXP Reward");
                desc    = L("A class for learning basic combat. Today is our second class of the 3 hour course.");
                func    = Class1_2;
                break;

            case 2:
                exp     = 100;
                msg     = L("Today is the last day of Basic Combat 1.<br/>Do you want to take the class?");
                name    = L("Basic Combat 1-3");
                paydesc = L("Total 300G for Tuition of 3-day Coursework (Already paid)");
                reward  = L("* STR Increase<br/>* EXP Reward");
                desc    = L("A class for learning basic combat. It's the last class of the 3. There will be an assignment at the end.");
                func    = Class1_3;
                break;

            case 3:
                exp     = 50;
                cost    = 500;
                msg     = L("This is the second class on Basic Combat.<br/>Are you ready to take it?");
                name    = L("Basic Combat 2-1");
                paydesc = L("3-day course. Total tuition of 500G");
                reward  = L("* Defense Skill<br/>* STR Increase, EXP Reward");
                desc    = L("A class for learning about the Defense skill. The complete class is comprised of 3 sessions with a simple assignment at the end.");
                func    = Class2_1;
                break;

            case 4:
                exp     = 50;
                msg     = L("Did you watch a fox defending itself?<br/>Then, let's start the next class.");
                name    = L("Basic Combat 2-2");
                paydesc = L("Total 500G for Tuition of 3-day Coursework (Already paid)");
                reward  = L("* Defense Skill<br/>* STR Increase, EXP Reward");
                desc    = L("A class for learning about the Defense skill. Today is the second class of the 3. You will learn how to use the Defense skill.");
                func    = Class2_2;
                break;

            case 5:
                exp     = 150;
                msg     = L("Today is the last day of Basic Combat 2.<br/>Do you want to take the class?");
                name    = L("Basic Combat 2-3");
                paydesc = L("Total 500G for Tuition of 3-day Coursework (Already paid)");
                reward  = L("* Defense Skill<br/>* STR Increase, EXP Reward");
                desc    = L("A class for learning about the Defense skill. It's the last class of the 3. There will be an assignment at the end.");
                func    = Class2_3;
                break;

            case 6:
                exp     = 100;
                cost    = 1000;
                msg     = L("This is the last class on Basic Combat.<br/>Are you Interested?");
                name    = L("Basic Combat 3-1");
                paydesc = L("5-day course. Total tuition of 1000G");
                reward  = L("* Smash skill<br/>* Will Increase, STR Increase, EXP Reward");
                desc    = L("A class for learning comprehensive elementary combat. The complete class is comprised of 5 sessions with an assignment at the end.");
                func    = Class3_1;
                break;

            case 7:
                exp     = 100;
                msg     = L("It was Basic Combat 3, right?<br/>Are you ready to start?");
                name    = L("Basic Combat 3-2");
                paydesc = L("Total 1000G for Tuition of 5-day Coursework (Already paid)");
                reward  = L("* Smash skill<br/>* Will Increase, STR Increase, EXP Reward");
                desc    = L("A class for learning comprehensive elementary combat. This is the second class of the 5, and you will learn about the Smash skill.");
                func    = Class3_2;
                break;

            case 8:
                exp     = 100;
                msg     = L("You're having troubles fighting alone?<br/>Then, today's class will help. Listen carefully.");
                name    = L("Basic Combat 3-3");
                paydesc = L("Total 1000G for Tuition of 5-day Coursework (Already paid)");
                reward  = L("* Smash skill<br/>* Will Increase, STR Increase, EXP Reward");
                desc    = L("A class for learning comprehensive elementary combat. This is the third class of the 5, and you will learn about the warrior party combination.");
                func    = Class3_3;
                break;

            case 9:
                exp     = 100;
                msg     = L("Remember the last class about the warrior-warrior party?<br/>Let's talk about a different type of party play.");
                name    = L("Basic Combat 3-4");
                paydesc = L("Total 1000G for Tuition of 5-day Coursework (Already paid)");
                reward  = L("* Smash skill<br/>* Will Increase, STR Increase, EXP Reward");
                desc    = L("A class for learning comprehensive elementary combat. This is the fourth class of the 5. We will now focus on the warrior and archer party combination.");
                func    = Class3_4;
                break;

            case 10:
                exp     = 100;
                msg     = L("Today is the last day of Basic Combat 3.<br/>Do you want to take the class?");
                name    = L("Basic Combat 3-5");
                paydesc = L("Total 1000G for Tuition of 5-day Coursework (Already paid)");
                reward  = L("* Smash skill<br/>* Will Increase, STR Increase, EXP Reward");
                desc    = L("A class for learning comprehensive elementary combat. This is the last class of the 5. There is an assignment waiting at the end of the class.");
                func    = Class3_5;
                break;
            }

            var school = GetSchoolTag(name, title, paydesc, reward, desc, remaintime);

            npc.Msg(msg + school);
            if (await npc.Select() == "@accept")
            {
                if (cost > 0)
                {
                    if (npc.Gold < cost)
                    {
                        npc.Msg(L("Oh, you're short of money for the class.<br/>I'm sorry, but come back later when you can pay the tuition."));
                        npc.End();
                        return(HookResult.End);
                    }

                    npc.Gold -= cost;
                }

                await func(npc);

                if (exp > 0)
                {
                    npc.Player.GiveExp(exp);
                }

                npc.Player.Vars.Perm[stateName] = state + 1;
                npc.Player.Vars.Perm[lastName]  = today;
            }
            else
            {
                npc.Msg(L("Not interested in my class? Well, then."));
            }
        }

        await npc.Conversation();

        npc.End();

        return(HookResult.End);
    }
Esempio n. 33
0
    public async Task AboutArbeit(NpcScript npc)
    {
        if (npc.DoingPtjForOtherNpc())
        {
            npc.Msg("You have other things to do, right?<br/>If you need the Holy Water of Lymilark, can you come back after you are finished with your work?");
            return;
        }

        if (npc.DoingPtjForNpc())
        {
            var result = npc.GetPtjResult();

            if (!npc.ErinnHour(Report, Deadline))
            {
                if (result == QuestResult.Perfect)
                {
                    npc.Msg("It seems you took care of your end of the bargain.<br/>I'm a little busy right now, but come back later so I can compensate you for your work.");
                }
                else
                {
                    npc.Msg("How are you doing with the part-time job for the Church today?<br/>I have the utmost faith in you, <username/>.");
                }
                return;
            }

            npc.Msg("Did you finish the part-time job I gave you?<br/>If you are done, you can report the results to me. Do you want to do so now?<button title='Report Now' keyword='@report' /><button title='Report Later' keyword='@later' />");

            if (await npc.Select() != "@report")
            {
                npc.Msg("You don't want to report yet?<br/>Please make sure to come back and report before the deadline.");
                return;
            }

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

                npc.Msg(npc.FavorExpression(), "I'm sorry,<br/>but I cannot give you the Holy Water of Lymilark unless you complete the task I've asked you to take care of.<br/>Please work harder next time.");
                npc.ModifyRelation(0, -Random(3), 0);
            }
            else
            {
                npc.Msg("Well done, <username/>. I feel very relieved thanks to you.<br/>In appreciation of all the hard work you've put in for the Church,<br/>I prepared some things for you.<br/>I'd love to give you all these if I could, but I can't. Please pick one.<button title='Report Later' keyword='@later' />" + npc.GetPtjReportXml(result));
                var reply = await npc.Select();

                if (!reply.StartsWith("@reward:"))
                {
                    npc.Msg("You don't want to report yet?<br/>Please make sure to come back and report before the deadline.");
                    return;
                }

                npc.CompletePtj(reply);
                remaining--;

                if (result == QuestResult.Perfect)
                {
                    npc.Msg(npc.FavorExpression(), "Thanks. You took care of everything I've asked for.<br/>As promised, I will give you the Holy Water of Lymilark.");
                    npc.ModifyRelation(0, Random(3), 0);
                }
                else if (result == QuestResult.Mid)
                {
                    npc.Msg(npc.FavorExpression(), "It's a bit short of what I asked for,<br/>but I appreciate your help.<br/>I will give you the Holy Water of Lymilark in return.");
                    npc.ModifyRelation(0, Random(1), 0);
                }
                else if (result == QuestResult.Low)
                {
                    npc.Msg(npc.FavorExpression(), "Did you run out of time?<br/>You completed only a portion of what I asked for.<br/>I'm sorry, but that's not good enough for me to give you the Holy Water of Lymilark.");
                    npc.ModifyRelation(0, -Random(2), 0);
                }
            }
            return;
        }

        if (!npc.ErinnHour(Start, Deadline))
        {
            npc.Msg("Are you willing to help the Church?<br/>It's a bit early, though. Please come back at a later time.");
            return;
        }

        if (!npc.CanDoPtj(JobType, remaining))
        {
            npc.Msg("Today's part-time jobs are all taken.<br/>If you need some Holy Water of Lymilark, please come back tomorrow.");
            return;
        }

        var randomPtj = npc.RandomPtj(JobType, QuestIds);
        var ptjXml    = npc.GetPtjXml(randomPtj, "Endelyon's Church Part-Time Job", "Looking for help with delivering goods to Church.", PerDay, remaining);
        var msg       = "";

        if (npc.GetPtjDoneCount(JobType) == 0)
        {
            msg = "Our Church is looking for a kind soul to help take care of our crops.<br/>The main job is to harvest wheat or barley from the farmland located south of the Church.<br/>One thing to note: because of our tight budget, we cannot afford to pay in gold.<p/>Instead, anyone who completes the job will receive some Holy Water of Lymilark,<br/>which can be used to bless items.<br/>Blessed items do not fall to the ground<br/>when its owner is knocked unconscious.<br/>Now, what do you say?";
        }
        else
        {
            msg = "Are you here for the Holy Water of Lymilark again?<br/>Please take a look at today's part-time job and tell me if you want it.";
        }

        npc.Msg(msg + ptjXml);

        if (await npc.Select() == "@accept")
        {
            npc.Msg("Thank you.<br/>Please take care of this on time.");
            npc.StartPtj(randomPtj);
        }
        else
        {
            npc.Msg("If you don't want to do it, then I guess that's that.");
        }
    }
Esempio n. 34
0
    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."));
            }
        }
    }
Esempio n. 35
0
    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..."));
            }
        }
    }
Esempio n. 36
0
    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.."));
            }
        }
    }
Esempio n. 37
0
	public async Task Class3_1(NpcScript npc)
	{
		npc.Msg(L("As you know, Basic Sorcery Chapter Three is about the application of Firebolt Magic.<br/>I believe that, when you complete this course<br/>you will no longer be a wannabe wizard, but a real bonafide wizard."));
		npc.Msg(L("After taking this class and practicing hard,<br/>I hope you will become a wizard<br/>who better understands the order of the universe."));
		npc.Msg(L("Especially, at the end of this chapter,<br/>you will have a tough assignment.<br/>So, you will have a difficult time<br/>if you don't practice hard. Ha ha."));
		npc.Msg(L("Then, let's start today's class."));
		npc.Msg(L("<image name='firebolt_loaded2'/>The third section of the Basic Sorcery is about the ways in which you can accumulate the Firebolt magic<br/>to make it stronger.<br/>I mentioned it before when I was teaching you<br/>the Icebolt magic."));
		npc.Msg(L("I'm talking about consecutive-casting.<br/>Yes, today's class is about consecutive-casting of Firebolt."));
		npc.Msg(L("Now, a question here as always:"));

		npc.Msg(L("I explained that there is an important law associated with Mana<br/>when casting the Icebolt magic consecutively.<br/>Do you remember what it was?<button title='The Law of Marginal Mana Decrease' keyword='@reply1'/><button title='The Law of Marginal Mana Increase' keyword='@reply2'/><button title='The Law of Marginal Mana Conservation' keyword='@reply3'/>"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Yes, correct.<br/>It is the law that the amount of Mana required for each stage decreases gradually<br/>when casting magic consecutively."));
				break;

			case "@reply2":
				npc.Msg(L("Increase. Oh, gosh.<br/>When casting ice elemental magic consecutively,<br/>the amount of mana required for each stage<br/>decreases gradually.<br/>So, not increase, but decrease is the right answer."));
				npc.Msg(L("You probably confused it with the Law of Marginal Damage Increase."));
				break;

			case "@reply3":
				npc.Msg(L("Ha ha. You seem confused.<br/>Sorry, but incorrect."));
				npc.Msg(L("When casting Ice Elemental magic consecutively,<br/>the amount of mana required for each stage<br/>decreases gradually.<br/>So, decrease is the right answer."));
				npc.Msg(L("You probably confused it with the Law of Marginal Damage Conservation."));
				break;
		}

		npc.Msg(L("What I'm going to talk about today is<br/>a little different from the Law of Marginal Mana Decrease."));
		npc.Msg(L("Do you remember I said that<br/>the limit on consecutive-casting is up to five times?"));
		npc.Msg(L("If you practiced it,<br/>you might know that's the case<br/>for Firebolt as well."));
		npc.Msg(L("<image name='icebolt_loaded'/>When you cast the Icebolt spell consecutively,<br/>the number of iceballs<br/>orbiting around you in a circle increases..."));
		npc.Msg(L("<image name='firebolt_loaded1'/>But when you cast the Firebolt spell consecutively,<br/>due to fire attracting fire,<br/>the fireballs orbiting around you in a circle get bigger."));
		npc.Msg(L("The bigger the fireball is,<br/>the greater the damage will be."));
		npc.Msg(L("Ha ha. It seems like you know it all."));
		npc.Msg(L("But, do you know how much the damage will grow<br/>every time you cast this magic?"));
		npc.Msg(L("Probably not.<br/>Even for good recorders,<br/>it would be difficult to observe this kind of detail and practice it."));
		npc.Msg(L("In the case of Firebolt, every time you cast it consecutively,<br/>the damage caused by the fireball increases."));
		npc.Msg(L("The increment of the damage grows as well<br/>at each stage.<br/>This is the so-called Law of Marginal Damage Increase."));
		npc.Msg(L("The law commonly applies to<br/>Fire elemental magic."));
		npc.Msg(L("But, the amount of Mana required at each level<br/>of the consecutive casting isn't any different."));
		npc.Msg(L("It means that Firebolt cast consecutively<br/>can make a stronger attack<br/>than Icebolt at the same level."));
		npc.Msg(L("<image local='true' name='mana_empty'/>But, if you cast Firebolt<br/>the same way you do Icebolt,<br/>you would run out of Mana<br/>and get into trouble."));
		npc.Msg(L("Much of the Firebolt magic is similar<br/>to the Icebolt magic.<br/>But, if you are not careful,<br/>you won't be able to use it as you might have originally intended."));
		npc.Msg(L("Now, let's summarize the class.<br/>It is very simple."));
		npc.Msg(L("<image name='firebolt_loaded2'/>First, consecutive-casting of the Firebolt magic is<br/>similar to that of the Icebolt magic.<br/>But, it doesn't create several fireballs as with the Icebolt magic.<br/>Instead, the size of the fireball increases."));
		npc.Msg(L("Second, while the Law of Marginal Mana Decrease<br/>applies to the Icebolt spell,<br/>the Law of Marginal Damage increase applies<br/>to the Firebolt spell."));
		npc.Msg(L("This is simple stuff.<br/>But, you remember it<br/>since the consecutive-casting of the Icebolt and the Firebolt spell is different<br/>in these two ways."));
		npc.Msg(L("In the next class,<br/>I'm going to explain how to use the Firebolt magic effectively."));
		npc.Msg(L("Please come to the next class.<br/>The more you focus on the class, <username/>, the better you<br/>will understand magic.<br/>So, don't be anxious if your performance doesn't improve quickly."));
		npc.Msg(L("From now on, attending magic classes alone will not be enough<br/>to maintain your magic performance."));
		npc.Msg(L("If you don't review what you learned that day,<br/>you might end up forgetting everything later.<br/>So, you should review what you learned through practice<br/>after class."));
		npc.Msg(L("Well, that's all for today."));
	}
Esempio n. 38
0
	public async Task Class2_1(NpcScript npc)
	{
		npc.Msg(L("How did you like getting trained in magic?<br/>Are you able to freely use Icebolt<br/>that I've taught you?"));
		npc.Msg(L("Let's see... Someone at your level, <username/>,<br/>should learn this first.<br/>How to cast Icebolt magic consecutively."));
		npc.Msg(L("Huh? You want to learn other magic first?<br/>Hmm. You may if you really want to."));
		npc.Msg(L("But, for now, it would probably be better for you to do as I say...<br/>You should learn to walk first before running, right?"));
		npc.Msg(L("When you learn something new,<br/>you should study and practice it diligently<br/>and eventually master it."));
		npc.Msg(L("If you learn several things at the same time without fully embracing each of them,<br/>you are bound to lose interest in everything."));
		npc.Msg(L("At the end of the day, you will end up not being able to learn anything more<br/>without excelling at anything."));
		npc.Msg(L("<image local='true' name='AP_points'/>Yes. In other words, you would lack AP, your personal capability.<br/>So, you will find it difficult to raise your rank and learn something new."));
		npc.Msg(L("You already know the Icebolt spell<br/>but, you need more training, <username/>."));
		npc.Msg(L("For now, trust your teacher<br/>and study and practice diligently what I teach you.<br/>It's never too late to learn something new after that."));
		npc.Msg(L("<image name='icebolt_loaded'/>Now, let's begin the lesson.<br/>We'll learn how to cast the Icebolt spell consecutively.<br/>Even if you have practiced it already, please listen carefully."));
		npc.Msg(L("You probably heard about it in the previous class.<br/>Charging the same spell multiple times<br/>to increase its power and then casting it<br/>is called consecutive casting."));
		npc.Msg(L("When you cast Icebolt consecutively,<br/>you can create several balls of ice,<br/>allowing you to make consecutive attacks.<br/>Please note that there are five balls of ice in the picture."));
		npc.Msg(L("Huh? You knew it all?<br/>Ha ha. You are always in a hurry.<br/>Then, let me ask you this."));

		npc.Msg(L("When you shoot balls of ice as a result of consecutive-casting,<br/>which ball of ice will cause the biggest damage?<button title='The first shot.' keyword='@reply1'/><button title='All are the same.' keyword='@reply2'/><button title='The last shot.' keyword='@reply3'/>"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Wrong! Wrong answer!<br/>All of the Icebolts in consecutive-casting cause the same amount of damage.<br/>If you had practiced Icebolt more, you might have gotten it right."));
				npc.Msg(L("It seems to me that, instead of being trained in magic step by step,<br/>you are in a rush to use various spells.<br/>You'd better focus more on the training."));
				break;

			case "@reply2":
				npc.Msg(L("Yes. Correct! They are all the same.<br/>You trained yourself a fair bit, didn't you? haha."));
				npc.Msg(L("I want to give you something as a reward but I have nothing suitable right now. Hehehehe."));
				break;

			case "@reply3":
				npc.Msg(L("Wrong.<br/>All of the icebolts in consecutive-casting cause the same amount of damage.<br/>If you had practiced icebolt more, you might have gotten it right."));
				npc.Msg(L("It seems to me that, instead of being trained in magic step by step,<br/>you are in a rush to use various spells.<br/>You'd better focus more on the training."));
				break;
		}

		npc.Msg(L("Then, let's continue the lesson.<br/>Consecutive-casting helps in magic training<br/>in that it is a way to directly control the amount of Mana.<br/>The same goes for other magic."));
		npc.Msg(L("But, practicing magic through consecutive-casting<br/>takes that much more Mana.<br/>So, it's not easy."));
		npc.Msg(L("That means<br/>the less Mana the spell consumes in consecutive-casting,<br/>the easier it will be to practice it."));
		npc.Msg(L("Hehehe... Someone who studied hard<br/>like you, <username/>,<br/>may have noticed it right away."));
		npc.Msg(L("The Elementals in the domain of ice<br/>spend less Mana<br/>as you use consecutive-casting more."));
		npc.Msg(L("That's why I taught you<br/>Icebolt first.<br/>It lessens the burden for beginning wizards<br/>who find it difficult to control the amount of Mana to use."));
		npc.Msg(L("How was that? Did you know that too?"));
		npc.Msg(L("Why don't I give you this, too?<br/>The more the consecutive-casting is practiced,<br/>the less additional Mana is required.<br/>That is the so-called the 'Law of Marginal Mana Decrease'."));
		npc.Msg(L("If spells like Icebolt which can be cast by using Mana alone<br/>are ruled by the law of marginal Mana decrease,<br/>they would be a perfect fit to practice controlling Mana."));
		npc.Msg(L("Now, do you see why I<br/>recommended Icebolt first?<br/>It is easy to learn, quick to be cast and convenient to do consecutive-casting.<br/>There is no better choice in starting to learn magic than this."));
		npc.Msg(L("Of course, the amount of damage by each iceball created by consecutive-casting<br/>does not increase as consecutive-casting is practiced.<br/>But, right now, learning how to use Mana more effectively<br/>is much more important than learning about the damage."));
		npc.Msg(L("Now, let me summarize for you what I taught you today."));
		npc.Msg(L("Some spells can be cast consecutively<br/>but, in the case of Ice Elemental spells,<br/>the spell is affected by the Law of Marginal Mana Decrease."));
		npc.Msg(L("When you cast Icebolt consecutively,<br/>the damage caused by each ice piece<br/>doesn't increase,<br/>but you can shoot sharp ice pieces consecutively."));
		npc.Msg(L("Let's call it a day here.<br/>Don't be late tomorrow."));
		npc.Msg(L("And one more thing - don't rush into it.<br/>I'd like to see you learn step-by-step. Ha ha."));
	}
Esempio n. 39
0
	public async Task Class1_2(NpcScript npc)
	{
		npc.Msg(L("Let's see...<br/>First, let's see how much you remember<br/>from what I taught you yesterday, shall we?"));

		npc.Msg(L("The magic which transforms the environment by responding to the rule of the universe -<br/>the most important thing in this magic is in handling what?<button title='Mana' keyword='@reply1' /><button title='Male' keyword='@reply2' /><button title='Female' keyword='@reply3' />"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Yes. You paid attention during class."));
				break;

			case "@reply2":
				npc.Msg(L("...<br/>Correct!<br/>We have something in common!"));
				break;

			case "@reply3":
				npc.Msg(L("NOT!<br/>Please pay attention during class."));
				break;
		}

		npc.Msg(L("But you know anyone could have gotten that, right?<br/>*Laugh*"));

		npc.Msg(L("Next question...<br/>Of the three graphs at the bottom of the interface on the right,<br/>which color represents Mana?<button title='Red' keyword='@reply1' /><button title='Blue' keyword='@reply2' /><button title='Yellow' keyword='@reply3' />"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Haha. That's my favorite color.<br/>But red doesn't represent mana."));
				npc.Msg(L("Red is for HP.<br/>You must have been way too nervous.<br/>Blue is the color for Mana."));
				break;

			case "@reply2":
				npc.Msg(L("Correct!<br/>But don't be too proud of yourself.<br/>Even Endelyon's dog knows that."));
				break;

			case "@reply3":
				npc.Msg(L("Umm... wrong.<br/>Yellow represents Stamina.<br/>You should know this..."));
				npc.Msg(L("Are you color blind, by any chance? Yellow-blue color blind?<br/>Then my apologies. I picked the wrong question."));
				npc.Msg(L("Mana graph is the middle one.<br/>If you learn magic with this in mind, you shouldn't have trouble learning it."));
				npc.Msg(L("But if you are not color blind and picked this wrong answer,<br/>that is simply disappointing."));
				break;
		}

		npc.Msg(L("One more quick question.<br/>What would be helpful in recovering Mana?<button title='Drink MP Potion.' keyword='@reply1' /><button title='Wait until night.' keyword='@reply2' /><button title='Ask Manari' keyword='@reply3' />"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Hmm. I suppose I didn't mention this...<br/>You can recover Mana to a certain point<br/>by drinking MP Potion."));
				npc.Msg(L("But you should be careful.<br/>Too much reliance on potions<br/>would eventually<br/>destroy your capability to control your body and Mana."));
				break;

			case "@reply2":
				npc.Msg(L("Yes, correct."));
				break;

			case "@reply3":
				npc.Msg(L("Who is Manari?<br/>Now, that was a random answer..."));
				break;
		}

		npc.Msg(L("As I explained before,<br/>Mana can be recovered by the power of Eweca.<br/>That's why you should wait<br/>until Eweca rises."));

		npc.Msg(L("Well, I guess this is enough review.<br/>Let's start today's class."));
		npc.Msg(L("Today, I am going to talk about Elementals."));
		npc.Msg(L("As the main components comprising the world,<br/>I mentioned Mana and Erg yesterday.<br/>Mana and Erg are very important components,<br/>but the order of the universe cannot be established just with these two."));
		npc.Msg(L("No less important than those two are<br/>the elements comprising the world.<br/>The elements, created in accordance with the rule of the physical world,<br/>actually play an important role in enriching the universe."));
		npc.Msg(L("In theory, the power of Mana affects all the elements.<br/>This is also the will of<br/>Aton Cimeni, the ultimate God who created the world."));
		npc.Msg(L("There are various kinds of elements<br/>and they are so vast that the relevant theories alone<br/>would fill dozens of books."));
		npc.Msg(L("The Four Element Theory, the Five Element Theory, the Multi-layer Element Theory, Element Fusion Theory...<br/>Many scholars maintained numerous theories<br/>and many of them have been proven to be true."));
		npc.Msg(L("...But this class is not about element theories<br/>but about magic.<br/>Wizards should understand elements<br/>as a part of magic."));
		npc.Msg(L("Now, how do we do this? How can we<br/>understand elements as a part of magic?<br/>What is central here is the magic affinity of elements."));
		npc.Msg(L("Among various elements comprising the world,<br/>three elements in particular have the strongest magic affinity.<br/>They are Lightning, Fire and Ice."));
		npc.Msg(L("In Sorcery, we call these Lightning, Fire<br/>and Ice Elementals."));
		npc.Msg(L("Since these three elements have especially strong magic affinity,<br/>keep in mind that we are only dealing with these three<br/>when we talk about elements in magic."));
		npc.Msg(L("One interesting thing is<br/>that magic based on these elementals<br/>have unique relations with each other."));
		npc.Msg(L("First of all, Fire elemental magic<br/>is incompatible with Ice elemental magic.<br/>Fire elemental magic<br/>is irrelevant with Lightning elemental magic."));
		npc.Msg(L("And while Lightning elemental magic<br/>and Ice elemental magic<br/>have complementary relations,"));
		npc.Msg(L("they conflict with each other sometimes<br/>and have a synergy at other times."));
		npc.Msg(L("Umm... you look confused. It is understandable."));
		npc.Msg(L("When it comes to Lightning and Ice magic,<br/>rather than explain them in great detail,<br/>you can simply pick them up as you<br/>actually learn them, so don't worry too much."));
		npc.Msg(L("For now, it is enough<br/>to be aware of the relationship of the three."));
		npc.Msg(L("Now, what kind of forms would these elementals appear?"));
		npc.Msg(L("You can picture thunder or a ball of lightning<br/>for Lightning,<br/>a ball of fire or flame for Fire<br/>and snow or a mass of ice for Ice."));
		npc.Msg(L("<image name='3elemental_stone'/>But this is not always the case.<br/>When you use powerful Mana and treat it with advanced magic,<br/>you can turn elementals into crystals."));
		npc.Msg(L("If you have further interest in elementals,<br/>it would be helpful to read 'Understanding of Elementals' written by Leslie.<br/>It might not be so easy to find a copy, though..."));
		npc.Msg(L("But, if you happen to get one, you should definitely read it.<br/>It will be of great help."));
		npc.Msg(L("Because I'm talking a lot about elementals,<br/>you might get the impression that all magic works<br/>within the large frame of elementals.<br/>But that is actually not true."));
		npc.Msg(L("Many kinds of magic<br/>have nothing to do with elementals."));
		npc.Msg(L("The kind of magic that does not belong to the elemental domains<br/>is called Non-elemental Magic.<br/>You look confused without any examples.<br/>Hmm. Healing is a classic example."));
		npc.Msg(L("Healing magic is<br/>a classic Non-elemental magic."));
		npc.Msg(L("If you want to learn Healing magic,<br/>'Healing: Basics of Magic' written by Flann<br/>would be helpful.<br/>If you are interested, it would be nice to study it on the side."));
		npc.Msg(L("Now, let me summarize for you."));
		npc.Msg(L("First, magic is divided into<br/>Elemental and Non-elemental magic."));
		npc.Msg(L("Second, Elemental magic is further divided<br/>into Lightning, Fire and Ice.<br/>Each elemental<br/>has unique characteristics and relations."));
		npc.Msg(L("Well, then, shall we learn<br/>how to cast Elemental magic?"));
		npc.Msg(L("Wait... Is it time to finish already?<br/>We will continue next time."));

		npc.Msg(L("So, how are you doing? Are you following OK?<br/><button title='Yes.' keyword='@reply1'/><button title='No. A waste of tuition.' keyword='@reply2'/>"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Heeheehee... But you seem disgruntled.<br/>You should show some respect to your teacher.<br/>We are having a class after all..."));
				break;

			case "@reply2":
				npc.Msg(L("Sorry to hear that. But there is no refund.<br/>If you think it's unfair,<br/>I would recommend giving up on the magic class."));
				npc.Msg(L("But you've already started - why don't you just give it a chance?"));
				break;
		}

		npc.Msg(L("Hmm. Perhaps you lost interest because of the heavy focus on the theory so far.<br/>Please, be patient. You cannot learn magic overnight.<br/>Basic Sorcery course will be finished by the next class.<br/>Actually, we are preparing for practice."));
		npc.Msg(L("And if you are hoping to actually use magic,<br/>the next class will be very exciting for you.<br/>Please show up to the end."));
		npc.Msg(L("Bye."));
	}
Esempio n. 40
0
	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."));
		}
	}
Esempio n. 41
0
    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);
    }
Esempio n. 42
0
	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."));
		}
	}
Esempio n. 43
0
	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."));
		}
	}
Esempio n. 44
0
	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."));
		}
	}
Esempio n. 45
0
    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);
    }
Esempio n. 46
0
	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."));
		}
	}
Esempio n. 47
0
	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?"));
		}
	}
Esempio n. 48
0
    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."));
            }
        }
    }
Esempio n. 49
0
	public async Task<HookResult> BeforeKeywords(NpcScript npc, params object[] args)
	{
		var keyword = args[0] as string;
		if (keyword != "about_study")
			return HookResult.Continue;

		var stateName = "RanaldClassState";
		var lastName = "RanaldClassLast";
		var state = (int)npc.Player.Vars.Perm.Get(stateName, 0);
		var last = (string)npc.Player.Vars.Perm.Get(lastName, "never");
		var now = ErinnTime.Now;
		var today = now.ToString("yyyy-MM-dd");
		var start = 9;
		var end = 21;
		var remaintime = end - now.Hour;
		var lastState = 10;

		if (npc.QuestActiveUncompleted(200040) || npc.QuestActiveUncompleted(200041) || npc.QuestActiveUncompleted(200028))
		{
			npc.Msg(L("Are you working on the assignment I gave you?<br/>You can't proceed to the next class unless you complete the assignment first."));
		}
		else if (state > lastState)
		{
			npc.Msg(L("I've got nothing more to teach you.<br/>But don't forget that you're still learning. Maintain your focus and keep up the good work."));
		}
		else if (last == today)
		{
			npc.Msg(L("Today's class is over.<br/>You can spend the rest of the day as you wish."));
		}
		else if (now.Hour < start)
		{
			// Unofficial
			npc.Msg(L("This is not the time for class. Come back later."));
		}
		else if (now.Hour >= end)
		{
			npc.Msg(L("This is not the time for class. Come back tomorrow morning."));
		}
		else
		{
			var exp = 0;
			var cost = 0;
			var msg = "";
			var name = "";
			var title = L("A class for learning combat theory.");
			var paydesc = "";
			var reward = "";
			var desc = "";
			var func = (Func<NpcScript, Task>)null;

			switch (state)
			{
				case 0:
					exp = 30;
					cost = 300;
					msg = L("Are you interested in the combat class?<br/>If you're sick and tired of battles run by simple mouse clicks,<br/>my class is definitely worth spending some time and money on.");
					name = L("Basic Combat 1-1");
					paydesc = L("3-day course. Total tuition of 300G");
					reward = L("* STR Increase<br/>* EXP Reward");
					desc = L("A class for the basics of combat. The complete class is 3 hours long with a simple assignment in the last hour.");
					func = Class1_1;
					break;

				case 1:
					exp = 30;
					msg = L("Uh? Hey, you're in my class, aren't you?<br/>Ready for the next class?<br/>The tuition was already paid last time, so you don't owe anything.");
					name = L("Basic Combat 1-2");
					paydesc = L("Total 300G for Tuition of 3-day Coursework (Already paid)");
					reward = L("* STR Increase<br/>* EXP Reward");
					desc = L("A class for learning basic combat. Today is our second class of the 3 hour course.");
					func = Class1_2;
					break;

				case 2:
					exp = 100;
					msg = L("Today is the last day of Basic Combat 1.<br/>Do you want to take the class?");
					name = L("Basic Combat 1-3");
					paydesc = L("Total 300G for Tuition of 3-day Coursework (Already paid)");
					reward = L("* STR Increase<br/>* EXP Reward");
					desc = L("A class for learning basic combat. It's the last class of the 3. There will be an assignment at the end.");
					func = Class1_3;
					break;

				case 3:
					exp = 50;
					cost = 500;
					msg = L("This is the second class on Basic Combat.<br/>Are you ready to take it?");
					name = L("Basic Combat 2-1");
					paydesc = L("3-day course. Total tuition of 500G");
					reward = L("* Defense Skill<br/>* STR Increase, EXP Reward");
					desc = L("A class for learning about the Defense skill. The complete class is comprised of 3 sessions with a simple assignment at the end.");
					func = Class2_1;
					break;

				case 4:
					exp = 50;
					msg = L("Did you watch a fox defending itself?<br/>Then, let's start the next class.");
					name = L("Basic Combat 2-2");
					paydesc = L("Total 500G for Tuition of 3-day Coursework (Already paid)");
					reward = L("* Defense Skill<br/>* STR Increase, EXP Reward");
					desc = L("A class for learning about the Defense skill. Today is the second class of the 3. You will learn how to use the Defense skill.");
					func = Class2_2;
					break;

				case 5:
					exp = 150;
					msg = L("Today is the last day of Basic Combat 2.<br/>Do you want to take the class?");
					name = L("Basic Combat 2-3");
					paydesc = L("Total 500G for Tuition of 3-day Coursework (Already paid)");
					reward = L("* Defense Skill<br/>* STR Increase, EXP Reward");
					desc = L("A class for learning about the Defense skill. It's the last class of the 3. There will be an assignment at the end.");
					func = Class2_3;
					break;

				case 6:
					exp = 100;
					cost = 1000;
					msg = L("This is the last class on Basic Combat.<br/>Are you Interested?");
					name = L("Basic Combat 3-1");
					paydesc = L("5-day course. Total tuition of 1000G");
					reward = L("* Smash skill<br/>* Will Increase, STR Increase, EXP Reward");
					desc = L("A class for learning comprehensive elementary combat. The complete class is comprised of 5 sessions with an assignment at the end.");
					func = Class3_1;
					break;

				case 7:
					exp = 100;
					msg = L("It was Basic Combat 3, right?<br/>Are you ready to start?");
					name = L("Basic Combat 3-2");
					paydesc = L("Total 1000G for Tuition of 5-day Coursework (Already paid)");
					reward = L("* Smash skill<br/>* Will Increase, STR Increase, EXP Reward");
					desc = L("A class for learning comprehensive elementary combat. This is the second class of the 5, and you will learn about the Smash skill.");
					func = Class3_2;
					break;

				case 8:
					exp = 100;
					msg = L("You're having troubles fighting alone?<br/>Then, today's class will help. Listen carefully.");
					name = L("Basic Combat 3-3");
					paydesc = L("Total 1000G for Tuition of 5-day Coursework (Already paid)");
					reward = L("* Smash skill<br/>* Will Increase, STR Increase, EXP Reward");
					desc = L("A class for learning comprehensive elementary combat. This is the third class of the 5, and you will learn about the warrior party combination.");
					func = Class3_3;
					break;

				case 9:
					exp = 100;
					msg = L("Remember the last class about the warrior-warrior party?<br/>Let's talk about a different type of party play.");
					name = L("Basic Combat 3-4");
					paydesc = L("Total 1000G for Tuition of 5-day Coursework (Already paid)");
					reward = L("* Smash skill<br/>* Will Increase, STR Increase, EXP Reward");
					desc = L("A class for learning comprehensive elementary combat. This is the fourth class of the 5. We will now focus on the warrior and archer party combination.");
					func = Class3_4;
					break;

				case 10:
					exp = 100;
					msg = L("Today is the last day of Basic Combat 3.<br/>Do you want to take the class?");
					name = L("Basic Combat 3-5");
					paydesc = L("Total 1000G for Tuition of 5-day Coursework (Already paid)");
					reward = L("* Smash skill<br/>* Will Increase, STR Increase, EXP Reward");
					desc = L("A class for learning comprehensive elementary combat. This is the last class of the 5. There is an assignment waiting at the end of the class.");
					func = Class3_5;
					break;
			}

			var school = GetSchoolTag(name, title, paydesc, reward, desc, remaintime);

			npc.Msg(msg + school);
			if (await npc.Select() == "@accept")
			{
				if (cost > 0)
				{
					if (npc.Gold < cost)
					{
						npc.Msg(L("Oh, you're short of money for the class.<br/>I'm sorry, but come back later when you can pay the tuition."));
						npc.End();
						return HookResult.End;
					}

					npc.Gold -= cost;
				}

				await func(npc);

				if (exp > 0)
					npc.Player.GiveExp(exp);

				npc.Player.Vars.Perm[stateName] = state + 1;
				npc.Player.Vars.Perm[lastName] = today;
			}
			else
			{
				npc.Msg(L("Not interested in my class? Well, then."));
			}
		}

		await npc.Conversation();
		npc.End();

		return HookResult.End;
	}
Esempio n. 50
0
	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;
	}
Esempio n. 51
0
	public async Task Class1_1(NpcScript npc)
	{
		npc.Msg(L("Now, let's begin."));
		npc.Msg(L("As I said, the tuition you paid today<br/>would cover this whole chapter.<br/>Let's see...<br/>You could probably complete this chapter in three days including today."));
		npc.Msg(L("Since today is the first day, I will briefly discuss<br/>what we'll be learning, instead of proceeding with the lesson.<br/>It is about magic and Mana,<br/>the fundamental power of magic."));

		npc.Msg(L("Why do you want to learn magic?<br/><button title='Because it looks cool.' keyword='@reply1' /><button title='To help others' keyword='@reply2' /><button title='Because Lassar is pretty.' keyword='@reply3' /><button title='Because I have money to spend.' keyword='@reply4' />"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Haha. You are so funny.<br/>But magic is not for showing off."));
				npc.Msg(L("Although, it does look cool, too."));
				break;

			case "@reply2":
				npc.Msg(L("That's great.<br/>You are a saint."));
				npc.Msg(L("...<br/>But it's not good to lie."));
				break;

			case "@reply3":
				npc.Msg(L("Hee hee.<br/>You know beauty when you see it, don't you?<br/>Yes, I am gorgeous, if I may say so myself."));
				npc.Msg(L("But, you should concentrate on the lesson,<br/>not only on the teacher."));
				break;

			case "@reply4":
				npc.Msg(L("You do? Well, aren't you lucky? You and your extra money.Hmph."));
				break;
		}

		npc.Msg(L("Very well. Even though you may not be able to spell out everything that you feel,<br/>you probably have something in mind.<br/>Please keep that attitude<br/>as you study magic."));
		npc.Msg(L("<image name='icebolt_preparing'/>Let me explain the definition of magic first.<br/>Magic is all the technical activities<br/>which change the surrounding environment<br/>by using supplementary means based on Mana."));
		npc.Msg(L("Spelling it out this way<br/>may only be confusing to you. Hehehehe.."));
		npc.Msg(L("Simply put, it is understanding the order before a phenomenon<br/>and to change the phenomenon created by this order.<br/>As with everything else in the world...<br/>The only difference with magic is that it requires Mana and other incidental factors."));
		npc.Msg(L("Does that help?<br/>Now, then, let me explain Mana,<br/>arguably the most important factor in magic. Please pay attention."));
		npc.Msg(L("<image name='hp_mana_stamina'/>First, look to the left bottom side of the menu bar on your interface.<br/>See the three bar graphs?<br/>As you know, red means HP,<br/>and yellow at the bottom means Stamina."));
		npc.Msg(L("<image name='gauge_mana'/>And... the second blue bar<br/>is the Mana gauge.<br/>It shows the amount of Mana you have."));
		npc.Msg(L("Mana is the energy of the source of existence which human beings possess.<br/>It is also the power through which people can communicate with all things in the world.<br/>Without Mana, it is impossible to cast magic."));
		npc.Msg(L("This is different from Erg,<br/>the source of energy<br/>which comes from Palala, the shining sun."));
		npc.Msg(L("Erg is also a form of energy<br/>but, it is just one form of Mana,<br/>not Mana itself."));
		npc.Msg(L("While Mana can be transformed into Erg,<br/>Erg cannot be transformed into Mana.<br/>That is the irreversible rule of Mana."));
		npc.Msg(L("You seem lost... Let's move on."));
		npc.Msg(L("Now, is Mana for only a select few?<br/>Not necessarily.<br/>Everyone possesses Mana<br/>but the amount and efficiency varies from person to person."));
		npc.Msg(L("Some have a large amount of Mana,<br/>but spend their whole life without using it,<br/>while others have little Mana but<br/>use it effectively<br/>and cast great magic."));
		npc.Msg(L("Of course, you can increase<br/>your capacity for Mana and<br/>familiarize yourself with using magic<br/>by training yourself."));
		npc.Msg(L("That is, while it is important to increase the amount of Mana,<br/>keep in mind that it is even more important<br/>to use it efficiently and effectively."));
		npc.Msg(L("And, there is one more thing you should remember.<br/>As I said before,<br/>Mana is not limitless."));
		npc.Msg(L("<image name='gauge_mana_empty'/>If you use Mana until the Mana gauge reaches zero,<br/>you will not be able to use magic<br/>until you recover Mana."));
		npc.Msg(L("Then, how can you recover Mana?<br/>It is very simple.<br/>Just wait until nightfall."));
		npc.Msg(L("<image name='moon_eweca'/>It is because of Eweca, the moon of Erinn.<br/>Smart students would have understood that right away...<br/>Mana can only be recovered at night when Eweca rises."));
		npc.Msg(L("Hmm... I've talked too long.<br/>Let's call it a day.<br/>Come again tomorrow<br/>and we will proceed with the rest of the lesson."));
		npc.Msg(L("And... Let's see...<br/>Hmm. You came without any preparation.<br/>Today is fine<br/>but, from now on, you should bring a notebook."));
		npc.Msg(L("Swordsmen learn through their bodies<br/>but that is not the case for wizards."));
		npc.Msg(L("A wizard should get in the habit of recording.<br/>You should always be prepared to write down<br/>the changes you feel and the achievements you make<br/>if you are to improve your magic beyond a certain level."));
		npc.Msg(L("If you do not review what you've learned in the class and forget,<br/>it would be very tough<br/>to improve your magic beyond average.<br/>So, you should be prepared to jot down notes even if you don't want to."));
		npc.Msg(L("As you might have surmised from your enrollment already,<br/>it takes a lot of patience to learn magic.<br/>Consistent attendance is key."));
		npc.Msg(L("Then, we'll finish here."));
	}
Esempio n. 52
0
    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);
    }
Esempio n. 53
0
	public async Task Class1_3(NpcScript npc)
	{
		if (!npc.Player.Skills.Has(SkillId.Icebolt, SkillRank.Novice))
		{
			npc.Player.Skills.Give(SkillId.Icebolt, SkillRank.Novice);
			npc.Player.Skills.Train(SkillId.Icebolt, SkillRank.Novice, 1);
		}

		npc.Msg(L("Good.<br/>First of all, let's check the new magic."));
		npc.Msg(L("<image local='true' name='magic_ice'/>Check the Skill window and press the 'Learn' button."));
		npc.Msg(L("As you know, the spell I've just taught you is Icebolt."));
		npc.Msg(L("Heehee... You want to use it already?<br/>What's the hurry?"));
		npc.Msg(L("You're making it difficult for me. Hehehe..."));
		npc.Msg(L("<image name='icebolt_fired'/>Now, first, you should know<br/>what kind of spell Icebolt is.<br/>Icebolt is an attack magic<br/>which shoots sharp ice fragments to the target at a rapid speed."));
		npc.Msg(L("In other words, it is very dangerous.<br/>So, you shouldn't use this magic on just anyone."));
		npc.Msg(L("You should know the principles, too.<br/>The principles behind Icebolt is very simple."));
		npc.Msg(L("First, collect the surrounding moisture with the power of Mana.<br/>Second, lower the temperature with the power of Mana.<br/>Third, create sharp ice fragments by controlling Mana.<br/>Fourth, shoot them to the target by using the force of repulsion."));
		npc.Msg(L("Easy, huh?"));
		npc.Msg(L("Of these four steps,<br/>how sharp the ice pieces are<br/>and how much repulsion it takes<br/>to shoot them to the target -"));
		npc.Msg(L("Balancing each of these two factors<br/>is the key to Icebolt magic."));
		npc.Msg(L("Ha ha. Simple, isn't it?<br/>It should look easy."));
		npc.Msg(L("But understanding with your head is one thing<br/>and connecting your body and will,<br/>and eventually being assimilated to the order of the universe,<br/>is quite another."));
		npc.Msg(L("Keep this in mind when you practice later."));
		npc.Msg(L("That is all I can explain to you.<br/>If you want<br/>more detail about<br/>how Icebolt magic was created,"));
		npc.Msg(L("'Icebolt Spell: Origin and Training'<br/>would be helpful."));
		npc.Msg(L("I hope that, with this magic,<br/>you would make a lot of people happy."));
		npc.Msg(L("And, if you have any questions<br/>or want more details about magic,<br/>please enroll in Basic Sorcery Chapter Two."));
		npc.Msg(L("Please keep practicing<br/>the magic I taught you today."));
		npc.Msg(L("Bye."));
		npc.Msg(L("Oh!<br/>Come to think of it, I didn't review what we learned yesterday."));

		npc.Msg(L("It's kind of late, but they have to be reviewed.<br/>Let me just ask some quick questions for review.<br/>Do you remember<br/>what you learned in the previous class, not what you've just learned?<button title='Elemental' keyword='@reply1' /><button title='Icebolt' keyword='@reply2' /><button title='Firebolt' keyword='@reply3' />"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Alright. You remember.<br/>But learning magic takes more than just memory.<br/>Don't let it go to your head."));
				break;

			case "@reply2":
				npc.Msg(L("Haha. You must have misunderstood me.<br/>That is what you've just learned."));
				npc.Msg(L("All you can think about is Icebolt right now, isn't it?"));
				break;

			case "@reply3":
				npc.Msg(L("Wow! You are a fast learner!<br/>Great!"));
				npc.Msg(L("...But don't tell me you've already learned firebolt."));
				break;
		}

		npc.Msg(L("Now, which one of the following does not belong to the Elementals?<button title='Lightning' keyword='@reply1' /><button title='Fire' keyword='@reply2' /><button title='Ice' keyword='@reply3' /><button title='Poison' keyword='@reply4' />"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Lightning belongs to the Elementals.<br/>If you picture a ball of lightning, it should be much easier to understand.<br/>Don't forget next time."));
				npc.Msg(L("Lightning, Fire, and Ice belong to the elementals but Poison does not."));
				break;

			case "@reply2":
				npc.Msg(L("Lightning belongs to the Elementals.<br/>If you picture a ball of lightning, it should be much easier to understand.<br/>Don't forget next time."));
				npc.Msg(L("Lightning, Fire, and Ice belong to the elementals but Poison does not."));
				break;

			case "@reply3":
				npc.Msg(L("Ice belongs to the elementals.<br/>If you picture ice, it should be much easier to understand.<br/>Don't forget next time."));
				npc.Msg(L("Lightning, Fire, and Ice belong to the elementals but Poison does not."));
				break;

			case "@reply4":
				npc.Msg(L("Correct. Poison means toxic substances.<br/>Poison simply means something<br/>created by a combination of different elements, and their state.<br/>It's far from the Elementals though."));
				npc.Msg(L("You seem to have studied a fair bit. Or was it a lucky guess? Haha."));
				break;
		}

		npc.Msg(L("Okay, today's class is over.<br/>Congratulations on your work so far."));
		npc.Msg(L("Do just as you learned today,<br/>and you, as a beginning wizard,<br/>will be able to adequately understand and use Icebolt<br/>wherever you may go."));
		npc.Msg(L("Haha. Congratulations on completing Chapter 1 of Basic Sorcery."));
	}
Esempio n. 54
0
    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."));
            }
        }
    }
Esempio n. 55
0
	public async Task Class2_3(NpcScript npc)
	{
		if (!npc.Player.Skills.Has(SkillId.Firebolt, SkillRank.Novice))
		{
			npc.Player.Skills.Give(SkillId.Firebolt, SkillRank.Novice);
			npc.Player.Skills.Train(SkillId.Firebolt, SkillRank.Novice, 1);
		}

		npc.Msg(L("Now, let's take a look at the new magic first<br/>and then start the class."));
		npc.Msg(L("<image local='true' name='magic_ice_fire'/>Check the Skill window and press the 'Learn' button,<br/>You should be able to confirm the Firebolt magic."));
		npc.Msg(L("<image name='firebolt_fired'/>Firebolt is magic<br/>that creates flames and shoots them at the target,<br/>doing fire damage."));
		npc.Msg(L("To use this magic with ease,<br/>you have to remember<br/>what I taught you in the previous class."));
		npc.Msg(L("On that note, let's review what you learned.<br/>Let's see if you still remember<br/>what I taught you yesterday."));

		npc.Msg(L("How many times is the limit for consecutive casting?<br/><button title='4' keyword='@reply1'/><button title='5' keyword='@reply2'/><button title='6' keyword='@reply3'/><button title='108' keyword='@reply4'/>"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Hmm. Have you even tried consecutive-casting?<br/>Five times is the limit."));
				npc.Msg(L("That was an easy question.<br/>That's disappointing, <player name>."));
				break;

			case "@reply2":
				npc.Msg(L("Correct!<br/>But, anyone who tried it once<br/>would know this, right?"));
				break;

			case "@reply3":
				npc.Msg(L("Wrong. Five times is the limit.<br/>You may cast magic beyond that,<br/>but it won't make any difference."));
				npc.Msg(L("Hmm. If there is any difference,<br/>you might be taken to magic scholars<br/>to be dissected as a specimen."));
				npc.Msg(L("Watch your back."));
				break;

			case "@reply4":
				npc.Msg(L("What?? Wrong! Five times is the limit.<br/>Hmm. If there are any changes,<br/>you might be taken to magic scholars<br/>to be dissected as a specimen."));
				npc.Msg(L("Watch your back."));
				break;
		}

		npc.Msg(L("What is the most important thing<br/>in using the Icebolt magic effectively?<br/><button title='Timing' keyword='@reply1'/><button title='Sense' keyword='@reply2'/><button title='Mana' keyword='@reply3'/><button title='Robe' keyword='@reply4'/>"));
		switch (await npc.Select())
		{
			case "@reply1":
				npc.Msg(L("Correct. You studied hard.<br/>It is rewarding to teach you."));
				npc.Msg(L("Not just for using the Icebolt magic,<br/>but for captivating a woman's heart also,<br/>timing is crucial.<br/>Have you thought about that?"));
				break;

			case "@reply2":
				npc.Msg(L("Ha ha. Having some sense would be good.<br/>But I didn't mention sense<br/>during the previous class."));
				npc.Msg(L("How can you give such an absent-minded answer<br/>in front of a beautiful lady like me?<br/>The answer is T.I.M.I.N.G! Don't forget."));
				break;

			case "@reply3":
				npc.Msg(L("Nope, that's incorrect.<br/>Mana is important for any magic,<br/>but it is not the most important factor<br/>in using the icebolt magic effectively..."));
				npc.Msg(L("Timing is the most important thing<br/>in using the icebolt magic."));
				break;

			case "@reply4":
				npc.Msg(L("What a disappointing answer...<br/>A robe does make a wizard look cool,<br/>but it has nothing to do with the Icebolt magic.<br/>You should focus more on timing."));
				npc.Msg(L("The strength of Icebolt<br/>which no other spell possesses<br/>is in the timing."));
				break;
		}

		npc.Msg(L("Hehehehe...It seems to be going into one ear and out the other<br/>because of your anticipation for new magic.<br/>Oddly disappointing."));
		npc.Msg(L("If you cannot get a good grasp on this,<br/>you will have a hard time understanding in the next class."));
		npc.Msg(L("You should remember that<br/>there is a time for learning,<br/>and always do your best at every moment."));
		npc.Msg(L("Now, I would like to explain the Firebolt magic.<br/>Please pay attention."));
		npc.Msg(L("<image name='campfire'/>First of all, let's briefly talk about fire.<br/>Fire means heat and light<br/>which an object emits as it gets hot."));
		npc.Msg(L("To make fire,<br/>the object to be burned and a high temperature to burn it are necessary.<br/>Without these two conditions met, it is impossible to make a fire."));
		npc.Msg(L("<image name='firebolt_loaded1'/>But, the story is different when using the power of Mana.<br/>Even without the object to burn,<br/>you can still make a fire by changing<br/>Mana and making it the center of heat."));
		npc.Msg(L("<image name='firebolt_fired'/>Firebolt is<br/>magic that shoots the fireball, reacted by using the power of Mana,<br/>to the target."));
		npc.Msg(L("Other than the fact that you shoot fire instead of ice,<br/>it is almost the same as Icebolt."));
		npc.Msg(L("<image name='firebolt_fired01'/>The enemy hit by the fireball<br/>would instantly feel the bodily combustion."));
		npc.Msg(L("Not only for the physical damage,<br/>but for the fear of experiencing his or her body set on fire,<br/>it is clearly a<br/>threatening magic..."));
		npc.Msg(L("Instead, since the Firebolt magic consumes more Mana<br/>compared to the Icebolt magic,<br/>you should not overuse it<br/>unless you are in an emergency situation."));
		npc.Msg(L("Now, let's learn how to cast<br/>Firebolt magic in earnest."));
		npc.Msg(L("The first step in learning the Firebolt magic is<br/>to create fireballs<br/>by using the power of Mana only."));
		npc.Msg(L("The most important part is<br/>to concentrate heat on a certain point by using Mana."));
		npc.Msg(L("As  you learn<br/>how to quickly adjust the process of<br/>absorbing heat by using the power of Mana, as with Icebolt,<br/>you should be able to easily pick it up."));
		npc.Msg(L("<image name='firebolt_loaded1'/>When you feel the concentrated<br/>Mana burning,<br/>try to create repulsive force in fireballs towards the target<br/>by using some of the Mana."));
		npc.Msg(L("<image name='firebolt_fired'/>Now, the fireball will fly towards the target.<br/>But the speed will not be that fast."));
		npc.Msg(L("Because a lot of energy is being concentrated<br/>to maintain the temperature of the fireball,<br/>even with repulsive force, it is difficult<br/>to pick up the speed as fast as Icebolt does."));
		npc.Msg(L("Well, that is all I can tell you.<br/>The rest, you should learn on your own through training and practicing."));
		npc.Msg(L("If you feel there is something missing in using the skill<br/>and want more information about the history<br/>and the development process of Firebolt magic,"));
		npc.Msg(L("go find and read 'How to Perform Firebolt Magic'<br/>written by Tarnwen."));
		npc.Msg(L("It is a bestseller that sold many copies.<br/>If you read it, it will be of great help.<br/>For the trainees' convenience,<br/>I sell the copies at wholesale price here. If you need one, just tell me."));
		npc.Msg(L("Well, now we've completed Basic Sorcery Chapter Two.<br/>I hope that, through the magic I taught you today,<br/>you will be able to better use Icebolt magic which you learned in Chapter One<br/>and be more proficient at using Mana."));
		npc.Msg(L("If you want to dig deeper on<br/>how to use the Firebolt magic,<br/>it would be good<br/>to enroll for Basic Sorcery  Chapter Three."));
		npc.Msg(L("Then, let's call it a day.<br/>Thank you for listening.<br/>This chapter is over, but please practice more."));
	}
Esempio n. 56
0
    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."));
        }
    }
Esempio n. 57
0
	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."));
		}
	}
Esempio n. 58
0
    public async Task AboutArbeit(NpcScript npc)
    {
        // Check if already doing another PTJ
        if (npc.DoingPtjForOtherNpc())
        {
            npc.Msg(L("Are you working for someone else?<br/>Can you help me after you're finished?"));
            return;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if (await npc.Select() == "@accept")
        {
            npc.Msg(L("Thank you for your help in advance."));
            npc.StartPtj(randomPtj);
        }
        else
        {
            npc.Msg(L("You seem busy today."));
        }
    }
Esempio n. 59
0
	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."));
		}
	}
Esempio n. 60
0
	public async Task AboutArbeit(NpcScript npc)
	{
		if(npc.DoingPtjForOtherNpc())
		{
			npc.Msg("You have other things to do, right?<br/>If you need the Holy Water of Lymilark, can you come back after you are finished with your work?");
			return;
		}
		
		if(npc.DoingPtjForNpc())
		{
			var result = npc.GetPtjResult();
			
			if(!npc.ErinnHour(Report, Deadline))
			{
				if(result == QuestResult.Perfect)
					npc.Msg("It seems you took care of your end of the bargain.<br/>I'm a little busy right now, but come back later so I can compensate you for your work.");
				else
					npc.Msg("How are you doing with the part-time job for the Church today?<br/>I have the utmost faith in you, <username/>.");
				return;
			}
			
			npc.Msg("Did you finish the part-time job I gave you?<br/>If you are done, you can report the results to me. Do you want to do so now?<button title='Report Now' keyword='@report' /><button title='Report Later' keyword='@later' />");
			
			if(await npc.Select() != "@report")
			{
				npc.Msg("You don't want to report yet?<br/>Please make sure to come back and report before the deadline.");
				return;
			}
			
			if(result == QuestResult.None)
			{
				npc.GiveUpPtj();
				
				npc.Msg(npc.FavorExpression(), "I'm sorry,<br/>but I cannot give you the Holy Water of Lymilark unless you complete the task I've asked you to take care of.<br/>Please work harder next time.");
				npc.ModifyRelation(0, -Random(3), 0);
			}
			else
			{
				npc.Msg("Well done, <username/>. I feel very relieved thanks to you.<br/>In appreciation of all the hard work you've put in for the Church,<br/>I prepared some things for you.<br/>I'd love to give you all these if I could, but I can't. Please pick one.<button title='Report Later' keyword='@later' />" + npc.GetPtjReportXml(result));
				var reply = await npc.Select();
				
				if(!reply.StartsWith("@reward:"))
				{
					npc.Msg("You don't want to report yet?<br/>Please make sure to come back and report before the deadline.");
					return;
				}
				
				npc.CompletePtj(reply);
				remaining--;
				
				if(result == QuestResult.Perfect)
				{
					npc.Msg(npc.FavorExpression(), "Thanks. You took care of everything I've asked for.<br/>As promised, I will give you the Holy Water of Lymilark.");
					npc.ModifyRelation(0, Random(3), 0); 
				}
				else if(result == QuestResult.Mid)
				{
					npc.Msg(npc.FavorExpression(), "It's a bit short of what I asked for,<br/>but I appreciate your help.<br/>I will give you the Holy Water of Lymilark in return.");
					npc.ModifyRelation(0, Random(1), 0); 
				}
				else if(result == QuestResult.Low)
				{
					npc.Msg(npc.FavorExpression(), "Did you run out of time?<br/>You completed only a portion of what I asked for.<br/>I'm sorry, but that's not good enough for me to give you the Holy Water of Lymilark.");
					npc.ModifyRelation(0, -Random(2), 0); 
				}
			}
			return;
		}
		
		if(!npc.ErinnHour(Start, Deadline))
		{
			npc.Msg("Are you willing to help the Church?<br/>It's a bit early, though. Please come back at a later time.");
			return;
		}
		
		if(!npc.CanDoPtj(JobType, remaining))
		{
			npc.Msg("Today's part-time jobs are all taken.<br/>If you need some Holy Water of Lymilark, please come back tomorrow.");
			return;
		}
		
		var randomPtj = npc.RandomPtj(JobType, QuestIds);
		var ptjXml = npc.GetPtjXml(randomPtj, "Endelyon's Church Part-Time Job", "Looking for help with delivering goods to Church.", PerDay, remaining);
		var msg = "";
		
		if(npc.GetPtjDoneCount(JobType) == 0)
			msg = "Our Church is looking for a kind soul to help take care of our crops.<br/>The main job is to harvest wheat or barley from the farmland located south of the Church.<br/>One thing to note: because of our tight budget, we cannot afford to pay in gold.<p/>Instead, anyone who completes the job will receive some Holy Water of Lymilark,<br/>which can be used to bless items.<br/>Blessed items do not fall to the ground<br/>when its owner is knocked unconscious.<br/>Now, what do you say?";
		else
			msg = "Are you here for the Holy Water of Lymilark again?<br/>Please take a look at today's part-time job and tell me if you want it.";
		
		npc.Msg(msg + ptjXml);
		
		if(await npc.Select() == "@accept")
		{
			npc.Msg("Thank you.<br/>Please take care of this on time.");
			npc.StartPtj(randomPtj);
		}
		else
		{
			npc.Msg("If you don't want to do it, then I guess that's that.");
		}
	}