-- 基础信息 local base_info = { group_id = 250083001 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 1001, gadget_id = 70380001, pos = { x = -90.293, y = -29.735, z = 64.686 }, rot = { x = 0.000, y = 0.000, z = 268.946 }, level = 1, is_use_point_array = true }, { config_id = 1003, gadget_id = 70310175, pos = { x = -89.400, y = -29.323, z = 64.518 }, rot = { x = 0.000, y = 0.000, z = 270.000 }, level = 1, is_use_point_array = true } } -- 区域 regions = { { config_id = 1002, shape = RegionShape.SPHERE, radius = 5, pos = { x = -79.354, y = -31.322, z = 55.086 } } } -- 触发器 triggers = { { config_id = 1001002, name = "ENTER_REGION_1002", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_1002", action = "action_EVENT_ENTER_REGION_1002", trigger_count = 0 } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 1001, 1003 }, regions = { 1002 }, triggers = { "ENTER_REGION_1002" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ENTER_REGION_1002(context, evt) if evt.param1 ~= 1002 then return false end -- 判断角色数量不少于0 if ScriptLib.GetRegionEntityCount(context, { region_eid = evt.source_eid, entity_type = EntityType.AVATAR }) < 0 then return false end return true end -- 触发操作 function action_EVENT_ENTER_REGION_1002(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 = true} if 0 ~= ScriptLib.SetPlatformPointArray(context, 1001, 1, {1,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 = true} if 0 ~= ScriptLib.SetPlatformPointArray(context, 1003, 2, {1,2}, tempParam) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray") return -1 end return 0 end