-- 基础信息 local base_info = { group_id = 240020001 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 1001, monster_id = 22010101, pos = { x = -5.534, y = 246.150, z = 9.062 }, rot = { x = 0.000, y = 315.309, z = 0.000 }, level = 1, pose_id = 9013 }, { config_id = 1002, monster_id = 22010101, pos = { x = -16.799, y = 246.150, z = 5.561 }, rot = { x = 0.000, y = 46.548, z = 0.000 }, level = 1, pose_id = 9013 }, { config_id = 1003, monster_id = 21020501, pos = { x = -9.812, y = 246.150, z = 3.879 }, rot = { x = 0.000, y = 354.868, z = 0.000 }, level = 1, pose_id = 401 } } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 1004, gadget_id = 70211022, pos = { x = -12.016, y = 246.150, z = 9.875 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 11, drop_tag = "战斗高级璃月", state = GadgetState.ChestLocked, isOneoff = true, persistent = true }, { config_id = 1007, gadget_id = 70900201, pos = { x = -11.843, y = 247.317, z = 10.143 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1001005, name = "ANY_MONSTER_DIE_1005", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_1005", action = "action_EVENT_ANY_MONSTER_DIE_1005" }, { config_id = 1001006, name = "MONSTER_BATTLE_1006", event = EventType.EVENT_MONSTER_BATTLE, source = "", condition = "condition_EVENT_MONSTER_BATTLE_1006", action = "action_EVENT_MONSTER_BATTLE_1006" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { 1001, 1002, 1003 }, gadgets = { 1004, 1007 }, regions = { }, triggers = { "ANY_MONSTER_DIE_1005", "MONSTER_BATTLE_1006" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ANY_MONSTER_DIE_1005(context, evt) -- 判断剩余怪物数量是否是0 if ScriptLib.GetGroupMonsterCount(context) ~= 0 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_DIE_1005(context, evt) -- 将configid为 1004 的物件更改为状态 GadgetState.Default if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 1004, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId") return -1 end return 0 end -- 触发条件 function condition_EVENT_MONSTER_BATTLE_1006(context, evt) if 1003 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_MONSTER_BATTLE_1006(context, evt) -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 1007 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end return 0 end