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

275 lines
8.5 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 = 199004056
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 56001, monster_id = 26010201, pos = { x = -425.418, y = 124.073, z = -568.672 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 20, drop_tag = "骗骗花", area_id = 400 },
{ config_id = 56009, monster_id = 26010201, pos = { x = -421.586, y = 124.471, z = -563.080 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 20, drop_tag = "骗骗花", area_id = 400 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 56002, gadget_id = 70510013, pos = { x = -421.600, y = 123.479, z = -563.731 }, rot = { x = 0.000, y = 319.800, z = 0.000 }, level = 20, persistent = true, area_id = 400 },
{ config_id = 56007, gadget_id = 70510013, pos = { x = -424.913, y = 123.476, z = -567.952 }, rot = { x = 0.000, y = 319.800, z = 0.000 }, level = 20, persistent = true, area_id = 400 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1056003, name = "GADGET_STATE_CHANGE_56003", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_56003", action = "action_EVENT_GADGET_STATE_CHANGE_56003", trigger_count = 0 },
{ config_id = 1056004, name = "ANY_MONSTER_DIE_56004", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_56004", action = "action_EVENT_ANY_MONSTER_DIE_56004" },
{ config_id = 1056005, name = "GADGET_CREATE_56005", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_56005", action = "action_EVENT_GADGET_CREATE_56005", trigger_count = 0 },
{ config_id = 1056006, name = "SELECT_OPTION_56006", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_56006", action = "action_EVENT_SELECT_OPTION_56006", trigger_count = 0 },
{ config_id = 1056008, name = "GADGET_STATE_CHANGE_56008", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_56008", action = "action_EVENT_GADGET_STATE_CHANGE_56008", trigger_count = 0 },
{ config_id = 1056010, name = "GADGET_CREATE_56010", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_56010", action = "action_EVENT_GADGET_CREATE_56010", trigger_count = 0 },
{ config_id = 1056011, name = "SELECT_OPTION_56011", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_56011", action = "action_EVENT_SELECT_OPTION_56011", trigger_count = 0 }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = suite_1,
monsters = { },
gadgets = { 56002, 56007 },
regions = { },
triggers = { "GADGET_STATE_CHANGE_56003", "ANY_MONSTER_DIE_56004", "GADGET_CREATE_56005", "SELECT_OPTION_56006", "GADGET_STATE_CHANGE_56008", "GADGET_CREATE_56010", "SELECT_OPTION_56011" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { 56001, 56009 },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_56003(context, evt)
if 56002 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_56003(context, evt)
-- 延迟0秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 56009, delay_time = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_56004(context, evt)
--判断死亡怪物的configid是否为 56001
if evt.param1 ~= 56001 then
return false
end
--判断死亡怪物的configid是否为 56009
if evt.param1 ~= 56009 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_56004(context, evt)
-- 运营数据埋点,匹配LD定义的规则使用
if 0 ~= ScriptLib.MarkPlayerAction(context, 2002, 3, 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : mark_playerAction")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_CREATE_56005(context, evt)
if 56002 ~= evt.param1 or GadgetState.Default ~= ScriptLib.GetGadgetStateByConfigId(context, 0, evt.param1) then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_56005(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 199004056, 56002, {173}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_56006(context, evt)
-- 判断是gadgetid 56002 option_id 173
if 56002 ~= evt.param1 then
return false
end
if 173 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_56006(context, evt)
-- 将configid为 56002 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 56002, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 删除指定group: 199004056 ;指定config:56002;物件身上指定option:173;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 199004056, 56002, 173) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 运营数据埋点,匹配LD定义的规则使用
if 0 ~= ScriptLib.MarkPlayerAction(context, 2002, 1, 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : mark_playerAction")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_56008(context, evt)
if 56007 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_56008(context, evt)
-- 延迟0秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 56001, delay_time = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_CREATE_56010(context, evt)
if 56007 ~= evt.param1 or GadgetState.Default ~= ScriptLib.GetGadgetStateByConfigId(context, 0, evt.param1) then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_56010(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 199004056, 56007, {173}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_56011(context, evt)
-- 判断是gadgetid 56007 option_id 173
if 56007 ~= evt.param1 then
return false
end
if 173 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_56011(context, evt)
-- 将configid为 56007 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 56007, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 删除指定group: 199004056 ;指定config:56007;物件身上指定option:173;
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 199004056, 56007, 173) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 运营数据埋点,匹配LD定义的规则使用
if 0 ~= ScriptLib.MarkPlayerAction(context, 2002, 1, 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : mark_playerAction")
return -1
end
return 0
end