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

153 lines
3.9 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 = 244002007
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 7002, gadget_id = 70360002, pos = { x = 343.297, y = -12.741, z = 263.058 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, is_guest_can_operate = true }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1007001, name = "GADGET_CREATE_7001", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_7001", action = "action_EVENT_GADGET_CREATE_7001" },
{ config_id = 1007003, name = "SELECT_OPTION_7003", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_7003", action = "action_EVENT_SELECT_OPTION_7003", forbid_guest = false }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 7002 },
regions = { },
triggers = { "GADGET_CREATE_7001", "SELECT_OPTION_7003" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_CREATE_7001(context, evt)
if 7002 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_7001(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 244002007, 7002, {214}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_7003(context, evt)
-- 判断是gadgetid 7002 option_id 214
if 7002 ~= evt.param1 then
return false
end
if 214 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_7003(context, evt)
-- 添加suite2的新内容
ScriptLib.AddExtraGroupSuite(context, 244002008, 2)
-- 删除指定group: 244002007 ;指定config:7002;物件身上指定option:214;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 244002007, 7002, 214) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 改变指定group组244002001中, configid为1020的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 244002001, 1020, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 改变指定group组244002001中, configid为1021的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 244002001, 1021, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 将configid为 7002 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 7002, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 删除suite4的所有内容
ScriptLib.RemoveExtraGroupSuite(context, 244002009, 4)
return 0
end