-- 基础信息 local base_info = { group_id = 240052002 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 2001, gadget_id = 70290508, pos = { x = 758.170, y = 56.843, z = 377.486 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 2002, gadget_id = 70360001, pos = { x = 758.170, y = 56.843, z = 377.486 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, worktop_config = { init_options = { 220 } } }, { config_id = 2004, gadget_id = 70290528, pos = { x = 748.320, y = 64.850, z = 356.630 }, rot = { x = 0.000, y = 20.555, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1002003, name = "SELECT_OPTION_2003", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_2003", action = "action_EVENT_SELECT_OPTION_2003" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 2001, 2002, 2004 }, regions = { }, triggers = { "SELECT_OPTION_2003" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_SELECT_OPTION_2003(context, evt) -- 判断是gadgetid 2002 option_id 220 if 2002 ~= evt.param1 then return false end if 220 ~= evt.param2 then return false end return true end -- 触发操作 function action_EVENT_SELECT_OPTION_2003(context, evt) -- 删除指定group: 240052002 ;指定config:2002;物件身上指定option:220; if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240052002, 2002, 220) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId") return -1 end -- 将configid为 2001 的物件更改为状态 GadgetState.GearStop if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2001, GadgetState.GearStop) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId") return -1 end -- 将configid为 2004 的物件更改为状态 GadgetState.GearStart if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2004, GadgetState.GearStart) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId") return -1 end -- 添加suite3的新内容 ScriptLib.AddExtraGroupSuite(context, 240052010, 3) -- 触发镜头注目,注目位置为坐标{x=748.0575, y=64.85, z=356.871},持续时间为3秒,并且为强制注目形式,不广播其他玩家 local pos = {x=748.0575, y=64.85, z=356.871} local pos_follow = {x=758.21, y=58.966, z=388.89} if 0 ~= ScriptLib.BeginCameraSceneLook(context, { look_pos = pos, is_allow_input = false, duration = 2, is_force = true, is_broadcast = false, is_recover_keep_current = true, delay = 0, is_set_follow_pos = true, is_abs_follow_pos = true, follow_pos = pos_follow, is_force_walk = false, is_change_play_mode = false, disable_protect = 1, blend_type = 1, blend_duration = 1, is_set_screen_XY = false, screen_x = 0, screen_y = 0 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_cameraLook_Begin") return -1 end return 0 end