-- 基础信息 local base_info = { group_id = 244002006 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 6001, monster_id = 23010601, pos = { x = 342.994, y = -19.277, z = 330.577 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 4116 } }, { config_id = 6002, monster_id = 23010201, pos = { x = 338.995, y = -19.276, z = 336.967 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 4116 } }, { config_id = 6003, monster_id = 23010501, pos = { x = 345.991, y = -19.277, z = 337.495 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 4116 } }, { config_id = 6004, monster_id = 23020101, pos = { x = 339.214, y = -19.276, z = 335.065 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 4116 } }, { config_id = 6005, monster_id = 23020101, pos = { x = 345.945, y = -19.277, z = 335.192 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 4116 } } } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 6010, gadget_id = 70330057, pos = { x = 343.117, y = -19.277, z = 343.374 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 6011, gadget_id = 70900205, pos = { x = 343.690, y = -31.324, z = 432.526 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1006006, name = "ANY_MONSTER_DIE_6006", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_6006", action = "action_EVENT_ANY_MONSTER_DIE_6006" }, { config_id = 1006007, name = "ANY_MONSTER_LIVE_6007", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_6007", action = "action_EVENT_ANY_MONSTER_LIVE_6007" }, { config_id = 1006008, name = "CHALLENGE_SUCCESS_6008", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "4", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_6008" }, { config_id = 1006009, name = "CHALLENGE_FAIL_6009", event = EventType.EVENT_CHALLENGE_FAIL, source = "4", condition = "", action = "action_EVENT_CHALLENGE_FAIL_6009" }, { config_id = 1006012, name = "GADGET_CREATE_6012", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_6012", action = "action_EVENT_GADGET_CREATE_6012" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 6011 }, regions = { }, triggers = { "ANY_MONSTER_LIVE_6007", "CHALLENGE_SUCCESS_6008", "CHALLENGE_FAIL_6009" }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { 6001, 6002, 6003 }, gadgets = { 6010, 6011 }, regions = { }, triggers = { "ANY_MONSTER_DIE_6006", "GADGET_CREATE_6012" }, rand_weight = 100 }, { -- suite_id = 3, -- description = , monsters = { 6004, 6005 }, gadgets = { 6011 }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ANY_MONSTER_DIE_6006(context, evt) -- 判断剩余怪物数量是否是0 if ScriptLib.GetGroupMonsterCount(context) ~= 0 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_DIE_6006(context, evt) -- 添加suite3的新内容 ScriptLib.AddExtraGroupSuite(context, 244002006, 3) return 0 end -- 触发条件 function condition_EVENT_ANY_MONSTER_LIVE_6007(context, evt) if 6001 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_LIVE_6007(context, evt) -- 创建编号为4(该挑战的识别id),挑战内容为2的区域挑战,具体参数填写方式,见DungeonChallengeData表中的注释,所有填写的值都必须是int类型 if 0 ~= ScriptLib.ActiveChallenge(context, 4, 2, 240, 244002006, 5, 0) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge") return -1 end return 0 end -- 触发操作 function action_EVENT_CHALLENGE_SUCCESS_6008(context, evt) -- 将configid为 6010 的物件更改为状态 GadgetState.Default if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6010, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId") return -1 end -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 6010 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end -- 改变指定group组244002001中, configid为1020的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 244002001, 1020, GadgetState.GearStart) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end -- 改变指定group组244002001中, configid为1021的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 244002001, 1021, GadgetState.GearStart) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end -- 改变指定group组244002001中, configid为1022的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 244002001, 1022, GadgetState.GearStart) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end -- 改变指定group组244002001中, configid为1023的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 244002001, 1023, GadgetState.GearStart) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end -- 添加suite4的新内容 ScriptLib.AddExtraGroupSuite(context, 244002009, 4) -- 触发镜头注目,注目位置为坐标(343,-18,323),持续时间为2秒,并且为强制注目形式,不广播其他玩家 local pos = {x=343, y=-18, z=323} local pos_follow = {x=0, y=0, z=0} 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 = 2, is_set_follow_pos = false, follow_pos = pos_follow, is_force_walk = false, is_change_play_mode = false, is_set_screen_XY = false, screen_x = 0, screen_y = 0 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_cameraLook_Begin") return -1 end -- 杀死Group内所有gadget if 0 ~= ScriptLib.KillGroupEntity(context, { group_id = 244002006, kill_policy = GroupKillPolicy.GROUP_KILL_GADGET }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_gadget_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_CHALLENGE_FAIL_6009(context, evt) -- 将configid为 6010 的物件更改为状态 GadgetState.Default if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6010, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId") return -1 end -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 6010 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end -- 改变指定group组244002001中, configid为1022的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 244002001, 1022, GadgetState.GearStart) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end -- 改变指定group组244002001中, configid为1023的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 244002001, 1023, GadgetState.GearStart) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 244002005, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 244002006, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 添加suite3的新内容 ScriptLib.AddExtraGroupSuite(context, 244002009, 3) return 0 end -- 触发条件 function condition_EVENT_GADGET_CREATE_6012(context, evt) if 6010 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_GADGET_CREATE_6012(context, evt) -- 将configid为 6010 的物件更改为状态 GadgetState.GearStop if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6010, GadgetState.GearStop) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId") return -1 end return 0 end