207 lines
6.4 KiB
Go
207 lines
6.4 KiB
Go
-- 基础信息
|
||
local base_info = {
|
||
group_id = 155005048
|
||
}
|
||
|
||
-- Trigger变量
|
||
local defs = {
|
||
duration = 30,
|
||
kill_sum = 3,
|
||
group_id = 155005048,
|
||
gadget_controller_id = 48004
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
{ config_id = 48001, monster_id = 26050901, pos = { x = 634.530, y = 245.050, z = 770.188 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, drop_id = 1000100, area_id = 200 },
|
||
{ config_id = 48002, monster_id = 26050901, pos = { x = 631.700, y = 245.052, z = 780.412 }, rot = { x = 0.000, y = 143.991, z = 0.000 }, level = 36, drop_id = 1000100, area_id = 200 },
|
||
{ config_id = 48004, monster_id = 26050901, pos = { x = 641.393, y = 245.901, z = 778.195 }, rot = { x = 0.000, y = 244.746, z = 0.000 }, level = 36, drop_id = 1000100, area_id = 200 }
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
-- 哀歌狭间挑战宝箱
|
||
{ config_id = 48003, gadget_id = 70211021, pos = { x = 636.451, y = 245.141, z = 776.916 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 16, drop_tag = "战斗高级稻妻", isOneoff = true, persistent = true, explore = { name = "chest", exp = 1 }, area_id = 200 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
-- 2.0rel加的保底,如果group在挑战中间被卸载了,需要在加载时加个保底置回初始状态
|
||
{ config_id = 1048005, name = "GROUP_LOAD_48005", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_48005", action = "action_EVENT_GROUP_LOAD_48005", trigger_count = 0 },
|
||
{ config_id = 1048006, name = "CHALLENGE_SUCCESS_48006", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "180", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_48006", trigger_count = 0 },
|
||
{ config_id = 1048007, name = "CHALLENGE_FAIL_48007", event = EventType.EVENT_CHALLENGE_FAIL, source = "180", condition = "", action = "action_EVENT_CHALLENGE_FAIL_48007", trigger_count = 0 },
|
||
-- 成功保底
|
||
{ config_id = 1048008, name = "GROUP_LOAD_48008", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_48008", action = "action_EVENT_GROUP_LOAD_48008", trigger_count = 0 },
|
||
{ config_id = 1048009, name = "QUEST_FINISH_48009", event = EventType.EVENT_QUEST_FINISH, source = "7224702", condition = "", action = "action_EVENT_QUEST_FINISH_48009", trigger_count = 0 }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
{ config_id = 1, name = "isFinish", value = 0, no_refresh = true }
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
end_suite = 0,
|
||
rand_suite = false
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = suite_1,
|
||
monsters = { },
|
||
gadgets = { },
|
||
regions = { },
|
||
triggers = { "GROUP_LOAD_48005", "CHALLENGE_SUCCESS_48006", "CHALLENGE_FAIL_48007", "GROUP_LOAD_48008", "QUEST_FINISH_48009" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 2,
|
||
-- description = suite_2,
|
||
monsters = { 48001, 48002, 48004 },
|
||
gadgets = { },
|
||
regions = { },
|
||
triggers = { },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GROUP_LOAD_48005(context, evt)
|
||
-- 判断变量"isFinish"为0
|
||
if ScriptLib.GetGroupVariableValue(context, "isFinish") ~= 0 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GROUP_LOAD_48005(context, evt)
|
||
-- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1
|
||
if 0 ~= ScriptLib.AddQuestProgress(context, "72247_ChallengeFaild_A") then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
|
||
return -1
|
||
end
|
||
|
||
-- 删除suite2的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 155005048, 2)
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_CHALLENGE_SUCCESS_48006(context, evt)
|
||
-- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1
|
||
if 0 ~= ScriptLib.AddQuestProgress(context, "72247_ChallengeSucess_A") then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
|
||
return -1
|
||
end
|
||
|
||
-- 将本组内变量名为 "isFinish" 的变量设置为 1
|
||
if 0 ~= ScriptLib.SetGroupVariableValue(context, "isFinish", 1) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
|
||
return -1
|
||
end
|
||
|
||
-- 创建id为48003的gadget
|
||
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 48003 }) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_CHALLENGE_FAIL_48007(context, evt)
|
||
-- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1
|
||
if 0 ~= ScriptLib.AddQuestProgress(context, "72247_ChallengeFaild_A") then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
|
||
return -1
|
||
end
|
||
|
||
-- 删除suite2的所有内容
|
||
ScriptLib.RemoveExtraGroupSuite(context, 155005048, 2)
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GROUP_LOAD_48008(context, evt)
|
||
-- 判断变量"isFinish"为1
|
||
if ScriptLib.GetGroupVariableValue(context, "isFinish") ~= 1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GROUP_LOAD_48008(context, evt)
|
||
-- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1
|
||
if 0 ~= ScriptLib.AddQuestProgress(context, "72247_ChallengeSucess_A") then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
|
||
return -1
|
||
end
|
||
|
||
-- 创建id为48003的gadget
|
||
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 48003 }) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_QUEST_FINISH_48009(context, evt)
|
||
-- 180号挑战,duration内击杀kill_sum的怪物
|
||
if 0 ~= ScriptLib.ActiveChallenge(context, 180, 180, defs.duration, defs.group_id, defs.kill_sum, 0) then
|
||
return -1
|
||
end
|
||
|
||
-- 添加suite2的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, defs.group_id, 2)
|
||
|
||
|
||
|
||
|
||
|
||
return 0
|
||
|
||
end |