mirror of
https://gitlab.com/YuukiPS/GC-Resources.git
synced 2025-04-28 09:05:26 +00:00
148 lines
3.4 KiB
Lua
148 lines
3.4 KiB
Lua
-- 基础信息
|
||
local base_info = {
|
||
group_id = 199002049
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 49001, gadget_id = 70710744, pos = { x = 621.107, y = 228.501, z = -430.442 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1, area_id = 401 },
|
||
{ config_id = 49003, gadget_id = 70360001, pos = { x = 620.820, y = 227.130, z = -430.417 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, persistent = true, area_id = 401 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1049004, name = "GADGET_CREATE_49004", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_49004", action = "action_EVENT_GADGET_CREATE_49004", trigger_count = 0 },
|
||
{ config_id = 1049005, name = "SELECT_OPTION_49005", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_49005", action = "action_EVENT_SELECT_OPTION_49005", trigger_count = 0 }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 3,
|
||
end_suite = 0,
|
||
rand_suite = false
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 49001 },
|
||
regions = { },
|
||
triggers = { },
|
||
rand_weight = 100,
|
||
ban_refresh = true
|
||
},
|
||
{
|
||
-- suite_id = 2,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 49001, 49003 },
|
||
regions = { },
|
||
triggers = { "GADGET_CREATE_49004", "SELECT_OPTION_49005" },
|
||
rand_weight = 100,
|
||
ban_refresh = true
|
||
},
|
||
{
|
||
-- suite_id = 3,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { },
|
||
regions = { },
|
||
triggers = { },
|
||
rand_weight = 100,
|
||
ban_refresh = true
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GADGET_CREATE_49004(context, evt)
|
||
if 49003 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GADGET_CREATE_49004(context, evt)
|
||
-- 设置操作台选项
|
||
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 199002049, 49003, {194}) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_SELECT_OPTION_49005(context, evt)
|
||
-- 判断是gadgetid 49003 option_id 194
|
||
if 49003 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
if 194 ~= evt.param2 then
|
||
return false
|
||
end
|
||
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_SELECT_OPTION_49005(context, evt)
|
||
-- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1
|
||
if 0 ~= ScriptLib.AddQuestProgress(context, "4007303") then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
|
||
return -1
|
||
end
|
||
|
||
-- 卸载指定gadget
|
||
if 0 ~= ScriptLib.RemoveEntityByConfigId(context, 199002049, EntityType.GADGET, 49003 ) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : remove_gadget_by_configid")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end |