-- 基础信息 local base_info = { group_id = 220157005 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 5002, monster_id = 28060402, pos = { x = 246.890, y = 182.323, z = 247.273 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, pose_id = 1 }, { config_id = 5003, monster_id = 28060402, pos = { x = 248.967, y = 182.355, z = 253.264 }, rot = { x = 0.000, y = 135.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 1 } } -- NPC npcs = { } -- 装置 gadgets = { } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1005001, name = "ANY_MONSTER_DIE_5001", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_5001", action = "action_EVENT_ANY_MONSTER_DIE_5001" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { 5002, 5003 }, gadgets = { }, regions = { }, triggers = { "ANY_MONSTER_DIE_5001" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ANY_MONSTER_DIE_5001(context, evt) -- 判断剩余怪物数量是否是0 if ScriptLib.GetGroupMonsterCount(context) ~= 0 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_DIE_5001(context, evt) -- 改变指定group组220157001中, configid为1001的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 220157001, 1001, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end -- 设置操作台选项 if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 220157001, 1001, {7}) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 220157006, suite = 3 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end