本文整理汇总了C#中NpcScript类的典型用法代码示例。如果您正苦于以下问题:C# NpcScript类的具体用法?C# NpcScript怎么用?C# NpcScript使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NpcScript类属于命名空间,在下文中一共展示了NpcScript类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: 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
示例2: 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
示例3: 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
示例4: 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
示例5: ElenKeywords
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;
}
开发者ID:RageNTonic,项目名称:aura,代码行数:25,代码来源:20006_elen_refine.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: 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
示例8: 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
示例9: TalkRanald
public async Task<HookResult> TalkRanald(NpcScript npc, params object[] args)
{
if(!npc.QuestActive(this.Id))
return HookResult.Continue;
return await LearnDefense(npc);
}
开发者ID:hzdlive,项目名称:aura-1,代码行数:7,代码来源:200007_go_to_school.cs
示例10: TalkDuncan
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;
}
开发者ID:ripxfrostbite,项目名称:aura,代码行数:34,代码来源:202006_duncans_call.cs
示例11: 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
示例12: Start
// 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> ();
}
开发者ID:Aidyy,项目名称:getting-home,代码行数:11,代码来源:NpcScript.cs
示例13: ScriptAttacher
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> ();
}
开发者ID:Aidyy,项目名称:getting-home,代码行数:9,代码来源:LevelScripter.cs
示例14: RanaldKeywords
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);
}
开发者ID:hzdlive,项目名称:aura-1,代码行数:9,代码来源:200007_go_to_school.cs
示例15: DuncanBeforeKeywords
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;
}
开发者ID:aura-project,项目名称:aura,代码行数:10,代码来源:004_the_story_of_the_goddess.cs
示例16: AfterIntro
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;
}
开发者ID:tkiapril,项目名称:aura,代码行数:10,代码来源:church_endelyon.cs
示例17: AfterIntro
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;
}
开发者ID:hzdlive,项目名称:aura-1,代码行数:10,代码来源:200024_caution_against_fire.cs
示例18: TalkNora
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;
}
开发者ID:aura-project,项目名称:aura,代码行数:10,代码来源:200009_lets_learn_the_resting_skill.cs
示例19: DuncanBeforeKeywords
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;
}
开发者ID:aura-project,项目名称:aura,代码行数:55,代码来源:021_the_pendant_from_goddess.cs
示例20: TalkDuncan
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;
}
开发者ID:hzdlive,项目名称:aura-1,代码行数:11,代码来源:duncans_praise.cs
注:本文中的NpcScript类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论