-- 基础信息 local base_info = { group_id = 240302003 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1000021, name = "DUNGEON_SETTLE_21", event = EventType.EVENT_DUNGEON_SETTLE, source = "", condition = "condition_EVENT_DUNGEON_SETTLE_21", action = "action_EVENT_DUNGEON_SETTLE_21" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = true } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { }, regions = { }, triggers = { "DUNGEON_SETTLE_21" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_DUNGEON_SETTLE_21(context, evt) -- 判断副本成功 if 1 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_DUNGEON_SETTLE_21(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240302007, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 改变指定group组240302008中, configid为8的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 240302008, 8, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end return 0 end