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

-- 怪物
monsters = {
	{ config_id = 8, monster_id = 20011201, pos = { x = 448.7, y = -24.4, z = 68.4 }, rot = { x = 0.0, y = 92.3, z = 0.0 }, level = 1, drop_id = 1100309 }
}

-- NPC
npcs = {
}

-- 装置
gadgets = {
	{ config_id = 1, gadget_id = 70210011, pos = { x = 507.4, y = -37.2, z = 83.8 }, rot = { x = 0.0, y = 182.3, z = 0.0 }, level = 1, chest_drop_id = 1100301, type = GadgetType.GADGET_DUNGEON_SECRET_CHEST },
	{ config_id = 3, gadget_id = 70350002, pos = { x = 469.6, y = -20.4, z = 67.5 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1 },
	{ config_id = 5, gadget_id = 70360002, pos = { x = 475.5, y = -20.0, z = 63.9 }, rot = { x = 0.0, y = 90.1, z = 0.0 }, level = 1 },
	{ config_id = 6, gadget_id = 70210011, pos = { x = 428.4, y = -22.1, z = 53.6 }, rot = { x = 0.0, y = 321.6, z = 0.0 }, level = 1, chest_drop_id = 1100301, type = GadgetType.GADGET_DUNGEON_SECRET_CHEST },
	{ config_id = 10, gadget_id = 70350002, pos = { x = 406.4, y = -22.2, z = 81.4 }, rot = { x = 0.0, y = 180.2, z = 0.0 }, level = 1 },
	{ config_id = 23, gadget_id = 70350002, pos = { x = 423.5, y = -22.1, z = 71.1 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1 },
	{ config_id = 25, gadget_id = 70220013, pos = { x = 490.5, y = -20.1, z = 78.2 }, rot = { x = 0.0, y = 41.5, z = 0.0 }, level = 1 },
	{ config_id = 26, gadget_id = 70220013, pos = { x = 491.5, y = -20.3, z = 75.8 }, rot = { x = 0.0, y = 272.6, z = 0.0 }, level = 1 },
	{ config_id = 27, gadget_id = 70210011, pos = { x = 495.1, y = -20.0, z = 77.0 }, rot = { x = 0.0, y = 75.6, z = 0.0 }, level = 1, chest_drop_id = 1100301, type = GadgetType.GADGET_DUNGEON_SECRET_CHEST },
	{ config_id = 28, gadget_id = 70220014, pos = { x = 489.4, y = -20.3, z = 79.6 }, rot = { x = 0.0, y = 283.9, z = 0.0 }, level = 1 },
	{ config_id = 31, gadget_id = 70220013, pos = { x = 502.9, y = -37.3, z = 81.8 }, rot = { x = 0.0, y = 351.4, z = 0.0 }, level = 1 },
	{ config_id = 32, gadget_id = 70220013, pos = { x = 505.4, y = -37.5, z = 82.0 }, rot = { x = 0.0, y = 314.5, z = 0.0 }, level = 1 },
	{ config_id = 33, gadget_id = 70220013, pos = { x = 504.5, y = -37.7, z = 80.1 }, rot = { x = 0.0, y = 290.5, z = 0.0 }, level = 1 },
	{ config_id = 39, gadget_id = 70310002, pos = { x = 494.2, y = -27.0, z = 70.9 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1 },
	{ config_id = 40, gadget_id = 70310002, pos = { x = 494.4, y = -26.8, z = 64.1 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1 },
	{ config_id = 41, gadget_id = 70310002, pos = { x = 495.3, y = -16.2, z = 72.0 }, rot = { x = 0.0, y = 180.0, z = 0.0 }, level = 1 },
	{ config_id = 42, gadget_id = 70310002, pos = { x = 495.0, y = -16.4, z = 63.2 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 43, gadget_id = 70310002, pos = { x = 450.2, y = -19.6, z = 64.2 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 44, gadget_id = 70310001, pos = { x = 425.9, y = -22.3, z = 65.5 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1 },
	{ config_id = 45, gadget_id = 70310001, pos = { x = 426.0, y = -22.2, z = 76.8 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1 },
	{ config_id = 46, gadget_id = 70310001, pos = { x = 400.7, y = -20.1, z = 78.9 }, rot = { x = 0.0, y = 180.0, z = 0.0 }, level = 1 },
	{ config_id = 47, gadget_id = 70310001, pos = { x = 411.8, y = -20.1, z = 78.9 }, rot = { x = 0.0, y = 180.0, z = 0.0 }, level = 1 },
	{ config_id = 54, gadget_id = 70310002, pos = { x = 472.1, y = -15.7, z = 61.6 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1 },
	{ config_id = 55, gadget_id = 70310002, pos = { x = 472.1, y = -15.6, z = 73.3 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1 },
	{ config_id = 61, gadget_id = 70310002, pos = { x = 501.0, y = -31.4, z = 84.4 }, rot = { x = 0.0, y = 90.0, z = 0.0 }, level = 1 },
	{ config_id = 62, gadget_id = 70310001, pos = { x = 420.8, y = -22.1, z = 58.1 }, rot = { x = 0.0, y = 99.0, z = 0.0 }, level = 1 },
	{ config_id = 67, gadget_id = 70310001, pos = { x = 544.6, y = -42.1, z = 46.2 }, rot = { x = 0.0, y = 223.2, z = 0.0 }, level = 1 },
	{ config_id = 68, gadget_id = 70310001, pos = { x = 555.3, y = -42.0, z = 46.2 }, rot = { x = 0.0, y = 183.0, z = 0.0 }, level = 1 },
	{ config_id = 71, gadget_id = 70310001, pos = { x = 544.7, y = -43.4, z = 40.2 }, rot = { x = 0.0, y = 64.0, z = 0.0 }, level = 1 },
	{ config_id = 72, gadget_id = 70310001, pos = { x = 555.5, y = -43.4, z = 40.6 }, rot = { x = 0.0, y = 83.2, z = 0.0 }, level = 1 },
	{ config_id = 73, gadget_id = 70310001, pos = { x = 555.6, y = -40.5, z = 51.3 }, rot = { x = 0.0, y = 76.8, z = 0.0 }, level = 1 },
	{ config_id = 74, gadget_id = 70310001, pos = { x = 544.6, y = -40.6, z = 51.1 }, rot = { x = 0.0, y = 266.0, z = 0.0 }, level = 1 },
	{ config_id = 75, gadget_id = 70310001, pos = { x = 555.4, y = -39.3, z = 55.2 }, rot = { x = 0.0, y = 209.6, z = 0.0 }, level = 1 },
	{ config_id = 76, gadget_id = 70310001, pos = { x = 544.8, y = -39.3, z = 55.3 }, rot = { x = 0.0, y = 97.2, z = 0.0 }, level = 1 },
	{ config_id = 77, gadget_id = 70310001, pos = { x = 555.3, y = -38.2, z = 71.1 }, rot = { x = 0.0, y = 348.4, z = 0.0 }, level = 1 },
	{ config_id = 78, gadget_id = 70310001, pos = { x = 545.1, y = -38.1, z = 71.2 }, rot = { x = 0.0, y = 239.0, z = 0.0 }, level = 1 },
	{ config_id = 79, gadget_id = 70310001, pos = { x = 555.4, y = -38.2, z = 81.8 }, rot = { x = 0.0, y = 21.3, z = 0.0 }, level = 1 },
	{ config_id = 80, gadget_id = 70310001, pos = { x = 545.1, y = -38.2, z = 81.5 }, rot = { x = 0.0, y = 100.8, z = 0.0 }, level = 1 },
	{ config_id = 87, gadget_id = 70900202, pos = { x = 532.3, y = 2.3, z = 219.9 }, rot = { x = 0.0, y = 331.6, z = 0.0 }, level = 1 },
	{ config_id = 88, gadget_id = 70900202, pos = { x = 496.3, y = -34.5, z = 67.7 }, rot = { x = 0.0, y = 275.0, z = 0.0 }, level = 1 },
	{ config_id = 89, gadget_id = 70900202, pos = { x = 475.4, y = -18.5, z = 63.9 }, rot = { x = 0.0, y = 162.9, z = 0.0 }, level = 1 },
	{ config_id = 90, gadget_id = 70900205, pos = { x = 402.2, y = -22.1, z = 54.8 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 91, gadget_id = 70900205, pos = { x = 398.6, y = -22.1, z = 54.8 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 92, gadget_id = 70900205, pos = { x = 402.1, y = -22.1, z = 51.1 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 93, gadget_id = 70900205, pos = { x = 398.3, y = -22.1, z = 50.3 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 135, gadget_id = 70900008, pos = { x = 410.5, y = -22.1, z = 63.9 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1 },
	{ config_id = 136, gadget_id = 70210022, pos = { x = 400.1, y = -22.1, z = 65.4 }, rot = { x = 0.0, y = 91.0, z = 0.0 }, level = 1, chest_drop_id = 1100302, state = GadgetState.ChestLocked, type = GadgetType.GADGET_DUNGEON_SECRET_CHEST },
	{ config_id = 142, gadget_id = 70900201, pos = { x = 533.9, y = -2.0, z = 248.0 }, rot = { x = 0.0, y = 120.1, z = 0.0 }, level = 1 }
}

-- 区域
regions = {
	{ config_id = 1, shape = RegionShape.SPHERE, radius = 5, pos = { x = 481.4, y = -21.4, z = 69.3 } },
	{ config_id = 4, shape = RegionShape.SPHERE, radius = 5, pos = { x = 480.0, y = -21.6, z = 67.3 } },
	{ config_id = 7, shape = RegionShape.SPHERE, radius = 5, pos = { x = 447.7, y = -22.1, z = 69.3 } },
	{ config_id = 13, shape = RegionShape.SPHERE, radius = 9, pos = { x = 550.0, y = -38.1, z = 75.8 } },
	{ config_id = 14, shape = RegionShape.CUBIC, size = { x = 15.0, y = 10.0, z = 25.0 }, pos = { x = 512.0, y = -35.2, z = 75.1 } },
	{ config_id = 15, shape = RegionShape.CUBIC, size = { x = 10.0, y = 3.0, z = 8.0 }, pos = { x = 429.5, y = -21.6, z = 78.9 } },
	{ config_id = 16, shape = RegionShape.CUBIC, size = { x = 6.0, y = 5.0, z = 12.0 }, pos = { x = 459.7, y = -22.6, z = 69.2 } },
	{ config_id = 17, shape = RegionShape.CUBIC, size = { x = 6.0, y = 8.0, z = 5.0 }, pos = { x = 430.5, y = -22.1, z = 62.7 } },
	{ config_id = 28, shape = RegionShape.SPHERE, radius = 5, pos = { x = 449.0, y = -21.6, z = 69.1 } },
	{ config_id = 36, shape = RegionShape.CUBIC, size = { x = 8.0, y = 5.0, z = 8.0 }, pos = { x = 496.6, y = -27.5, z = 67.7 } },
	{ config_id = 37, shape = RegionShape.CUBIC, size = { x = 6.0, y = 3.0, z = 9.0 }, pos = { x = 497.0, y = -16.9, z = 67.7 } },
	{ config_id = 39, shape = RegionShape.SPHERE, radius = 5, pos = { x = 502.2, y = -37.3, z = 85.4 } },
	{ config_id = 44, shape = RegionShape.CUBIC, size = { x = 15.0, y = 3.0, z = 3.0 }, pos = { x = 550.0, y = -42.2, z = 43.2 } },
	{ config_id = 45, shape = RegionShape.CUBIC, size = { x = 15.0, y = 5.0, z = 3.0 }, pos = { x = 549.7, y = -41.1, z = 48.1 } },
	{ config_id = 46, shape = RegionShape.SPHERE, radius = 5, pos = { x = 549.9, y = -38.2, z = 62.5 } },
	{ config_id = 60, shape = RegionShape.SPHERE, radius = 5, pos = { x = 411.7, y = -22.1, z = 63.8 } },
	{ config_id = 64, shape = RegionShape.SPHERE, radius = 5, pos = { x = 414.1, y = -22.1, z = 66.5 } }
}

-- 触发器
triggers = {
	{ name = "GADGET_CREATE_1", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_1", action = "action_EVENT_GADGET_CREATE_1" },
	{ name = "SELECT_OPTION_4", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_4", action = "action_EVENT_SELECT_OPTION_4" },
	{ name = "ANY_MONSTER_DIE_7", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_7", action = "action_EVENT_ANY_MONSTER_DIE_7" },
	{ name = "ENTER_REGION_13", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_13", action = "action_EVENT_ENTER_REGION_13" },
	{ name = "ENTER_REGION_14", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_14", action = "action_EVENT_ENTER_REGION_14" },
	{ name = "ENTER_REGION_15", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_15", action = "action_EVENT_ENTER_REGION_15" },
	{ name = "ENTER_REGION_16", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_16", action = "action_EVENT_ENTER_REGION_16" },
	{ name = "ENTER_REGION_17", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_17", action = "action_EVENT_ENTER_REGION_17" },
	{ name = "SELECT_OPTION_28", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_28", action = "action_EVENT_SELECT_OPTION_28" },
	{ name = "ENTER_REGION_36", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_36", action = "action_EVENT_ENTER_REGION_36" },
	{ name = "ENTER_REGION_37", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_37", action = "action_EVENT_ENTER_REGION_37" },
	{ name = "GADGET_CREATE_39", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_39", action = "action_EVENT_GADGET_CREATE_39" },
	{ name = "ENTER_REGION_44", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_44", action = "action_EVENT_ENTER_REGION_44" },
	{ name = "ENTER_REGION_45", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_45", action = "action_EVENT_ENTER_REGION_45" },
	{ name = "ENTER_REGION_46", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_46", action = "action_EVENT_ENTER_REGION_46" },
	{ name = "GADGET_STATE_CHANGE_60", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_60", action = "action_EVENT_GADGET_STATE_CHANGE_60", trigger_count = 0 },
	{ name = "TIMER_EVENT_64", event = EventType.EVENT_TIMER_EVENT, source = "begin", condition = "", action = "action_EVENT_TIMER_EVENT_64", trigger_count = 0 }
}

-- 变量
variables = {
}

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

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

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

suites = {
	{
		-- suite_id = 0,
		-- description = suite_1,
		monsters = { 8 },
		gadgets = { 1, 3, 5, 6, 10, 23, 25, 26, 27, 28, 31, 32, 33, 39, 40, 41, 42, 43, 44, 45, 46, 47, 54, 55, 61, 62, 67, 68, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 90, 91, 92, 93, 135, 136 },
		regions = { 1, 4, 7, 13, 14, 15, 16, 17, 28, 36, 37, 39, 44, 45, 46, 60, 64 },
		triggers = { "GADGET_CREATE_1", "SELECT_OPTION_4", "ANY_MONSTER_DIE_7", "ENTER_REGION_13", "ENTER_REGION_14", "ENTER_REGION_15", "ENTER_REGION_16", "ENTER_REGION_17", "SELECT_OPTION_28", "ENTER_REGION_36", "ENTER_REGION_37", "GADGET_CREATE_39", "ENTER_REGION_44", "ENTER_REGION_45", "ENTER_REGION_46", "GADGET_STATE_CHANGE_60", "TIMER_EVENT_64" },
		rand_weight = 100
	}
}

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

-- 触发条件
function condition_EVENT_GADGET_CREATE_1(context, evt)
	-- 判断是gadgetid 5
	if 5 ~= evt.param1 then
			return false
		end
	
	return true
end

-- 触发操作
function action_EVENT_GADGET_CREATE_1(context, evt)
	-- 设置操作台选项
	if 0 ~= ScriptLib.SetWorktopOptions(context, {1}) then
		return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_SELECT_OPTION_4(context, evt)
	-- 判断是gadgetid 5
	if 5 ~= evt.param1 then
			return false
		end
	
	return true
end

-- 触发操作
function action_EVENT_SELECT_OPTION_4(context, evt)
	-- 将configid为 3 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 3, GadgetState.GearStart) then
			return -1
		end 
	
		-- 杀死Group内指定的monster和gadget
		if 0 ~= ScriptLib.KillGroupEntity(context, { group_id = 220011001, monsters = {}, gadgets = {89} }) then
			return -1
		end
	
	-- 将configid为 5 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 5, GadgetState.GearStart) then
			return -1
		end 
	
	return 0
end

-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_7(context, evt)
	--判断死亡怪物的configid是否为 8
	if evt.param1 ~= 8 then
	    return false
	 end
	  
	
	return true
end

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

-- 触发条件
function condition_EVENT_ENTER_REGION_13(context, evt)
	if evt.param1 ~= 13 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_13(context, evt)
	-- 触发镜头注目，注目位置为坐标（550，-35，83），持续时间为3秒，并且为强制注目形式，不广播其他玩家
		local pos = {x=550, y=-35, z=83}
	    if 0 ~= ScriptLib.BeginCameraSceneLook(context, { look_pos = pos, duration = 3, is_force = true, is_broadcast = false }) then
					return -1
				end 
	
	-- 调用提示id为 1041001 的提示UI，会显示在屏幕中央偏下位置，id索引自 ReminderData表格
	if 0 ~= ScriptLib.ShowReminder(context, 1041001) then
		return -1
	end
	
	-- 创生gadget 88
	if 0 ~= ScriptLib.CreateGadget(context, { config_id = 88 }) then
		return -1
	end
	
	-- 创生gadget 142
	if 0 ~= ScriptLib.CreateGadget(context, { config_id = 142 }) then
		return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_14(context, evt)
	if evt.param1 ~= 14 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_14(context, evt)
	-- 调用提示id为 1041011 的提示UI，会显示在屏幕中央偏下位置，id索引自 ReminderData表格
	if 0 ~= ScriptLib.ShowReminder(context, 1041011) then
		return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_15(context, evt)
	if evt.param1 ~= 15 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_15(context, evt)
	-- 调用提示id为 1041021 的提示UI，会显示在屏幕中央偏下位置，id索引自 ReminderData表格
	if 0 ~= ScriptLib.ShowReminder(context, 1041021) then
		return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_16(context, evt)
	if evt.param1 ~= 16 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_16(context, evt)
	-- 调用提示id为 1041041 的提示UI，会显示在屏幕中央偏下位置，id索引自 ReminderData表格
	if 0 ~= ScriptLib.ShowReminder(context, 1041041) then
		return -1
	end
	
	-- 将configid为 43 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 43, GadgetState.GearStart) then
			return -1
		end 
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_17(context, evt)
	if evt.param1 ~= 17 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_17(context, evt)
	-- 调用提示id为 1041031 的提示UI，会显示在屏幕中央偏下位置，id索引自 ReminderData表格
	if 0 ~= ScriptLib.ShowReminder(context, 1041031) then
		return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_SELECT_OPTION_28(context, evt)
	-- 判断是gadgetid 5
	if 5 ~= evt.param1 then
			return false
		end
	
	return true
end

-- 触发操作
function action_EVENT_SELECT_OPTION_28(context, evt)
	-- 根据不同的选项做不同的操作
	if 1 == evt.param2 then
		if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 5, GadgetState.GearStart) then
			return -1
		end 
		return 0
	end
	
	-- 删除指定group： 220011001 ；指定config：5；物件身上指定option：1；
	if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 220011001, 5, 1) then
		return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_36(context, evt)
	if evt.param1 ~= 36 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_36(context, evt)
	-- 将configid为 39 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 39, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 40 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 40, GadgetState.GearStart) then
			return -1
		end 
	
		-- 杀死Group内指定的monster和gadget
		if 0 ~= ScriptLib.KillGroupEntity(context, { group_id = 220011001, monsters = {}, gadgets = {88,142} }) then
			return -1
		end
	
	-- 创生gadget 89
	if 0 ~= ScriptLib.CreateGadget(context, { config_id = 89 }) then
		return -1
	end
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_37(context, evt)
	if evt.param1 ~= 37 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_37(context, evt)
	-- 将configid为 41 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 41, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 42 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 42, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 54 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 54, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 55 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 55, GadgetState.GearStart) then
			return -1
		end 
	
	return 0
end

-- 触发条件
function condition_EVENT_GADGET_CREATE_39(context, evt)
	if 61 ~= evt.param1 then
		return false
	end
	
	return true
end

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

-- 触发条件
function condition_EVENT_ENTER_REGION_44(context, evt)
	if evt.param1 ~= 44 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_44(context, evt)
	-- 将configid为 67 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 67, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 68 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 68, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 71 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 71, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 72 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 72, GadgetState.GearStart) then
			return -1
		end 
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_45(context, evt)
	if evt.param1 ~= 45 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_45(context, evt)
	-- 将configid为 73 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 73, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 74 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 74, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 75 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 75, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 76 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 76, GadgetState.GearStart) then
			return -1
		end 
	
	return 0
end

-- 触发条件
function condition_EVENT_ENTER_REGION_46(context, evt)
	if evt.param1 ~= 46 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_46(context, evt)
	-- 将configid为 77 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 77, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 78 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 78, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 79 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 79, GadgetState.GearStart) then
			return -1
		end 
	
	-- 将configid为 80 的物件更改为状态 GadgetState.GearStart
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 80, GadgetState.GearStart) then
			return -1
		end 
	
	return 0
end

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

-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_60(context, evt)
	-- 通知任务系统完成条件类型"LUA通知"，复杂参数为quest_param的进度+1
	if 0 ~= ScriptLib.AddQuestProgress(context, "LisaOne") then
	  return -1
	end
	
	-- 延迟3秒后,向groupId为：220011001的对象,请求一次调用,并将string参数："begin" 传递过去
	if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 220011001, "begin", 3) then
	  return -1
	end
	
	return 0
end

-- 触发条件

-- 触发操作
function action_EVENT_TIMER_EVENT_64(context, evt)
		-- 重新生成指定group，指定suite
		if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 220011006, suite = 1 }) then
			return -1
		end
	
	return 0
end
