mirror of
https://gitlab.com/YuukiPS/GC-Resources.git
synced 2025-04-29 09:35:48 +00:00
202 lines
5.5 KiB
Lua
202 lines
5.5 KiB
Lua
-- 基础信息
|
||
local base_info = {
|
||
group_id = 220111007
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 7002, gadget_id = 70211021, pos = { x = 32.519, y = 2.881, z = 116.819 }, rot = { x = 0.000, y = 2.200, z = 0.000 }, level = 1, drop_tag = "战斗高级稻妻", isOneoff = true, persistent = true }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
{ config_id = 7003, shape = RegionShape.SPHERE, radius = 5, pos = { x = 30.362, y = 2.341, z = 150.378 } },
|
||
-- 暴力销毁
|
||
{ config_id = 7004, shape = RegionShape.SPHERE, radius = 5, pos = { x = 30.486, y = -7.447, z = 140.149 } }
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1007001, name = "QUEST_FINISH_7001", event = EventType.EVENT_QUEST_FINISH, source = "", condition = "condition_EVENT_QUEST_FINISH_7001", action = "action_EVENT_QUEST_FINISH_7001" },
|
||
{ config_id = 1007003, name = "ENTER_REGION_7003", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_7003", action = "action_EVENT_ENTER_REGION_7003" },
|
||
-- 暴力销毁
|
||
{ config_id = 1007004, name = "ENTER_REGION_7004", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_7004", action = "action_EVENT_ENTER_REGION_7004" }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
end_suite = 0,
|
||
rand_suite = false
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { },
|
||
regions = { 7003, 7004 },
|
||
triggers = { "QUEST_FINISH_7001", "ENTER_REGION_7003", "ENTER_REGION_7004" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 2,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 7002 },
|
||
regions = { },
|
||
triggers = { },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_QUEST_FINISH_7001(context, evt)
|
||
--检查ID为200705的任务的完成状态是否为1(1=完成,0=失败)
|
||
--此事件需要配合Quest表使用,在Quest表里的完成执行中配置“通知group脚本”,则该任务完成后服务端会向对应的group发送通知,参数1填写场景ID,参数2填写group ID(如果不填则会通知所有group)
|
||
|
||
--检查任务ID
|
||
if 200705 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
--检查任务成功状态
|
||
if 1 ~= evt.param2 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_QUEST_FINISH_7001(context, evt)
|
||
-- 添加suite2的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 220111007, 2)
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ENTER_REGION_7003(context, evt)
|
||
if evt.param1 ~= 7003 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_7003(context, evt)
|
||
-- 删除suite16的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 16)
|
||
|
||
-- 删除suite2的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111012, 2)
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ENTER_REGION_7004(context, evt)
|
||
if evt.param1 ~= 7004 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_7004(context, evt)
|
||
-- 删除suite1的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 1)
|
||
|
||
-- 删除suite2的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 2)
|
||
|
||
-- 删除suite3的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 3)
|
||
|
||
-- 删除suite4的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 4)
|
||
|
||
-- 删除suite5的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 5)
|
||
|
||
-- 删除suite6的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 6)
|
||
|
||
-- 删除suite7的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 7)
|
||
|
||
-- 删除suite8的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 8)
|
||
|
||
-- 删除suite9的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 9)
|
||
|
||
-- 删除suite10的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 10)
|
||
|
||
-- 删除suite11的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 11)
|
||
|
||
-- 删除suite12的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 12)
|
||
|
||
-- 删除suite13的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 13)
|
||
|
||
-- 删除suite14的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 14)
|
||
|
||
-- 删除suite15的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 15)
|
||
|
||
-- 删除suite16的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 220111010, 16)
|
||
|
||
return 0
|
||
end |