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

189 lines
6.0 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 = 250075005
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 5001, gadget_id = 70290483, pos = { x = 452.863, y = 14.145, z = 483.961 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 5002, gadget_id = 70290484, pos = { x = 457.190, y = 13.721, z = 484.146 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 5003, gadget_id = 70290485, pos = { x = 445.570, y = 13.952, z = 482.766 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 5004, gadget_id = 70290526, pos = { x = 452.842, y = 13.717, z = 484.158 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 5005, gadget_id = 70290519, pos = { x = 445.827, y = 13.719, z = 482.733 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 5006, gadget_id = 70211002, pos = { x = 457.425, y = 13.728, z = 484.139 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, drop_tag = "战斗低级蒙德", isOneoff = true, persistent = true },
{ config_id = 5007, gadget_id = 70290526, pos = { x = 450.616, y = 13.749, z = 489.394 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1005008, name = "GADGET_CREATE_5008", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_5008", action = "action_EVENT_GADGET_CREATE_5008" },
{ config_id = 1005009, name = "SELECT_OPTION_5009", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_5009", action = "action_EVENT_SELECT_OPTION_5009" },
{ config_id = 1005010, name = "SELECT_OPTION_5010", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_5010", action = "action_EVENT_SELECT_OPTION_5010" }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 5001, 5002, 5003, 5004, 5005, 5006, 5007 },
regions = { },
triggers = { "GADGET_CREATE_5008", "SELECT_OPTION_5009", "SELECT_OPTION_5010" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_CREATE_5008(context, evt)
if 5007 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_5008(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250075005, 5007, {1,4}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_5009(context, evt)
-- 判断是gadgetid 5007 option_id 1
if 5007 ~= evt.param1 then
return false
end
if 1 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_5009(context, evt)
-- 删除指定group: 250075005 ;指定config:5007;物件身上指定option:1;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250075005, 5007, 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 将configid为 5001 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 5001, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 5002 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 5002, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 5003 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 5003, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_5010(context, evt)
-- 判断是gadgetid 5007 option_id 4
if 5007 ~= evt.param1 then
return false
end
if 4 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_5010(context, evt)
-- 删除指定group: 250075005 ;指定config:5007;物件身上指定option:4;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250075005, 5007, 4) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 将configid为 5001 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 5001, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 5002 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 5002, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 5003 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 5003, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end