Beispiel #1
0
    public async Task <HookResult> AfterIntro(NpcScript npc, params object[] args)
    {
        // Handle receiving of Anthology from some of her PTJ quests
        int id;

        if (npc.QuestActive(id = 501405, "ptj3") || npc.QuestActive(id = 501435, "ptj3") || npc.QuestActive(id = 501465, "ptj3"))
        {
            if (!npc.Player.Inventory.Has(Anthology))
            {
                return(HookResult.Continue);
            }

            npc.Player.Inventory.Remove(Anthology, 1);
            npc.FinishQuest(id, "ptj3");

            npc.Notice(L("You have given Anthology to be Delivered to Caitin."));
        }

        // Call PTJ method after intro if it's time to report
        if (npc.DoingPtjForNpc() && npc.ErinnHour(Report, Deadline))
        {
            await AboutArbeit(npc);

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Beispiel #2
0
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		// Handle delivery of Iron Ore from some of his PTJ quests
		int id, itemCount = -1;
		if (npc.QuestActive(id = 514602, "ptj2"))
			itemCount = 5;
		else if (npc.QuestActive(id = 514632, "ptj2"))
			itemCount = 7;
		else if (npc.QuestActive(id = 514662, "ptj2"))
			itemCount = 10;

		if (itemCount != -1)
		{
			if (!npc.Player.Inventory.Has(64002, itemCount)) // Iron Ore
				return HookResult.Continue;

			npc.FinishQuest(id, "ptj2");

			npc.Player.Inventory.Remove(64002, itemCount);
			npc.Notice(L("You have given Iron Ore to Sion."));
			npc.Msg(string.Format(LN("(Gave Sion {0} Iron Ore)", "(Gave Sion {0} Iron Ore)", itemCount), itemCount));
		}

		// Call PTJ method after intro if it's time to report
		if (npc.DoingPtjForNpc() && npc.ErinnHour(Report, Deadline))
		{
			await AboutArbeit(npc);
			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #3
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);
    }
Beispiel #4
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;
	}
Beispiel #5
0
	public async Task<HookResult> TalkMalcolm(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk_malcolm1"))
		{
			npc.FinishQuest(this.Id, "talk_malcolm1");
			
			npc.Msg("So, you received the quest I sent through the Owl.<br/>Thanks for coming.<br/>I think I lost my ring in Alby Dungeon,<br/>but I can't leave, because I have no one to take care of the General Shop.");
			npc.Msg("I know it's a lot to ask, but can you go find the ring for me?<br/>The dungeon is very dangerous so I suggest talking to Trefor first about the Counterattack skill.<br/><br/>Take this pass to enter the dungeon, and please find my ring.");
			npc.GiveItem(63181); // Malcolm's Pass
			npc.GiveKeyword("skill_counter_attack");

			return HookResult.End;
		}
		else if (npc.QuestActive(this.Id, "talk_malcolm2"))
		{
			npc.FinishQuest(this.Id, "talk_malcolm2");
			npc.GiveKeyword("Clear_Tutorial_Malcolm_Ring");
			npc.RemoveItem(75058); // Malcolm's Ring

			npc.Msg("You found my Ring!<br/>You have my thanks.");

			return HookResult.Break;
		}
		
		return HookResult.Continue;
	}
	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;
	}
Beispiel #7
0
	public async Task<HookResult> TalkNpc(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk_deian1"))
		{
			npc.FinishQuest(this.Id, "talk_deian1");

			npc.Msg("Oh thank you for coming, I was dying from boredom...");
			npc.Msg("Did you bring a gathering knife? I don't seem to<br/>have any extra around here. If you didn't you'll need<br/>to go see Ferghus about that!");
			npc.Msg("In any case, I could really use your help again shearing all my sheep.<br/>Just hold the knife gently in your one hand and grab a tuft of wool with<br/>the other. Easy right? Hehe, well why do you think I don't want to do it?<br/>Can you gather five bundles of wool for me?");

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

			npc.Msg("Thank you, thank you! You look like a natural with that knife, I must say.<br/>These bundles of wool will help me out the rest of the day.<br/>Come by again if you ever want to get more wool!");

			npc.RemoveItem(60009, 5); // Wool
			npc.CompleteQuest(this.Id);

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #8
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);
    }
Beispiel #9
0
    public async Task <HookResult> TalkTrefor(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk_trefor"))
        {
            npc.FinishQuest(this.Id, "talk_trefor");

            npc.Player.Skills.Give(SkillId.Smash, SkillRank.Novice);

            npc.Msg("Welcome, I am Trefor, the guard.<br/>Someone from the town went into Alby Dungeon a while ago, but hasn't returned yet.<br/>I wish I could go there myself, but I can't leave my post. I'd really appreciate it if you can go and look for in Alby Dungeon.");
            npc.Msg("Since the dungeon is a dangerous place to be in, I'll teach you a skill that will help you in an emergency situation.<br/>It's called the Smash skill. If you use it, you can knock down a monster with a single blow!<br/>It is also highly effective when you sneak up on a target and deliver the blow without warning.");
            npc.Msg("Against monsters that are using the Defense skill,<br/>Smash will be the only way to penetrate that skill and deliver a killer blow.");
            npc.Msg("However... looking at the way you're holding your sword, I'm not sure if you are up to the task.<br/>Let me test your skills first. Do you see those brown foxes wandering in front of me?<br/>They're quite a nuisance, praying on those roosters in town.<br/>I want you to go and hunt 5 Young Brown Foxes right now.");
            npc.Msg("Foxes use the Defense Skill a lot, and as I told you before, regular attacks do not work against defending targets.<br/>That's then the Smash skill comes in handy.<br/><br/>Watch how I do it, and try picking up the important parts so you can use it too.<br/>You don't need to overstrain yourself by going for the Brown Foxes. Young Brown Foxes will do just fine.", npc.Movie("skillbar_guide_us.wmv", 500, 300), npc.Button("Continue"));
            await npc.Select();

            npc.Close2();

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

            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, "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.HasItem(63180))
            {
                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);
    }
Beispiel #10
0
    public async Task <HookResult> DougalAfterIntro(NpcScript npc, params object[] args)
    {
        if (!npc.HasQuest(this.Id) && !npc.HasKeyword("g1_37_1"))
        {
            npc.SendOwl(this.Id, OwlDelay);
            npc.GiveKeyword("g1_37_1");

            npc.Msg(L("You're quite brave to come to a place like this. I'm Dougal.<br/>I'm here... alone."));
            npc.Msg(L("I see that you're not from around here.<br/>I'm Dougal, the last remaining human here.<br/>I was pretty lonely. It's been a while since I've seen anyone."));
            npc.Msg(L("Why am I left here alone?<br/>It's complicated, but I didn't stay behind<br/>because I wanted to."));
            npc.Msg(L("..."));
            npc.Msg(L("What?<br/>This is Tir Na Nog?<br/>You mean the legendary paradise, Tir Na Nog?"));
            npc.Msg(L("Hah!<br/>Hahaha. I didn't expect to hear such a foolish statement from you."));
            npc.Msg(L("Look, if this truly is Tir Na Nog, the world where sickness and death don't exist,<br/>why would I have a leg like this?"));
            npc.Msg(L("Also, this town has turned into a wasteland<br/>after being invaded by the Fomors."));
            npc.Msg(L("You probably heard a false rumor somewhere.<br/>I'm sorry but this isn't the place you think it is."));
            npc.Msg(L("This is just another world that has become a land of the Fomors."));
            npc.Msg(L("But since you're here, take a look<br/>around as much as you want.<br/>Who knows?<br/>You might find this place similar to a place<br/>you are familiar with. Haha."));

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

            npc.Msg(L("You've come... I was waiting for you.<br/>Because you're not from around here,<br/>I thought that losing the freedom of your body<br/>might end up getting you into big trouble."));
            npc.Msg(L("...True... Nobody but your party can help you<br/>in here.<br/>Even if your life ends and you pass away..."));
            npc.Msg(L("When you can't move...<br/>You return to your world.<br/>I do think you have to endure that fact, only because you are a human of another world..."));
            npc.Msg(L("...I've called you because a good plan has come up."));
            npc.Msg(L("Do you...know about the added soul phenomenon?<br/>It is the phenomenon where the spirit doesn't go away from one's body...<br/>I thought maybe if you were to use this trick<br/>you could let your spirit stay near here."));
            npc.Msg(L("Yes... If your spirit does not go away from your fallen body and stays near it<br/>there wouldn't be such a thing as having to resurrect back from the world you were in<br/>even if you were to lose the freedom of your body."));
            npc.Msg(L("But... dealing with spirits is also a dangerous thing...<br/>With the slightest provocation you can turn into one of those zombies behind the graveyard..."));
            npc.Msg(L("...So, I'll have to see if my thoughts are correct.<br/>If you knock down the spiritless zombies<br/>I will measure the added soul phenomenon that happens around the zombies<br/>and see if you can resurrect in this place."));
            npc.Msg(L("What do you think? Would you like to give it a try?"));

            return(HookResult.Break);
        }
        else if (npc.QuestActive(this.Id, "talk2"))
        {
            npc.CompleteQuest(this.Id);

            npc.RemoveKeyword("g1_37_1");
            npc.GiveKeyword("g1_bind");

            npc.Msg(L("It's just as I'd thought. We can use the added soul phenomenon<br/>and have your spirit stay here.<br/>If you believe me, from now on,<br/>you won't ever be an undead even if you collapse here."));
            npc.Msg(L("...Yes. My body and soul<br/>are exchanging with you the amount of strength<br/>you need to resurrect here..."));
            npc.Msg(L("Oh no... Are you uncomfortable about exchanging such things with me?<br/>Ha ha, no need to act calm.<br/>But..."));
            npc.Msg(L("Even when you can't move<br/>you can come near me.<br/>You will make it through this world with more ease if you remember this."));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Beispiel #11
0
	public async Task<HookResult> DougalAfterIntro(NpcScript npc, params object[] args)
	{
		if (!npc.HasQuest(this.Id) && !npc.HasKeyword("g1_37_1"))
		{
			npc.SendOwl(this.Id, OwlDelay);
			npc.GiveKeyword("g1_37_1");

			npc.Msg(L("You're quite brave to come to a place like this. I'm Dougal.<br/>I'm here... alone."));
			npc.Msg(L("I see that you're not from around here.<br/>I'm Dougal, the last remaining human here.<br/>I was pretty lonely. It's been a while since I've seen anyone."));
			npc.Msg(L("Why am I left here alone?<br/>It's complicated, but I didn't stay behind<br/>because I wanted to."));
			npc.Msg(L("..."));
			npc.Msg(L("What?<br/>This is Tir Na Nog?<br/>You mean the legendary paradise, Tir Na Nog?"));
			npc.Msg(L("Hah!<br/>Hahaha. I didn't expect to hear such a foolish statement from you."));
			npc.Msg(L("Look, if this truly is Tir Na Nog, the world where sickness and death don't exist,<br/>why would I have a leg like this?"));
			npc.Msg(L("Also, this town has turned into a wasteland<br/>after being invaded by the Fomors."));
			npc.Msg(L("You probably heard a false rumor somewhere.<br/>I'm sorry but this isn't the place you think it is."));
			npc.Msg(L("This is just another world that has become a land of the Fomors."));
			npc.Msg(L("But since you're here, take a look<br/>around as much as you want.<br/>Who knows?<br/>You might find this place similar to a place<br/>you are familiar with. Haha."));

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

			npc.Msg(L("You've come... I was waiting for you.<br/>Because you're not from around here,<br/>I thought that losing the freedom of your body<br/>might end up getting you into big trouble."));
			npc.Msg(L("...True... Nobody but your party can help you<br/>in here.<br/>Even if your life ends and you pass away..."));
			npc.Msg(L("When you can't move...<br/>You return to your world.<br/>I do think you have to endure that fact, only because you are a human of another world..."));
			npc.Msg(L("...I've called you because a good plan has come up."));
			npc.Msg(L("Do you...know about the added soul phenomenon?<br/>It is the phenomenon where the spirit doesn't go away from one's body...<br/>I thought maybe if you were to use this trick<br/>you could let your spirit stay near here."));
			npc.Msg(L("Yes... If your spirit does not go away from your fallen body and stays near it<br/>there wouldn't be such a thing as having to resurrect back from the world you were in<br/>even if you were to lose the freedom of your body."));
			npc.Msg(L("But... dealing with spirits is also a dangerous thing...<br/>With the slightest provocation you can turn into one of those zombies behind the graveyard..."));
			npc.Msg(L("...So, I'll have to see if my thoughts are correct.<br/>If you knock down the spiritless zombies<br/>I will measure the added soul phenomenon that happens around the zombies<br/>and see if you can resurrect in this place."));
			npc.Msg(L("What do you think? Would you like to give it a try?"));

			return HookResult.Break;
		}
		else if (npc.QuestActive(this.Id, "talk2"))
		{
			npc.CompleteQuest(this.Id);

			npc.RemoveKeyword("g1_37_1");
			npc.GiveKeyword("g1_bind");

			npc.Msg(L("It's just as I'd thought. We can use the added soul phenomenon<br/>and have your spirit stay here.<br/>If you believe me, from now on,<br/>you won't ever be an undead even if you collapse here."));
			npc.Msg(L("...Yes. My body and soul<br/>are exchanging with you the amount of strength<br/>you need to resurrect here..."));
			npc.Msg(L("Oh no... Are you uncomfortable about exchanging such things with me?<br/>Ha ha, no need to act calm.<br/>But..."));
			npc.Msg(L("Even when you can't move<br/>you can come near me.<br/>You will make it through this world with more ease if you remember this."));

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #12
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;
	}
Beispiel #13
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;
	}
Beispiel #14
0
    public async Task <HookResult> KristellAfterIntro(NpcScript npc, params object[] args)
    {
        if (npc.HasKeyword("g1_25") && npc.HasItem(BookOfRevenge2))
        {
            npc.RemoveItem(BookOfRevenge2);
            npc.SendOwl(this.Id, OwlDelay1);

            npc.RemoveKeyword("g1_memo_of_parcelman");
            npc.RemoveKeyword("g1_25");
            npc.GiveKeyword("g1_26");

            npc.Msg(L("So there really was another volume.<br/>I'm impressed. I didn't think you'd be able to find it."));
            npc.Msg(L("I'll translate this book, as promised.<br/>I'll let you know as soon as I'm finished."));

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

            npc.GiveItem(BookOfRevenge2Translated);
            npc.Notice(L("You have received the Book of Revenge, Vol. 2 (Translated) from Kristell."));

            npc.Msg(L("You must be here for your translated copy of the book.<br/>Here, I think you should read it yourself.<br/>It's better than having me summarize it for you."));
            npc.Msg(L("That said, I can't believe what's written in this book..."));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
	public async Task<HookResult> KristellAfterIntro(NpcScript npc, params object[] args)
	{
		if (npc.HasKeyword("g1_25") && npc.HasItem(BookOfRevenge2))
		{
			npc.RemoveItem(BookOfRevenge2);
			npc.SendOwl(this.Id, OwlDelay1);

			npc.RemoveKeyword("g1_memo_of_parcelman");
			npc.RemoveKeyword("g1_25");
			npc.GiveKeyword("g1_26");

			npc.Msg(L("So there really was another volume.<br/>I'm impressed. I didn't think you'd be able to find it."));
			npc.Msg(L("I'll translate this book, as promised.<br/>I'll let you know as soon as I'm finished."));

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

			npc.GiveItem(BookOfRevenge2Translated);
			npc.Notice(L("You have received the Book of Revenge, Vol. 2 (Translated) from Kristell."));

			npc.Msg(L("You must be here for your translated copy of the book.<br/>Here, I think you should read it yourself.<br/>It's better than having me summarize it for you."));
			npc.Msg(L("That said, I can't believe what's written in this book..."));

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #16
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);
    }
Beispiel #17
0
    public async Task <HookResult> AfterIntro(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk"))
        {
            npc.FinishQuest(this.Id, "talk");

            npc.Msg("Hi, <username/>, thank you for stopping by.");
            npc.Msg("So lets get down to business.<br/>I've noticed a couple of teens in town with crushes on each other.");
            npc.Msg("They don't seem to realize that the both have a crush on each other.");
            npc.Msg("Both of them seem like they are having trouble expressing their feelings to each other though...<br/>It pains me to see that, do you think you can lend them a helping hand?");
            if (npc.Player.IsMale)
            {
                npc.Msg("Anyways, if you so choose,<br/>I think it would be best for you to help out Conor.");
                npc.Msg("Conor is actually right over there by the housing board.");
                npc.Msg("Go ahead and talk to him,<br/>I'm sure you can find a way to help him out.");
            }
            else
            {
                npc.Msg("Anyways, if you so choose,<br/>I think it would be best for you to help out Abbey.");
                npc.Msg("Abbey was standing by the northern gate,<br/>you should be able to find her there.");
                npc.Msg("Go ahead and talk to her,<br/>I'm sure you can find a way to help her out.");
            }
            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
	public async Task<HookResult> TalkDuncan(NpcScript npc, params object[] args)
	{
		if(npc.QuestActive(this.Id, "talk_duncan"))
		{
			npc.FinishQuest(this.Id, "talk_duncan");
			
			Send.Effect(npc.NPC, Effect.ScreenFlash, 3000, 0);
			
			// Remove Eiry
			var eiry = npc.Player.Inventory.Items.FirstOrDefault(item => item.EgoInfo.Race == EgoRace.EirySword);
			if(eiry != null)
				npc.Player.Inventory.Remove(eiry);
			
			// Give sword
			npc.GiveItem(40015);
			npc.Notice("Received Fluted Short Sword from Duncan.");
			
			npc.Msg("Welcome to Tir Chonaill.");
			npc.Msg("Oh, you are finally here, <username/>.<br/>I've heard a lot about you from the villagers.<br/>You've leveled up quite a lot.");
			npc.Msg("This may be a small town,<br/>but Tir Chonaill has long boasted a tradition<br/>of growing resolute and sturdy warriors<br/>that don't have to worry about the kingdom's control.");
			npc.Msg("You have now completed all our missions<br/>and have earned the right to join the rank of Tir Chonaill's warriors.<br/>Well done, and congratulations.");
			npc.Msg("Wherever you go, don't forget who you are and what you have become.<br/>Since you have become strong enough to survive alone,<br/>your ego guide must have already parted ways with you.<br/>There is no one to look after you now, so befriend as many people as you can.");
			npc.Msg("If you have anything else to ask, let me know.");
			await npc.Conversation();
			
			npc.Close2();
			
			Cutscene.Play("etc_event_ego_goodbye", npc.Player);
			
			return HookResult.Break;
		}
		
		return HookResult.Continue;
	}
Beispiel #19
0
    public async Task <HookResult> TarlachBeforeKeywords(NpcScript npc, params object[] args)
    {
        var keyword = args[0] as string;

        if (keyword == "g1_bone_of_glasgavelen" && npc.HasKeyword("g1_28"))
        {
            if (!npc.QuestActive(NextQuestId))
            {
                npc.StartQuest(NextQuestId);                 // Obtain the Magic Powder of Preservation
                npc.GiveWarpScroll(63009, "Fiodth_Dungeon");

                npc.Msg(L("...!<p/>That's it! In order to revive Glas Ghaibhleann,<br/>his bones must be exacavated and re-assembled.<br/>Any missing bones must be replaced with Adamantium."));
                npc.Msg(L("But Adamantium is difficult to shape. It must<br/>be melted at very high temperatures first. And<br/>there's a special ingredient that must be applied to the bone."));
                npc.Msg(L("It won't be enough to simply destroy the bones before it's<br/>completed. Once the Adamantium hardens, you can't destroy it. I have no<br/>doubt the Formors have already gathered all the bones<br/>and prepared their magical reagents, too."));
                npc.Msg(L("It's only a matter of time before the Fomors invade Erinn..."));
                npc.Msg(L("How do I know all this? I learned it<br/>in the land of Fomors, Tir Na Nog.<br/>Tir Na Nog is a reflection of Erinn...or perhaps it's the other way around?<br/>At any rate, the worlds are quite similar."));
                npc.Msg(L("Perhaps it would be better for you to see it first hand.<br/>Can you do me a favor?"));
                npc.Msg(L("These glasses carry the memories of my time there."), npc.Image("g1_ch25_glasses"));
                npc.Msg(L("I can't say for certain if the memories<br/>are intact, but if you wish to see what I saw through<br/>these glasses, you'll need them.<br/>Please find me some Magic Powder of Preservation."), npc.Image("g1_ch25_glasses"));
                npc.Msg(L("The powder will prevent the glasses from breaking further.<br/>This will also sustain the memories contained within,<br/>If you get me the powder, I'll preserve the glasses."));
                npc.Msg(L("You can find Magic Powder of Preservation<br/>deep inside Fiodh Dungeon."));
            }
            else
            {
                npc.Msg(L("You can find Magic Powder of Preservation<br/>deep inside Fiodh Dungeon.<br/>If you get me the powder, I'll preserve the glasses."));
            }

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Beispiel #20
0
	public async Task<HookResult> TalkRanald(NpcScript npc, params object[] args)
	{
		if(!npc.QuestActive(this.Id))
			return HookResult.Continue;
	
		return await LearnDefense(npc);
	}
Beispiel #21
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> AfterIntro(NpcScript npc, params object[] args)
    {
        if (!npc.QuestActive(this.Id))
        {
            return(HookResult.Continue);
        }

        if (!npc.Player.Inventory.Has(51104, 1))         // 1 Base Herb
        {
            return(HookResult.Continue);
        }

        Send.Notice(npc.Player, "You have given Base Herb to Manus.");
        npc.Player.Inventory.Remove(51104, 1);         // 1 Base Herb
        npc.FinishQuest(this.Id, "talk");

        npc.Msg("You've come, <username/>.<br/>And with the base herb. Well done.");
        npc.Msg("Okay, I'll tell you about Herbalism.<br/>Herbalism is the knowledge to be able<br/>to classify the physiological effect of eating herbs.");
        npc.Msg("Some herbs create a specific effect.<br/><image name='bloody_herb'/>This herb is known as Bloody Herb for its red color.<br/>It contains an element that strengthens your life force.");
        npc.Msg("<image name='sunlight_herb'/>This herb is known as Sunlight Herb for its yellow color.<br/>It helps increase endurance.<br/>Mostly used in making tonics.");
        npc.Msg("<image name='base_herb'/>The Base Herb functions as a stabilizer to stabilize the virtue of several herbs mixed altogether,<br/>so this herb is often used when making medicine.");
        npc.Msg("<image name='G1_Ch01_manaherb'/>The Mana Herb is a plant that grows on the mana of Eweca.<br/>If properly processed, this herb can be used to make medicine that recovers mana.");
        npc.Msg("This processing step would be the Potion Making skill, right?<br/>Buy a Potion Making Kit and try it out for yourself. Ha ha. I just happen to have some with me...");
        npc.Msg("So now, <username/>, you are an Herbalism beginner .<br/>From now on, please help me out with the work in my store.");

        return(HookResult.Break);
    }
Beispiel #23
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);
    }
Beispiel #24
0
    public async Task <HookResult> DuncanAfterIntro(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk"))
        {
            npc.CompleteQuest(this.Id);

            npc.GiveKeyword("g1_memorial4");
            npc.GiveKeyword("g1_34_1");

            npc.GiveItem(Torque);
            npc.Notice(L("You have received Broken Torque from Duncan."));

            npc.Msg(L("Welcome, <username/>. I'm glad you came...<br/>First, let me give you this.<br/>I found it while I was cleaning the house."));
            npc.Msg(L("Yes... This is the reason I called you<br/>Do you remember...? How I told you I raised Mari..."));
            npc.Msg(L("When Mari first came to me...<br/>She was delivered by a pair of white and brown deer, wrapped tightly in a blanket..."), npc.Image("g1_ch31_baby"));
            npc.Msg(L("Inside the blanket, there was a letter from Shiela,<br/>asking me to watch over Mari, and the item I just gave you..."), npc.Image("g1_ch31_baby"));
            npc.Msg(L("This is what the letter said...<br/>When Mari becomes an adult...<br/>give her this memento so she can find her past...<br/>and...tell her go to Math Dungeon..."), npc.Image("g1_ch31_baby"));
            npc.Msg(L("Shiela said...when she dies<br/>she'll attach her memories to this item..."));
            npc.Msg(L("...<br/>But...now...since Mari...<br/>doesn't need it anymore...<br/>...I'm giving it to you."));
            npc.Msg(L("It seems like an item related to Mores...<br/>I hope it will be helpful in some way<br/>in your search to find Tir Na Nog..."));
            npc.Msg(L("I'm giving you a Red Wing of the Goddess as well...<br/>so hurry up and go to Math Dungeon.<br/>I wish you the best of luck."));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Beispiel #25
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;
	}
Beispiel #26
0
    public async Task <HookResult> TalkFerghus(NpcScript npc, params object[] args)
    {
        if (npc.Player.QuestActive(this.Id, "talk_ferghus"))
        {
            npc.Player.FinishQuestObjective(this.Id, "talk_ferghus");

            npc.Msg("<npcportrait name='ferghus_fake'/>They're gonna start calling me Ferghus the Trend King. These<br/>wings are going to change the world, But that's just a shake of<br/>the hammer for old Ferghus.");
            npc.Msg("<npcportrait name='ferghus_fake'/>I deserve a long night of drinking for this one.");
            npc.Msg("<npcportrait name='ferghus_fake'/>I call these Ferghus's Amazing Wings. I like names to be simple,<br/>you know? These things are going to be flying off the shelves.<br/>That is, if I can get the materials I need to get them made...");
            npc.Msg("<npcportrait name='ferghus_fake'/>Do you think you could help an old blacksmith out? I've got my<br/>hands full here.");
            npc.Msg(Hide.Both, "(Ask him what he needs.)");
            npc.Msg("<npcportrait name='ferghus_fake'/>Paper! Can you believe it? I swear I'd bought about 100 reams<br/>of the stuff, but I woke up a couple of days ago in a haze and I<br/>have no idea what I did with it.");
            npc.Msg("<npcportrait name='ferghus_fake'/>Hopefully Malcolm still has some left over at the General Store...");
            npc.Msg(Hide.Both, "(You try to figure out why he would need that much paper for<br/>wings, but he interrupts your train of thought.");
            npc.Msg("<npcportrait name='ferghus_fake'/>Oh, I see the burning passion in your eyes, You can see that we're<br/>on the cusp of something great here! Just go get me 50 sheets<br/>of paper, and I'll make you something worth talking about.");

            return(HookResult.End);
        }

        else if (npc.QuestActive(this.Id, "talk_ferghus2") && npc.HasItem(64018, 50))
        {
            npc.FinishQuest(this.Id, "talk_ferghus2");
            npc.RemoveItem(64018, 50);             // Paper
            npc.Msg("<npcportrait name='ferghus_fake'/>It's happening! My masterpiece is coming right up!");
            npc.Msg(Hide.Both, "...");
            npc.Msg("<npcportrait name='ferghus_fake'/>All done! Put those on!");

            npc.Player.GiveItem(19208);             // Ferghus's Amazing Wings (Expired after 12 hours in official)
            npc.Player.Notice("You received Ferghus's Amazing Wings.");

            return(HookResult.End);
        }

        else if (npc.QuestActive(this.Id, "talk_ferghus3") && npc.Player.HasEquipped("/action_butterfly_big_type/cloth/not_enchantable/not_dyeable/expiring/"))
        {
            npc.FinishQuest(this.Id, "talk_ferghus3");
            npc.Msg(Hide.Both, "(The wings look like they'd fall apart in an instant and the<br/>harness is downright painful, Ferghus notices you shifting<br/>uncomfortably).");
            npc.Msg("<npcportrait name='ferghus_fake'/>Don't you like them? It's just a prototype, you know? I know<br/>they aren't the sturdiest things in the world, but I think they<br/>have a certain charm.");
            npc.Msg("<npcportrait name='ferghus_fake'/>I guess I'll have to go back to the drawing board for now...<br/>Why don't you take a look around, see if there's anything you<br/>want to buy? Maybe I can do some repairs for you.");
            npc.Msg(Hide.Both, "(The wings seem to be simultaneously wrenching your neck out<br/>of place and compressing your spine. You'd better get out of here.)");

            return(HookResult.End);
        }

        return(HookResult.Continue);
    }
Beispiel #27
0
    public async Task <HookResult> TalkRanald(NpcScript npc, params object[] args)
    {
        if (!npc.QuestActive(this.Id))
        {
            return(HookResult.Continue);
        }

        return(await LearnDefense(npc));
    }
Beispiel #28
0
    public async Task <HookResult> TalkNora(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id) && !npc.Player.Skills.Has(SkillId.Rest))
        {
            npc.Msg("If you came here because of the mail you received about the Resting skill,<br/>we need to talk about it first.<br/>You know you should ask me with the 'Skills' keyword, right?");
            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
	public async Task<HookResult> TalkNora(NpcScript npc, params object[] args)
	{
		if(npc.QuestActive(this.Id) && !npc.Player.Skills.Has(SkillId.Rest))
		{
			npc.Msg("If you came here because of the mail you received about the Resting skill,<br/>we need to talk about it first.<br/>You know you should ask me with the 'Skills' keyword, right?");
			return HookResult.Break;
		}
		
		return HookResult.Continue;
	}
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if (!npc.QuestActive(this.Id))
			return HookResult.Continue;
		npc.FinishQuest(this.Id, "talk");

		npc.Msg("(Missing dialog: Advice about Campfire)");

		return HookResult.Break;
	}
Beispiel #31
0
    public async Task <HookResult> AfterIntro(NpcScript npc, params object[] args)
    {
        // Handle delivery of Iron Ore from some of his PTJ quests
        int id, itemCount = -1;

        if (npc.QuestActive(id = 514602, "ptj2"))
        {
            itemCount = 5;
        }
        else if (npc.QuestActive(id = 514632, "ptj2"))
        {
            itemCount = 7;
        }
        else if (npc.QuestActive(id = 514662, "ptj2"))
        {
            itemCount = 10;
        }

        if (itemCount != -1)
        {
            if (!npc.Player.Inventory.Has(64002, itemCount))             // Iron Ore
            {
                return(HookResult.Continue);
            }

            npc.FinishQuest(id, "ptj2");

            npc.Player.Inventory.Remove(64002, itemCount);
            npc.Notice(L("You have given Iron Ore to Sion."));
            npc.Msg(string.Format(LN("(Gave Sion {0} Iron Ore)", "(Gave Sion {0} Iron Ore)", itemCount), itemCount));
        }

        // Call PTJ method after intro if it's time to report
        if (npc.DoingPtjForNpc() && npc.ErinnHour(Report, Deadline))
        {
            await AboutArbeit(npc);

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Beispiel #32
0
	public async Task<HookResult> TalkFriend(NpcScript npc, params object[] args)
	{
		if (!npc.QuestActive(this.Id, "talk_friend"))
			return HookResult.Continue;
		npc.FinishQuest(this.Id, "talk_friend");

		npc.Player.Titles.Enable(FriendTitle); // is a friend of ...
		await FriendDialog(npc);

		return HookResult.Break;
	}
    public async Task <HookResult> FletaIntro(NpcScript npc, params object[] args)
    {
        if (!npc.QuestActive(this.Id, "talk_fleta"))
        {
            return(HookResult.Continue);
        }

        npc.FinishQuest(this.Id, "talk_fleta");

        return(HookResult.Break);
    }
Beispiel #34
0
	public async Task<HookResult> TalkDuncan(NpcScript npc, params object[] args)
	{
		if (!npc.QuestActive(this.Id, "talk_duncan"))
			return HookResult.Continue;
		npc.FinishQuest(this.Id, "talk_duncan");

		// Unofficial
		npc.Msg("Hello <username/>.<br/>I heard you worked hard and made a difference helping the town residents.<br/>Why don't you pay " + FriendName + " a visit?<br/>I think you could become good friends.");

		return HookResult.Break;
	}
Beispiel #35
0
    public async Task <HookResult> AfterIntro(NpcScript npc, params object[] args)
    {
        if (!npc.QuestActive(this.Id))
        {
            return(HookResult.Continue);
        }
        npc.FinishQuest(this.Id, "talk");

        npc.Msg("(Missing dialog: Advice about Campfire)");

        return(HookResult.Break);
    }
Beispiel #36
0
    public async Task <HookResult> AfterIntro(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "obj1"))
        {
            npc.FinishQuest(this.Id, "obj1");
            npc.Msg(L("(Missing dialog: Magic Mastery Lesson"));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Beispiel #37
0
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id,"obj1"))
		{
			npc.FinishQuest(this.Id, "obj1");
			npc.Msg(L("(Missing dialog: Magic Mastery Lesson"));

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk"))
		{
			npc.FinishQuest(this.Id, "talk");
			npc.Msg("(Missing dialog: Visiting Bangor)");

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #39
0
    public async Task <HookResult> AfterIntro(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk") && npc.HasItem(50010, 5))
        {
            npc.FinishQuest(this.Id, "talk");
            npc.RemoveItem(50010, 5);             // Potatoes
            npc.Msg("(Missing dialog: Harvest Potato)");

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk") && npc.HasItem(64002, 5))
		{
			npc.FinishQuest(this.Id, "talk");
			npc.RemoveItem(64002, 5); // Iron Ore
			npc.Msg("(Missing dialog: Mine Lumps of Iron Ore)");

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #41
0
    public override async Task <HookResult> ClientAfterIntro(NpcScript npc, params object[] args)
    {
        if (!npc.QuestActive(this.Id, "ptj1"))
        {
            return(HookResult.Continue);
        }

        npc.FinishQuest(this.Id, "ptj1");

        AfterIntroDialogue(npc);

        return(HookResult.Break);
    }
Beispiel #42
0
	public async Task<HookResult> LearnDefense(NpcScript npc)
	{
		npc.Msg("It seems you are seeking a warrior's advice from me.<br/>Let's see, first, just lunging at your enemy is not everything.<br/>Defend your opponent's attack to break its flow<br/>and win a chance to strike back. It's really a critical part in a fight. <p/>That's the Defense skill.<br/>Hmm... If you haven't learned it yet, can you do me a favor?<br/>I'll let you know what it is so you can practice by yourself.");
		
		npc.Notice("Received Defense Guidebook from Ranald.");
		if(!npc.QuestActive(this.Id))
			npc.StartQuest(this.Id);
		npc.CompleteQuest(this.Id);
		
		npc.Msg("How to use the Defense skill is described in this book.<br/>Read it well and practice hard. That's the only efficient way you can defend yourself.");
		
		return HookResult.Break;
	}
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk") && npc.HasItem(64002, 10))
		{
			npc.FinishQuest(this.Id, "talk");
			npc.RemoveItem(64002, 10); // Iron Ore
			npc.Msg(L("(I give the ore to Elen)<p/>Thank you~, was it difficult to get this?<p/>Because of all the Fomors recently, nobody's going into the dungeon.<br/>Comgan's been asking people to dig here...<br/>It'll be very worrying if this situation continues.<p/>I'd appreciate someone digging on a regular basis...<br/>Ah! Don't mind my musing!"));

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #44
0
	public async Task<HookResult> LassarAfterIntro(NpcScript npc, params object[] args)
	{
		if (!npc.QuestActive(this.Id, "get_item"))
			return HookResult.Continue;

		npc.FinishQuest(this.Id, "get_item");

		npc.Msg(L("Here... This is the item Priest Meven told me to give to you."));
		npc.Msg(L("Isn't it beautiful? It's a black rose.<br/>The overwhelming redness of the flower itself turned the flower pitch black...<br/>I am happy it grew so beautifully compared to other flowers..."), npc.Image("g1_ch16_blackrose"));
		npc.Msg(L("But... what's the reason you're looking for such a rare flower?<br/>Are you... going to give it to your lover? Ha ha..."));

		return HookResult.Break;
	}
Beispiel #45
0
    public async Task <HookResult> TalkFriend(NpcScript npc, params object[] args)
    {
        if (!npc.QuestActive(this.Id, "talk_friend"))
        {
            return(HookResult.Continue);
        }
        npc.FinishQuest(this.Id, "talk_friend");

        npc.Player.Titles.Enable(FriendTitle);         // is a friend of ...
        await FriendDialog(npc);

        return(HookResult.Break);
    }
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if (!npc.QuestActive(this.Id, "deliver1"))
			return HookResult.Continue;

		npc.FinishQuest(this.Id, "deliver1");

		npc.Player.RemoveItem(16011, 2);

		npc.Msg(L("Ah, thank you."));

		return HookResult.Break;
	}
Beispiel #47
0
    public async Task <HookResult> TalkDuncan(NpcScript npc, params object[] args)
    {
        if (!npc.QuestActive(this.Id, "talk_duncan"))
        {
            return(HookResult.Continue);
        }
        npc.FinishQuest(this.Id, "talk_duncan");

        // Unofficial
        npc.Msg("Hello <username/>.<br/>I heard you worked hard and made a difference helping the town residents.<br/>Why don't you pay " + FriendName + " a visit?<br/>I think you could become good friends.");

        return(HookResult.Break);
    }
Beispiel #48
0
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk") && npc.HasItem(50009, 5))
		{
			npc.FinishQuest(this.Id, "talk");
			npc.RemoveItem(50009, 5); // Eggs
			npc.Msg("(Missing dialog: Gather Eggs)");

			return HookResult.Break;
		}

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

			npc.Msg(L("Welcome. I am Stewart.<br/>I will give you a mana potion that will help you with your magic training studies.<br/>I think you have talent in magic."));
			npc.Msg(L("I'd be thankful if you had interest in magic."));

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #50
0
	public async Task<HookResult> TalkAranwen(NpcScript npc, params object[] args)
	{
		if(npc.QuestActive(this.Id, "talk_aranwen"))
		{
			npc.FinishQuest(this.Id, "talk_aranwen");
			
			// TODO: Get official dialog.
			npc.Msg("Good job reaching Level 30!");
			
			return HookResult.Break;
		}
		
		return HookResult.Continue;
	}
Beispiel #51
0
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id) && npc.HasItem(60008, 5))
		{
			npc.RemoveItem(60008, 5); // Cobweb
			npc.CompleteQuest(this.Id);

			npc.Msg("(Missing dialog: Appreciation for getting the cobweb)");

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #52
0
	public async Task<HookResult> ElenIntro(NpcScript npc, params object[] args)
	{
		if (!npc.QuestActive(this.Id))
			return HookResult.Continue;

		if (!npc.Player.Inventory.Has(64002, 5)) // 5 Iron Ore
			return HookResult.Continue;

		Send.Notice(npc.Player, "You have given Iron Ore to Elen.");
		npc.Player.Inventory.Remove(64002, 5); // 5 Iron Ore
		npc.CompleteQuest(this.Id);

		return HookResult.Break;
	}
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk"))
		{
			npc.FinishQuest(this.Id, "talk");

			npc.AcquireItem(40022); // Gathering Axe
			npc.Msg("(Missing dialog: Explanation on getting firewood");

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

			npc.RemoveItem(63002, 6);
			npc.Msg("(Missing dialog: Appreciation for getting firewood");

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Beispiel #54
0
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk") && npc.HasItem(50009, 5))
		{
			npc.FinishQuest(this.Id, "talk");
			npc.RemoveItem(50009, 5); // Eggs

			npc.Msg(L("Oh, thank you. That was fast.<br/>If you get hungry later on, feel free to drop by.<br/>I've got plenty of delicious food in store for you!"));

			return HookResult.Break;
		}

		return HookResult.Continue;
	}