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

-- 怪物
monsters = {
	{ config_id = 2005, monster_id = 21010201, pos = { x = 340.1, y = -19.2, z = 343.3 }, rot = { x = 0.0, y = 288.7, z = 0.0 }, level = 1, pose_id = 9012 },
	{ config_id = 2006, monster_id = 20010801, pos = { x = 347.9, y = -19.2, z = 346.7 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2007, monster_id = 20010801, pos = { x = 338.7, y = -19.2, z = 346.9 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2008, monster_id = 20010801, pos = { x = 343.6, y = -19.2, z = 349.1 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2009, monster_id = 20010901, pos = { x = 343.6, y = -19.2, z = 345.9 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2010, monster_id = 21020101, pos = { x = 351.9, y = -19.2, z = 343.4 }, rot = { x = 0.0, y = 83.3, z = 0.0 }, level = 1, pose_id = 401 },
	{ config_id = 2011, monster_id = 21010201, pos = { x = 331.9, y = -19.2, z = 338.7 }, rot = { x = 0.0, y = 173.5, z = 0.0 }, level = 1, pose_id = 9016 },
	{ config_id = 2012, monster_id = 21011002, pos = { x = 333.6, y = -19.2, z = 346.1 }, rot = { x = 0.0, y = 31.1, z = 0.0 }, level = 1, pose_id = 9013 },
	{ config_id = 2013, monster_id = 21011002, pos = { x = 335.1, y = -19.2, z = 337.5 }, rot = { x = 0.0, y = 255.7, z = 0.0 }, level = 1, pose_id = 9003 },
	{ config_id = 2014, monster_id = 20011201, pos = { x = 346.3, y = -19.2, z = 340.9 }, rot = { x = 0.0, y = 356.5, z = 0.0 }, level = 1 },
	{ config_id = 2015, monster_id = 20011301, pos = { x = 338.6, y = -19.2, z = 343.3 }, rot = { x = 0.0, y = 2.6, z = 0.0 }, level = 1 },
	{ config_id = 2016, monster_id = 20011301, pos = { x = 348.5, y = -19.2, z = 343.4 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2027, monster_id = 20011201, pos = { x = 340.1, y = -19.2, z = 340.8 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 }
}

-- NPC
npcs = {
}

-- 装置
gadgets = {
	{ config_id = 2001, gadget_id = 70360002, pos = { x = 343.3, y = -19.3, z = 343.7 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2002, gadget_id = 70350003, pos = { x = 353.3, y = -18.1, z = 322.6 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2003, gadget_id = 70350003, pos = { x = 343.4, y = -18.1, z = 322.7 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2004, gadget_id = 70350003, pos = { x = 333.4, y = -18.1, z = 322.7 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2017, gadget_id = 70320002, pos = { x = 353.4, y = -19.2, z = 338.6 }, rot = { x = 0.0, y = 272.3, z = 0.0 }, level = 1 },
	{ config_id = 2018, gadget_id = 70380010, pos = { x = 343.3, y = -19.2, z = 343.2 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2023, gadget_id = 70310001, pos = { x = 349.3, y = -19.2, z = 343.4 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2024, gadget_id = 70310001, pos = { x = 337.7, y = -19.2, z = 343.5 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 2025, gadget_id = 70220025, pos = { x = 351.6, y = -19.2, z = 343.4 }, rot = { x = 270.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2026, gadget_id = 70320002, pos = { x = 338.2, y = -19.2, z = 348.9 }, rot = { x = 0.0, y = 266.6, z = 0.0 }, level = 1 },
	{ config_id = 2028, gadget_id = 70320002, pos = { x = 348.3, y = -19.2, z = 348.7 }, rot = { x = 0.0, y = 92.0, z = 0.0 }, level = 1 },
	{ config_id = 2033, gadget_id = 70350003, pos = { x = 353.3, y = -18.6, z = 368.5 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2034, gadget_id = 70350003, pos = { x = 343.3, y = -18.6, z = 368.5 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2035, gadget_id = 70350003, pos = { x = 333.3, y = -18.6, z = 368.4 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2036, gadget_id = 70320002, pos = { x = 332.4, y = -19.2, z = 338.6 }, rot = { x = 0.0, y = 88.1, z = 0.0 }, level = 1 },
	{ config_id = 2037, gadget_id = 70211011, pos = { x = 359.1, y = -14.3, z = 335.2 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, drop_tag = "战斗中级蒙德", isOneoff = true, persistent = true, type = GadgetType.GADGET_DUNGEON_SECRET_CHEST },
	{ config_id = 2038, gadget_id = 70220013, pos = { x = 366.4, y = -14.3, z = 336.1 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2039, gadget_id = 70220013, pos = { x = 368.0, y = -14.3, z = 334.0 }, rot = { x = 0.0, y = 307.5, z = 0.0 }, level = 1 },
	{ config_id = 2040, gadget_id = 70220014, pos = { x = 365.2, y = -14.3, z = 334.5 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2041, gadget_id = 70220014, pos = { x = 369.3, y = -14.3, z = 336.1 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2042, gadget_id = 70220014, pos = { x = 360.5, y = -16.9, z = 343.9 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2043, gadget_id = 70220014, pos = { x = 359.8, y = -16.9, z = 345.1 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2044, gadget_id = 70220013, pos = { x = 360.0, y = -16.9, z = 347.4 }, rot = { x = 0.0, y = 59.4, z = 0.0 }, level = 1 },
	{ config_id = 2045, gadget_id = 70220025, pos = { x = 360.0, y = -16.9, z = 344.8 }, rot = { x = 270.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2046, gadget_id = 70310002, pos = { x = 348.3, y = -8.8, z = 324.3 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2047, gadget_id = 70310002, pos = { x = 338.4, y = -8.8, z = 324.3 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 2048, gadget_id = 70690006, pos = { x = 343.0, y = -35.4, z = 336.0 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2049, gadget_id = 70220013, pos = { x = 330.8, y = -19.4, z = 335.3 }, rot = { x = 0.0, y = 307.7, z = 0.0 }, level = 1 },
	{ config_id = 2050, gadget_id = 70220013, pos = { x = 332.6, y = -19.3, z = 333.2 }, rot = { x = 0.0, y = 342.0, z = 0.0 }, level = 1 },
	{ config_id = 2051, gadget_id = 70220014, pos = { x = 332.6, y = -19.3, z = 336.3 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2052, gadget_id = 70220014, pos = { x = 333.8, y = -19.2, z = 335.1 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2053, gadget_id = 70220015, pos = { x = 329.8, y = -18.6, z = 336.5 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2054, gadget_id = 70220015, pos = { x = 330.5, y = -18.6, z = 332.7 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 2058, gadget_id = 70211021, pos = { x = 343.6, y = -19.2, z = 331.8 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, drop_tag = "战斗高级蒙德", persistent = true, type = GadgetType.GADGET_DUNGEON_SECRET_CHEST }
}

-- 区域
regions = {
	{ config_id = 2029, shape = RegionShape.CUBIC, size = { x = 30.0, y = 8.0, z = 3.0 }, pos = { x = 341.2, y = -19.0, z = 360.2 } },
	{ config_id = 2030, shape = RegionShape.CUBIC, size = { x = 10.0, y = 5.0, z = 3.0 }, pos = { x = 353.2, y = -23.7, z = 384.4 } },
	{ config_id = 2031, shape = RegionShape.CUBIC, size = { x = 10.0, y = 5.0, z = 3.0 }, pos = { x = 343.1, y = -23.7, z = 384.4 } },
	{ config_id = 2032, shape = RegionShape.CUBIC, size = { x = 10.0, y = 5.0, z = 3.0 }, pos = { x = 332.9, y = -23.8, z = 384.4 } },
	{ config_id = 2055, shape = RegionShape.CUBIC, size = { x = 30.0, y = 8.0, z = 3.0 }, pos = { x = 344.7, y = -18.8, z = 358.2 } },
	{ config_id = 2056, shape = RegionShape.CUBIC, size = { x = 30.0, y = 8.0, z = 3.0 }, pos = { x = 344.3, y = -19.1, z = 358.2 } }
}

-- 触发器
triggers = {
	{ name = "ANY_MONSTER_DIE_2019", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_2019", action = "action_EVENT_ANY_MONSTER_DIE_2019" },
	{ name = "SELECT_OPTION_2020", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_2020", action = "action_EVENT_SELECT_OPTION_2020" },
	{ name = "SELECT_OPTION_2021", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_2021", action = "action_EVENT_SELECT_OPTION_2021" },
	{ name = "SELECT_OPTION_2022", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_2022", action = "action_EVENT_SELECT_OPTION_2022" },
	{ name = "ENTER_REGION_2029", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_2029", action = "action_EVENT_ENTER_REGION_2029" },
	{ name = "ENTER_REGION_2030", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_2030", action = "action_EVENT_ENTER_REGION_2030" },
	{ name = "ENTER_REGION_2031", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_2031", action = "action_EVENT_ENTER_REGION_2031" },
	{ name = "ENTER_REGION_2032", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_2032", action = "action_EVENT_ENTER_REGION_2032" },
	{ name = "ENTER_REGION_2055", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_2055", action = "action_EVENT_ENTER_REGION_2055" },
	{ name = "ENTER_REGION_2056", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_2056", action = "action_EVENT_ENTER_REGION_2056" },
	{ name = "GADGET_STATE_CHANGE_2057", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_2057", action = "action_EVENT_GADGET_STATE_CHANGE_2057" }
}

-- 变量
variables = {
}

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

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

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

suites = {
	{
		-- suite_id = 1,
		-- description = ,
		monsters = { },
		gadgets = { 2001, 2002, 2003, 2004, 2033, 2034, 2035, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2049, 2050, 2051, 2052, 2053, 2054 },
		regions = { 2029, 2030, 2031, 2032 },
		triggers = { "ANY_MONSTER_DIE_2019", "SELECT_OPTION_2020", "SELECT_OPTION_2021", "SELECT_OPTION_2022", "ENTER_REGION_2029", "ENTER_REGION_2030", "ENTER_REGION_2031", "ENTER_REGION_2032", "GADGET_STATE_CHANGE_2057" },
		rand_weight = 100
	},
	{
		-- suite_id = 2,
		-- description = 冰之试炼,
		monsters = { },
		gadgets = { 2018 },
		regions = { 2055 },
		triggers = { "ENTER_REGION_2055" },
		rand_weight = 100
	},
	{
		-- suite_id = 3,
		-- description = 雷之试炼,
		monsters = { 2005, 2010, 2011, 2012, 2013 },
		gadgets = { 2023, 2024, 2025 },
		regions = { },
		triggers = { },
		rand_weight = 100
	},
	{
		-- suite_id = 4,
		-- description = 火之试炼,
		monsters = { },
		gadgets = { 2017, 2026, 2028, 2036 },
		regions = { 2056 },
		triggers = { "ENTER_REGION_2056" },
		rand_weight = 100
	},
	{
		-- suite_id = 5,
		-- description = 水之挑战怪物,
		monsters = { 2006, 2007, 2008, 2009 },
		gadgets = { },
		regions = { },
		triggers = { },
		rand_weight = 100
	},
	{
		-- suite_id = 6,
		-- description = 火之挑战怪物,
		monsters = { 2014, 2015, 2016, 2027 },
		gadgets = { },
		regions = { },
		triggers = { },
		rand_weight = 100
	},
	{
		-- suite_id = 7,
		-- description = 宝箱奖励,
		monsters = { },
		gadgets = { 2058 },
		regions = { },
		triggers = { },
		rand_weight = 100
	},
	{
		-- suite_id = 8,
		-- description = 风场,
		monsters = { },
		gadgets = { 2048 },
		regions = { },
		triggers = { },
		rand_weight = 100
	}
}

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

-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_2019(context, evt)
	-- 判断剩余怪物数量是否是0
	if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
		return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_2019(context, evt)
	-- 将configid为 2001 的物件更改为状态 GadgetState.Default
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2001, GadgetState.Default) then
			return -1
		end 
	
	-- 设置操作台选项
	if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 240008002, 2001, {178,179,180}) then
		return -1
	end
	
	-- 添加suite7的新内容
	    ScriptLib.AddExtraGroupSuite(context, 240008002, 7)
	
	return 0
end

-- 触发条件
function condition_EVENT_SELECT_OPTION_2020(context, evt)
	-- 判断是gadgetid 2001 option_id 178
	if 2001 ~= evt.param1 then
		return false	
	end
	
	if 178 ~= evt.param2 then
		return false
	end
	
	
	return true
end

-- 触发操作
function action_EVENT_SELECT_OPTION_2020(context, evt)
	-- 添加suite2的新内容
	    ScriptLib.AddExtraGroupSuite(context, 240008003, 2)
	
	-- 将configid为 2002 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2002, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 2001 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2001, GadgetState.GearStart) then
			return -1
		end 
	
	-- 删除指定group： 240008002 ；指定config：2001；物件身上指定option：178；
	if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240008002, 2001, 178) then
		return -1
	end
	
	-- 删除指定group： 240008002 ；指定config：2001；物件身上指定option：179；
	if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240008002, 2001, 179) then
		return -1
	end
	
	-- 删除指定group： 240008002 ；指定config：2001；物件身上指定option：180；
	if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240008002, 2001, 180) then
		return -1
	end
	
	-- 触发镜头注目，注目位置为坐标（353，-18，322），持续时间为2秒，并且为强制注目形式，不广播其他玩家
		local pos = {x=353, y=-18, z=322}
	    if 0 ~= ScriptLib.BeginCameraSceneLook(context, { look_pos = pos, duration = 2, is_force = true, is_broadcast = false, is_recover_keep_current = true, delay = 0 }) then
					return -1
				end 
	
	return 0
end

-- 触发条件
function condition_EVENT_SELECT_OPTION_2021(context, evt)
	-- 判断是gadgetid 2001 option_id 179
	if 2001 ~= evt.param1 then
		return false	
	end
	
	if 179 ~= evt.param2 then
		return false
	end
	
	
	return true
end

-- 触发操作
function action_EVENT_SELECT_OPTION_2021(context, evt)
	-- 添加suite3的新内容
	    ScriptLib.AddExtraGroupSuite(context, 240008003, 3)
	
	-- 将configid为 2003 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2003, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 2001 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2001, GadgetState.GearStart) then
			return -1
		end 
	
	-- 删除指定group： 240008002 ；指定config：2001；物件身上指定option：178；
	if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240008002, 2001, 178) then
		return -1
	end
	
	-- 删除指定group： 240008002 ；指定config：2001；物件身上指定option：179；
	if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240008002, 2001, 179) then
		return -1
	end
	
	-- 删除指定group： 240008002 ；指定config：2001；物件身上指定option：180；
	if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240008002, 2001, 180) then
		return -1
	end
	
	-- 触发镜头注目，注目位置为坐标（343，-18，322），持续时间为2秒，并且为强制注目形式，不广播其他玩家
		local pos = {x=343, y=-18, z=322}
	    if 0 ~= ScriptLib.BeginCameraSceneLook(context, { look_pos = pos, duration = 2, is_force = true, is_broadcast = false, is_recover_keep_current = true, delay = 0 }) then
					return -1
				end 
	
	return 0
end

-- 触发条件
function condition_EVENT_SELECT_OPTION_2022(context, evt)
	-- 判断是gadgetid 2001 option_id 180
	if 2001 ~= evt.param1 then
		return false	
	end
	
	if 180 ~= evt.param2 then
		return false
	end
	
	
	return true
end

-- 触发操作
function action_EVENT_SELECT_OPTION_2022(context, evt)
	-- 添加suite4的新内容
	    ScriptLib.AddExtraGroupSuite(context, 240008003, 4)
	
	-- 将configid为 2004 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2004, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 2001 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2001, GadgetState.GearStart) then
			return -1
		end 
	
	-- 删除指定group： 240008002 ；指定config：2001；物件身上指定option：178；
	if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240008002, 2001, 178) then
		return -1
	end
	
	-- 删除指定group： 240008002 ；指定config：2001；物件身上指定option：179；
	if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240008002, 2001, 179) then
		return -1
	end
	
	-- 删除指定group： 240008002 ；指定config：2001；物件身上指定option：180；
	if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240008002, 2001, 180) then
		return -1
	end
	
	-- 触发镜头注目，注目位置为坐标（333，-18，322），持续时间为2秒，并且为强制注目形式，不广播其他玩家
		local pos = {x=333, y=-18, z=322}
	    if 0 ~= ScriptLib.BeginCameraSceneLook(context, { look_pos = pos, duration = 2, is_force = true, is_broadcast = false, is_recover_keep_current = true, delay = 0 }) then
					return -1
				end 
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_2029(context, evt)
	if evt.param1 ~= 2029 then return false end
	
	-- 判断角色数量不少于1
	if ScriptLib.GetRegionEntityCount(context, { region_eid = evt.source_eid, entity_type = EntityType.AVATAR }) < 1 then
		return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_ENTER_REGION_2029(context, evt)
	-- 将configid为 2001 的物件更改为状态 GadgetState.GearStop
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2001, GadgetState.GearStop) then
			return -1
		end 
	
	-- 将configid为 2033 的物件更改为状态 GadgetState.GearStop
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2033, GadgetState.GearStop) then
			return -1
		end 
	
	-- 将configid为 2034 的物件更改为状态 GadgetState.GearStop
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2034, GadgetState.GearStop) then
			return -1
		end 
	
	-- 将configid为 2035 的物件更改为状态 GadgetState.GearStop
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2035, GadgetState.GearStop) then
			return -1
		end 
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_2030(context, evt)
	if evt.param1 ~= 2030 then return false end
	
	-- 判断角色数量不少于1
	if ScriptLib.GetRegionEntityCount(context, { region_eid = evt.source_eid, entity_type = EntityType.AVATAR }) < 1 then
		return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_ENTER_REGION_2030(context, evt)
	-- 将configid为 2033 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2033, GadgetState.GearStart) then
			return -1
		end 
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_2031(context, evt)
	if evt.param1 ~= 2031 then return false end
	
	-- 判断角色数量不少于1
	if ScriptLib.GetRegionEntityCount(context, { region_eid = evt.source_eid, entity_type = EntityType.AVATAR }) < 1 then
		return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_ENTER_REGION_2031(context, evt)
	-- 将configid为 2034 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2034, GadgetState.GearStart) then
			return -1
		end 
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_2032(context, evt)
	if evt.param1 ~= 2032 then return false end
	
	-- 判断角色数量不少于1
	if ScriptLib.GetRegionEntityCount(context, { region_eid = evt.source_eid, entity_type = EntityType.AVATAR }) < 1 then
		return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_ENTER_REGION_2032(context, evt)
	-- 将configid为 2035 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2035, GadgetState.GearStart) then
			return -1
		end 
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_2055(context, evt)
	if evt.param1 ~= 2055 then return false end
	
	-- 判断角色数量不少于1
	if ScriptLib.GetRegionEntityCount(context, { region_eid = evt.source_eid, entity_type = EntityType.AVATAR }) < 1 then
		return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_ENTER_REGION_2055(context, evt)
	-- 添加suite5的新内容
	    ScriptLib.AddExtraGroupSuite(context, 240008002, 5)
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_2056(context, evt)
	if evt.param1 ~= 2056 then return false end
	
	-- 判断角色数量不少于1
	if ScriptLib.GetRegionEntityCount(context, { region_eid = evt.source_eid, entity_type = EntityType.AVATAR }) < 1 then
		return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_ENTER_REGION_2056(context, evt)
	-- 添加suite6的新内容
	    ScriptLib.AddExtraGroupSuite(context, 240008002, 6)
	
	return 0
end

-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_2057(context, evt)
	if 2046 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
		return false
	end
	
	return true
end

-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_2057(context, evt)
	-- 添加suite8的新内容
	    ScriptLib.AddExtraGroupSuite(context, 240008002, 8)
	
	return 0
end
