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> 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;
	}
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;
	}
Esempio n. 4
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;
	}
	public async Task<HookResult> AeiraBeforeKeywords(NpcScript npc, params object[] args)
	{
		var keyword = args[0] as string;
		if (keyword != "g1_book1")
			return HookResult.Continue;

		if (npc.HasKeyword("g1_06"))
		{
			npc.RemoveKeyword("g1_06");
			npc.GiveKeyword("g1_07");

			npc.Msg(L("'The Land of Eternity, Tir Na Nog'...?"));
			npc.Msg(L("Oh no.<br/>That book wasn't selling at all, so I returned all of them.<br/>Haha! Where did you hear about that book?"));
		}
		else if (npc.HasKeyword("g1_07"))
		{
			npc.RemoveKeyword("g1_07");
			npc.GiveKeyword("g1_08");

			npc.Msg(L("Let's see... I can order one for you,<br/>but it'll take some time to arrive.<br/>I hope that's okay."));
		}
		else if (npc.HasKeyword("g1_08"))
		{
			npc.RemoveKeyword("g1_book1");
			npc.SendOwl(this.Id, OwlDelay);

			npc.Msg(L("I'm sorry!<br/>The book still isn't in stock."));
			npc.Msg(L("Hmm, how about this. I'll send you an owl when the book arrives.<br/>That would be better, right?"));
		}

		return HookResult.Break;
	}
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");
			
			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. 7
0
	public async Task<HookResult> TalkRanald(NpcScript npc, params object[] args)
	{
		if(!npc.QuestActive(this.Id))
			return HookResult.Continue;
	
		return await LearnDefense(npc);
	}
Esempio n. 8
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;
	}
	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;
	}
Esempio n. 10
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;
	}
Esempio n. 11
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. 12
0
    //    Vector3 postBearCubPosition;
    // The start function can be used for initiation
    void Start()
    {
        if (charIdentifier == "BearCub")
        questReliantScript = questReliantNPC.GetComponent<NpcScript> ();

        doesCharHaveItemReq = false;
        doesCharHaveItemUnreq = false;
        myTransform = GetComponent<Transform> ();
    }
Esempio n. 13
0
	public async Task<HookResult> RanaldKeywords(NpcScript npc, params object[] args)
	{
		var keyword = args[0] as string;
		
		if(npc.QuestCompleted(this.Id) || keyword != "about_skill")
			return HookResult.Continue;
	
		return await LearnDefense(npc);
	}
Esempio n. 14
0
 void ScriptAttacher()
 {
     beaverScript = beaver.GetComponent<NpcScript> ();
     motherBearScript = motherBear.GetComponent<NpcScript> ();
     foxScript = fox.GetComponent<NpcScript> ();
     foxChatScrupt = fox.GetComponent<NewChatScript> ();
     bearCubScript = bearCub.GetComponent<NpcScript> ();
     bearChatScript = motherBear.GetComponent<NewChatScript> ();
 }
Esempio n. 15
0
	public async Task<HookResult> AfterIntro(NpcScript npc, params object[] args)
	{
		if(npc.DoingPtjForNpc() && npc.ErinnHour(Report, Deadline))
		{
			await AboutArbeit(npc);
			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;
	}
	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> DuncanBeforeKeywords(NpcScript npc, params object[] args)
	{
		var keyword = args[0] as string;
		if (keyword != "g1_goddess")
			return HookResult.Continue;

		npc.Msg(L("You want to know of the Goddess Morrighan?<br/>If it's about the Goddess, you're better off speaking to Meven..."));

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

		if (keyword == "g1_goddess_morrighan2")
		{
			if (npc.HasKeyword("g1_30"))
			{
				npc.RemoveKeyword("g1_30");
				npc.GiveKeyword("g1_31");

				npc.Msg(Hide.Name, L("(You tell Duncan about the experience Tarlach had in Tir Na Nog.)"));
				npc.Msg(L("Is that what happened to Tarlach?<br/>That's unbelievable.<br/>But I suppose there's no choice but to believe him. Hmmm."));
				npc.Msg(L("There is one more thing I'd like to tell you.<br/>What I'm about to tell you is a secret I've kept all my life,<br/>so promise me you won't tell anyone else, okay?"));
				npc.Msg(L("You said Mores tried to save<br/>Tarlach and his friends at the last minute when they went to Tir Na Nog, right?"));
				npc.Msg(L("I'm sure that wasn't because of Tarlach."));
				npc.Msg(L("Mari. It was because of Mari.<br/>Mari was Mores's only daughter.<br/>Mores recognized that fact."), npc.Image("g1_ch27_mari"));
				npc.Msg(L("I knew his wife Shiela before she passed away.<br/>She was killed by humans instigated by nobles,<br/>but Mari was sent to me with the help of the wolves and deer."));
				npc.Msg(L("Mari's memory of her parents<br/>was personally erased by her mother."));
				npc.Msg(L("It would mean death for her to<br/>remember her parents."));
				npc.Msg(L("So I raised Mari myself."));
				npc.Msg(L("Yes, I think I've told you enought about this story."));
				npc.Msg(L("Hmm. Everything else fits into the story except<br/>the Goddess.<br/>You don't aactually agree with Tarlach<br/>about the Goddess, do you?"));
				npc.Msg(L("Ask the other people.<br/>Don't tell them what you think, but just listen<br/>to see if the Goddess is someone who'd betray humankind."));
			}

			npc.Msg(L("I'll remind you one more time.<br/>Please keep what I told you about Mari a secret."));

			return HookResult.Break;
		}
		else if (keyword == "g1_request_from_goddess")
		{
			var owlDelay = 36 * 60; // 1 Erinn day
			if (IsEnabled("ShorterWaitTimesChapter1"))
				owlDelay = 4 * 60;

			npc.SendOwl(this.Id, owlDelay);

			npc.RemoveKeyword("g1_32");
			npc.GiveKeyword("g1_33");
			npc.RemoveKeyword("g1_request_from_goddess");
			npc.GiveKeyword("g1_way_to_tirnanog1");

			npc.Msg(L("You dreamt of the Goddess again?<br/>The Goddess said that the day of Glas Ghaibhleann's resurrection is approaching?"));
			npc.Msg(L("It's just as I'd thought... Is Mores<br/>behind the resurrection of Glas Ghaibhleann?<br/>We don't even have the slightest clue what to do about it yet.<br/>This is a big problem!"));
			npc.Msg(L("I think I forgot to tell you this,<br/>Magic doesn't work on Adamantium,<br/>so it's difficult to fuse to a magical creature."));
			npc.Msg(L("That's why special ingredients are required.<br/>They say that the soul of a brave human is needed as an ingredient."));
			npc.Msg(L("It's possible that they may already have the soul<br/>of one of the Three Missing Warriors.<br/>Then this is truly a big problem.<br/>We have to stop them somehow."));
			npc.Msg(L("Now hurry up and find out how to get there!"));

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
Esempio n. 20
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;
	}
Esempio n. 21
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;
	}
Esempio n. 22
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> 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;
	}
Esempio n. 24
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;
	}
Esempio n. 25
0
	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;
	}
	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;
	}
Esempio n. 27
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;
	}
Esempio n. 28
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.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;
	}
	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;
	}
Esempio n. 31
0
    public async Task <HookResult> TalkConor(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk_conor") && npc.HasItem(50707))
        {
            npc.FinishQuest(this.Id, "talk_conor");

            npc.RemoveItem(50707);             // Cacao Chocolate Cake
            npc.Msg(Hide.Name, "You present the cake to Conor,<br/>You explain that its from Abbey.");
            npc.Msg("Abbey?!<br/>Really? I never knew she felt that way about me...");
            npc.Msg("I'm sorry... I'm really happy.<br/>Thank you for the cake.");

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

        if (keyword == "g1_bone_of_glasgavelen")
        {
            npc.Msg(L("Of course, Glas Ghaibhleann's Bones..."));
            npc.Msg(L("After such a long time some bones will be missing or broken,<br/>and must be replaced with something...<br/>like Adamantium..."));
            npc.Msg(L("I don't know much about this topic, maybe Tarlach has more information."));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Esempio n. 33
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);
    }
Esempio n. 34
0
    public async Task <HookResult> TalkMless(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk_mless"))
        {
            npc.FinishQuest(this.Id, "talk_mless");
            npc.CompleteQuest(this.Id);
            npc.Msg("Ah... it's you, <username/>. Now that was a worthy combat...<br/>As promised, I will bestow upon you now the power of Dark Knight.");
            npc.Msg("Continue to hone your strength through the power of your transformation...");
            npc.End();

            return(HookResult.End);
        }

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

            npc.Msg("Ah, it's <username/>.<br/>Your Compose rank is already at E... You're pretty good.");
            npc.Msg("Open the Quest window and press Mission Complete!<br/>The owl will deliver the book to you.");
            npc.Msg("Keep practicing!<br/>Write a song about me, too!");

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Esempio n. 36
0
    public async Task <HookResult> AfterIntro(NpcScript npc, params object[] args)
    {
        // Call PTJ method after intro if it's time to report
        int report, deadline;

        GetPersonalReportAndDeadline(npc, out report, out deadline);
        if (npc.DoingPtjForNpc() && npc.ErinnHour(report, deadline))
        {
            await AboutArbeit(npc);

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Esempio n. 37
0
    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(18014, 1);

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

        return(HookResult.Break);
    }
Esempio n. 38
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);
    }
Esempio n. 39
0
    public async Task <HookResult> TalkAbbey(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk_abbey") && npc.HasItem(50707))
        {
            npc.FinishQuest(this.Id, "talk_abbey");

            npc.RemoveItem(50707);             // Cacao Chocolate Cake
            npc.Msg(Hide.Name, "You present the cake to Abbey,<br/>You explain that its from Conor.");
            npc.Msg("Another cake?<br/>That's sweet of him...<br/>I feel like I should do something for him.");
            npc.Msg("Anyways, thank you for the cake.");

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

        if (keyword == "g1_memo_of_lost_thing")
        {
            npc.Msg(L("Hmm? Who picked it up just now?<br/>Priestess Kristel was looking for such an item, so I gave it to her."));
            npc.Msg(L("A Priestess wouldn't have any reason to lie<br/>Is there a problem?"));
            npc.Msg(L("Why don't you speak to her at the Temple?"));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Esempio n. 41
0
    public async Task <HookResult> TalkAbbey(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk_abbey") && npc.HasItem(50707))
        {
            npc.FinishQuest(this.Id, "talk_abbey");

            npc.RemoveItem(50707);             // Cacao Chocolate Cake
            npc.Msg(Hide.Name, "You present the cake to Abbey,<br/>You explain that its from Conor.");
            npc.Msg("Conor did...?<br/>Wow, I didn't realize he felt that way about me...");
            npc.Msg("I'm really happy to know that.<br/>Thank you for the cake.");

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

            // Unofficial
            npc.Msg("Ah, my armor. Thank you, <username/>.");
            //npc.RemoveItem(70002); // Full Ring Mail to be Delivered

            return(HookResult.Break);
        }

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

            npc.Msg(L("Is there another volume to this book...?<br/>I'm not sure.<br/>Based on the introduction, it seems likely..."));
            npc.Msg(L("I've learned that this book is very popular amongst high-ranking Fomors.<br/>I only found that out while I was translating the book."));
            npc.Msg(L("Sorry I'm not much help<br/>Maybe Aeira knows something about this.<br/>When it comes to books, no one's more knowledgable than her."));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Esempio n. 44
0
    private void LassarFinish(NpcScript npc)
    {
        npc.Player.RemoveKeyword("g1_black_rose");
        npc.Player.RemoveKeyword("g1_17_3");
        npc.Player.RemoveKeyword("g1_17_4");
        npc.Player.GiveKeyword("g1_17_5");

        npc.Player.RemoveItem(HolyWater);
        npc.Player.Notice(L("You have given Holy Water of Lymilark to Lassar."));

        npc.Player.SendOwl(210023, OwlDelay);         // Receive the Requested Object

        npc.Msg(L("Yes, this should be enough.<br/>It's almost ready. Once it forms the proper shape, I'll let you know via an owl. Hahaha.<br/>Owls don't fly into buildings so<br/>don't forget to check the sky outside."));
        npc.Msg(L("Now, will you excuse me?"));
    }
Esempio n. 45
0
    public async Task <HookResult> TalkConor(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk_conor") && npc.HasItem(50707))
        {
            npc.FinishQuest(this.Id, "talk_conor");

            npc.RemoveItem(50707);             // Cacao Chocolate Cake
            npc.Msg(Hide.Name, "You present the cake to Conor,<br/>You explain that its from Abbey.");
            npc.Msg("Another cake?<br/>Perhaps I should return the favor one day...");
            npc.Msg("Anyways, thank you for the cake.");

            return(HookResult.Break);
        }
        return(HookResult.Continue);
    }
Esempio n. 46
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, "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. 47
0
    public async Task <HookResult> GoroAfterIntro(NpcScript npc, params object[] args)
    {
        if (!npc.QuestActive(this.Id) || !npc.HasItem(GorosRing))
        {
            return(HookResult.Continue);
        }

        npc.CompleteQuest(this.Id);
        npc.RemoveItem(GorosRing);

        npc.Msg(Hide.Name, L("(You give Goro his ring.)"));
        npc.Msg(L("Thank you, I'll now read it to you..."));
        npc.Msg(L("'Dul Brau Dairam Shanon' means 'Goddess, lend me the moonlight.'"));

        return(HookResult.Break);
    }
    public async Task <HookResult> AeiraAfterIntro(NpcScript npc, params object[] args)
    {
        if (npc.Player.QuestActive(this.Id, "talk_aeira"))
        {
            npc.Player.CompleteQuest(this.Id);
            npc.Player.SendOwl(210008, OwlDelay2);             // Find the Book of Revenge, Vol. III

            npc.Msg(L("Since you're looking for volume 3, I'm guessing you already<br/>found volume 2? I'm afraid I haven't heard anything about volume 3 just yet."));
            npc.Msg(L("It's turning out to be a lot harder to find the last volume.<br/>My distributor has been absolutely useless, and Eavan says<br/>she hasn't come across such a book. Even Leslie says she<br/>doesn't know anything. Same with Stewart."));
            npc.Msg(L("I've asked everywhere, but I don't know how long it will take.<br/>I'm afraid you're going to have to be patient. But even if<br/>you're patient, I just don't have any confidence that I'll<br/>be able to find it..."));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Esempio n. 49
0
    public async Task <HookResult> RanaldAfterIntro(NpcScript npc, params object[] args)
    {
        if (!npc.Player.QuestActive(this.Id, "ptj2"))
        {
            return(HookResult.Continue);
        }

        npc.Player.FinishQuestObjective(this.Id, "ptj2");
        npc.Player.GiveItem(Anthology);

        npc.Msg(L("You are working for Caitin now?<br/>Then, can you do me a favor? Please give this to her for me."));
        npc.Msg(Hide.Name, L("(Received an Anthology.)"));
        npc.Msg(L("I borrowed this from her,<br/>but don't have time to return it right now."));

        return(HookResult.Break);
    }
Esempio n. 50
0
    public async Task <HookResult> TalkConor(NpcScript npc, params object[] args)
    {
        if (npc.QuestActive(this.Id, "talk_conor"))
        {
            npc.FinishQuest(this.Id, "talk_conor");

            npc.Msg(Hide.Name, "You tell Conor that you delivered the cake.");
            npc.Msg("It seemed that she liked it right?<br/>She even said that she should return the favor?");
            npc.Msg("Well, I'm glad to hear that's the case.<br/>Do you think you could help me make another cake tomorrow?");
            npc.Msg("Oh right, its not much, but take these for your trouble.");
            npc.Msg("Thanks again for the help.");

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

            npc.Msg(L("Ah! I've been waiting!<br/>I have good news."));
            npc.Msg(L("I found out where you can find volume 3<br/>of that Fomor book you've been looking for,<br/>Lassar, the magic instructor at the school in<br/>Tir Chonaill has it. You know her, don't you?"));
            npc.Msg(L("She came by looking for a particular book recently<br/>and while we were chatting, I snuck in a question<br/>about your own search. She says she has the third<br/>colume of 'The Book of Revenge!' An original copy<br/>in the Fomor language, no less!"));
            npc.Msg(L("You should hurry up and see here. Good luck!"));

            return(HookResult.Break);
        }

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

            npc.GiveItem(BookOfRevenge3);
            npc.Notice(L("You have received The Book of Revenge, Vol. III from Seumas."));

            npc.Msg(L("Oh, that was fast, <username/>...<br/>Did Sion like it? Hah... Thank you...<br/>Here...is the...book...<br/>Hope it would be helpful..."));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Esempio n. 53
0
    public async Task Class1_3(NpcScript npc)
    {
        npc.Msg(L("Then let's begin the class. I need you to sit up and focus.<br/>HP is the basic parameter.<br/>What happens when you run out of HP?<br/>You lose consciousness. But don't worry. You are not dead yet..."));
        npc.Msg(L("<image name='HP'/>Just like Stamina, the HP bar also has a black region that cannot be recovered by resting.<br/>That represents how serious your wound is."));
        npc.Msg(L("<image name='HP'/>Some enemies may injure you with their attacks.<br/>Bats and Mimics especially can cause injuries very easily. You need to be careful when you meet them.<br/>So, what if you ignored the wounds and fought on?"));
        npc.Msg(L("<image name='Die'/>That's what happens. You would even lose some EXP. It hurts a lot."));
        npc.Msg(L("Wounds can be cured by simply using the Resting skill or the First Aid skill.<br/>In other words, make sure to take a rest whenever you get wounded."));
        npc.Msg(L("But resting too much in a dungeon may backfire.<br/>What do you think will happen if you just take a quick break after a battle without even checking your HP bar and face another monster right away?"));
        npc.Msg(L("<image name='Die'/>Again, this would happen."));
        npc.Msg(L("You can't cure your wounds by resting in a dungeon. Probably because of the cold temperature inside.<br/>But a campfire will help you recover. Someone who knows how to start a campfire may be good company for you."));
        npc.Msg(L("Now, like I said, I'm giving you homework.<br/>Gather nails that are dangerously protruding from objects around the town.<br/>You must have seen many people hitting a variety of objects to get small gems."));
        npc.Msg(L("Anyone learning how to fight should first think about how to serve others.<br/>There's no way you can follow them one by one and stop them from doing stupid things,<br/>but you can help them by removing nails from those objects they hit.<br/>At least, they won't get hurt by them. Just hit the objects a few times and get the nails from them."));
        npc.Msg(L("Get me 10 nails and you're done for the day.<br/>Cheating is not allowed. Nails from other people don't count.<br/>Get them on your own.<br/>Now, go!"));

        npc.StartQuest(200040);         // Basic Combat 1 Mission
    }
Esempio n. 54
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(L("You brought the cobwebs! Thank you."));
            npc.Msg(L("Cobwebs are used to make Fine Yarn.<br/>The cobwebs dropped by the spiders in TirChonaill are sturdier than usual, so they're great for making strings."));
            npc.Msg(L("If you're interested in making thread,<br/>come and talk to me with the keyword 'Skill' after gathering Cobwebs.<br/>I'll tell you about the Weaving skill."));

            return(HookResult.Break);
        }

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

            npc.RemoveItem(FathersGift);
            npc.Notice(L("You have given Father's Gift to Sion."));

            npc.Msg(L("... What's this?<br/>Eh, a present from dad?<br/>Wow, thank you!"));

            return(HookResult.Break);
        }

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

            npc.Msg(L("Welcome to Dunbarton.<br/>My name is Eavan, the Town Office worker who takes care of all the business related to the Adventurer's Association."));
            npc.Msg(L("<username/>, your outstanding achievements are already well-known<br/>all around the Adventurers' Association."));
            npc.Msg(L("I'm certain that all the hardships you went through<br/>will help you during your stay<br/>here on Erinn."));
            npc.Msg(L("You've done very well."));

            return(HookResult.Break);
        }

        return(HookResult.Continue);
    }
Esempio n. 57
0
    public async Task <HookResult> TarlachBearBeforeGift(NpcScript npc, params object[] args)
    {
        if (!npc.HasKeyword("g1_01") || npc.Favor < 15)
        {
            return(HookResult.Continue);
        }

        npc.RemoveKeyword("g1_01");
        npc.GiveKeyword("g1_02");
        npc.GiveKeyword("g1_tarlach1");

        npc.Msg(Hide.Name, L("(The bear is writing something in the snow.)"));
        npc.Msg(Hide.Name, L("(Tar...)<p/>(Tar... la... ch.)<p/>(The bear writes the word 'Tarlach' and stares at you.)<p/>(Tarlach...)<p/>(It seems to be someone's name.)"));

        return(HookResult.Break);
    }
Esempio n. 58
0
        /// <summary>
        /// Starts session
        /// </summary>
        /// <param name="target"></param>
        /// <param name="creature"></param>
        private bool Start(NPC target, Creature creature)
        {
            this.Target = target;

            if (target.ScriptType == null)
            {
                return(false);
            }

            var script = Activator.CreateInstance(target.ScriptType) as NpcScript;

            script.NPC    = target;
            script.Player = creature;
            this.Script   = script;
            return(true);
        }
Esempio n. 59
0
    public async Task <HookResult> ClientAfterIntro(NpcScript npc, params object[] args)
    {
        if (!npc.QuestActive(this.Id, "ptj1"))
        {
            return(HookResult.Continue);
        }

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

        npc.Player.GiveItem(ItemId);
        npc.Notice(LReceivedNotice);

        ClientAfterIntroDialogue(npc);

        return(HookResult.Break);
    }
Esempio n. 60
0
    public virtual async Task <HookResult> ClientAfterIntro(NpcScript npc, params object[] args)
    {
        if (!npc.Player.QuestActive(this.Id, "ptj1"))
        {
            return(HookResult.Continue);
        }

        npc.Player.FinishQuestObjective(this.Id, "ptj1");

        npc.Player.RemoveItem(ItemId, 1);
        npc.Player.Notice(LItemNotice);

        AfterIntroDialogue(npc);

        return(HookResult.Break);
    }