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

227 lines
7.0 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 = 240015013
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 13001, gadget_id = 70310032, pos = { x = -41.613, y = 59.807, z = 156.419 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 13002, gadget_id = 70310032, pos = { x = -43.539, y = 61.222, z = 151.517 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 13003, gadget_id = 70310032, pos = { x = -45.205, y = 62.404, z = 146.867 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 13004, gadget_id = 70310032, pos = { x = -46.328, y = 63.340, z = 141.996 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 13005, gadget_id = 70310032, pos = { x = -47.696, y = 64.342, z = 137.651 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 13006, gadget_id = 70310032, pos = { x = -48.439, y = 65.553, z = 133.513 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1013007, name = "GADGET_CREATE_13007", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_13007", action = "action_EVENT_GADGET_CREATE_13007", trigger_count = 0 },
{ config_id = 1013008, name = "GADGET_CREATE_13008", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_13008", action = "action_EVENT_GADGET_CREATE_13008", trigger_count = 0 },
{ config_id = 1013009, name = "TIMER_EVENT_13009", event = EventType.EVENT_TIMER_EVENT, source = "time1", condition = "", action = "action_EVENT_TIMER_EVENT_13009", trigger_count = 0 },
{ config_id = 1013010, name = "TIMER_EVENT_13010", event = EventType.EVENT_TIMER_EVENT, source = "time2", condition = "", action = "action_EVENT_TIMER_EVENT_13010", trigger_count = 0 }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { "GADGET_CREATE_13007", "GADGET_CREATE_13008", "TIMER_EVENT_13009", "TIMER_EVENT_13010" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { 13001, 13003, 13005 },
regions = { },
triggers = { },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = ,
monsters = { },
gadgets = { 13002, 13004, 13006 },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_CREATE_13007(context, evt)
if 13001 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_13007(context, evt)
-- 延迟5秒后,向groupId为:240015013的对象,请求一次调用,并将string参数:"time1" 传递过去
if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 240015013, "time1", 5) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_CREATE_13008(context, evt)
if 13002 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_13008(context, evt)
-- 延迟5秒后,向groupId为:240015013的对象,请求一次调用,并将string参数:"time2" 传递过去
if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 240015013, "time2", 5) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_TIMER_EVENT_13009(context, evt)
-- 创建id为13002的gadget
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 13002 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
return -1
end
-- 创建id为13004的gadget
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 13004 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
return -1
end
-- 创建id为13006的gadget
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 13006 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
return -1
end
-- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 13001 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
return -1
end
-- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 13003 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
return -1
end
-- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 13005 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_TIMER_EVENT_13010(context, evt)
-- 创建id为13001的gadget
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 13001 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
return -1
end
-- 创建id为13003的gadget
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 13003 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
return -1
end
-- 创建id为13005的gadget
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 13005 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
return -1
end
-- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 13002 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
return -1
end
-- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 13004 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
return -1
end
-- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 13006 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
return -1
end
return 0
end