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

135 lines
2.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 = 250006002
}
-- Trigger变量
local defs = {
gadget_id_1 = 14,
gadget_id_2 = 104
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 14, gadget_id = 70360002, pos = { x = 343.186, y = -29.017, z = 436.651 }, rot = { x = 0.000, y = 358.997, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1000001, name = "GADGET_CREATE_1", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_1", action = "action_EVENT_GADGET_CREATE_1" },
{ config_id = 1000002, name = "SELECT_OPTION_2", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_2", action = "action_EVENT_SELECT_OPTION_2", trigger_count = 0, forbid_guest = false }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 1,
rand_suite = true
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 14 },
regions = { },
triggers = { "GADGET_CREATE_1", "SELECT_OPTION_2" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_CREATE_1(context, evt)
if 14 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_1(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptions(context, {104}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_work_options")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_2(context, evt)
if 14 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_2(context, evt)
-- 根据不同的选项做不同的操作
if defs.gadget_id_2 == evt.param2 then
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, defs.gadget_id_1, GadgetState.GearStart) then
return -1
end
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 250006003, suite = 1 }) then
return -1
end
-- 删除指定group: 250006002 ;指定config:14;物件身上指定option:104;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250006002, defs.gadget_id_1, 104) then
return -1
end
return 0
end
return 0
end