Files
hk4e-go/gdconf/game_data_config/lua/scene/47017/scene47017_group247017002.lua
T
2022-11-30 00:00:20 +08:00

292 lines
12 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 基础信息
local base_info = {
group_id = 247017002
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 2001, monster_id = 21010201, pos = { x = 7.117, y = 0.038, z = -79.816 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2002, monster_id = 21010201, pos = { x = 2.052, y = 0.038, z = -72.466 }, rot = { x = 0.000, y = 200.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2003, monster_id = 21011001, pos = { x = -2.730, y = 0.053, z = -72.552 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2004, monster_id = 21011001, pos = { x = -6.903, y = 0.038, z = -75.339 }, rot = { x = 0.000, y = 120.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2005, monster_id = 21010101, pos = { x = -7.049, y = 0.043, z = -83.914 }, rot = { x = 0.000, y = 60.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2006, monster_id = 21010101, pos = { x = -0.643, y = 0.039, z = -87.367 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2007, monster_id = 21020701, pos = { x = 4.528, y = 0.047, z = -85.558 }, rot = { x = 0.000, y = 325.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2008, monster_id = 21010201, pos = { x = 5.791, y = 0.038, z = -74.587 }, rot = { x = 0.000, y = 245.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2009, monster_id = 21011601, pos = { x = -3.814, y = 0.045, z = -87.043 }, rot = { x = 0.000, y = 25.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2010, monster_id = 21010201, pos = { x = -7.260, y = 0.049, z = -79.512 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2011, monster_id = 21030101, pos = { x = 6.549, y = 0.059, z = -82.356 }, rot = { x = 0.000, y = 285.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2012, monster_id = 21010201, pos = { x = 7.151, y = 0.034, z = -78.207 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2013, monster_id = 21010201, pos = { x = 3.821, y = 0.034, z = -72.927 }, rot = { x = 0.000, y = 200.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2014, monster_id = 21010901, pos = { x = -1.212, y = 0.050, z = -72.304 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2015, monster_id = 21010901, pos = { x = -5.588, y = 0.034, z = -73.712 }, rot = { x = 0.000, y = 135.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2016, monster_id = 21030601, pos = { x = -5.744, y = 0.039, z = -85.855 }, rot = { x = 0.000, y = 60.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } },
{ config_id = 2017, monster_id = 21010201, pos = { x = 0.036, y = 0.035, z = -87.432 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 1007, 1010 } }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 2018, gadget_id = 70360001, pos = { x = -0.023, y = 0.038, z = -79.879 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 2019, gadget_id = 70290137, pos = { x = 0.064, y = 0.698, z = -99.726 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, state = GadgetState.GearStart },
{ config_id = 2020, gadget_id = 70290137, pos = { x = 0.079, y = 0.686, z = -59.714 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, state = GadgetState.GearStart },
{ config_id = 2021, gadget_id = 70290137, pos = { x = -19.866, y = 0.687, z = -79.890 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, state = GadgetState.GearStart },
{ config_id = 2022, gadget_id = 70290137, pos = { x = 20.086, y = 0.680, z = -79.851 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, state = GadgetState.GearStart }
}
-- 区域
regions = {
{ config_id = 2025, shape = RegionShape.CUBIC, size = { x = 25.000, y = 10.000, z = 25.000 }, pos = { x = 1.049, y = 0.242, z = -80.427 } }
}
-- 触发器
triggers = {
{ config_id = 1002023, name = "GADGET_CREATE_2023", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_2023", action = "action_EVENT_GADGET_CREATE_2023" },
{ config_id = 1002024, name = "SELECT_OPTION_2024", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_2024", action = "action_EVENT_SELECT_OPTION_2024" },
{ config_id = 1002025, name = "ENTER_REGION_2025", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_2025", action = "action_EVENT_ENTER_REGION_2025" },
{ config_id = 1002026, name = "ANY_MONSTER_DIE_2026", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_2026", action = "action_EVENT_ANY_MONSTER_DIE_2026" },
{ config_id = 1002027, name = "ANY_MONSTER_DIE_2027", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_2027", action = "action_EVENT_ANY_MONSTER_DIE_2027" },
{ config_id = 1002028, name = "ANY_MONSTER_DIE_2028", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_2028", action = "action_EVENT_ANY_MONSTER_DIE_2028" }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 2018, 2019, 2020, 2021, 2022 },
regions = { 2025 },
triggers = { "GADGET_CREATE_2023", "SELECT_OPTION_2024", "ENTER_REGION_2025" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { 2001, 2002, 2003, 2004, 2005, 2006 },
gadgets = { },
regions = { },
triggers = { "ANY_MONSTER_DIE_2026" },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = ,
monsters = { 2012, 2013, 2014, 2015, 2016, 2017 },
gadgets = { },
regions = { },
triggers = { "ANY_MONSTER_DIE_2028" },
rand_weight = 100
},
{
-- suite_id = 4,
-- description = ,
monsters = { 2007, 2008, 2009, 2010, 2011 },
gadgets = { },
regions = { },
triggers = { "ANY_MONSTER_DIE_2027" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_CREATE_2023(context, evt)
if 2018 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_2023(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 247017002, 2018, {175}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_2024(context, evt)
-- 判断是gadgetid 2018 option_id 175
if 2018 ~= evt.param1 then
return false
end
if 175 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_2024(context, evt)
-- 删除指定group: 247017002 ;指定config:2018;物件身上指定option:175;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 247017002, 2018, 175) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 添加suite2的新内容
ScriptLib.AddExtraGroupSuite(context, 247017002, 2)
return 0
end
-- 触发条件
function condition_EVENT_ENTER_REGION_2025(context, evt)
if evt.param1 ~= 2025 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_2025(context, evt)
-- 将configid为 2019 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2019, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 2020 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2020, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 2021 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2021, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 2022 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2022, 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_2026(context, evt)
-- 判断剩余怪物数量是否是0
if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_2026(context, evt)
-- 添加suite3的新内容
ScriptLib.AddExtraGroupSuite(context, 247017002, 3)
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_2027(context, evt)
-- 判断剩余怪物数量是否是0
if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_2027(context, evt)
-- 将configid为 2019 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2019, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 2020 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2020, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 2021 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2021, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 2022 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2022, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_2028(context, evt)
-- 判断剩余怪物数量是否是0
if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_2028(context, evt)
-- 添加suite4的新内容
ScriptLib.AddExtraGroupSuite(context, 247017002, 4)
return 0
end