-- 基础信息 local base_info = { group_id = 166001473 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 473001, monster_id = 24010301, pos = { x = 56.998, y = 313.152, z = 369.969 }, rot = { x = 0.000, y = 359.687, z = 0.000 }, level = 36, drop_id = 1000100, pose_id = 101, area_id = 300 } } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 473004, gadget_id = 70360342, pos = { x = 56.286, y = 313.430, z = 365.484 }, rot = { x = 12.204, y = 0.000, z = 0.000 }, level = 36, area_id = 300 }, { config_id = 473005, gadget_id = 70360342, pos = { x = 56.296, y = 314.194, z = 365.065 }, rot = { x = 54.494, y = 0.000, z = 0.000 }, level = 36, area_id = 300 } } -- 区域 regions = { { config_id = 473002, shape = RegionShape.SPHERE, radius = 5, pos = { x = 62.236, y = 322.850, z = 391.871 }, area_id = 300 } } -- 触发器 triggers = { { config_id = 1473002, name = "ENTER_REGION_473002", event = EventType.EVENT_ENTER_REGION, source = "", condition = "", action = "action_EVENT_ENTER_REGION_473002" }, { config_id = 1473003, name = "ANY_MONSTER_DIE_473003", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_473003", action = "action_EVENT_ANY_MONSTER_DIE_473003" }, { config_id = 1473006, name = "GROUP_LOAD_473006", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_473006", action = "action_EVENT_GROUP_LOAD_473006", trigger_count = 0 } } -- 变量 variables = { { config_id = 1, name = "mud", value = 0, no_refresh = true } } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 473004, 473005 }, regions = { 473002 }, triggers = { "ENTER_REGION_473002", "ANY_MONSTER_DIE_473003", "GROUP_LOAD_473006" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发操作 function action_EVENT_ENTER_REGION_473002(context, evt) -- 延迟0秒刷怪 if 0 ~= ScriptLib.CreateMonster(context, { config_id = 473001, delay_time = 0 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster") return -1 end return 0 end -- 触发条件 function condition_EVENT_ANY_MONSTER_DIE_473003(context, evt) -- 判断剩余怪物数量是否是0 if ScriptLib.GetGroupMonsterCount(context) ~= 0 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_DIE_473003(context, evt) -- 将本组内变量名为 "mud" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValue(context, "mud", 1) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable") return -1 end -- 将本组内变量名为 "open" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "open", 1, 166001049) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 473004 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 473005 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end return 0 end -- 触发条件 function condition_EVENT_GROUP_LOAD_473006(context, evt) -- 判断变量"mud"为1 if ScriptLib.GetGroupVariableValue(context, "mud") ~= 1 then return false end return true end -- 触发操作 function action_EVENT_GROUP_LOAD_473006(context, evt) -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 473005 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 473004 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end return 0 end