本文整理汇总了C#中NpcScript.QuestActiveUncompleted方法的典型用法代码示例。如果您正苦于以下问题:C# NpcScript.QuestActiveUncompleted方法的具体用法?C# NpcScript.QuestActiveUncompleted怎么用?C# NpcScript.QuestActiveUncompleted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NpcScript
的用法示例。
在下文中一共展示了NpcScript.QuestActiveUncompleted方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BeforeKeywords
public async Task<HookResult> BeforeKeywords(NpcScript npc, params object[] args)
{
var keyword = args[0] as string;
if (keyword != "about_study")
return HookResult.Continue;
var stateName = "LassarClassState";
var lastName = "LassarClassLast";
var state = (int)npc.Player.Vars.Perm.Get(stateName, 0);
var last = (string)npc.Player.Vars.Perm.Get(lastName, "never");
var now = ErinnTime.Now;
var today = now.ToString("yyyy-MM-dd");
var start = 7;
var end = 23;
var remaintime = end - now.Hour;
var lastState = 8;
if (npc.QuestActiveUncompleted(200029))
{
npc.Msg(L("Haven't you finished the assignment I gave you?<br/>Well... Don't tell me you haven't received the assignment yet?<br/>It's been a long time since I sent it by an owl!"));
npc.Msg(L("Well, this assignment has no deadline,<br/>so you can take your time."));
}
else if (state > lastState)
{
npc.Msg(L("<username/>, you have already completed the Basic Sorcery.<br/>From now on, you should find ways to study on your own."));
}
else if (last == today)
{
npc.Msg(L("Hmm... Now is not the right time to talk about it.<br/>Today's magic classes are all finished.<br/>Come back later. Shall we say... around when the shadow points north, northwest?"));
}
else if (now.Hour < start || now.Hour >= end)
{
npc.Msg(L("Class has started long ago.<br/>You should come back later."));
}
else
{
var exp = 0;
var cost = 0;
var msg = "";
var name = "";
var title = L("The Basics of Magic and Understanding of Mana");
var paydesc = "";
var reward = "";
var desc = "";
var func = (Func<NpcScript, Task>)null;
switch (state)
{
case 0:
exp = 30;
cost = 4000;
msg = L("Are you going to take a magic class?<br/>Then, how about this course?<br/>Tuition is a lump sum that includes three days of lessons including today.<br/>This tuition covers up to the end of Basic Sorcery Chapter One.");
name = L("Basic Sorcery 1-1");
paydesc = L("Total tuition for three days is 4000G.");
reward = L("* Icebolt Spell<br/>* EXP Reward");
desc = L("The first thing you learn about and use in the three classes in Basic Sorcery Chapter One is Mana, which is the most fundamental element in magic.");
func = Class1_1;
break;
case 1:
exp = 30;
msg = L("Hee hee.<br/>You are here for a class. <username/>?<br/>How was the class yesterday?<br/>We'll start as soon as we're ready.");
name = L("Basic Sorcery 1-2");
paydesc = L("Already paid.");
reward = L("* Icebolt Spell<br/>* EXP Reward");
desc = L("The second of the three classes in Basic Sorcery Chapter One, you learn how to distinguish magic by its domain and learn about the Elementals.");
func = Class1_2;
break;
case 2:
exp = 100;
msg = L("You're already here for the last class of the first chapter, <username/>.<br/>The class is not only for gaining spells.<br/>One of the advantages of taking classes is gaining knowledge and experiences to use magic correctly and effectively<br/>without additional training. Do you want to take the class?");
name = L("Basic Sorcery 1-3");
title = L("Icebolt Magic Practice");
paydesc = L("Already paid.");
reward = L("* Icebolt Spell<br/>* EXP Reward");
desc = L("The last thing you learn in the three classes of Basic Sorcery Chapter One is how to cast Icebolt magic.");
func = Class1_3;
break;
case 3:
exp = 50;
cost = 4000;
msg = L("Oh. You took the first chapter of Basic Sorcery before.<br/>Was the class helpful?<br/>I hope you do well in this chapter too.<br/>To learn this chapter, you have to pay the tuition now. Hee hee.");
name = L("Basic Sorcery 2-1");
title = L("How to Cast Icebolt Consecutively");
paydesc = L("Total tuition for three days is 4000G.");
reward = L("* Firebolt Spell<br/>* EXP Reward");
desc = L("In the first lesson of the three classes in Basic Sorcery Chapter Two, designed to improve the understanding of Ice elemental magic, you learn how to cast Icebolt magic consecutively and what to watch out for.");
func = Class2_1;
break;
case 4:
exp = 50;
msg = L("Hee hee. You came here to take the class, right?");
name = L("Basic Sorcery 2-2");
title = L("Strategic Use of Icebolt Magic");
paydesc = L("Already Paid.");
reward = L("* Firebolt Spell<br/>* EXP Reward");
desc = L("In the second lesson of the three classes in Basic Sorcery chapter two, you learn how to employ Icebolt spells effectively in real combat situations.");
//.........这里部分代码省略.........
示例2: BeforeKeywords
public async Task<HookResult> BeforeKeywords(NpcScript npc, params object[] args)
{
var keyword = args[0] as string;
if (keyword != "about_study")
return HookResult.Continue;
var stateName = "RanaldClassState";
var lastName = "RanaldClassLast";
var state = (int)npc.Player.Vars.Perm.Get(stateName, 0);
var last = (string)npc.Player.Vars.Perm.Get(lastName, "never");
var now = ErinnTime.Now;
var today = now.ToString("yyyy-MM-dd");
var start = 9;
var end = 21;
var remaintime = end - now.Hour;
var lastState = 10;
if (npc.QuestActiveUncompleted(200040) || npc.QuestActiveUncompleted(200041) || npc.QuestActiveUncompleted(200028))
{
npc.Msg(L("Are you working on the assignment I gave you?<br/>You can't proceed to the next class unless you complete the assignment first."));
}
else if (state > lastState)
{
npc.Msg(L("I've got nothing more to teach you.<br/>But don't forget that you're still learning. Maintain your focus and keep up the good work."));
}
else if (last == today)
{
npc.Msg(L("Today's class is over.<br/>You can spend the rest of the day as you wish."));
}
else if (now.Hour < start)
{
// Unofficial
npc.Msg(L("This is not the time for class. Come back later."));
}
else if (now.Hour >= end)
{
npc.Msg(L("This is not the time for class. Come back tomorrow morning."));
}
else
{
var exp = 0;
var cost = 0;
var msg = "";
var name = "";
var title = L("A class for learning combat theory.");
var paydesc = "";
var reward = "";
var desc = "";
var func = (Func<NpcScript, Task>)null;
switch (state)
{
case 0:
exp = 30;
cost = 300;
msg = L("Are you interested in the combat class?<br/>If you're sick and tired of battles run by simple mouse clicks,<br/>my class is definitely worth spending some time and money on.");
name = L("Basic Combat 1-1");
paydesc = L("3-day course. Total tuition of 300G");
reward = L("* STR Increase<br/>* EXP Reward");
desc = L("A class for the basics of combat. The complete class is 3 hours long with a simple assignment in the last hour.");
func = Class1_1;
break;
case 1:
exp = 30;
msg = L("Uh? Hey, you're in my class, aren't you?<br/>Ready for the next class?<br/>The tuition was already paid last time, so you don't owe anything.");
name = L("Basic Combat 1-2");
paydesc = L("Total 300G for Tuition of 3-day Coursework (Already paid)");
reward = L("* STR Increase<br/>* EXP Reward");
desc = L("A class for learning basic combat. Today is our second class of the 3 hour course.");
func = Class1_2;
break;
case 2:
exp = 100;
msg = L("Today is the last day of Basic Combat 1.<br/>Do you want to take the class?");
name = L("Basic Combat 1-3");
paydesc = L("Total 300G for Tuition of 3-day Coursework (Already paid)");
reward = L("* STR Increase<br/>* EXP Reward");
desc = L("A class for learning basic combat. It's the last class of the 3. There will be an assignment at the end.");
func = Class1_3;
break;
case 3:
exp = 50;
cost = 500;
msg = L("This is the second class on Basic Combat.<br/>Are you ready to take it?");
name = L("Basic Combat 2-1");
paydesc = L("3-day course. Total tuition of 500G");
reward = L("* Defense Skill<br/>* STR Increase, EXP Reward");
desc = L("A class for learning about the Defense skill. The complete class is comprised of 3 sessions with a simple assignment at the end.");
func = Class2_1;
break;
case 4:
exp = 50;
msg = L("Did you watch a fox defending itself?<br/>Then, let's start the next class.");
name = L("Basic Combat 2-2");
paydesc = L("Total 500G for Tuition of 3-day Coursework (Already paid)");
reward = L("* Defense Skill<br/>* STR Increase, EXP Reward");
//.........这里部分代码省略.........