0
0
mirror of https://gitlab.com/YuukiPS/GC-Resources.git synced 2025-04-28 09:05:26 +00:00
GC-Resources/Resources/Scripts/Scene/4/scene4_group144002008.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

159 lines
4.1 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 = 144002008
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
-- 打捞点1
{ config_id = 8003, gadget_id = 70950081, pos = { x = 400.599, y = 120.000, z = -269.339 }, rot = { x = 0.000, y = 352.166, z = 0.000 }, level = 1, area_id = 101 },
-- 打捞点1
{ config_id = 8004, gadget_id = 70360001, pos = { x = 400.571, y = 120.000, z = -269.068 }, rot = { x = 0.000, y = 352.166, z = 0.000 }, level = 1, area_id = 101 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
-- 创建打捞点1的交互选项
{ config_id = 1008005, name = "GADGET_CREATE_8005", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_8005", action = "action_EVENT_GADGET_CREATE_8005", trigger_count = 0 },
-- 跟打捞点1交互后销毁按钮和气泡
{ config_id = 1008006, name = "SELECT_OPTION_8006", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_8006", action = "action_EVENT_SELECT_OPTION_8006" }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { 8003, 8004 },
regions = { },
triggers = { "GADGET_CREATE_8005", "SELECT_OPTION_8006" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_CREATE_8005(context, evt)
if 8004 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_8005(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 144002008, 8004, {171}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_8006(context, evt)
-- 判断是gadgetid 8004 option_id 171
if 8004 ~= evt.param1 then
return false
end
if 171 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_8006(context, evt)
-- 将configid为 8003 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 8003, 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 = 8004 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
return -1
end
-- 针对当前group内变量名为 "salvageCounter" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "salvageCounter", 1, 144002007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 将本组内变量名为 "curPos" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "curPos", 1, 144002007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
return -1
end
-- 通知任务系统完成条件类型"LUA通知"复杂参数为quest_param的进度+1
if 0 ~= ScriptLib.AddQuestProgress(context, "7900315Finish") then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
return -1
end
return 0
end