-- 基础信息
local base_info = {
	group_id = 220138022
}

--================================================================
-- 
-- 配置
-- 
--================================================================

-- 怪物
monsters = {
}

-- NPC
npcs = {
}

-- 装置
gadgets = {
	{ config_id = 22001, gadget_id = 70310266, pos = { x = 11.649, y = 17.268, z = 49.812 }, rot = { x = 270.115, y = 89.970, z = 0.000 }, level = 1, persistent = true, is_use_point_array = true },
	{ config_id = 22009, gadget_id = 70310443, pos = { x = 11.616, y = 35.360, z = 72.805 }, rot = { x = 89.839, y = 0.084, z = 90.087 }, level = 1, is_enable_interact = false },
	{ config_id = 22010, gadget_id = 70310444, pos = { x = 11.717, y = 22.794, z = 69.896 }, rot = { x = 0.000, y = 180.000, z = 270.000 }, level = 1 },
	{ config_id = 22011, gadget_id = 70380001, pos = { x = 12.671, y = 22.637, z = 69.086 }, rot = { x = 0.000, y = 0.000, z = 90.000 }, level = 1, is_use_point_array = true },
	{ config_id = 22012, gadget_id = 70310443, pos = { x = 5.913, y = 35.360, z = 73.188 }, rot = { x = 89.839, y = 0.084, z = 90.087 }, level = 1, is_enable_interact = false },
	{ config_id = 22013, gadget_id = 70310443, pos = { x = 5.913, y = 36.689, z = 71.947 }, rot = { x = 0.000, y = 180.000, z = 270.002 }, level = 1, is_enable_interact = false },
	{ config_id = 22014, gadget_id = 70310445, pos = { x = 5.925, y = 36.596, z = 73.128 }, rot = { x = 0.000, y = 0.000, z = 90.000 }, level = 1 },
	{ config_id = 22015, gadget_id = 70380001, pos = { x = 6.923, y = 37.224, z = 73.549 }, rot = { x = 0.000, y = 0.000, z = 90.000 }, level = 1, start_route = false, is_use_point_array = true, is_enable_interact = false },
	{ config_id = 22016, gadget_id = 70310445, pos = { x = 11.634, y = 32.442, z = 54.032 }, rot = { x = 0.182, y = 179.972, z = 270.000 }, level = 1, is_enable_interact = false },
	{ config_id = 22017, gadget_id = 70310443, pos = { x = 11.633, y = 32.361, z = 55.204 }, rot = { x = 0.182, y = 179.972, z = 270.000 }, level = 1, is_enable_interact = false },
	{ config_id = 22018, gadget_id = 70310443, pos = { x = 11.635, y = 33.618, z = 53.967 }, rot = { x = 89.631, y = 348.026, z = 78.139 }, level = 1 },
	{ config_id = 22019, gadget_id = 70380001, pos = { x = 12.649, y = 32.357, z = 53.639 }, rot = { x = 0.000, y = 0.000, z = 90.000 }, level = 1, start_route = false, is_use_point_array = true, is_enable_interact = false },
	{ config_id = 22025, gadget_id = 70310443, pos = { x = 11.706, y = 22.793, z = 67.422 }, rot = { x = 0.000, y = 0.000, z = 90.000 }, level = 1 },
	{ config_id = 22027, gadget_id = 70310443, pos = { x = 11.616, y = 36.689, z = 71.564 }, rot = { x = 0.000, y = 180.000, z = 270.002 }, level = 1, is_enable_interact = false },
	{ config_id = 22029, gadget_id = 70310445, pos = { x = 11.627, y = 36.596, z = 72.745 }, rot = { x = 0.000, y = 0.000, z = 90.000 }, level = 1 },
	{ config_id = 22030, gadget_id = 70380001, pos = { x = 12.625, y = 37.224, z = 73.166 }, rot = { x = 0.000, y = 0.000, z = 90.000 }, level = 1, start_route = false, is_use_point_array = true, is_enable_interact = false },
	{ config_id = 22031, gadget_id = 70310444, pos = { x = 5.881, y = 22.794, z = 69.718 }, rot = { x = 0.000, y = 180.000, z = 270.000 }, level = 1 },
	{ config_id = 22032, gadget_id = 70380001, pos = { x = 6.835, y = 22.637, z = 68.907 }, rot = { x = 0.000, y = 0.000, z = 90.000 }, level = 1, is_use_point_array = true },
	{ config_id = 22033, gadget_id = 70310443, pos = { x = 12.008, y = 43.035, z = 55.128 }, rot = { x = 0.182, y = 179.972, z = 270.000 }, level = 1, is_enable_interact = false },
	{ config_id = 22034, gadget_id = 70310443, pos = { x = 11.993, y = 44.334, z = 53.892 }, rot = { x = 89.641, y = 348.027, z = 78.140 }, level = 1 },
	{ config_id = 22035, gadget_id = 70380001, pos = { x = 13.006, y = 43.073, z = 53.563 }, rot = { x = 0.000, y = 0.000, z = 90.000 }, level = 1, start_route = false, is_use_point_array = true, is_enable_interact = false },
	{ config_id = 22036, gadget_id = 70310445, pos = { x = 12.027, y = 43.113, z = 53.961 }, rot = { x = 0.182, y = 179.972, z = 270.000 }, level = 1, is_enable_interact = false },
	{ config_id = 22037, gadget_id = 70310266, pos = { x = 11.700, y = 51.764, z = 53.798 }, rot = { x = 0.993, y = 179.971, z = 270.110 }, level = 1, persistent = true, is_use_point_array = true },
	{ config_id = 22043, gadget_id = 70310443, pos = { x = 5.881, y = 22.794, z = 67.246 }, rot = { x = 0.000, y = 180.000, z = 270.000 }, level = 1 }
}

-- 区域
regions = {
}

-- 触发器
triggers = {
	{ config_id = 1022002, name = "QUEST_FINISH_22002", event = EventType.EVENT_QUEST_FINISH, source = "4007210", condition = "", action = "action_EVENT_QUEST_FINISH_22002", trigger_count = 0 },
	{ config_id = 1022003, name = "PLATFORM_ARRIVAL_22003", event = EventType.EVENT_PLATFORM_ARRIVAL, source = "", condition = "condition_EVENT_PLATFORM_ARRIVAL_22003", action = "action_EVENT_PLATFORM_ARRIVAL_22003", trigger_count = 0 },
	{ config_id = 1022004, name = "PLATFORM_ARRIVAL_22004", event = EventType.EVENT_PLATFORM_ARRIVAL, source = "", condition = "condition_EVENT_PLATFORM_ARRIVAL_22004", action = "action_EVENT_PLATFORM_ARRIVAL_22004", trigger_count = 0 },
	{ config_id = 1022005, name = "PLATFORM_ARRIVAL_22005", event = EventType.EVENT_PLATFORM_ARRIVAL, source = "", condition = "condition_EVENT_PLATFORM_ARRIVAL_22005", action = "action_EVENT_PLATFORM_ARRIVAL_22005", trigger_count = 0 },
	{ config_id = 1022006, name = "VARIABLE_CHANGE_22006", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_22006", action = "action_EVENT_VARIABLE_CHANGE_22006", trigger_count = 0 },
	{ config_id = 1022007, name = "VARIABLE_CHANGE_22007", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_22007", action = "action_EVENT_VARIABLE_CHANGE_22007", trigger_count = 0 },
	{ config_id = 1022008, name = "VARIABLE_CHANGE_22008", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_22008", action = "action_EVENT_VARIABLE_CHANGE_22008", trigger_count = 0 },
	{ config_id = 1022020, name = "PLATFORM_ARRIVAL_22020", event = EventType.EVENT_PLATFORM_ARRIVAL, source = "", condition = "condition_EVENT_PLATFORM_ARRIVAL_22020", action = "action_EVENT_PLATFORM_ARRIVAL_22020", trigger_count = 0 },
	{ config_id = 1022021, name = "PLATFORM_ARRIVAL_22021", event = EventType.EVENT_PLATFORM_ARRIVAL, source = "", condition = "condition_EVENT_PLATFORM_ARRIVAL_22021", action = "action_EVENT_PLATFORM_ARRIVAL_22021", trigger_count = 0 },
	{ config_id = 1022022, name = "PLATFORM_ARRIVAL_22022", event = EventType.EVENT_PLATFORM_ARRIVAL, source = "", condition = "condition_EVENT_PLATFORM_ARRIVAL_22022", action = "action_EVENT_PLATFORM_ARRIVAL_22022", trigger_count = 0 },
	-- 玩法完成+任务消息+切suite
	{ config_id = 1022024, name = "PLATFORM_ARRIVAL_22024", event = EventType.EVENT_PLATFORM_ARRIVAL, source = "", condition = "condition_EVENT_PLATFORM_ARRIVAL_22024", action = "action_EVENT_PLATFORM_ARRIVAL_22024", trigger_count = 0 },
	-- 任务结束删除洋葱哥
	{ config_id = 1022026, name = "QUEST_FINISH_22026", event = EventType.EVENT_QUEST_FINISH, source = "4007219", condition = "", action = "action_EVENT_QUEST_FINISH_22026", trigger_count = 0 },
	{ config_id = 1022028, name = "GROUP_LOAD_22028", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_22028", action = "action_EVENT_GROUP_LOAD_22028", trigger_count = 0 },
	-- 任务结束刷suite保底
	{ config_id = 1022038, name = "GROUP_LOAD_22038", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD_22038", trigger_count = 0 },
	-- 任务期间刷莱昂保底
	{ config_id = 1022039, name = "GROUP_LOAD_22039", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD_22039", trigger_count = 0 },
	-- 任务开始刷莱昂保底
	{ config_id = 1022040, name = "QUEST_START_22040", event = EventType.EVENT_QUEST_START, source = "4007219", condition = "", action = "action_EVENT_QUEST_START_22040", trigger_count = 0 },
	-- 4007214 任务保底
	{ config_id = 1022041, name = "GROUP_LOAD_22041", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_22041", action = "action_EVENT_GROUP_LOAD_22041", trigger_count = 0 },
	-- 4007214 任务保底
	{ config_id = 1022042, name = "QUEST_START_22042", event = EventType.EVENT_QUEST_START, source = "4007214", condition = "condition_EVENT_QUEST_START_22042", action = "action_EVENT_QUEST_START_22042", trigger_count = 0 }
}

-- 变量
variables = {
	{ config_id = 1, name = "eyefinish1", value = 0, no_refresh = true },
	{ config_id = 2, name = "duankou", value = 0, no_refresh = true },
	{ config_id = 5, name = "eyefinish2", value = 0, no_refresh = true },
	{ config_id = 6, name = "eyefinish3", value = 0, no_refresh = true },
	{ config_id = 9, name = "start1", value = 0, no_refresh = true },
	{ config_id = 10, name = "missionComplete", value = 0, no_refresh = true },
	{ config_id = 11, name = "TalkDone", value = 0, no_refresh = true }
}

-- 废弃数据
garbages = {
	triggers = {
		{ config_id = 1022023, name = "PLATFORM_ARRIVAL_22023", event = EventType.EVENT_PLATFORM_ARRIVAL, source = "", condition = "condition_EVENT_PLATFORM_ARRIVAL_22023", action = "action_EVENT_PLATFORM_ARRIVAL_22023", trigger_count = 0 }
	}
}

--================================================================
-- 
-- 初始化配置
-- 
--================================================================

-- 初始化时创建
init_config = {
	suite = 1,
	end_suite = 0,
	rand_suite = false
}

--================================================================
-- 
-- 小组配置
-- 
--================================================================

suites = {
	{
		-- suite_id = 1,
		-- description = ,
		monsters = { },
		gadgets = { 22001, 22010, 22011, 22012, 22013, 22014, 22015, 22016, 22017, 22018, 22019, 22025 },
		regions = { },
		triggers = { "QUEST_FINISH_22002", "PLATFORM_ARRIVAL_22003", "PLATFORM_ARRIVAL_22004", "PLATFORM_ARRIVAL_22005", "VARIABLE_CHANGE_22006", "VARIABLE_CHANGE_22007", "VARIABLE_CHANGE_22008", "PLATFORM_ARRIVAL_22020", "PLATFORM_ARRIVAL_22021", "PLATFORM_ARRIVAL_22022", "PLATFORM_ARRIVAL_22024", "GROUP_LOAD_22028", "GROUP_LOAD_22038", "GROUP_LOAD_22041", "QUEST_START_22042" },
		rand_weight = 100
	},
	{
		-- suite_id = 2,
		-- description = ,
		monsters = { },
		gadgets = { 22009, 22027, 22029, 22030, 22031, 22032, 22033, 22034, 22035, 22036, 22043 },
		regions = { },
		triggers = { "QUEST_FINISH_22026", "GROUP_LOAD_22039", "QUEST_START_22040", "GROUP_LOAD_22041", "QUEST_START_22042" },
		rand_weight = 100
	}
}

--================================================================
-- 
-- 触发器
-- 
--================================================================

-- 触发操作
function action_EVENT_QUEST_FINISH_22002(context, evt)
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22001, 4, {1,2,3,4}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	-- 将configid为 22001 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 22001, GadgetState.GearStart) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
			return -1
		end 
	
	-- 将本组内变量名为 "TalkDone" 的变量设置为 1
	if 0 ~= ScriptLib.SetGroupVariableValue(context, "TalkDone", 1) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_PLATFORM_ARRIVAL_22003(context, evt)
	-- 判断是gadgetid 为 22001的移动平台，是否到达了4 的点集中的 4 点
	
	if 22001 ~= evt.param1 then
	  return false
	end
	
	if 4 ~= evt.param2 then
	  return false
	end
	
	if 4 ~= evt.param3 then
	  return false
	end
	
	
	return true
end

-- 触发操作
function action_EVENT_PLATFORM_ARRIVAL_22003(context, evt)
	-- 将本组内变量名为 "duankou" 的变量设置为 1
	if 0 ~= ScriptLib.SetGroupVariableValue(context, "duankou", 1) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_PLATFORM_ARRIVAL_22004(context, evt)
	-- 判断是gadgetid 为 22001的移动平台，是否到达了13 的点集中的 4 点
	
	if 22001 ~= evt.param1 then
	  return false
	end
	
	if 13 ~= evt.param2 then
	  return false
	end
	
	if 4 ~= evt.param3 then
	  return false
	end
	
	
	return true
end

-- 触发操作
function action_EVENT_PLATFORM_ARRIVAL_22004(context, evt)
	-- 将本组内变量名为 "duankou" 的变量设置为 2
	if 0 ~= ScriptLib.SetGroupVariableValue(context, "duankou", 2) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_PLATFORM_ARRIVAL_22005(context, evt)
	-- 判断是gadgetid 为 22001的移动平台，是否到达了14 的点集中的 6 点
	
	if 22001 ~= evt.param1 then
	  return false
	end
	
	if 14 ~= evt.param2 then
	  return false
	end
	
	if 6 ~= evt.param3 then
	  return false
	end
	
	
	return true
end

-- 触发操作
function action_EVENT_PLATFORM_ARRIVAL_22005(context, evt)
	-- 将本组内变量名为 "duankou" 的变量设置为 3
	if 0 ~= ScriptLib.SetGroupVariableValue(context, "duankou", 3) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_22006(context, evt)
	if evt.param1 == evt.param2 then return false end
	
	if evt.param1 == evt.param2 then return false end
	if evt.source_name ~= "eyefinish1" and evt.source_name ~="duankou" then
	return false 
	end
	
	-- 判断变量"eyefinish1"为1
	if ScriptLib.GetGroupVariableValue(context, "eyefinish1") ~= 1 then
			return false
	end
	
	-- 判断变量"duankou"为1
	if ScriptLib.GetGroupVariableValue(context, "duankou") ~= 1 then
			return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_VARIABLE_CHANGE_22006(context, evt)
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22001, 5, {1,2}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_22007(context, evt)
	if evt.param1 == evt.param2 then return false end
	
	if evt.param1 == evt.param2 then return false end
	
	if evt.source_name ~= "eyefinish2" and evt.source_name ~="duankou" then
	return false 
	end
	
	-- 判断变量"eyefinish2"为1
	if ScriptLib.GetGroupVariableValue(context, "eyefinish2") ~= 1 then
			return false
	end
	
	-- 判断变量"duankou"为2
	if ScriptLib.GetGroupVariableValue(context, "duankou") ~= 2 then
			return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_VARIABLE_CHANGE_22007(context, evt)
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22001, 6, {1,2,3}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_22008(context, evt)
	if evt.param1 == evt.param2 then return false end
	
	if evt.param1 == evt.param2 then return false end
	
	if evt.source_name ~= "eyefinish3" and evt.source_name ~="duankou" then
	return false 
	end
	
	-- 判断变量"eyefinish3"为1
	if ScriptLib.GetGroupVariableValue(context, "eyefinish3") ~= 1 then
			return false
	end
	
	-- 判断变量"duankou"为3
	if ScriptLib.GetGroupVariableValue(context, "duankou") ~= 3 then
			return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_VARIABLE_CHANGE_22008(context, evt)
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22001, 7, {1,2,3}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_PLATFORM_ARRIVAL_22020(context, evt)
	-- 判断是gadgetid 为 22001的移动平台，是否到达了5 的点集中的 2 点
	
	if 22001 ~= evt.param1 then
	  return false
	end
	
	if 5 ~= evt.param2 then
	  return false
	end
	
	if 2 ~= evt.param3 then
	  return false
	end
	
	
	return true
end

-- 触发操作
function action_EVENT_PLATFORM_ARRIVAL_22020(context, evt)
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22011, 9, {2}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22001, 13, {1,2,3,4}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_PLATFORM_ARRIVAL_22021(context, evt)
	-- 判断是gadgetid 为 22001的移动平台，是否到达了6 的点集中的 3 点
	
	if 22001 ~= evt.param1 then
	  return false
	end
	
	if 6 ~= evt.param2 then
	  return false
	end
	
	if 3 ~= evt.param3 then
	  return false
	end
	
	
	return true
end

-- 触发操作
function action_EVENT_PLATFORM_ARRIVAL_22021(context, evt)
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22015, 10, {2}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22001, 14, {1,2,3,4,5,6}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_PLATFORM_ARRIVAL_22022(context, evt)
	-- 判断是gadgetid 为 22001的移动平台，是否到达了7 的点集中的 3 点
	
	if 22001 ~= evt.param1 then
	  return false
	end
	
	if 7 ~= evt.param2 then
	  return false
	end
	
	if 3 ~= evt.param3 then
	  return false
	end
	
	
	return true
end

-- 触发操作
function action_EVENT_PLATFORM_ARRIVAL_22022(context, evt)
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22019, 11, {2}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22001, 15, {1,2,3}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_PLATFORM_ARRIVAL_22024(context, evt)
	-- 判断是gadgetid 为 22001的移动平台，是否到达了15 的点集中的 3 点
	
	if 22001 ~= evt.param1 then
	  return false
	end
	
	if 15 ~= evt.param2 then
	  return false
	end
	
	if 3 ~= evt.param3 then
	  return false
	end
	
	
	return true
end

-- 触发操作
function action_EVENT_PLATFORM_ARRIVAL_22024(context, evt)
	-- 通知任务系统完成条件类型"LUA通知"，复杂参数为quest_param的进度+1
	if 0 ~= ScriptLib.AddQuestProgress(context, "4007214") then
		ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
	  return -1
	end
	
	-- 将configid为 22001 的物件更改为状态 GadgetState.Default
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 22001, GadgetState.Default) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
			return -1
		end 
	
		-- 重新生成指定group，指定suite
		if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 220138022, suite = 2 }) then
	    ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
			return -1
		end
	
	-- 将本组内变量名为 "missionComplete" 的变量设置为 1
	if 0 ~= ScriptLib.SetGroupVariableValue(context, "missionComplete", 1) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
	  return -1
	end
	
	return 0
end

-- 触发操作
function action_EVENT_QUEST_FINISH_22026(context, evt)
		-- 永久关闭CongfigId的Gadget，需要和Groups的RefreshWithBlock标签搭配
		if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 22037 }) then
	    ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
		    return -1
		end
		
	
	return 0
end

-- 触发条件
function condition_EVENT_GROUP_LOAD_22028(context, evt)
	-- 判断变量"missionComplete"为0
	if ScriptLib.GetGroupVariableValue(context, "missionComplete") ~= 0 then
			return false
	end
	
	-- 判断变量"TalkDone"为1
	if ScriptLib.GetGroupVariableValue(context, "TalkDone") ~= 1 then
			return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_GROUP_LOAD_22028(context, evt)
	-- 将本组内变量名为 "duankou" 的变量设置为 0
	if 0 ~= ScriptLib.SetGroupVariableValue(context, "duankou", 0) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
	  return -1
	end
	
	-- 设置移动平台点阵,点阵id为point_array_id
	-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
	-- turn_mode = true/false 开启/关闭
	local tempParam = {route_type = 0, turn_mode = false}
	if 0 ~= ScriptLib.SetPlatformPointArray(context, 22001, 4, {1,2,3,4}, tempParam) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
	  return -1
	end
	
	-- 将configid为 22001 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 22001, GadgetState.GearStart) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
			return -1
		end 
	
	return 0
end

-- 触发操作
function action_EVENT_GROUP_LOAD_22038(context, evt)
			    if ScriptLib.GetHostQuestState(context,4007214)==3 then
				ScriptLib.RefreshGroup(context, { group_id = 220138022, suite = 2 }) 
				end
			
			return 0
end

-- 触发操作
function action_EVENT_GROUP_LOAD_22039(context, evt)
				    if ScriptLib.GetHostQuestState(context,4007219)==2 then
					ScriptLib.CreateGadget(context, { config_id = 22037 }) 
					end
				
				return 0
end

-- 触发操作
function action_EVENT_QUEST_START_22040(context, evt)
	-- 创建id为22037的gadget
	if 0 ~= ScriptLib.CreateGadget(context, { config_id = 22037 }) then
	  ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_GROUP_LOAD_22041(context, evt)
	-- 判断变量"missionComplete"为1
	if ScriptLib.GetGroupVariableValue(context, "missionComplete") ~= 1 then
			return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_GROUP_LOAD_22041(context, evt)
	-- 通知任务系统完成条件类型"LUA通知"，复杂参数为quest_param的进度+1
	if 0 ~= ScriptLib.AddQuestProgress(context, "4007214") then
		ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
	  return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_QUEST_START_22042(context, evt)
	-- 判断变量"missionComplete"为1
	if ScriptLib.GetGroupVariableValue(context, "missionComplete") ~= 1 then
			return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_QUEST_START_22042(context, evt)
	-- 通知任务系统完成条件类型"LUA通知"，复杂参数为quest_param的进度+1
	if 0 ~= ScriptLib.AddQuestProgress(context, "4007214") then
		ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
	  return -1
	end
	
	return 0
end