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

248 lines
8.3 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 = 250006003
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 3001, monster_id = 21010301, pos = { x = 348.296, y = -28.895, z = 426.385 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true },
{ config_id = 3002, monster_id = 21010301, pos = { x = 343.100, y = -28.965, z = 427.963 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true },
{ config_id = 3003, monster_id = 21010301, pos = { x = 338.125, y = -28.895, z = 426.578 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true },
{ config_id = 3004, monster_id = 21010301, pos = { x = 350.015, y = -28.965, z = 421.638 }, rot = { x = 0.000, y = 350.976, z = 0.000 }, level = 1, disableWander = true },
{ config_id = 3005, monster_id = 21020101, pos = { x = 343.020, y = -28.983, z = 420.604 }, rot = { x = 0.000, y = 0.107, z = 0.000 }, level = 1, disableWander = true },
{ config_id = 3006, monster_id = 21010301, pos = { x = 336.859, y = -28.984, z = 421.594 }, rot = { x = 0.000, y = 8.968, z = 0.000 }, level = 1, disableWander = true },
{ config_id = 3007, monster_id = 20011001, pos = { x = 346.700, y = -28.983, z = 421.982 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true },
{ config_id = 3008, monster_id = 20011001, pos = { x = 340.066, y = -28.983, z = 422.145 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1000003, name = "ANY_MONSTER_LIVE_3", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_3", action = "action_EVENT_ANY_MONSTER_LIVE_3", trigger_count = 0 },
{ config_id = 1000004, name = "CHALLENGE_FAIL_4", event = EventType.EVENT_CHALLENGE_FAIL, source = "1001", condition = "", action = "action_EVENT_CHALLENGE_FAIL_4" },
{ config_id = 1000005, name = "CHALLENGE_SUCCESS_5", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "1001", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_5" },
{ config_id = 1000006, name = "ANY_MONSTER_DIE_6", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_6", action = "action_EVENT_ANY_MONSTER_DIE_6" },
{ config_id = 1000007, name = "ANY_MONSTER_DIE_7", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_7", action = "action_EVENT_ANY_MONSTER_DIE_7" },
{ config_id = 1000008, name = "ANY_MONSTER_DIE_8", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_8", action = "action_EVENT_ANY_MONSTER_DIE_8" },
{ config_id = 1000009, name = "ANY_MONSTER_DIE_9", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_9", action = "action_EVENT_ANY_MONSTER_DIE_9" }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 2,
end_suite = 1,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { 3001, 3002, 3003 },
gadgets = { },
regions = { },
triggers = { "ANY_MONSTER_LIVE_3", "CHALLENGE_FAIL_4", "CHALLENGE_SUCCESS_5", "ANY_MONSTER_DIE_6", "ANY_MONSTER_DIE_7", "ANY_MONSTER_DIE_8", "ANY_MONSTER_DIE_9" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = suite_2,
monsters = { },
gadgets = { },
regions = { },
triggers = { "ANY_MONSTER_LIVE_3", "CHALLENGE_FAIL_4", "CHALLENGE_SUCCESS_5" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_3(context, evt)
if 3001 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_3(context, evt)
-- 创建编号为1001(该挑战的识别id),挑战内容为104的区域挑战,具体参数填写方式,见DungeonChallengeData表中的注释,所有填写的值都必须是int类型
if 0 ~= ScriptLib.ActiveChallenge(context, 1001, 104, 250006003, 8, 20, 8) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_4(context, evt)
-- 改变指定group组250006002中, configid为14的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 250006002, 14, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250006002, 14, {104}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 250006003, suite = 2 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_SUCCESS_5(context, evt)
-- 改变指定group组250006001中, configid为10的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 250006001, 10, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 改变指定group组250006001中, configid为11的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 250006001, 11, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_6(context, evt)
-- 判断剩余怪物数量是否是0
if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_6(context, evt)
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 250006003, suite = 3 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_7(context, evt)
if 3001 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_7(context, evt)
-- 延迟0秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 3004, delay_time = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
-- 延迟0秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 3007, delay_time = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_8(context, evt)
if 3002 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_8(context, evt)
-- 延迟0秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 3006, delay_time = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
-- 延迟0秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 3008, delay_time = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_9(context, evt)
if 3003 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_9(context, evt)
-- 延迟0秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 3005, delay_time = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
return 0
end