-- 基础信息 local base_info = { group_id = 144001190 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1190001, name = "QUEST_START_190001", event = EventType.EVENT_QUEST_START, source = "7901503", condition = "", action = "action_EVENT_QUEST_START_190001" }, { config_id = 1190002, name = "VARIABLE_CHANGE_190002", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_190002", action = "action_EVENT_VARIABLE_CHANGE_190002" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { }, regions = { }, triggers = { "QUEST_START_190001", "VARIABLE_CHANGE_190002" }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发操作 function action_EVENT_QUEST_START_190001(context, evt) -- 调用提示id为 1110320 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格 if 0 ~= ScriptLib.ShowReminder(context, 1110320) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui") return -1 end return 0 end -- 触发条件 function condition_EVENT_VARIABLE_CHANGE_190002(context, evt) if evt.param1 == evt.param2 then return false end -- 判断变量"complete"为1 if ScriptLib.GetGroupVariableValueByGroup(context, "complete", 144001004) ~= 1 then return false end return true end -- 触发操作 function action_EVENT_VARIABLE_CHANGE_190002(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 144001190, suite = 2 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end