文章编辑人员:雪舞
内容测试时间:2023-5-12 23:44:35
测试版本:新武侠世界
--获取已学习的秘籍ID
local nMijiBook = GetMissionData(sceneId, selfId, MD_MIJI_BOOK)
local nMijiBookTab = MathCilCompute_4_In(nMijiBook)
local skillIDs = {} -- 创建一个数组来储存技能ID
local skillCount = 0 -- 用来跟踪技能ID的数量
for i = 1, 3 do
if nMijiBookTab[i] > 0 then
local nBookTableIndex, _, nSkillID_1, nSkillID_2, nSkillID_3 = CallScriptFunction(990023, "GetMiJiInfo", sceneId, selfId, 2, nMijiBookTab[i])
-- 将技能ID添加到数组中
skillCount = skillCount + 1
skillIDs[skillCount] = nSkillID_1
skillCount = skillCount + 1
skillIDs[skillCount] = nSkillID_2
skillCount = skillCount + 1
skillIDs[skillCount] = nSkillID_3
end
end
-- 这里可以插入你的代码
-- 学习技能
for i = 1, skillCount do
AddSkill(sceneId, selfId, skillIDs[i])
end
|