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


C# NpcScript.Button方法代码示例

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


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

示例1: TalkDuncan

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

示例2: DuncanBeforeKeywords

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

示例3: TalkTrefor

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

示例4: TalkNpc

	public async Task<HookResult> TalkNpc(NpcScript npc, params object[] args)
	{
		if (npc.QuestActive(this.Id, "talk_endelyon"))
		{
			npc.FinishQuest(this.Id, "talk_endelyon");

			npc.Msg("Ah, you're here.<br/>May the blessings of Lymilark be with you in every step of the way. There are some people who think it to be difficult.<br/>Just hold on to the instrument, and you'll be able to play a semblance of music.<br/>Of course, it requires hours of practice if you plan on bringing tears to your special someone.", npc.Button("End Conversation", "@end"));
			await npc.Select();

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

			return HookResult.End;
		}

		return HookResult.Continue;
	}
开发者ID:aura-project,项目名称:aura,代码行数:17,代码来源:202027_playing_instruments.cs

示例5: AboutArbeit

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

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

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

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

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

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

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

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

				npc.CompletePtj(reply);
				remaining--;

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

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

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

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

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

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

		if (await npc.Select() == "@accept")
		{
			npc.Msg(L("Thank you.<br/>Please take care of this on time."));
			npc.StartPtj(randomPtj);
		}
		else
		{
			npc.Msg(L("If you don't want to do it, then I guess that's that."));
		}
//.........这里部分代码省略.........
开发者ID:RageNTonic,项目名称:aura,代码行数:101,代码来源:church_endelyon.cs

示例6: AboutArbeit

	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("Do you need holy water?<br/>If you come after you have finished the work that you are doing now, I will give you a task that's related to holy water."));
			return;
		}

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

			// Check if report time
			if (!npc.ErinnHour(Report, Deadline))
			{
				if (result == QuestResult.Perfect)
					npc.Msg(L("You will have to wait a little longer for the deadline today."));
				else
					npc.Msg(L("It is not the deadline yet.<br/>Anyway, are you doing the work I have asked you to do?"));

				return;
			}

			// Report?
			npc.Msg(L("It is the deadline.<br/>Shall we see whether you have completed your tasks?"),
				npc.Button(L("Report Now"), "@report"),
				npc.Button(L("Report Later"), "@later")
				);

			if (await npc.Select() != "@report")
			{
				npc.Msg(L("Very well.<br/>But, please do report to me before the deadline."));
				return;
			}

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

				npc.Msg(npc.FavorExpression(), L("If you ignore the tasks you promised to carry out,<br/>I cannot help you much, either."));
				npc.ModifyRelation(0, -Random(3), 0);
			}
			// Low~Perfect result
			else
			{
				npc.Msg(L("Thank you for a job well done.<br/>For that, I have prepared a few things.<br/>I cannot part with all of them, but<br/>why don't you pick one that you like?"),
					npc.Button(L("Report Later"), "@later"),
					npc.PtjReport(result)
					);
				var reply = await npc.Select();

				// Report later
				if (!reply.StartsWith("@reward:"))
				{
					npc.Msg(npc.FavorExpression(), L("Hmm? Would you rather do it next time?<br/>Whatever works for you, then."));
					return;
				}

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

				// Result msg
				if (result == QuestResult.Perfect)
				{
					npc.Msg(npc.FavorExpression(), L("Thank you.<br/>You have not disappointed me, as expected."));
					npc.ModifyRelation(0, Random(3), 0);
				}
				else if (result == QuestResult.Mid)
				{
					npc.Msg(npc.FavorExpression(), L("It seems that you have not completely finished the given tasks.<br/>But, you also seem to have done your best, <username/>,<br/>so I will give you a reward for that."));
					npc.ModifyRelation(0, Random(1), 0);
				}
				else if (result == QuestResult.Low)
				{
					npc.Msg(npc.FavorExpression(), L("Pardon my criticism,<br/>but you seem to have neglected your tasks and focused on something else.<br/>I will give you a partial compensation."));
					npc.ModifyRelation(0, -Random(2), 0);
				}
			}
			return;
		}

		// Check if PTJ time
		if (!npc.ErinnHour(Start, Deadline))
		{
			npc.Msg(L("I appreciate your willingness to help,<br/>but it is not time yet for me to assign tasks."));
			return;
		}

		// Check if not done today and if there are jobs remaining
		if (!npc.CanDoPtj(JobType, remaining))
		{
			npc.Msg(L("There doesn't seem to be much else you can help with today.<br/>Let's talk again tomorrow."));
			return;
		}

		// Offer PTJ
//.........这里部分代码省略.........
开发者ID:aura-project,项目名称:aura,代码行数:101,代码来源:church_comgan.cs

示例7: AboutArbeit

	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("Are you working on a different part-time job?<br/>Well, then. Please help me in the future when you have a chance."));
			return;
		}

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

			// Check if report time
			if (!npc.ErinnHour(Report, Deadline))
			{
				if (result == QuestResult.Perfect)
					npc.Msg(L("Ah, you are here already?<br/>It's a little bit too early. Can you come back around the deadline?"));
				else
					npc.Msg(L("I hope you didn't forget what I asked you to do.<p/>Please have it done by the deadline."));
				return;
			}

			// Report?
			npc.Msg(L("Did you complete the task I requested?<br/>You can report now and finish it up,<br/>or you may report it later if you're not done yet."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later"));

			if (await npc.Select() != "@report")
			{
				npc.Msg(L("Please report before the deadline is over.<br/>Even if the work is not done, you should still report.<br/>Then I can pay you for what you've completed."));
				return;
			}

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

				npc.Msg(npc.FavorExpression(), L("Ha ha. This is a little disappointing.<br/>I don't think I can pay you for this."));
				npc.ModifyRelation(0, -Random(3), 0);
			}
			// Low~Perfect result
			else
			{
				npc.Msg(L("You are quite skillful, <username/>.<br/>Now there's nothing to worry about even if I get too much work. Ha ha.<br/>Please choose what you want. You deserve it.<br/>I'd like to give it to you as a compensation for your hard work."), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result));
				var reply = await npc.Select();

				// Report later
				if (!reply.StartsWith("@reward:"))
				{
					npc.Msg(L("Please report before the deadline is over.<br/>Even if the work is not done, you should still report.<br/>Then I can pay you for what you've completed."));
					return;
				}

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

				// Result msg
				if (result == QuestResult.Perfect)
				{
					npc.Msg(npc.FavorExpression(), L("Great! You have done well as I requested.<br/>I hope you can help me again next time."));
					npc.ModifyRelation(0, Random(3), 0);
				}
				else if (result == QuestResult.Mid)
				{
					npc.Msg(npc.FavorExpression(), L("Thank you. Although you didn't complete the job, you've done enough so far.<br/>But I'm sorry to tell you I must deduct a little from your pay."));
					npc.ModifyRelation(0, Random(1), 0);
				}
				else if (result == QuestResult.Low)
				{
					npc.Msg(npc.FavorExpression(), L("Hmm... It's not exactly what I expected, but thank you.<br/>I'm afraid this is all I can pay you."));
					npc.ModifyRelation(0, -Random(2), 0);
				}
			}
			return;
		}

		// Check if PTJ time
		if (!npc.ErinnHour(Start, Deadline))
		{
			npc.Msg(L("Hmm... It's not a good time for this.<br/>Can you come back when it is time for part-time jobs?"));
			return;
		}

		// Check if not done today and if there are jobs remaining
		if (!npc.CanDoPtj(JobType, remaining))
		{
			npc.Msg(L("I'm all set for today.<br/>Will you come back tomorrow?"));
			return;
		}

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

		// Msg is kinda unofficial, she currently says the following, and then
		// tells you you'd get Homestead seeds.
		npc.Msg(L("Are you here for a part-time job at my Inn again?"), npc.PtjDesc(randomPtj, L("Piaras's Inn Part-time Job"), L("Looking for help with delivering goods to Inn."), PerDay, remaining, npc.GetPtjDoneCount(JobType)));

		if (await npc.Select() == "@accept")
//.........这里部分代码省略.........
开发者ID:aura-project,项目名称:aura,代码行数:101,代码来源:inn_piaras.cs

示例8: AboutArbeit

	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("So, you want to work at a Healer's House, do you?<br/>I appreciate your enthusiasm, but finish the work you're doing first."));
			return;
		}

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

			// Check if report time
			if (!npc.ErinnHour(Report, Deadline))
			{
				if (result == QuestResult.Perfect)
					npc.Msg(L("It's not the deadline yet. Come back later.<p/>Alright. I'll see you later!"));
				else
					npc.Msg(L("I trust that your work is going well?"));

				return;
			}

			// Report?
			npc.Msg(L("So, do you want to wrap up today's work here?<br/>You can report and finish the work without completing it,<br/>but it's good to finish something you've started."),
				npc.Button(L("Report Now"), "@report"),
				npc.Button(L("Report Later"), "@later")
				);

			if (await npc.Select() != "@report")
			{
				npc.Msg(L("Alright! Go for it!<br/>I look forward to your report!"));
				return;
			}

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

				npc.Msg(npc.FavorExpression(), L("Weak.<br/>If you keep this up,<br/>you'll never get paid."));
				npc.ModifyRelation(0, -Random(3), 0);
			}
			// Low~Perfect result
			else
			{
				npc.Msg(L("Ha ha. I knew I was an excellent judge of character!<br/>Now, I should pay you for the work you have done, hmm? Take your pick here.<br/>I have to give to other workers, too, so don't even think about taking them all! Hahaha."),
					npc.Button(L("Report Later"), "@later"),
					npc.PtjReport(result)
					);
				var reply = await npc.Select();

				// Report later
				if (!reply.StartsWith("@reward:"))
				{
					npc.Msg(npc.FavorExpression(), L("Eh? What, are you going to just leave?"));
					return;
				}

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

				// Result msg
				if (result == QuestResult.Perfect)
				{
					npc.Msg(npc.FavorExpression(), L("Alright! Well done!<br/>You've worked hard."));
					npc.ModifyRelation(0, Random(3), 0);
				}
				else if (result == QuestResult.Mid)
				{
					npc.Msg(npc.FavorExpression(), L("Hmm. That's not quite enough.<br/>I'll deduct it from your pay."));
					npc.ModifyRelation(0, Random(1), 0);
				}
				else if (result == QuestResult.Low)
				{
					npc.Msg(npc.FavorExpression(), L("Is this the best you can do?<br/>Then I have no choice but to pay only a little."));
					npc.ModifyRelation(0, -Random(2), 0);
				}

				// Herbalism quest
				if (npc.GetPtjSuccessCount(JobType) >= 10 && !npc.HasSkill(SkillId.Herbalism) && !npc.HasQuest(200042) && !npc.HasQuest(200063))
				{
					// Unofficial/Copy of Dilys
					npc.Msg(L("Say, <username/>. Do you have any interest in learning Herbalism?<br/>You've been such a great help to me here, I thought you might be interested in becoming a healer.<br/>If you're interested in Herbalism, I have a favor to ask you.<br/>If you do it, then I'll teach you."), npc.Button(L("I will do it"), "@yes"), npc.Button(L("No, thanks"), "@no"));
					if (await npc.Select() == "@yes")
					{
						npc.SendOwl(200042); // Gather Base Herb (Manus)
						npc.Msg(L("You sound really interested in becoming a healer...<br/>If you step outside, an owl will deliver my request to you."));
					}
					else
					{
						npc.Msg(L("Really?<br/>Then, I will see you next time when you need another part-time job."));
					}
				}
			}
			return;
		}
//.........这里部分代码省略.........
开发者ID:aura-project,项目名称:aura,代码行数:101,代码来源:healer_manus.cs

示例9: AboutArbeit

	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("You seem to have another job. Don't you think you should finish that first?"));
			return;
		}

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

			// Check if report time
			if (!npc.ErinnHour(Report, Deadline))
			{
				if (result == QuestResult.Perfect)
				{
					npc.Msg(L("Now is not the time. Want to come back later?"));
				}
				else
				{
					npc.Msg(L("I trust that the work is going well?<p/>I'm getting worried for no reason."));
				}
				return;
			}

			// Report?
			npc.Msg(L("Did you finish today's work?<br/>If so, would you like to report now and wrap it up?"),
				npc.Button(L("Report Now"), "@report"),
				npc.Button(L("Report Later"), "@later")
				);

			if (await npc.Select() != "@report")
			{
				npc.Msg(L("I look forward to your work."));
				return;
			}

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

				npc.Msg(npc.FavorExpression(), L("*Sigh*<br/>If you're going to be like this, don't even start working next time."));
				npc.ModifyRelation(0, -Random(3), 0);
			}
			// Low~Perfect result
			else
			{
				npc.Msg(L("Wow, you're not bad at all. I thought it would be rather difficult for you.<br/>Ha. Then take your pick among these items.<br/>Thank you for the hard work, <username/>."),
					npc.Button(L("Report Later"), "@later"),
					npc.PtjReport(result)
					);
				var reply = await npc.Select();

				// Report later
				if (!reply.StartsWith("@reward:"))
				{
					npc.Msg(npc.FavorExpression(), L("Well, then I guess I'll see you next time.<br/>Someone else might take away all the good stuff in the meantime, though."));
					return;
				}

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

				// Result msg
				if (result == QuestResult.Perfect)
				{
					npc.Msg(npc.FavorExpression(), L("Wow, it's perfect!<br/>Thanks for the help."));
					npc.ModifyRelation(0, Random(3), 0);
				}
				else
				{
					// Nerys doesn't have any PTJ quests that could yield
					// mid/low results.
				}
			}
			return;
		}

		// Check if PTJ time
		if (!npc.ErinnHour(Start, Deadline))
		{
			npc.Msg(L("Come back during the business hours."));
			return;
		}

		// Check if not done today and if there are jobs remaining
		if (!npc.CanDoPtj(JobType, remaining))
		{
			npc.Msg(L("Today's work is done. Come back tomorrow."));
			return;
		}

		// Offer PTJ
		var randomPtj = npc.RandomPtj(JobType, QuestIds);
		var msg = "";
//.........这里部分代码省略.........
开发者ID:aura-project,项目名称:aura,代码行数:101,代码来源:wepshop_nerys.cs

示例10: AboutArbeit

	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("You have some other job?<br/>Shearing is the best part-time job.<br/>You'll understand once you try it."));
			return;
		}

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

			// Check if report time
			if (!npc.ErinnHour(Report, Deadline))
			{
				if (result == QuestResult.Perfect)
					npc.Msg(L("You still have time left.<br/>Come back later."));
				else
					npc.Msg(L("How's everything going?<br/>"));
				return;
			}

			// Report?
			npc.Msg(L("Did you finish shearing the sheep?<br/>Let me see if you're done.<br/>If not, you can report it to me later."), npc.Button(L("Report Now"), "@report"), npc.Button(L("Report Later"), "@later"));

			if (await npc.Select() != "@report")
			{
				npc.Msg(L("You can show me later if you're not done.<br/>But even if you are not done, don't forget to report it before the deadline.<br/>I'll just pay for what you have."));
				return;
			}

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

				npc.Msg(npc.FavorExpression(), L("Hey, this isn't enough...<br/>I won't pay you a penny."));
				npc.ModifyRelation(0, -Random(3), 0);
			}
			// Low~Perfect result
			else
			{
				npc.Msg(L("Wow, <username/>, you are quite a worker. Nicely done.<br/>I will give you anything you want from here as a bonus.<br/>But you'd better not complain about the selections!"), npc.Button(L("Report Later"), "@later"), npc.PtjReport(result));
				var reply = await npc.Select();

				// Report later
				if (!reply.StartsWith("@reward:"))
				{
					npc.Msg(L("You can show me later if you're not done.<br/>But even if you are not done, don't forget to report it before the deadline.<br/>I'll just pay for what you have."));
					return;
				}

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

				// Result msg
				if (result == QuestResult.Perfect)
				{
					npc.Msg(npc.FavorExpression(), L("Nice!<br/>Keep up the good work."));
					npc.ModifyRelation(0, Random(3), 0);
				}
				else if (result == QuestResult.Mid)
				{
					npc.Msg(npc.FavorExpression(), L("It's a little less than what you promised,<br/>but I guess it's not that bad. Good enough."));
					npc.ModifyRelation(0, Random(1), 0);
				}
				else if (result == QuestResult.Low)
				{
					npc.Msg(npc.FavorExpression(), L("Hey, this is it?<br/>There's no more? Then this is all I can give you."));
					npc.ModifyRelation(0, -Random(2), 0);
				}
			}
			return;
		}

		// Check if PTJ time
		if (!npc.ErinnHour(Start, Deadline))
		{
			npc.Msg(L("It's not time for part-time jobs yet.<br/>Come back later."));
			return;
		}

		// Check if not done today and if there are jobs remaining
		if (!npc.CanDoPtj(JobType, remaining))
		{
			npc.Msg(L("Ah, I have enough wool for the day.<br/>Want to try again tomorrow?"));
			return;
		}

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

		// Msg is kinda unofficial, she currently says the following, and then
		// tells you you'd get Homestead seeds.
		npc.Msg(L("Do you want a part-time shearing job?"), npc.PtjDesc(randomPtj, L("Shepherd Boy Deian's Shearing Part-Time Job"), L("Looking for material collectors."), PerDay, remaining, npc.GetPtjDoneCount(JobType)));

		if (await npc.Select() == "@accept")
//.........这里部分代码省略.........
开发者ID:RageNTonic,项目名称:aura,代码行数:101,代码来源:neighboring_deian.cs

示例11: AboutArbeit

	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("Are you working for someone else?<br/>Can you help me after you're finished?"));
			return;
		}

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

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

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

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

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

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

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

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

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

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

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

//.........这里部分代码省略.........
开发者ID:aura-project,项目名称:aura,代码行数:101,代码来源:healer_dilys.cs

示例12: AboutArbeit

	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("You seem to be working on something else already....<br/>It's probably a good idea to finish what you're working on first."));
			return;
		}

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

			// Check if report time
			if (!npc.ErinnHour(Report, Deadline))
			{
				if (result == QuestResult.Perfect)
				{
					npc.Msg(L("I'm a little busy right now. Would you mind coming back later?"));
				}
				else
				{
					npc.Msg(L("How's the work going? You'll be fine."));
				}
				return;
			}

			// Report?
			npc.Msg(L("Are you done with the task I gave you?<br/>If not, you can come back later."),
				npc.Button(L("Report Now"), "@report"),
				npc.Button(L("Report Later"), "@later")
				);

			if (await npc.Select() != "@report")
			{
				npc.Msg(L("Then please come back later."));
				return;
			}

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

				npc.Msg(npc.FavorExpression(), L("You didn't want to work, did you?<br/>I can't pay you, then."));
				npc.ModifyRelation(0, -Random(3), 0);
			}
			// Low~Perfect result
			else
			{
				npc.Msg(L("So... How shall I put this?<br/>This is a way of saying thank you for all the hard work you've done for me...<br/>Please pick something that you'll find useful."),
					npc.Button(L("Report Later"), "@later"),
					npc.PtjReport(result)
					);
				var reply = await npc.Select();

				// Report later
				if (!reply.StartsWith("@reward:"))
				{
					npc.Msg(npc.FavorExpression(), L("Yes, you can do it next time.<br/>I'll see you later."));
					return;
				}

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

				// Result msg
				if (result == QuestResult.Perfect)
				{
					npc.Msg(npc.FavorExpression(), L("Wow, thank you!<br/>Can you help me out again tomorrow?"));
					npc.ModifyRelation(0, Random(3), 0);
				}
				else
				{
					// Aeira doesn't have any PTJ quests that could yield
					// mid/low results.
				}
			}
			return;
		}

		// Check if PTJ time
		if (!npc.ErinnHour(Start, Deadline))
		{
			npc.Msg(L("Oh no. It's not time for a part-time job, yet.<br/>Please come back later."));
			return;
		}

		// Check if not done today and if there are jobs remaining
		if (!npc.CanDoPtj(JobType, remaining))
		{
			npc.Msg(L("I'm done for today!<br/>Please come again tomorrow."));
			return;
		}

		// Offer PTJ
		var randomPtj = npc.RandomPtj(JobType, QuestIds);
		var msg = "";
//.........这里部分代码省略.........
开发者ID:aura-project,项目名称:aura,代码行数:101,代码来源:bookstore_aeira.cs

示例13: LassarBeforeKeyword

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

		if (keyword == "g1_black_rose")
		{
			if (npc.HasKeyword("g1_17_2"))
			{
				npc.RemoveKeyword("g1_17_2");
				npc.GiveKeyword("g1_17_3");

				npc.Msg(L("Hmm. Priest Meven's favor?<br/>Why would he need something like that? Hehehe."));
				npc.Msg(L("Hmm, I don't know how this will sound<br/>but I need some Holy Water of Lymilark to grow this.<br/>Priest Meven used to supply me with it up until recently."));
				npc.Msg(L("I guess he got caught by Priestess Endelyon.<br/>He hasn't given me any for the past few days."));
				npc.Msg(L("If you have any Holy Water of Lymilark, could you give me a bottle?"), npc.Button(L("Here."), "@yes"), npc.Button(L("No"), "@no"));
				if (await npc.Select() != "@yes" || !npc.HasItem(HolyWater))
				{
					npc.Msg(L("I need some Holy Water of Lymilark to grow this, please come back once you have some."));
					return HookResult.Break;
				}

				LassarFinish(npc);

				return HookResult.Break;
			}
			else if (npc.HasKeyword("g1_17_3"))
			{
				npc.Msg(L("Did you get a bottle of Holy Water of Lymilark?"), npc.Button(L("Here."), "@yes"), npc.Button(L("No"), "@no"));
				if (await npc.Select() != "@yes" || !npc.HasItem(HolyWater))
				{
					npc.Msg(L("I need some Holy Water of Lymilark to grow this, please come back once you have some."));
					return HookResult.Break;
				}

				LassarFinish(npc);

				return HookResult.Break;
			}
		}

		return HookResult.Continue;
	}
开发者ID:aura-project,项目名称:aura,代码行数:42,代码来源:010_book_of_evil_1.cs

示例14: TarlachBeforeKeywords

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

		if (keyword == "g1_dulbrau1")
		{
			if (npc.HasItem(FomorMedal))
			{
				if (npc.HasKeyword("g1_13"))
				{
					npc.RemoveKeyword("g1_13");
					npc.GiveKeyword("g1_14");

					npc.Msg(L("'Goddess, lend me the moonlight...'<br/>That's what Goro said it means?<br/>The line 'Dul Brau Dairam Shanon?'"));
					npc.Msg(L("I can't say for sure that's it's a wrong interpretation but...<br/>it's slightly different from what I remember."));
				}

				npc.Msg(L("Could I take a look at this medal?"), npc.Button(L("Yes"), "@yes"), npc.Button(L("No"), "@no"));
				if (await npc.Select() != "@yes")
				{
					npc.Msg(L("I won't be able to teach you the meaning of this line without seeing the medal."));
					return HookResult.Break;
				}

				npc.RemoveItem(FomorMedal);
				npc.RemoveKeyword("g1_dulbrau1");
				npc.GiveKeyword("g1_dulbrau2");

				npc.Msg(L("Thank you, let's take a look.<br/>Hm... I see."));
				npc.Msg(L("The reason I am human during the night,<br/>is because of Eweca's moonlight and its magic power..."));
				npc.Msg(L("'Dul Brau Dairam Shanon' means,<br/>'Oh, Goddess. Please bestow me with your powers.'"));
				npc.Msg(L("This story...<br/>is straight from a Fomor who was practicing magic,<br/>so I am sure of it.<br/>..."));
				npc.Msg(L("Anyway, now you should know what this means.<br/>Fomors are coming to Erinn with the help of the Goddess.<br/>Yes, with the very power of the Goddess."));
				npc.Msg(L("Morrighan is assisting Fomors with their infiltration.<br/>Which is an unforgivable act.<br/>If you don't believe me, why don't you go ask Goro again?"));
			}
			else
			{
				npc.Msg(L("'Goddess, lend me the moonlight...'<br/>That's what Goro said it means?<br/>The line 'Dul Brau Dairam Shanon?'"));
				npc.Msg(L("I can't say for sure that's it's a wrong interpretation but...<br/>it's slightly different from what I remember."));
			}

			return HookResult.Break;
		}
		else if (keyword == "g1_dulbrau2")
		{
			npc.Msg(L("If you don't believe me, why don't you go ask Goro again?"));

			return HookResult.Break;
		}

		return HookResult.Continue;
	}
开发者ID:aura-project,项目名称:aura,代码行数:52,代码来源:008_goros_ring.cs

示例15: AboutArbeit

	public async Task AboutArbeit(NpcScript npc)
	{
		// Check if already doing another PTJ
		if (npc.DoingPtjForOtherNpc())
		{
			npc.Msg(L("You can do only one part-time job per day.<br/>You're done for the day, so find something else to do."));
			return;
		}

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

			// Check if report time
			if (!npc.ErinnHour(Report, Deadline))
			{
				if (result == QuestResult.Perfect)
					npc.Msg(L("What? Already finished everything?<br/>Man, that's the spirit.<br/>But there's still time left before the deadline.<br/>Come back a little later. Haha..."));
				else
					npc.Msg(L("Chopping enough firewood?"));
				return;
			}

			// Report?
			npc.Msg(L("Got enough firewood?<br/>Report to me later if you need more time.<br/>If you want to finish it now, I can pay for what you did so far."),
				npc.Button(L("Report Now"), "@report"),
				npc.Button(L("Report Later"), "@later")
				);

			if (await npc.Select() != "@report")
			{
				npc.Msg(L("Right. That's it.<br/>Things done by halves are never done right!<br/>Just finish it before the deadline."));
				return;
			}

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

				npc.Msg(npc.FavorExpression(), L("What is this? A joke?<br/>Don't even think about a payment!"));
				npc.ModifyRelation(0, -Random(3), 0);
			}
			// Low~Perfect result
			else
			{
				npc.Msg(L("Hear, Hear! <username/> just did another wonderful job!<br/>Outstanding, you are a lucky guy today. Just take anything you want from here. Haha!"),
					npc.Button(L("Report Later"), "@later"),
					npc.PtjReport(result)
					);
				var reply = await npc.Select();

				// Report later
				if (!reply.StartsWith("@reward:"))
				{
					npc.Msg(npc.FavorExpression(), L("What's this? Are you saying you don't like the reward<br/>Tracy the Lumberjack prepared for you?"));
					return;
				}

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

				// Result msg
				if (result == QuestResult.Perfect)
				{
					npc.Msg(npc.FavorExpression(), L("Hmm...<br/>Good! That's good enough."));
					npc.ModifyRelation(0, Random(3), 0);
				}
				else if (result == QuestResult.Mid)
				{
					npc.Msg(npc.FavorExpression(), L("Well, not bad.<br/>Put a little more effort next time."));
					npc.ModifyRelation(0, Random(1), 0);
				}
				else if (result == QuestResult.Low)
				{
					npc.Msg(npc.FavorExpression(), L("What... You think this is a joke?<br/>That's all I can pay.<br/>And I won't accept results like this next time."));
					npc.ModifyRelation(0, -Random(2), 0);
				}
			}
			return;
		}

		// Check if PTJ time
		if (!npc.ErinnHour(Start, Deadline))
		{
			npc.Msg(L("You want a logging job?<br/>This is not the right time. Come back later.<br/>When the shadow's in the northwest... I think 7 o'clock in the morning will do."));
			return;
		}

		// Check if not done today and if there are jobs remaining
		if (!npc.CanDoPtj(JobType, remaining))
		{
			npc.Msg(L("You can do only one part-time job per day.<br/>You're done for the day, so find something else to do."));
			return;
		}

		// Offer PTJ
		var randomPtj = npc.RandomPtj(JobType, QuestIds);
//.........这里部分代码省略.........
开发者ID:aura-project,项目名称:aura,代码行数:101,代码来源:woodcutting_tracy.cs


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