252 lines
8.5 KiB
Go
252 lines
8.5 KiB
Go
-- 基础信息
|
||
local base_info = {
|
||
group_id = 250055006
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
{ config_id = 6001, monster_id = 23010101, pos = { x = -32.521, y = 10.339, z = 75.185 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1, disableWander = true },
|
||
{ config_id = 6002, monster_id = 23010501, pos = { x = -34.756, y = 10.332, z = 80.856 }, rot = { x = 0.000, y = 225.000, z = 0.000 }, level = 1, disableWander = true },
|
||
{ config_id = 6003, monster_id = 23010401, pos = { x = -34.726, y = 10.332, z = 68.911 }, rot = { x = 0.000, y = 300.000, z = 0.000 }, level = 1, disableWander = true },
|
||
{ config_id = 6004, monster_id = 23010101, pos = { x = -46.429, y = 10.367, z = 71.936 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, disableWander = true },
|
||
{ config_id = 6005, monster_id = 23010101, pos = { x = -46.265, y = 10.346, z = 78.698 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, disableWander = true }
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 6012, gadget_id = 70360001, pos = { x = -39.279, y = 10.388, z = 75.207 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 6013, gadget_id = 70290137, pos = { x = -39.222, y = 10.887, z = 60.135 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, state = GadgetState.GearStart },
|
||
{ config_id = 6014, gadget_id = 70290137, pos = { x = -39.215, y = 10.959, z = 90.197 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, state = GadgetState.GearStart },
|
||
{ config_id = 6015, gadget_id = 70290137, pos = { x = -54.061, y = 11.011, z = 75.093 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, state = GadgetState.GearStart },
|
||
{ config_id = 6016, gadget_id = 70290137, pos = { x = -24.157, y = 10.923, z = 75.116 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, state = GadgetState.GearStart }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
{ config_id = 6019, shape = RegionShape.CUBIC, size = { x = 25.000, y = 10.000, z = 25.000 }, pos = { x = -40.129, y = 10.429, z = 75.274 } }
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1006006, name = "ANY_MONSTER_DIE_6006", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_6006", action = "action_EVENT_ANY_MONSTER_DIE_6006" },
|
||
{ config_id = 1006017, name = "GADGET_CREATE_6017", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_6017", action = "action_EVENT_GADGET_CREATE_6017" },
|
||
{ config_id = 1006018, name = "SELECT_OPTION_6018", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_6018", action = "action_EVENT_SELECT_OPTION_6018" },
|
||
{ config_id = 1006019, name = "ENTER_REGION_6019", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_6019", action = "action_EVENT_ENTER_REGION_6019" },
|
||
{ config_id = 1006021, name = "ANY_MONSTER_DIE_6021", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_6021", action = "action_EVENT_ANY_MONSTER_DIE_6021" }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
end_suite = 0,
|
||
rand_suite = false
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 6012, 6013, 6014, 6015, 6016 },
|
||
regions = { 6019 },
|
||
triggers = { "GADGET_CREATE_6017", "SELECT_OPTION_6018", "ENTER_REGION_6019" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 2,
|
||
-- description = ,
|
||
monsters = { 6004, 6005 },
|
||
gadgets = { },
|
||
regions = { },
|
||
triggers = { "ANY_MONSTER_DIE_6006" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 3,
|
||
-- description = ,
|
||
monsters = { 6001, 6002, 6003 },
|
||
gadgets = { },
|
||
regions = { },
|
||
triggers = { "ANY_MONSTER_DIE_6021" },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_6006(context, evt)
|
||
-- 判断剩余怪物数量是否是0
|
||
if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_6006(context, evt)
|
||
-- 添加suite3的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 250055006, 3)
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GADGET_CREATE_6017(context, evt)
|
||
if 6012 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GADGET_CREATE_6017(context, evt)
|
||
-- 设置操作台选项
|
||
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250055006, 6012, {175}) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_SELECT_OPTION_6018(context, evt)
|
||
-- 判断是gadgetid 6012 option_id 175
|
||
if 6012 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
if 175 ~= evt.param2 then
|
||
return false
|
||
end
|
||
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_SELECT_OPTION_6018(context, evt)
|
||
-- 删除指定group: 250055006 ;指定config:6012;物件身上指定option:175;
|
||
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250055006, 6012, 175) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 添加suite2的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 250055006, 2)
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ENTER_REGION_6019(context, evt)
|
||
if evt.param1 ~= 6019 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_6019(context, evt)
|
||
-- 将configid为 6013 的物件更改为状态 GadgetState.Default
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6013, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 将configid为 6014 的物件更改为状态 GadgetState.Default
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6014, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 将configid为 6015 的物件更改为状态 GadgetState.Default
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6015, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 将configid为 6016 的物件更改为状态 GadgetState.Default
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6016, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_6021(context, evt)
|
||
-- 判断剩余怪物数量是否是0
|
||
if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_6021(context, evt)
|
||
-- 将configid为 6013 的物件更改为状态 GadgetState.GearStart
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6013, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 将configid为 6014 的物件更改为状态 GadgetState.GearStart
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6014, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 将configid为 6015 的物件更改为状态 GadgetState.GearStart
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6015, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 将configid为 6016 的物件更改为状态 GadgetState.GearStart
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 6016, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end |