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

-- 怪物
monsters = {
}

-- NPC
npcs = {
}

-- 装置
gadgets = {
	{ config_id = 169, gadget_id = 70310001, pos = { x = -13.5, y = 52.0, z = -9.1 }, rot = { x = 0.0, y = 186.3, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 170, gadget_id = 70220013, pos = { x = -11.0, y = 51.6, z = 1.3 }, rot = { x = 0.0, y = 267.7, z = 0.0 }, level = 1 },
	{ config_id = 171, gadget_id = 70220014, pos = { x = 3.0, y = 51.9, z = -10.6 }, rot = { x = 0.0, y = 85.4, z = 0.0 }, level = 1 },
	{ config_id = 172, gadget_id = 70220014, pos = { x = 3.8, y = 51.8, z = -11.6 }, rot = { x = 0.0, y = 98.7, z = 0.0 }, level = 1 },
	{ config_id = 173, gadget_id = 70220014, pos = { x = -20.4, y = 55.5, z = 16.0 }, rot = { x = 86.0, y = 204.4, z = 0.0 }, level = 1 },
	{ config_id = 174, gadget_id = 70220014, pos = { x = -21.8, y = 55.0, z = 16.1 }, rot = { x = 0.0, y = 347.2, z = 0.0 }, level = 1 },
	{ config_id = 175, gadget_id = 70220014, pos = { x = 18.4, y = 61.1, z = 19.5 }, rot = { x = 0.0, y = 345.1, z = 0.0 }, level = 1 },
	{ config_id = 176, gadget_id = 70220014, pos = { x = 19.4, y = 61.0, z = 19.7 }, rot = { x = 0.0, y = 101.7, z = 0.0 }, level = 1 },
	{ config_id = 177, gadget_id = 70220013, pos = { x = 15.8, y = 56.1, z = 19.8 }, rot = { x = 0.0, y = 86.4, z = 0.0 }, level = 1 },
	{ config_id = 178, gadget_id = 70220013, pos = { x = -4.7, y = 59.2, z = 34.8 }, rot = { x = 13.2, y = 243.2, z = 327.8 }, level = 1 },
	{ config_id = 179, gadget_id = 70310001, pos = { x = -1.4, y = 52.8, z = 37.6 }, rot = { x = 0.0, y = 174.2, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 180, gadget_id = 70310001, pos = { x = 9.8, y = 47.0, z = 67.5 }, rot = { x = 0.0, y = 298.5, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 181, gadget_id = 70310001, pos = { x = 5.7, y = 41.8, z = 80.9 }, rot = { x = 0.0, y = 303.5, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 182, gadget_id = 70310001, pos = { x = -17.4, y = 42.0, z = 91.8 }, rot = { x = 0.0, y = 195.1, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 183, gadget_id = 70310001, pos = { x = 0.4, y = 42.0, z = 116.5 }, rot = { x = 0.0, y = 266.6, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 184, gadget_id = 70310001, pos = { x = 15.4, y = 41.9, z = 119.1 }, rot = { x = 0.0, y = 81.9, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 185, gadget_id = 70310001, pos = { x = 15.3, y = 42.0, z = 125.1 }, rot = { x = 0.0, y = 305.7, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 186, gadget_id = 70220013, pos = { x = -18.6, y = 42.0, z = 85.2 }, rot = { x = 0.0, y = 95.3, z = 0.0 }, level = 1 },
	{ config_id = 187, gadget_id = 70220014, pos = { x = -7.6, y = 41.9, z = 122.3 }, rot = { x = 0.0, y = 152.0, z = 0.0 }, level = 1 },
	{ config_id = 188, gadget_id = 70220014, pos = { x = -6.6, y = 42.0, z = 122.7 }, rot = { x = 0.0, y = 194.9, z = 0.0 }, level = 1 },
	{ config_id = 189, gadget_id = 70220013, pos = { x = -2.0, y = 41.8, z = 126.8 }, rot = { x = 0.0, y = 269.8, z = 0.0 }, level = 1 },
	{ config_id = 190, gadget_id = 70220014, pos = { x = -17.9, y = 41.9, z = 86.7 }, rot = { x = 0.0, y = 3.4, z = 0.0 }, level = 1 },
	{ config_id = 191, gadget_id = 70220014, pos = { x = -18.9, y = 42.1, z = 86.7 }, rot = { x = 0.0, y = 280.4, z = 0.0 }, level = 1 },
	{ config_id = 192, gadget_id = 70220013, pos = { x = 84.1, y = 39.4, z = 111.9 }, rot = { x = 0.0, y = 168.4, z = 0.0 }, level = 1 },
	{ config_id = 193, gadget_id = 70310001, pos = { x = 73.0, y = 39.4, z = 112.4 }, rot = { x = 0.0, y = 308.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 194, gadget_id = 70310001, pos = { x = 73.3, y = 39.4, z = 128.2 }, rot = { x = 0.0, y = 279.6, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 195, gadget_id = 70310001, pos = { x = 90.9, y = 40.1, z = 112.1 }, rot = { x = 0.0, y = 271.3, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 196, gadget_id = 70310001, pos = { x = 115.1, y = 39.3, z = 113.3 }, rot = { x = 0.0, y = 80.5, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 197, gadget_id = 70310001, pos = { x = 115.1, y = 39.4, z = 128.9 }, rot = { x = 0.0, y = 26.6, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 198, gadget_id = 70310001, pos = { x = 135.8, y = 39.4, z = 122.3 }, rot = { x = 0.0, y = 18.9, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 199, gadget_id = 70310001, pos = { x = 133.3, y = 39.2, z = 130.2 }, rot = { x = 0.0, y = 270.3, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 200, gadget_id = 70220013, pos = { x = 112.6, y = 39.3, z = 129.6 }, rot = { x = 0.0, y = 9.2, z = 0.0 }, level = 1 },
	{ config_id = 201, gadget_id = 70310001, pos = { x = 243.1, y = 58.9, z = 194.9 }, rot = { x = 0.0, y = 196.6, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 202, gadget_id = 70310001, pos = { x = 236.0, y = 59.0, z = 197.6 }, rot = { x = 0.0, y = 92.2, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 203, gadget_id = 70310001, pos = { x = 234.7, y = 58.9, z = 186.8 }, rot = { x = 0.0, y = 323.9, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 204, gadget_id = 70310001, pos = { x = 251.6, y = 68.8, z = 227.7 }, rot = { x = 0.0, y = 301.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 205, gadget_id = 70310001, pos = { x = 245.9, y = 68.9, z = 234.6 }, rot = { x = 0.0, y = 341.1, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 206, gadget_id = 70310001, pos = { x = 249.2, y = 69.0, z = 244.7 }, rot = { x = 0.0, y = 235.6, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 207, gadget_id = 70310001, pos = { x = 223.7, y = 74.3, z = 254.5 }, rot = { x = 0.0, y = 121.6, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 208, gadget_id = 70310001, pos = { x = 234.8, y = 74.3, z = 261.6 }, rot = { x = 0.0, y = 282.6, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 209, gadget_id = 70310001, pos = { x = 223.7, y = 74.3, z = 267.0 }, rot = { x = 0.0, y = 114.5, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 210, gadget_id = 70310001, pos = { x = 197.8, y = 53.5, z = 302.8 }, rot = { x = 0.0, y = 259.1, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 211, gadget_id = 70310001, pos = { x = 184.2, y = 53.5, z = 303.0 }, rot = { x = 0.0, y = 224.8, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 212, gadget_id = 70310001, pos = { x = 197.7, y = 57.0, z = 313.0 }, rot = { x = 0.0, y = 5.3, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 213, gadget_id = 70310001, pos = { x = 184.8, y = 57.0, z = 313.0 }, rot = { x = 0.0, y = 29.9, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 214, gadget_id = 70310001, pos = { x = 204.2, y = 56.9, z = 324.0 }, rot = { x = 0.0, y = 85.5, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 215, gadget_id = 70310001, pos = { x = 180.2, y = 56.8, z = 324.4 }, rot = { x = 0.0, y = 82.3, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 216, gadget_id = 70310001, pos = { x = 197.6, y = 58.3, z = 345.6 }, rot = { x = 0.0, y = 356.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 217, gadget_id = 70310001, pos = { x = 185.9, y = 58.4, z = 345.4 }, rot = { x = 0.0, y = 70.9, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 218, gadget_id = 70310001, pos = { x = 207.3, y = 56.9, z = 361.1 }, rot = { x = 0.0, y = 285.2, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 219, gadget_id = 70310001, pos = { x = 207.1, y = 56.9, z = 378.6 }, rot = { x = 0.0, y = 158.6, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 220, gadget_id = 70310001, pos = { x = 199.2, y = 56.9, z = 392.6 }, rot = { x = 0.0, y = 324.6, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 221, gadget_id = 70310001, pos = { x = 175.6, y = 56.8, z = 360.8 }, rot = { x = 0.0, y = 259.3, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 222, gadget_id = 70310001, pos = { x = 176.4, y = 56.9, z = 378.4 }, rot = { x = 0.0, y = 117.3, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 223, gadget_id = 70310001, pos = { x = 183.9, y = 56.8, z = 392.7 }, rot = { x = 0.0, y = 61.4, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 224, gadget_id = 70310002, pos = { x = 25.9, y = 55.6, z = 34.0 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 225, gadget_id = 70310002, pos = { x = 20.0, y = 54.7, z = 65.8 }, rot = { x = 0.0, y = 270.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 226, gadget_id = 70310002, pos = { x = 41.0, y = 46.0, z = 84.8 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 227, gadget_id = 70310002, pos = { x = 35.9, y = 44.8, z = 109.7 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 228, gadget_id = 70310002, pos = { x = 176.5, y = 47.5, z = 115.6 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 229, gadget_id = 70310002, pos = { x = 176.5, y = 47.4, z = 126.5 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 230, gadget_id = 70310002, pos = { x = 185.1, y = 47.5, z = 135.0 }, rot = { x = 0.0, y = 180.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 231, gadget_id = 70310002, pos = { x = 196.1, y = 47.5, z = 135.0 }, rot = { x = 0.0, y = 180.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 232, gadget_id = 70310002, pos = { x = 186.5, y = 47.7, z = 142.5 }, rot = { x = 0.0, y = 87.2, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 233, gadget_id = 70310002, pos = { x = 194.7, y = 49.3, z = 160.3 }, rot = { x = 0.0, y = 273.8, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 234, gadget_id = 70310002, pos = { x = 186.3, y = 49.2, z = 160.2 }, rot = { x = 0.0, y = 95.2, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 235, gadget_id = 70310002, pos = { x = 185.5, y = 63.6, z = 349.0 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 236, gadget_id = 70310002, pos = { x = 197.5, y = 63.7, z = 349.0 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 237, gadget_id = 70310002, pos = { x = 174.0, y = 62.2, z = 333.0 }, rot = { x = 0.0, y = 270.0, z = 0.0 }, level = 1, state = GadgetState.GearStart },
	{ config_id = 238, gadget_id = 70310002, pos = { x = 209.0, y = 62.2, z = 333.1 }, rot = { x = 0.0, y = 75.0, z = 0.0 }, level = 1, state = GadgetState.GearStart }
}

-- 区域
regions = {
	{ config_id = 54, shape = RegionShape.SPHERE, radius = 5, pos = { x = -0.3, y = 52.0, z = -2.8 } },
	{ config_id = 55, shape = RegionShape.SPHERE, radius = 5, pos = { x = 4.3, y = 52.0, z = 11.1 } },
	{ config_id = 56, shape = RegionShape.SPHERE, radius = 5, pos = { x = -3.7, y = 52.0, z = 3.9 } },
	{ config_id = 57, shape = RegionShape.SPHERE, radius = 5, pos = { x = -5.2, y = 51.8, z = -3.1 } }
}

-- 触发器
triggers = {
	{ name = "ENTER_REGION_54", event = EventType.EVENT_ENTER_REGION, source = "", condition = "", action = "" },
	{ name = "ENTER_REGION_55", event = EventType.EVENT_ENTER_REGION, source = "", condition = "", action = "" },
	{ name = "ENTER_REGION_56", event = EventType.EVENT_ENTER_REGION, source = "", condition = "", action = "" },
	{ name = "CLIENT_EXECUTE_57", event = EventType.EVENT_CLIENT_EXECUTE, source = "FireSourceChange", condition = "", action = "action_EVENT_CLIENT_EXECUTE_57", trigger_count = 0 }
}

-- 变量
variables = {
}

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

-- 初始化时创建
init_config = {
	suite = 1,
	rand_suite = true,
	npcs = { }
}

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

suites = {
	{
		-- suite_id = 0,
		-- description = ,
		monsters = { },
		gadgets = { 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238 },
		regions = { 57 },
		triggers = { "CLIENT_EXECUTE_57" },
		rand_weight = 100
	}
}

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

-- 触发条件

-- 触发操作

-- 触发条件

-- 触发操作

-- 触发条件

-- 触发操作

-- 触发条件

-- 触发操作
function action_EVENT_CLIENT_EXECUTE_57(context, evt)
	-- 针对groupid为 220006009 中该config对应的物件进行状态改变操作
	local this_gadget = ScriptLib.GetGadgetConfigId(context, { gadget_eid = evt.source_eid })
		--ScriptLib.PrintLog("config_id="..this_gadget)
	
		if evt.param1 == 1 then
			ScriptLib.SetGroupGadgetStateByConfigId(context, 220006009, this_gadget, GadgetState.GearStart )
			return 0
		end
	
		if evt.param1 == 0 then
			ScriptLib.SetGroupGadgetStateByConfigId(context, 220006009, this_gadget, GadgetState.Default )
			return 0
		end
	
	return 0
end
