-- 基础信息 local base_info = { group_id = 133103469 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 469004, gadget_id = 70211102, pos = { x = 314.276, y = 188.028, z = 1468.257 }, rot = { x = 2.142, y = 18.459, z = 358.381 }, level = 21, drop_tag = "解谜低级璃月", state = GadgetState.ChestLocked, isOneoff = true, persistent = true, explore = { name = "chest", exp = 1 }, area_id = 6 } } -- 区域 regions = { { config_id = 469005, shape = RegionShape.SPHERE, radius = 3, pos = { x = 315.244, y = 189.269, z = 1469.891 }, area_id = 6 } } -- 触发器 triggers = { { config_id = 1469005, name = "ENTER_REGION_469005", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_469005", action = "action_EVENT_ENTER_REGION_469005" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = suite_1, monsters = { }, gadgets = { 469004 }, regions = { 469005 }, triggers = { "ENTER_REGION_469005" }, rand_weight = 100 }, { -- suite_id = 2, -- description = suite_2, monsters = { }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ENTER_REGION_469005(context, evt) if evt.param1 ~= 469005 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_469005(context, evt) -- 将configid为 469004 的物件更改为状态 GadgetState.Default if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 469004, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId") return -1 end return 0 end