-- 基础信息 local base_info = { group_id = 240019001 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 1001, monster_id = 24010101, pos = { x = 4.227, y = 246.150, z = 12.208 }, rot = { x = 0.000, y = 323.522, z = 0.000 }, level = 1, pose_id = 101 }, { config_id = 1002, monster_id = 24010201, pos = { x = -5.847, y = 246.150, z = 2.790 }, rot = { x = 0.000, y = 352.562, z = 0.000 }, level = 1, pose_id = 101 }, { config_id = 1003, monster_id = 24010101, pos = { x = -22.568, y = 246.150, z = 8.333 }, rot = { x = 0.000, y = 64.432, z = 0.000 }, level = 1, pose_id = 101 } } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 1005, gadget_id = 70211022, pos = { x = -6.405, y = 246.150, z = 11.333 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 16, drop_tag = "战斗高级璃月", state = GadgetState.ChestLocked, isOneoff = true, persistent = true }, { config_id = 1007, gadget_id = 70900201, pos = { x = -6.298, y = 246.150, z = 11.470 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1001004, name = "ANY_MONSTER_DIE_1004", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_1004", action = "action_EVENT_ANY_MONSTER_DIE_1004" }, { 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 = { 1005, 1007 }, regions = { }, triggers = { "ANY_MONSTER_DIE_1004", "MONSTER_BATTLE_1006" }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ANY_MONSTER_DIE_1004(context, evt) -- 判断剩余怪物数量是否是0 if ScriptLib.GetGroupMonsterCount(context) ~= 0 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_DIE_1004(context, evt) -- 将configid为 1005 的物件更改为状态 GadgetState.Default if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 1005, 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 1002 ~= 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