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

228 lines
7.2 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 = 250021002
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 2003, monster_id = 20011201, pos = { x = -42.839, y = 6.885, z = 53.398 }, rot = { x = 0.000, y = 79.010, z = 0.000 }, level = 1 },
{ config_id = 2004, monster_id = 20011201, pos = { x = -36.269, y = 6.885, z = 47.914 }, rot = { x = 0.000, y = 9.311, z = 0.000 }, level = 1 },
{ config_id = 2005, monster_id = 20011201, pos = { x = -30.438, y = 6.885, z = 52.667 }, rot = { x = 0.000, y = 239.804, z = 0.000 }, level = 1 },
{ config_id = 2006, monster_id = 20011201, pos = { x = -36.499, y = 6.885, z = 59.006 }, rot = { x = 0.000, y = 189.078, z = 0.000 }, level = 1 },
{ config_id = 2007, monster_id = 20011301, pos = { x = -39.395, y = 6.885, z = 55.859 }, rot = { x = 0.000, y = 135.969, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 2001, gadget_id = 70350002, pos = { x = -37.242, y = 6.885, z = 72.519 }, rot = { x = 0.000, y = 341.890, z = 0.000 }, level = 1 },
{ config_id = 2002, gadget_id = 70360002, pos = { x = -36.026, y = 6.885, z = 53.069 }, rot = { x = 0.000, y = 155.116, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1002008, name = "GADGET_CREATE_2008", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_2008", action = "action_EVENT_GADGET_CREATE_2008" },
{ config_id = 1002009, name = "SELECT_OPTION_2009", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_2009", action = "action_EVENT_SELECT_OPTION_2009", trigger_count = 0 },
{ config_id = 1002010, name = "CHALLENGE_SUCCESS_2010", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_2010" },
{ config_id = 1002011, name = "CHALLENGE_FAIL_2011", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "", action = "action_EVENT_CHALLENGE_FAIL_2011", trigger_count = 0 },
{ config_id = 1002012, name = "SELECT_OPTION_2012", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_2012", action = "action_EVENT_SELECT_OPTION_2012" }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 2001, 2002 },
regions = { },
triggers = { "GADGET_CREATE_2008", "SELECT_OPTION_2009", "CHALLENGE_SUCCESS_2010", "CHALLENGE_FAIL_2011", "SELECT_OPTION_2012" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = suite_2,
monsters = { 2003, 2004, 2005, 2006, 2007 },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_CREATE_2008(context, evt)
if 2002 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_2008(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250021002, 2002, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_2009(context, evt)
-- 判断是gadgetid 2002 option_id 7
if 2002 ~= evt.param1 then
return false
end
if 7 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_2009(context, evt)
-- 删除指定group: 250021002 ;指定config:2002;物件身上指定option:7;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250021002, 2002, 7) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 改变指定group组250021002中, configid为2002的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 250021002, 2002, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 180号挑战,duration内击杀kill_sum的怪物
if 0 ~= ScriptLib.ActiveChallenge(context, 180, 180, 30, 250021002, 5, 0) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : challenge_KilMonster_InTime")
return -1
end
-- 添加suite2的新内容
ScriptLib.AddExtraGroupSuite(context, 250021002, 2)
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_SUCCESS_2010(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250021002, 2002, {1}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 将configid为 2002 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2002, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_2011(context, evt)
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, 250021002, 2)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250021002, 2002, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 将configid为 2002 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2002, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_2012(context, evt)
-- 判断是gadgetid 2002 option_id 1
if 2002 ~= evt.param1 then
return false
end
if 1 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_2012(context, evt)
-- 将configid为 2001 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2001, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 2002 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 2002, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 删除指定group: 250021002 ;指定config:2002;物件身上指定option:1;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250021002, 2002, 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
return 0
end