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

150 lines
3.8 KiB
Go

-- 基础信息
local base_info = {
group_id = 250010013
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 3, monster_id = 21011001, pos = { x = 122.207, y = 6.980, z = -30.717 }, rot = { x = 0.000, y = 282.489, z = 0.000 }, level = 1 },
{ config_id = 4, monster_id = 21010701, pos = { x = 120.983, y = 6.980, z = -32.650 }, rot = { x = 0.000, y = 267.747, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
}
-- 区域
regions = {
{ config_id = 41, shape = RegionShape.SPHERE, radius = 2, pos = { x = 108.202, y = 7.006, z = -42.807 } }
}
-- 触发器
triggers = {
{ config_id = 1000040, name = "ANY_MONSTER_DIE_40", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_40", action = "action_EVENT_ANY_MONSTER_DIE_40", trigger_count = 0 },
{ config_id = 1000041, name = "ENTER_REGION_41", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_41", action = "action_EVENT_ENTER_REGION_41", forbid_guest = false },
{ config_id = 1000045, name = "ANY_MONSTER_DIE_45", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_45", action = "action_EVENT_ANY_MONSTER_DIE_45", trigger_count = 0 }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { },
regions = { 41 },
triggers = { "ANY_MONSTER_DIE_40", "ENTER_REGION_41", "ANY_MONSTER_DIE_45" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_40(context, evt)
--判断死亡怪物的configid是否为 4
if evt.param1 ~= 4 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_40(context, evt)
-- 延迟1秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 4, delay_time = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ENTER_REGION_41(context, evt)
if evt.param1 ~= 41 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_41(context, evt)
-- 延迟1秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 3, delay_time = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
-- 延迟1秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 4, delay_time = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_45(context, evt)
--判断死亡怪物的configid是否为 3
if evt.param1 ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_45(context, evt)
-- 延迟1秒刷怪
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 3, delay_time = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
return -1
end
return 0
end