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

170 lines
4.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 = 250009012
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 12005, monster_id = 20010901, pos = { x = 140.952, y = 3.990, z = -18.123 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 12001, gadget_id = 70510014, pos = { x = 140.975, y = 3.990, z = -18.173 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12006, gadget_id = 70211101, pos = { x = 141.040, y = 3.990, z = -17.545 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, drop_tag = "解谜低级蒙德", showcutscene = true, isOneoff = true, persistent = true }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1012002, name = "GADGET_CREATE_12002", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_12002", action = "action_EVENT_GADGET_CREATE_12002" },
{ config_id = 1012003, name = "SELECT_OPTION_12003", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_12003", action = "action_EVENT_SELECT_OPTION_12003" },
{ config_id = 1012004, name = "GADGET_STATE_CHANGE_12004", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_12004", action = "action_EVENT_GADGET_STATE_CHANGE_12004" },
{ config_id = 1012007, name = "ANY_MONSTER_DIE_12007", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_12007", action = "action_EVENT_ANY_MONSTER_DIE_12007" }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 12001 },
regions = { },
triggers = { "GADGET_CREATE_12002", "SELECT_OPTION_12003", "GADGET_STATE_CHANGE_12004", "ANY_MONSTER_DIE_12007" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_CREATE_12002(context, evt)
if 12001 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_12002(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250009012, 12001, {174}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_12003(context, evt)
-- 判断是gadgetid 12001 option_id 174
if 12001 ~= evt.param1 then
return false
end
if 174 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_12003(context, evt)
-- 将configid为 12001 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 12001, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 删除指定group: 250009012 ;指定config:12001;物件身上指定option:174;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250009012, 12001, 174) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_12004(context, evt)
if 12001 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_12004(context, evt)
-- 延迟0秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 12005, delay_time = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_12007(context, evt)
if 12005 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_12007(context, evt)
-- 创建id为12006的gadget
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 12006 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
return -1
end
return 0
end