-- 基础信息 local base_info = { group_id = 133002055 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 55002, monster_id = 28020306, pos = { x = 1215.016, y = 387.749, z = -732.250 }, rot = { x = 0.000, y = 163.895, z = 0.000 }, level = 1, drop_id = 1000100, climate_area_id = 1, area_id = 10 } } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 55005, gadget_id = 70710587, pos = { x = 1191.471, y = 391.648, z = -708.691 }, rot = { x = 0.000, y = 342.183, z = 0.000 }, level = 1, area_id = 10 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1055003, name = "QUEST_FINISH_55003", event = EventType.EVENT_QUEST_FINISH, source = "", condition = "condition_EVENT_QUEST_FINISH_55003", action = "action_EVENT_QUEST_FINISH_55003" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { 55002 }, gadgets = { 55005 }, regions = { }, triggers = { "QUEST_FINISH_55003" }, rand_weight = 100, ban_refresh = true } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_QUEST_FINISH_55003(context, evt) --检查ID为4002719的任务的完成状态是否为1(1=完成,0=失败) --此事件需要配合Quest表使用,在Quest表里的完成执行中配置“通知group脚本”,则该任务完成后服务端会向对应的group发送通知,参数1填写场景ID,参数2填写group ID(如果不填则会通知所有group) --检查任务ID if 4002719 ~= evt.param1 then return false end --检查任务成功状态 if 1 ~= evt.param2 then return false end return true end -- 触发操作 function action_EVENT_QUEST_FINISH_55003(context, evt) -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 55005 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end return 0 end