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

273 lines
13 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 = 247004029
}
-- DEFS_MISCS
local GroupId = 247004029
local ChestConfigID = 29028
local RegionID = 29030
local ChestConfigIDList = {29028}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 29001, gadget_id = 70310154, pos = { x = 19.727, y = 0.993, z = 414.079 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 },
{ config_id = 29002, gadget_id = 70310154, pos = { x = 19.727, y = 0.993, z = 411.223 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 },
{ config_id = 29003, gadget_id = 70310154, pos = { x = 19.727, y = 0.993, z = 408.575 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 },
{ config_id = 29004, gadget_id = 70310154, pos = { x = 19.417, y = 0.993, z = 403.973 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 },
{ config_id = 29005, gadget_id = 70310154, pos = { x = 19.417, y = 0.993, z = 396.014 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 },
{ config_id = 29006, gadget_id = 70310154, pos = { x = 19.727, y = 0.993, z = 391.694 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 },
{ config_id = 29007, gadget_id = 70310154, pos = { x = 19.727, y = 0.993, z = 389.034 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 },
{ config_id = 29008, gadget_id = 70310154, pos = { x = 19.727, y = 0.993, z = 386.190 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 },
{ config_id = 29009, gadget_id = 70310154, pos = { x = -19.688, y = 0.993, z = 412.578 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 },
{ config_id = 29010, gadget_id = 70310154, pos = { x = -19.688, y = 0.993, z = 409.722 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 },
{ config_id = 29011, gadget_id = 70310154, pos = { x = -19.688, y = 0.993, z = 407.074 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 },
{ config_id = 29012, gadget_id = 70360291, pos = { x = 21.279, y = 0.993, z = 407.091 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29013, gadget_id = 70360291, pos = { x = 21.279, y = 0.993, z = 392.938 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29014, gadget_id = 70310154, pos = { x = -19.688, y = 0.993, z = 392.877 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 },
{ config_id = 29015, gadget_id = 70360291, pos = { x = -20.629, y = 0.993, z = 414.079 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29016, gadget_id = 70360291, pos = { x = -20.699, y = 0.993, z = 411.221 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29017, gadget_id = 70360291, pos = { x = -20.699, y = 0.993, z = 408.573 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29018, gadget_id = 70360291, pos = { x = -20.699, y = 0.993, z = 403.682 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29019, gadget_id = 70360291, pos = { x = -20.699, y = 0.993, z = 395.956 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29020, gadget_id = 70360291, pos = { x = -20.699, y = 0.993, z = 391.668 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29021, gadget_id = 70360291, pos = { x = -20.699, y = 0.993, z = 389.040 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29022, gadget_id = 70360291, pos = { x = -20.699, y = 0.993, z = 386.205 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29023, gadget_id = 70360291, pos = { x = 21.279, y = 0.993, z = 412.578 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29024, gadget_id = 70360291, pos = { x = 21.279, y = 0.993, z = 409.766 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29028, gadget_id = 70211111, pos = { x = -0.056, y = -0.608, z = 400.041 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, chest_drop_id = 21600009, drop_count = 1, isOneoff = true, persistent = true },
{ config_id = 29031, gadget_id = 70310125, pos = { x = 0.018, y = 0.114, z = 420.063 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 29032, gadget_id = 70310125, pos = { x = 0.018, y = 0.114, z = 380.033 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, state = GadgetState.GearStart },
{ config_id = 29033, gadget_id = 70310125, pos = { x = -20.080, y = 0.114, z = 400.015 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 },
{ config_id = 29034, gadget_id = 70310125, pos = { x = 19.864, y = 0.113, z = 400.015 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1, state = GadgetState.GearStart }
}
-- 区域
regions = {
{ config_id = 29025, shape = RegionShape.CUBIC, size = { x = 50.000, y = 20.000, z = 50.000 }, pos = { x = 0.000, y = 0.000, z = 400.000 } },
{ config_id = 29030, shape = RegionShape.CUBIC, size = { x = 40.000, y = 20.000, z = 40.000 }, pos = { x = 0.000, y = 0.000, z = 400.000 } }
}
-- 触发器
triggers = {
{ config_id = 1029025, name = "ENTER_REGION_29025", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_29025", action = "action_EVENT_ENTER_REGION_29025" },
{ config_id = 1029026, name = "TIMER_EVENT_29026", event = EventType.EVENT_TIMER_EVENT, source = "timer1", condition = "condition_EVENT_TIMER_EVENT_29026", action = "action_EVENT_TIMER_EVENT_29026", trigger_count = 0 },
{ config_id = 1029027, name = "TIMER_EVENT_29027", event = EventType.EVENT_TIMER_EVENT, source = "timer2", condition = "condition_EVENT_TIMER_EVENT_29027", action = "action_EVENT_TIMER_EVENT_29027", trigger_count = 0 },
{ config_id = 1029029, name = "ANY_GADGET_DIE_29029", event = EventType.EVENT_ANY_GADGET_DIE, source = "", condition = "condition_EVENT_ANY_GADGET_DIE_29029", action = "action_EVENT_ANY_GADGET_DIE_29029" },
{ config_id = 1029030, name = "ENTER_REGION_29030", event = EventType.EVENT_ENTER_REGION, source = "", condition = "", action = "" }
}
-- 变量
variables = {
{ config_id = 1, name = "challenge", value = 0, no_refresh = true }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 29001, 29002, 29003, 29004, 29005, 29006, 29007, 29008, 29009, 29010, 29011, 29012, 29013, 29014, 29015, 29016, 29017, 29018, 29019, 29020, 29021, 29022, 29023, 29024, 29028, 29031, 29032, 29033, 29034 },
regions = { 29025, 29030 },
triggers = { "ENTER_REGION_29025", "TIMER_EVENT_29026", "TIMER_EVENT_29027", "ANY_GADGET_DIE_29029", "ENTER_REGION_29030" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_ENTER_REGION_29025(context, evt)
if evt.param1 ~= 29025 then return false end
-- 判断角色数量不少于1
if ScriptLib.GetRegionEntityCount(context, { region_eid = evt.source_eid, entity_type = EntityType.AVATAR }) < 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ENTER_REGION_29025(context, evt)
-- 延迟1秒后,向groupId为:247004029的对象,请求一次调用,并将string参数:"timer1" 传递过去
if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 247004029, "timer1", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_TIMER_EVENT_29026(context, evt)
-- 判断变量"challenge"为0
if ScriptLib.GetGroupVariableValue(context, "challenge") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_TIMER_EVENT_29026(context, evt)
-- 将configid为 29001 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29001, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 29002 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29002, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 29003 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29003, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 29004 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29004, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 29005 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29005, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 29006 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29006, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 29007 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29007, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 29008 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29008, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 延迟2秒后,向groupId为:247004029的对象,请求一次调用,并将string参数:"timer2" 传递过去
if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 247004029, "timer2", 2) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_TIMER_EVENT_29027(context, evt)
-- 判断变量"challenge"为0
if ScriptLib.GetGroupVariableValue(context, "challenge") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_TIMER_EVENT_29027(context, evt)
-- 将configid为 29010 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29010, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 29011 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29011, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 29009 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29009, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 29014 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 29014, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 延迟2秒后,向groupId为:247004029的对象,请求一次调用,并将string参数:"timer1" 传递过去
if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 247004029, "timer1", 2) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_GADGET_DIE_29029(context, evt)
if 29028 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_GADGET_DIE_29029(context, evt)
-- 将本组内变量名为 "challenge" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "challenge", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
return 0
end
require "V2_2/RogueDungeon_ChestRoom"