Lua接口/服务端函数索引/任务配置查询:修订间差异
来自天龙知识库
跳到导航跳到搜索
整理当前服务端 Lua 接口:注册名称、参数、返回值与调用说明 |
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
||
| (未显示另一用户的1个中间版本) | |||
| 第1行: | 第1行: | ||
__NOTOC__ | __NOTOC__ | ||
<div class="lua-reference | <div class="lua-reference"> | ||
[[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端调用约定|调用约定]] | [[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端调用约定|调用约定]] | ||
<div | <div class="lua-lead">任务配置查询:32 个接口,32 个调用名称,其中 30 个在当前脚本中有调用。</div> | ||
{| class="wikitable | {| class="wikitable" | ||
! scope="col" | ! scope="col" class="lua-w36" | 函数 / 别名 | ||
! scope="col | ! scope="col" | 调用与用途 | ||
|- | |- | ||
| [[Lua接口/服务端/GetNextMissionIndex|GetNextMissionIndex]] | |||
| <code>GetNextMissionIndex(missionIndex)</code><br />返回当前配表任务指向的下一任务索引。<br /><span class="lua-muted">脚本中 5 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TAddNumText|TAddNumText]] | |||
| <code>TAddNumText(sceneId, id, msg, state, index, issueScript)</code><br />向扩展任务缓冲写入编号、状态、索引、发布脚本和文本。<br /><span class="lua-muted">脚本中 33 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TAddText|TAddText]] | |||
| <code>TAddText(sceneId, msg)</code><br />向扩展任务缓冲写入一条纯文本。<br /><span class="lua-muted">脚本中 21 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TBeginEvent|TBeginEvent]] | |||
| <code>TBeginEvent(sceneId)</code><br />开始构造扩展任务事件列表,只重置当前使用数量。<br /><span class="lua-warn">脚本中未见调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TDispatchEventList|TDispatchEventList]] | |||
| <code>TDispatchEventList()</code><br />当前为空实现,调用不会派发扩展任务对话。<br /><span class="lua-muted">脚本中 14 处调用</span><br />'''空实现''' | |||
|- | |- | ||
| [[Lua接口/服务端/TEndEvent|TEndEvent]] | |||
| <code>TEndEvent()</code><br />结束扩展任务事件构造;不执行额外操作。<br /><span class="lua-muted">脚本中 3 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetAcceptNpcInfo|TGetAcceptNpcInfo]] | |||
| <code>TGetAcceptNpcInfo(missionIndex)</code><br />返回接取 NPC 的场景编号和名称。<br /><span class="lua-muted">脚本中 14 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetAwardExp|TGetAwardExp]] | |||
| <code>TGetAwardExp(missionIndex)</code><br />返回任务固定经验奖励,未找到时为 -1。<br /><span class="lua-muted">脚本中 5 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetAwardItem|TGetAwardItem]] | |||
| <code>TGetAwardItem(missionIndex)</code><br />返回五组固定奖励物品,总计 11 个数值。<br /><span class="lua-muted">脚本中 8 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetAwardMoney|TGetAwardMoney]] | |||
| <code>TGetAwardMoney(missionIndex)</code><br />返回任务固定金钱奖励,未找到时为 0。<br /><span class="lua-muted">脚本中 8 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetCheckInfo|TGetCheckInfo]] | |||
| <code>TGetCheckInfo(missionIndex)</code><br />返回任务等级限制和三个前置任务索引。<br /><span class="lua-muted">脚本中 6 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetCompleteNpcInfo|TGetCompleteNpcInfo]] | |||
| <code>TGetCompleteNpcInfo(missionIndex)</code><br />返回完成 NPC 的场景编号和名称。<br /><span class="lua-muted">脚本中 11 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetDefaultDesc|TGetDefaultDesc]] | |||
| <code>TGetDefaultDesc(missionIndex)</code><br />返回 Lua 默认任务在 NPC 上使用的第一段说明。<br /><span class="lua-warn">脚本中未见调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetDuologue|TGetDuologue]] | |||
| <code>TGetDuologue(sceneId, duologueIndex)</code><br />按对白索引返回 StorytellingDuologue.txt 中的完整文本。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetEnterAreaDesc|TGetEnterAreaDesc]] | |||
| <code>TGetEnterAreaDesc(missionIndex)</code><br />返回进入区域任务是否有说明、区域说明和提示文本。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetEnterAreaInfo|TGetEnterAreaInfo]] | |||
| <code>TGetEnterAreaInfo(missionIndex)</code><br />返回进入区域任务的数量及三组场景区域、事件区域。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetHideItem|TGetHideItem]] | |||
| <code>TGetHideItem(missionIndex)</code><br />返回三组隐藏奖励物品,总计 7 个数值。<br /><span class="lua-muted">脚本中 8 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetHusongAIType|TGetHusongAIType]] | |||
| <code>TGetHusongAIType(missionIndex)</code><br />返回护送任务 NPC 的 AI 类型。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetHusongPatrolPath|TGetHusongPatrolPath]] | |||
| <code>TGetHusongPatrolPath(missionIndex)</code><br />返回护送任务的巡逻路径编号。<br /><span class="lua-muted">脚本中 3 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetKillInfo|TGetKillInfo]] | |||
| <code>TGetKillInfo(missionIndex)</code><br />返回击杀任务的类型数和五组怪物名称、击杀数量。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetLimitedTimeInfo|TGetLimitedTimeInfo]] | |||
| <code>TGetLimitedTimeInfo(missionIndex)</code><br />返回限时任务的位置、持续时间及说明。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetLootItemInfo|TGetLootItemInfo]] | |||
| <code>TGetLootItemInfo(missionIndex)</code><br />返回收集物品任务的五组怪物和掉落参数。<br /><span class="lua-muted">脚本中 12 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetMissionDesc|TGetMissionDesc]] | |||
| <code>TGetMissionDesc(missionIndex)</code><br />返回任务的四段正文描述。<br /><span class="lua-muted">脚本中 11 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetMissionIdByIndex|TGetMissionIdByIndex]] | |||
| <code>TGetMissionIdByIndex(missionIndex)</code><br />将任务表索引转换为任务编号。<br /><span class="lua-muted">脚本中 54 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetMissionName|TGetMissionName]] | |||
| <code>TGetMissionName(missionIndex)</code><br />返回任务表首段显示文本,未找到时返回空串。<br /><span class="lua-muted">脚本中 52 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetRadioItem|TGetRadioItem]] | |||
| <code>TGetRadioItem(missionIndex)</code><br />返回五组随机奖励物品,总计 11 个数值。<br /><span class="lua-muted">脚本中 8 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetRelationShipAwardInfo|TGetRelationShipAwardInfo]] | |||
| <code>TGetRelationShipAwardInfo(missionIndex)</code><br />返回关系奖励位置、数值及说明。<br /><span class="lua-muted">脚本中 7 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetRelationShipPunishInfo|TGetRelationShipPunishInfo]] | |||
| <code>TGetRelationShipPunishInfo(missionIndex)</code><br />返回关系惩罚位置、数值及说明。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetSongXinInfo|TGetSongXinInfo]] | |||
| <code>TGetSongXinInfo(missionIndex)</code><br />返回送信任务的物品数量和五组三字段物品参数。<br /><span class="lua-muted">脚本中 4 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TGetTargetNpcInfo|TGetTargetNpcInfo]] | |||
| <code>TGetTargetNpcInfo(missionIndex)</code><br />返回送信或护送任务的目标 NPC 信息。<br /><span class="lua-muted">脚本中 11 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TIsHaveContinue|TIsHaveContinue]] | |||
| <code>TIsHaveContinue(missionIndex)</code><br />返回送信任务是否包含继续对话步骤。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/TIsMissionRoundable|TIsMissionRoundable]] | |||
| <code>TIsMissionRoundable(missionIndex)</code><br />返回任务是否允许循环完成;进入区域和护送任务固定返回 0。<br /><span class="lua-muted">脚本中 9 处调用</span> | |||
|} | |} | ||
</div> | </div> | ||
2026年9月19日 (六) 16:59的最新版本
任务配置查询:32 个接口,32 个调用名称,其中 30 个在当前脚本中有调用。
| 函数 / 别名 | 调用与用途 |
|---|---|
| GetNextMissionIndex | GetNextMissionIndex(missionIndex)返回当前配表任务指向的下一任务索引。 脚本中 5 处调用 |
| TAddNumText | TAddNumText(sceneId, id, msg, state, index, issueScript)向扩展任务缓冲写入编号、状态、索引、发布脚本和文本。 脚本中 33 处调用 |
| TAddText | TAddText(sceneId, msg)向扩展任务缓冲写入一条纯文本。 脚本中 21 处调用 |
| TBeginEvent | TBeginEvent(sceneId)开始构造扩展任务事件列表,只重置当前使用数量。 脚本中未见调用 |
| TDispatchEventList | TDispatchEventList()当前为空实现,调用不会派发扩展任务对话。 脚本中 14 处调用 空实现 |
| TEndEvent | TEndEvent()结束扩展任务事件构造;不执行额外操作。 脚本中 3 处调用 |
| TGetAcceptNpcInfo | TGetAcceptNpcInfo(missionIndex)返回接取 NPC 的场景编号和名称。 脚本中 14 处调用 |
| TGetAwardExp | TGetAwardExp(missionIndex)返回任务固定经验奖励,未找到时为 -1。 脚本中 5 处调用 |
| TGetAwardItem | TGetAwardItem(missionIndex)返回五组固定奖励物品,总计 11 个数值。 脚本中 8 处调用 |
| TGetAwardMoney | TGetAwardMoney(missionIndex)返回任务固定金钱奖励,未找到时为 0。 脚本中 8 处调用 |
| TGetCheckInfo | TGetCheckInfo(missionIndex)返回任务等级限制和三个前置任务索引。 脚本中 6 处调用 |
| TGetCompleteNpcInfo | TGetCompleteNpcInfo(missionIndex)返回完成 NPC 的场景编号和名称。 脚本中 11 处调用 |
| TGetDefaultDesc | TGetDefaultDesc(missionIndex)返回 Lua 默认任务在 NPC 上使用的第一段说明。 脚本中未见调用 |
| TGetDuologue | TGetDuologue(sceneId, duologueIndex)按对白索引返回 StorytellingDuologue.txt 中的完整文本。 脚本中 1 处调用 |
| TGetEnterAreaDesc | TGetEnterAreaDesc(missionIndex)返回进入区域任务是否有说明、区域说明和提示文本。 脚本中 1 处调用 |
| TGetEnterAreaInfo | TGetEnterAreaInfo(missionIndex)返回进入区域任务的数量及三组场景区域、事件区域。 脚本中 2 处调用 |
| TGetHideItem | TGetHideItem(missionIndex)返回三组隐藏奖励物品,总计 7 个数值。 脚本中 8 处调用 |
| TGetHusongAIType | TGetHusongAIType(missionIndex)返回护送任务 NPC 的 AI 类型。 脚本中 2 处调用 |
| TGetHusongPatrolPath | TGetHusongPatrolPath(missionIndex)返回护送任务的巡逻路径编号。 脚本中 3 处调用 |
| TGetKillInfo | TGetKillInfo(missionIndex)返回击杀任务的类型数和五组怪物名称、击杀数量。 脚本中 2 处调用 |
| TGetLimitedTimeInfo | TGetLimitedTimeInfo(missionIndex)返回限时任务的位置、持续时间及说明。 脚本中 2 处调用 |
| TGetLootItemInfo | TGetLootItemInfo(missionIndex)返回收集物品任务的五组怪物和掉落参数。 脚本中 12 处调用 |
| TGetMissionDesc | TGetMissionDesc(missionIndex)返回任务的四段正文描述。 脚本中 11 处调用 |
| TGetMissionIdByIndex | TGetMissionIdByIndex(missionIndex)将任务表索引转换为任务编号。 脚本中 54 处调用 |
| TGetMissionName | TGetMissionName(missionIndex)返回任务表首段显示文本,未找到时返回空串。 脚本中 52 处调用 |
| TGetRadioItem | TGetRadioItem(missionIndex)返回五组随机奖励物品,总计 11 个数值。 脚本中 8 处调用 |
| TGetRelationShipAwardInfo | TGetRelationShipAwardInfo(missionIndex)返回关系奖励位置、数值及说明。 脚本中 7 处调用 |
| TGetRelationShipPunishInfo | TGetRelationShipPunishInfo(missionIndex)返回关系惩罚位置、数值及说明。 脚本中 1 处调用 |
| TGetSongXinInfo | TGetSongXinInfo(missionIndex)返回送信任务的物品数量和五组三字段物品参数。 脚本中 4 处调用 |
| TGetTargetNpcInfo | TGetTargetNpcInfo(missionIndex)返回送信或护送任务的目标 NPC 信息。 脚本中 11 处调用 |
| TIsHaveContinue | TIsHaveContinue(missionIndex)返回送信任务是否包含继续对话步骤。 脚本中 1 处调用 |
| TIsMissionRoundable | TIsMissionRoundable(missionIndex)返回任务是否允许循环完成;进入区域和护送任务固定返回 0。 脚本中 9 处调用 |