Esempio n. 1
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. 2
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);
    }
Esempio n. 3
0
	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;
	}
    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. 5
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. 6
0
    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();

            var cutscene = new Cutscene("etc_event_ego_goodbye", npc.Player);
            cutscene.AddActor("me", npc.Player);
            cutscene.Play();

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }