0
0
mirror of https://gitlab.com/YuukiPS/GC-Resources.git synced 2025-04-28 17:15:22 +00:00
GC-Resources/Resources/Scripts/Scene/6/scene6_group166001029.lua
KingRainbow44 8dd3a721e5
Revert "The Great De-Local'ifying of defs and base_info"
This reverts commit 0989747b
2023-08-30 21:15:50 -04:00

199 lines
5.6 KiB
Lua
Raw Permalink 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 = 166001029
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 29001, gadget_id = 70710221, pos = { x = 1006.956, y = 747.060, z = 271.010 }, rot = { x = 0.000, y = 227.103, z = 0.000 }, level = 32, persistent = true, area_id = 300 },
{ config_id = 29003, gadget_id = 70360001, pos = { x = 1006.719, y = 748.354, z = 269.852 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 32, persistent = true, area_id = 300 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1029002, name = "GADGET_STATE_CHANGE_29002", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_29002", action = "action_EVENT_GADGET_STATE_CHANGE_29002" },
{ config_id = 1029004, name = "GADGET_CREATE_29004", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_29004", action = "action_EVENT_GADGET_CREATE_29004", trigger_count = 0 },
{ config_id = 1029005, name = "SELECT_OPTION_29005", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_29005", action = "action_EVENT_SELECT_OPTION_29005" },
{ config_id = 1029006, name = "QUEST_START_29006", event = EventType.EVENT_QUEST_START, source = "7104108", condition = "", action = "action_EVENT_QUEST_START_29006", trigger_count = 0 },
{ config_id = 1029007, name = "GROUP_LOAD_29007", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_29007", action = "action_EVENT_GROUP_LOAD_29007", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "done", value = 0, no_refresh = true }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 2,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 29001 },
regions = { },
triggers = { "QUEST_START_29006", "GROUP_LOAD_29007" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { 29001, 29003 },
regions = { },
triggers = { "GADGET_STATE_CHANGE_29002", "GADGET_CREATE_29004", "SELECT_OPTION_29005", "GROUP_LOAD_29007" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_29002(context, evt)
if 29001 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_29002(context, evt)
-- 通知任务系统完成条件类型"LUA通知"复杂参数为quest_param的进度+1
if 0 ~= ScriptLib.AddQuestProgress(context, "166001029") then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_CREATE_29004(context, evt)
if 29003 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_29004(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 166001029, 29003, {1}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_29005(context, evt)
-- 判断是gadgetid 29003 option_id 1
if 29003 ~= evt.param1 then
return false
end
if 1 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_29005(context, evt)
-- 将configid为 29001 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29001, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 永久关闭CongfigId的Gadget需要和Groups的RefreshWithBlock标签搭配
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 29003 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
return -1
end
-- 将本组内变量名为 "done" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "done", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_QUEST_START_29006(context, evt)
-- group调整group进度,只对非randSuite有效
if 0 ~= ScriptLib.GoToGroupSuite(context, 166001029, 2) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : goto_groupSuite")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GROUP_LOAD_29007(context, evt)
-- 判断变量"done"为0
if ScriptLib.GetGroupVariableValue(context, "done") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GROUP_LOAD_29007(context, evt)
-- 将configid为 29001 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29001, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end