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

267 lines
8.7 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 = 177008036
}
-- Trigger变量
local defs = {
duration = 120,
kill_sum = 3,
group_id = 177008036,
gadget_controller_id = 36004
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 36001, monster_id = 21020701, pos = { x = -327.266, y = 259.098, z = 409.304 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, drop_id = 1000100, affix = { 1041 }, area_id = 210 },
{ config_id = 36010, monster_id = 21020201, pos = { x = -332.787, y = 259.480, z = 409.302 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, drop_id = 1000100, affix = { 1041 }, area_id = 210 },
{ config_id = 36011, monster_id = 21030103, pos = { x = -322.366, y = 257.863, z = 411.085 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, drop_id = 1000100, affix = { 1041 }, area_id = 210 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 36002, gadget_id = 70330140, pos = { x = -328.696, y = 256.295, z = 417.256 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, state = GadgetState.GearAction2, persistent = true, worktop_config = { is_persistent = true, init_options = { } }, area_id = 210 },
{ config_id = 36003, gadget_id = 70211160, pos = { x = -325.824, y = 256.366, z = 416.406 }, rot = { x = 345.289, y = 180.216, z = 4.495 }, level = 16, drop_tag = "渊下宫活动低级稻妻", isOneoff = true, persistent = true, area_id = 210 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
-- 2.0rel加的保底,如果group在挑战中间被卸载了,需要在加载时加个保底置回初始状态
{ config_id = 1036005, name = "GROUP_LOAD_36005", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_36005", action = "action_EVENT_GROUP_LOAD_36005", trigger_count = 0 },
{ config_id = 1036006, name = "CHALLENGE_SUCCESS_36006", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "180", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_36006", trigger_count = 0 },
{ config_id = 1036007, name = "CHALLENGE_FAIL_36007", event = EventType.EVENT_CHALLENGE_FAIL, source = "180", condition = "", action = "action_EVENT_CHALLENGE_FAIL_36007", trigger_count = 0 },
{ config_id = 1036008, name = "GADGET_STATE_CHANGE_36008", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_36008", action = "action_EVENT_GADGET_STATE_CHANGE_36008", trigger_count = 0 },
{ config_id = 1036009, name = "SELECT_OPTION_36009", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_36009", action = "action_EVENT_SELECT_OPTION_36009", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "isFinish", value = 0, no_refresh = true }
}
-- 废弃数据
garbages = {
gadgets = {
{ config_id = 36004, gadget_id = 70360001, pos = { x = -331.035, y = 259.529, z = 410.988 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, persistent = true, area_id = 210 }
}
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = suite_1,
monsters = { },
gadgets = { 36002 },
regions = { },
triggers = { "GROUP_LOAD_36005", "CHALLENGE_SUCCESS_36006", "CHALLENGE_FAIL_36007", "GADGET_STATE_CHANGE_36008", "SELECT_OPTION_36009" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = suite_2,
monsters = { 36001, 36010, 36011 },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GROUP_LOAD_36005(context, evt)
-- 判断变量"isFinish"为1
if ScriptLib.GetGroupVariableValue(context, "isFinish") ~= 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GROUP_LOAD_36005(context, evt)
-- 将configid为 36002 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 36002, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, 177008036, 2)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 177008036, 36002, {177}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 运营数据埋点,匹配LD定义的规则使用
if 0 ~= ScriptLib.MarkPlayerAction(context, 3001, 4, 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : mark_playerAction")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_SUCCESS_36006(context, evt)
-- 将本组内变量名为 "isFinish" 的变量设置为 2
if 0 ~= ScriptLib.SetGroupVariableValue(context, "isFinish", 2) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 将configid为 36002 的物件更改为状态 GadgetState.GearStop
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 36002, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 创建id为36003的gadget
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 36003 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
return -1
end
-- 运营数据埋点,匹配LD定义的规则使用
if 0 ~= ScriptLib.MarkPlayerAction(context, 3001, 3, 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : mark_playerAction")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_36007(context, evt)
-- 将configid为 36002 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 36002, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, 177008036, 2)
-- 运营数据埋点,匹配LD定义的规则使用
if 0 ~= ScriptLib.MarkPlayerAction(context, 3001, 4, 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : mark_playerAction")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_36008(context, evt)
if GadgetState.Default ~= ScriptLib.GetGadgetStateByConfigId(context, 177008036, 36002) then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_36008(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 177008036, 36002, {177}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 将本组内变量名为 "isFinish" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "isFinish", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_36009(context, evt)
-- 判断是gadgetid 36002 option_id 177
if 36002 ~= evt.param1 then
return false
end
if 177 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_36009(context, evt)
-- 180号挑战,duration内击杀kill_sum的怪物
if 0 ~= ScriptLib.ActiveChallenge(context, 180, 180, defs.duration, defs.group_id, defs.kill_sum, 0) then
return -1
end
-- 添加suite2的新内容
ScriptLib.AddExtraGroupSuite(context, defs.group_id, 2)
-- 删除指定group: 177008035 ;指定config:35002;物件身上指定option:177;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 177008036, 36002, 177) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 将configid为 2002 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 36002, GadgetState.GearStart) then
return -1
end
-- 运营数据埋点,匹配LD定义的规则使用
if 0 ~= ScriptLib.MarkPlayerAction(context, 3001, 1, 1) then
return -1
end
return 0
end