-- 基础信息 local base_info = { group_id = 201019001 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 1001, monster_id = 22010101, pos = { x = 68.674, y = 16.500, z = -3.164 }, rot = { x = 0.000, y = 92.950, z = 0.000 }, level = 1, disableWander = true } } -- NPC npcs = { } -- 装置 gadgets = { } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1001002, name = "MONSTER_BATTLE_1002", event = EventType.EVENT_MONSTER_BATTLE, source = "", condition = "condition_EVENT_MONSTER_BATTLE_1002", action = "action_EVENT_MONSTER_BATTLE_1002" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { 1001 }, gadgets = { }, regions = { }, triggers = { "MONSTER_BATTLE_1002" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_MONSTER_BATTLE_1002(context, evt) if 1001 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_MONSTER_BATTLE_1002(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 201019002, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end