当前位置: 首页>>代码示例>>C#>>正文


C# NpcScript.Msg方法代码示例

本文整理汇总了C#中NpcScript.Msg方法的典型用法代码示例。如果您正苦于以下问题:C# NpcScript.Msg方法的具体用法?C# NpcScript.Msg怎么用?C# NpcScript.Msg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NpcScript的用法示例。


在下文中一共展示了NpcScript.Msg方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: KristellAfterIntro

	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;
	}
开发者ID:aura-project,项目名称:aura,代码行数:31,代码来源:015_the_book_of_revenge_vol2.cs

示例2: TalkDeian

	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;
	}
开发者ID:xKamuna,项目名称:aura,代码行数:31,代码来源:202003_save_my_sheep.cs

示例3: TalkMalcolm

	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;
	}
开发者ID:tkiapril,项目名称:aura,代码行数:26,代码来源:202004_malcolms_ring.cs

示例4: TalkNpc

	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;
	}
开发者ID:tkiapril,项目名称:aura,代码行数:26,代码来源:202033_gathering_berries.cs

示例5: TalkNpc

	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;
	}
开发者ID:tkiapril,项目名称:aura,代码行数:26,代码来源:202035_sheep_shearing.cs

示例6: AeiraBeforeKeywords

	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;
	}
开发者ID:aura-project,项目名称:aura,代码行数:32,代码来源:005_the_land_of_eternity.cs

示例7: LassarAfterIntro

	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;
	}
开发者ID:aura-project,项目名称:aura,代码行数:13,代码来源:011_book_of_evil_2.cs

示例8: LearnDefense

	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;
	}
开发者ID:hzdlive,项目名称:aura-1,代码行数:13,代码来源:200007_go_to_school.cs

示例9: TarlachBearBeforeGift

	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;
	}
开发者ID:aura-project,项目名称:aura,代码行数:14,代码来源:002_the_three_missing_warriors.cs

示例10: AfterIntro

	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;
	}
开发者ID:aura-project,项目名称:aura,代码行数:14,代码来源:202043_talk_with_stewart.cs

示例11: GoroAfterIntro

	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;
	}
开发者ID:aura-project,项目名称:aura,代码行数:14,代码来源:008_goros_ring.cs

示例12: TarlachAfterIntro

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

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

		npc.Msg(L("...!<br/>Yes... that's it.<br/>The black rose I have been looking for..."));
		npc.Msg(L("No... it's different. This...<br/>is a new flower..."));
		npc.Msg(L("Thank you... <username/>...<br/>for helping me..."));
		npc.Msg(L("Then... please do me one more favor...<br/>Can you... deliver this rose to Kristell of Dunbarton?"));
		npc.Msg(L("...That would be all... thanks."));

		return HookResult.Break;
	}
开发者ID:aura-project,项目名称:aura,代码行数:15,代码来源:011_book_of_evil_2.cs

示例13: AeiraAfterIntro

	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;
	}
开发者ID:aura-project,项目名称:aura,代码行数:16,代码来源:016_investigating_the_book_of_revenge_vol3.cs

示例14: AfterIntro

	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 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;
	}
开发者ID:aura-project,项目名称:aura,代码行数:16,代码来源:202046_talk_with_eavan.cs

示例15: AfterIntro

	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;
	}
开发者ID:aura-project,项目名称:aura,代码行数:32,代码来源:stope_sion.cs


注:本文中的NpcScript.Msg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。