最终整理版

This commit is contained in:
2026-06-03 17:04:06 +08:00
commit 959055ce90
1240 changed files with 80570 additions and 0 deletions
+164
View File
@@ -0,0 +1,164 @@
extends NpcScript
#
func OnStart():
var questState : int = GetQuest(ProgressCommons.Quest.TUTORIAL)
match questState:
ProgressCommons.TUTORIAL.INACTIVE:
OnFirstMeeting()
ProgressCommons.TUTORIAL.INTRO_ITEMS_GIVEN:
OnSendToKaelForCheck()
ProgressCommons.TUTORIAL.POTION_GIVEN:
OnSendToKaelForCheck()
ProgressCommons.TUTORIAL.CLOTHES_GIVEN:
OnSendToKaelForCheck()
ProgressCommons.TUTORIAL.UI_EXPLAINED:
OnSendToKaelForCheck()
_:
Mes("你回来了。需要药剂,还是想问些城里的事?")
OnMainChoice()
# First meeting
func OnFirstMeeting():
var waterBottleID : int = DB.GetCellHash("Water Bottle")
var cactusSourCandyID : int = DB.GetCellHash("Cactus Sour Candy")
Mes("醒了?欢迎来到图利姆沙。")
Mes("你差一点就倒在城墙看不见的地方了。巡逻队在沙地边缘发现你时,你已经晒到说不出话。")
Mes("我是埃拉诺。先喝点水,再吃这块仙人掌酸糖。别急着站太久,你的身体还没完全缓过来。")
SetQuest(ProgressCommons.Quest.TUTORIAL, ProgressCommons.TUTORIAL.INTRO_ITEMS_GIVEN)
AddItem(waterBottleID)
AddItem(cactusSourCandyID)
OnFeelingChoice()
func OnFeelingChoice():
Choice("我好多了,谢谢。", OnFeelingBetter)
Choice("还是有点虚弱。", OnFeelingWeak)
func OnFeelingWeak():
var cactusDrinkID : int = DB.GetCellHash("Cactus Drink")
Mes("那再拿一杯仙人掌饮料。剩下的就只能靠时间了,亲爱的。")
SetQuest(ProgressCommons.Quest.TUTORIAL, ProgressCommons.TUTORIAL.POTION_GIVEN)
AddItem(cactusDrinkID)
OnFeelingBetter()
func OnFeelingBetter():
Mes("能回答问题就好。关于你为什么会独自出现在沙漠里,凯尔会继续问。")
Mes("他负责巡逻队的初步确认,也负责给刚恢复的人安排第一只同行宠物。")
OnSendToKaelForCheck()
func OnGiveStarterClothes():
var cottonShirtID : int = DB.GetCellHash("Cotton Shirt")
var linenShortsID : int = DB.GetCellHash("Shorts")
Mes("不管你从哪里来,能站起来就是好事。图利姆沙需要愿意帮忙的人。")
Mes("最近沙漠越来越不安稳。东边山里有一群迷信 卡奥雷 的狂热者,袭击旅人,甚至曾经差点冲破城墙。")
Mes("先把这身破布换掉吧。城里人会看衣服判断你是不是刚从沙地里被捡回来。")
SetQuest(ProgressCommons.Quest.TUTORIAL, ProgressCommons.TUTORIAL.CLOTHES_GIVEN)
AddItem(cottonShirtID, 1, "Used")
AddItem(linenShortsID, 1, "Used")
OnExplainUI()
func OnExplainUI():
Mes("放你到城里乱跑之前,我先讲几件保命的事。")
HighlightUI(UICommons.UITarget.STATINDICATOR)
Narrate("这些是你的关键状态。探索和战斗时要随时留意。")
HighlightUI(UICommons.UITarget.HEALTHBAR)
Narrate("生命值代表你还能承受多少伤害。")
HighlightUI(UICommons.UITarget.MANABAR)
Narrate("玛纳 支撑技能释放。玛纳 不足时,许多能力无法使用。")
HighlightUI(UICommons.UITarget.STAMINABAR)
Narrate("耐力影响奔跑、攻击和体力动作。耗尽后会明显变慢。")
HighlightUI(UICommons.UITarget.MENUINDICATOR)
Narrate("菜单可以查看背包、技能、任务、设置等信息。")
HighlightUI(UICommons.UITarget.ACTION_BAR)
Narrate("快捷栏可以放常用技能和物品。战斗时每一秒都很重要。")
HighlightUI(UICommons.UITarget.INVENTORY)
Narrate("背包窗口可以管理物品、装备、药剂和收集品。")
HighlightUI(UICommons.UITarget.NONE)
SetQuest(ProgressCommons.Quest.TUTORIAL, ProgressCommons.TUTORIAL.UI_EXPLAINED)
Action(OnMainChoice)
# Main choice loop
func HasAllIngredients() -> bool:
return HasItem(DB.GetCellHash("Maggot Slime"), 6) and HasItem(DB.GetCellHash("Water Bottle")) and HasItem(DB.GetCellHash("Cactus Drink"))
func OnMainChoice():
var sideQuestState : int = GetQuest(ProgressCommons.Quest.ELANORE_POTION)
if sideQuestState == ProgressCommons.ELANORE_POTION.STARTED and HasAllIngredients():
Choice("我带来了你要的材料。", OnPotionQuestTurnIn)
elif sideQuestState == ProgressCommons.ELANORE_POTION.STARTED:
Choice("药剂材料还差什么?", OnPotionQuestReminder)
else:
Choice("有什么我能帮忙的吗?", OnHelpWithPotions)
Choice("卡奥雷 是什么?", OnExplainKaore)
Choice("你是谁?", OnExplainSelf)
if GetQuest(ProgressCommons.Quest.TUTORIAL) >= ProgressCommons.TUTORIAL.ELANORE_DONE:
Choice("谢谢,我先走了。", Farewell)
# Help with potions
func OnHelpWithPotions():
Mes("当然。我经常给守卫和居民调制治疗药剂,伤口、脱水和轻度 卡奥雷 侵蚀都能先稳住。")
Mes("药剂需要材料。你刚恢复,先做点不太危险的收集工作,也能熟悉城外生态。")
Mes("我需要 6 份沙虫黏液、1 瓶水和 1 杯仙人掌饮料。带回来后,我会给你一瓶仙人掌药剂。")
SetQuest(ProgressCommons.Quest.ELANORE_POTION, ProgressCommons.ELANORE_POTION.STARTED)
if GetQuest(ProgressCommons.Quest.TUTORIAL) < ProgressCommons.TUTORIAL.ELANORE_DONE:
OnSendToKael()
else:
OnMainChoice()
func OnPotionQuestReminder():
Mes("还需要 6 份沙虫黏液、1 瓶水和 1 杯仙人掌饮料。收齐后再来找我。")
OnMainChoice()
func OnPotionQuestTurnIn():
Mes("谢谢你。这些材料够我马上调一批新的治疗药剂。")
Mes("在城门边帮人,比困在高塔或王宫里讨论规矩有用得多。图利姆沙的领导者真该多看看这里。")
RemoveItem(DB.GetCellHash("Maggot Slime"), 6)
RemoveItem(DB.GetCellHash("Water Bottle"))
RemoveItem(DB.GetCellHash("Cactus Drink"))
SetQuest(ProgressCommons.Quest.ELANORE_POTION, ProgressCommons.ELANORE_POTION.INACTIVE)
AddItem(DB.GetCellHash("Cactus Potion"))
OnMainChoice()
# What is 卡奥雷
func OnExplainKaore():
Mes("玛纳 是连接生命的能量。卡奥雷 则像腐败的 玛纳,它不滋养生命,只会扭曲、侵蚀,让生物变得狂躁甚至半死不活。")
LookAtNpc("Nina")
Mes("如果你想知道更多,去问我的学徒 妮娜。她守着城里的 灵魂石碑,对 玛纳 和 卡奥雷 的解释比我更系统。")
ResetCamera()
OnMainChoice()
# Who are you
func OnExplainSelf():
Mes("我是埃拉诺,图利姆沙和周边土地的 卡维。外人通常把我们称作德鲁伊。")
Mes("我所属的 卡乌马图阿 传承守护着很古老的知识。不过现在你不用背这些名词。先活下来,再慢慢了解这个世界。")
OnMainChoice()
func Farewell():
if randi() % 2:
Chat("出城前检查水和药。")
else:
Chat("别一个人硬闯沙暴。")
# Tutorial conclusion
func OnSendToKael():
Mes("我不能把你留在这里一整天。你需要在城里站稳脚跟。")
Mes("看守凯尔正负责城墙内侧的巡逻和仙人掌田。如果你想找点正经事做,先去见他。")
LookAtNpc("Kael")
Mes("他就在东北边,靠近几棵棕榈树。")
Mes("沿着这面墙走到拐角,再往上走就能看见他。")
ResetCamera()
SetQuest(ProgressCommons.Quest.TUTORIAL, ProgressCommons.TUTORIAL.ELANORE_DONE)
DisplayActions(["gp_interact", "gp_target"])
Narrate("靠近 角色 后使用互动键可以交谈,也可以先用目标键选中对象。")
func OnSendToKaelForCheck():
Mes("先去找凯尔。")
Mes("你的身体能不能撑住外面的风、你醒来前发生了什么、还有初始宠物的选择,都由他来说明。")
LookAtNpc("Kael")
Mes("他就在东北边,靠近几棵棕榈树。沿着这面墙走到拐角,再往上走就能看见他。")
ResetCamera()
DisplayActions(["gp_interact", "gp_target"])
Narrate("靠近凯尔后使用互动键交谈。")