添加配置表

This commit is contained in:
flswld
2022-11-30 00:00:20 +08:00
parent f70a890338
commit d7f3f3b866
33382 changed files with 8476601 additions and 0 deletions
@@ -0,0 +1,24 @@
-- 地图配置
scene_config = {
begin_pos = { x = -92.9, z = -102.5 },
size = { x = 215.4, z = 168.6 },
born_pos = { x = 16.853, y = 40.586, z = 42.139 },
born_rot = { x = 0.000, y = 180.000, z = 0.000 },
die_y = -25.02457,
city_id = 1,
vision_anchor = { x = -92.9, z = -102.5 }
}
-- 所有的区块
blocks = { 43004 }
-- 所有的区块范围坐标
block_rects = {
{ min = { x = -92.9, z = -102.5 }, max = { x = 122.5, z = 66.1 } }
}
-- Dummy Points
dummy_points = { }
-- Routes
routes_config = { }
@@ -0,0 +1,19 @@
-- 所有的group
groups = {
{ id = 243004001, refresh_id = 1001, pos = { x = 67.990, y = 40.000, z = -28.465 } },
{ id = 243004002, pos = { x = -4.870, y = 40.078, z = -50.283 } },
{ id = 243004003, pos = { x = -31.161, y = 40.001, z = -96.481 } },
{ id = 243004004, refresh_id = 1002, pos = { x = 32.776, y = -19.530, z = -56.961 } },
{ id = 243004005, refresh_id = 1, pos = { x = 30.590, y = 40.000, z = -62.128 } },
{ id = 243004006, refresh_id = 1, pos = { x = 49.138, y = 40.000, z = -31.903 } },
{ id = 243004007, refresh_id = 1, pos = { x = 99.585, y = 40.013, z = -2.075 } },
{ id = 243004008, refresh_id = 1002, pos = { x = 16.876, y = 40.000, z = -2.348 } },
{ id = 243004009, refresh_id = 1002, pos = { x = 71.699, y = 40.000, z = -76.979 } },
{ id = 243004010, refresh_id = 1002, pos = { x = -3.442, y = 40.996, z = -50.251 } },
{ id = 243004011, refresh_id = 1002, pos = { x = 98.086, y = 40.001, z = -3.208 } },
{ id = 243004012, refresh_id = 1, pos = { x = -4.870, y = 38.889, z = -50.280 } },
{ id = 243004013, refresh_id = 1, pos = { x = 39.997, y = 40.376, z = -25.990 } },
{ id = 243004014, refresh_id = 1, pos = { x = 14.581, y = 40.116, z = -56.360 } },
{ id = 243004016, refresh_id = 1001, pos = { x = -2.463, y = 40.001, z = -77.738 } },
{ id = 243004017, refresh_id = 1001, pos = { x = -35.933, y = 40.000, z = -27.175 } }
}
@@ -0,0 +1,384 @@
-- 基础信息
local base_info = {
group_id = 243004001
}
-- Trigger变量
local defs = {
gadget_1 = 1003,
group_1 = 243004001,
monster_1 = 1004,
monster_2 = 1005,
monster_3 = 1006,
monster_4 = 1007,
monster_5 = 1008,
monster_6 = 1011,
monster_7 = 1012,
monster_8 = 1014,
Region1 = 1015,
challenge1 = 1,
challenge_father = 999,
group_core = 243004005,
gadget_rune = 5017
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 1004, monster_id = 23010501, pos = { x = 70.844, y = 39.997, z = -30.442 }, rot = { x = 0.000, y = 346.531, z = 0.000 }, level = 1 },
{ config_id = 1005, monster_id = 23010201, pos = { x = 63.419, y = 40.009, z = -30.891 }, rot = { x = 0.000, y = 21.465, z = 0.000 }, level = 1 },
{ config_id = 1008, monster_id = 23010101, pos = { x = 71.497, y = 39.997, z = -19.082 }, rot = { x = 0.000, y = 214.507, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 1003, gadget_id = 70360001, pos = { x = 76.206, y = 41.024, z = -28.238 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 1015, shape = RegionShape.CUBIC, size = { x = 50.000, y = 40.000, z = 45.000 }, pos = { x = 64.000, y = 40.000, z = -32.200 } }
}
-- 触发器
triggers = {
{ config_id = 1001001, name = "GADGET_CREATE_1001", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_1001", action = "action_EVENT_GADGET_CREATE_1001" },
{ config_id = 1001002, name = "SELECT_OPTION_1002", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_1002", action = "action_EVENT_SELECT_OPTION_1002", trigger_count = 0 },
{ config_id = 1001006, name = "ANY_MONSTER_DIE_1006", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_1006", action = "action_EVENT_ANY_MONSTER_DIE_1006", trigger_count = 0 },
{ config_id = 1001007, name = "VARIABLE_CHANGE_1007", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_1007", action = "action_EVENT_VARIABLE_CHANGE_1007", trigger_count = 0 },
{ config_id = 1001009, name = "CHALLENGE_SUCCESS_1009", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "1", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_1009" },
{ config_id = 1001010, name = "ANY_MONSTER_LIVE_1010", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_1010", action = "action_EVENT_ANY_MONSTER_LIVE_1010", trigger_count = 0 },
{ config_id = 1001013, name = "CHALLENGE_FAIL_1013", event = EventType.EVENT_CHALLENGE_FAIL, source = "1", condition = "", action = "action_EVENT_CHALLENGE_FAIL_1013", trigger_count = 0 },
{ config_id = 1001015, name = "LEAVE_REGION_1015", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_1015", action = "action_EVENT_LEAVE_REGION_1015", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "key", value = 0, no_refresh = false },
{ config_id = 2, name = "success", value = 0, no_refresh = false }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 1003 },
regions = { 1015 },
triggers = { "GADGET_CREATE_1001", "SELECT_OPTION_1002", "ANY_MONSTER_DIE_1006", "VARIABLE_CHANGE_1007", "ANY_MONSTER_LIVE_1010", "LEAVE_REGION_1015" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { 1004, 1005, 1008 },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_CREATE_1001(context, evt)
if defs.gadget_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_1001(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_1002(context, evt)
-- 判断是gadgetid 1003 option_id 177
if defs.gadget_1 ~= evt.param1 then
return false
end
if 7 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_1002(context, evt)
--刷新suite2
ScriptLib.AddExtraGroupSuite(context, defs.group_1, 2)
-- 删除指定group 243004001 ;指定config1003;物件身上指定option7
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, defs.group_1, defs.gadget_1, 7) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 将configid为 1003 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, defs.gadget_1, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_1006(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_1006(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_1007(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为3
if ScriptLib.GetGroupVariableValue(context, "key") ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_1007(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 将本组内变量名为 "key" 的变量设置为 99
if 0 ~= ScriptLib.SetGroupVariableValue(context, "key", 99) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
ScriptLib.ChangeGroupVariableValueByGroup(context, "runes", 1, defs.group_core)
ScriptLib.PrintContextLog(context, "符文计数+1")
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
ScriptLib.PrintContextLog(context, "1号符文射线!!!!!!!!")
--[[ 触发镜头注目,注目位置为坐标(0,0,0),持续时间为2秒,并且为强制注目形式,不广播其他玩家
local pos = {x=76.2, y=52, z=-28.2}
local pos_follow = {x=0, y=0, z=0}
if 0 ~= ScriptLib.BeginCameraSceneLook(context, { look_pos = pos, is_allow_input = false, duration = 2, is_force = true, is_broadcast = false, is_recover_keep_current = true, delay = 0,
is_set_follow_pos = false, follow_pos = pos_follow, is_force_walk = false, is_change_play_mode = false,
is_set_screen_XY = false, screen_x = 0, screen_y = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_cameraLook_Begin")
return -1
end
-]]
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_SUCCESS_1009(context, evt)
ScriptLib.ChangeGroupVariableValueByGroup(context, "runes", 1, defs.group_core)
ScriptLib.PrintContextLog(context, "符文计数+1")
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
ScriptLib.PrintContextLog(context, "1号符文射线!!!!!!!!")
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_1010(context, evt)
if defs.monster_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_1010(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 3})
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
ScriptLib.PrintContextLog(context, "1号符文点亮!!!!!!!!")
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_1013(context, evt)
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
-- 改变指定group组243004001中, configid为1003的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_1, defs.gadget_1, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_1015(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region1 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_1015(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "key", 0) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
-- 改变指定group组243004001中, configid为1003的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_1, defs.gadget_1, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
return 0
end
@@ -0,0 +1,71 @@
-- 基础信息
local base_info = {
group_id = 243004002
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
}
-- 区域
regions = {
}
-- 触发器
triggers = {
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
@@ -0,0 +1,71 @@
-- 基础信息
local base_info = {
group_id = 243004003
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
}
-- 区域
regions = {
}
-- 触发器
triggers = {
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
@@ -0,0 +1,265 @@
-- 基础信息
local base_info = {
group_id = 243004004
}
-- Trigger变量
local defs = {
gadget_1 = 4001,
group_1 = 243004004,
monster_1 = 4007,
group_core = 243004005,
challenge_father = 999,
challenge1 = 120
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 4007, monster_id = 24010101, pos = { x = 38.892, y = -19.559, z = -40.256 }, rot = { x = 0.000, y = 185.359, z = 0.000 }, level = 11, affix = { 1008 }, pose_id = 100 },
{ config_id = 4010, monster_id = 24010101, pos = { x = 24.161, y = -19.559, z = -40.088 }, rot = { x = 0.000, y = 152.471, z = 0.000 }, level = 11, affix = { 1008 }, pose_id = 100 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 4001, gadget_id = 70360010, pos = { x = 31.059, y = -19.662, z = -52.312 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1004002, name = "GADGET_CREATE_4002", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_4002", action = "action_EVENT_GADGET_CREATE_4002" },
{ config_id = 1004003, name = "SELECT_OPTION_4003", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_4003", action = "action_EVENT_SELECT_OPTION_4003", trigger_count = 0 },
{ config_id = 1004004, name = "VARIABLE_CHANGE_4004", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_4004", action = "action_EVENT_VARIABLE_CHANGE_4004", trigger_count = 0 },
{ config_id = 1004005, name = "CHALLENGE_SUCCESS_4005", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "120", condition = "", action = "" },
{ config_id = 1004006, name = "CHALLENGE_FAIL_4006", event = EventType.EVENT_CHALLENGE_FAIL, source = "120", condition = "", action = "action_EVENT_CHALLENGE_FAIL_4006" },
{ config_id = 1004008, name = "ANY_MONSTER_DIE_4008", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_4008", action = "action_EVENT_ANY_MONSTER_DIE_4008", trigger_count = 0 },
{ config_id = 1004009, name = "DUNGEON_SETTLE_4009", event = EventType.EVENT_DUNGEON_SETTLE, source = "", condition = "", action = "action_EVENT_DUNGEON_SETTLE_4009" },
{ config_id = 1004014, name = "ANY_MONSTER_LIVE_4014", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_4014", action = "action_EVENT_ANY_MONSTER_LIVE_4014", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "key", value = 0, no_refresh = false },
{ config_id = 2, name = "key1", value = 0, no_refresh = false }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 4001 },
regions = { },
triggers = { "GADGET_CREATE_4002", "SELECT_OPTION_4003", "VARIABLE_CHANGE_4004", "CHALLENGE_SUCCESS_4005", "CHALLENGE_FAIL_4006", "ANY_MONSTER_DIE_4008", "DUNGEON_SETTLE_4009", "ANY_MONSTER_LIVE_4014" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { 4007, 4010 },
gadgets = { },
regions = { },
triggers = { "CHALLENGE_SUCCESS_4005", "CHALLENGE_FAIL_4006" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_CREATE_4002(context, evt)
if defs.gadget_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_4002(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_4003(context, evt)
-- 判断是gadgetid 4001 option_id 7
if defs.gadget_1 ~= evt.param1 then
return false
end
if 7 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_4003(context, evt)
-- 添加suite2的新内容
ScriptLib.AddExtraGroupSuite(context, defs.group_1, 2)
-- 删除指定group 243004004 ;指定config4001;物件身上指定option7
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, defs.group_1, defs.gadget_1, 7) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 将configid为 4001 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, defs.gadget_1, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 卸载指定gadget
if 0 ~= ScriptLib.RemoveEntityByConfigId(context, defs.group_core, EntityType.GADGET, 5009 ) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : remove_gadget_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_4004(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key1"为2
if ScriptLib.GetGroupVariableValue(context, "key1") ~= 2 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValueByGroup(context, "success", 243004005) ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_4004(context, evt)
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "success", 1, defs.group_core) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_4006(context, evt)
-- 改变指定group组243004013中, configid为4001的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_1, defs.gadget_1, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = defs.group_1, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_4008(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_4008(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key1", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
-- 触发操作
function action_EVENT_DUNGEON_SETTLE_4009(context, evt)
ScriptLib.StopGallery(context, 7010, false)
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_4014(context, evt)
if defs.monster_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_4014(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 2})
return 0
end
@@ -0,0 +1,574 @@
-- 基础信息
local base_info = {
group_id = 243004005
}
-- Trigger变量
local defs = {
group_1 = 243004005,
gadget_switch = 5013,
gadget_floor = 5016,
challenge_father = 999
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 5004, gadget_id = 70360159, pos = { x = 32.272, y = 69.000, z = -45.694 }, rot = { x = 0.000, y = 142.231, z = 0.000 }, level = 1, mark_flag = 2 },
{ config_id = 5008, gadget_id = 70900201, pos = { x = 32.091, y = 41.714, z = -45.585 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 5009, gadget_id = 70900201, pos = { x = 32.748, y = -19.560, z = -53.107 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 5013, gadget_id = 70360164, pos = { x = 32.272, y = 40.100, z = -45.694 }, rot = { x = 0.000, y = 31.000, z = 0.000 }, level = 1, mark_flag = 4 },
{ config_id = 5016, gadget_id = 70350244, pos = { x = 31.800, y = 39.380, z = -54.210 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, state = GadgetState.GearStart },
{ config_id = 5017, gadget_id = 70360161, pos = { x = 76.200, y = 40.001, z = -28.200 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 5018, gadget_id = 70360160, pos = { x = -3.900, y = 40.000, z = -80.600 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 5019, gadget_id = 70360162, pos = { x = -36.300, y = 40.000, z = -28.300 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 5005, shape = RegionShape.SPHERE, radius = 5, pos = { x = 19.288, y = 39.992, z = -6.088 } },
-- 切换天气区域
{ config_id = 5010, shape = RegionShape.CUBIC, size = { x = 40.000, y = 1.000, z = 40.000 }, pos = { x = 32.594, y = 33.695, z = -52.932 } },
{ config_id = 5014, shape = RegionShape.CUBIC, size = { x = 40.000, y = 20.000, z = 2.000 }, pos = { x = 17.218, y = 47.230, z = 11.808 } }
}
-- 触发器
triggers = {
{ config_id = 1005001, name = "CHALLENGE_FAIL_5001", event = EventType.EVENT_CHALLENGE_FAIL, source = "999", condition = "", action = "action_EVENT_CHALLENGE_FAIL_5001" },
{ config_id = 1005002, name = "TIME_AXIS_PASS_5002", event = EventType.EVENT_TIME_AXIS_PASS, source = "randball", condition = "", action = "action_EVENT_TIME_AXIS_PASS_5002", trigger_count = 0 },
{ config_id = 1005003, name = "VARIABLE_CHANGE_5003", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_5003", action = "action_EVENT_VARIABLE_CHANGE_5003", trigger_count = 0 },
{ config_id = 1005005, name = "ENTER_REGION_5005", event = EventType.EVENT_ENTER_REGION, source = "", condition = "", action = "" },
-- 符文没亮时开机关
{ config_id = 1005006, name = "SELECT_OPTION_5006", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_5006", action = "action_EVENT_SELECT_OPTION_5006", trigger_count = 0 },
{ config_id = 1005007, name = "TIMER_EVENT_5007", event = EventType.EVENT_TIMER_EVENT, source = "floor", condition = "", action = "action_EVENT_TIMER_EVENT_5007" },
-- 切换天气区域
{ config_id = 1005010, name = "ENTER_REGION_5010", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_5010", action = "action_EVENT_ENTER_REGION_5010" },
{ config_id = 1005011, name = "GADGET_CREATE_5011", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_5011", action = "action_EVENT_GADGET_CREATE_5011" },
-- 符文全亮后开机关
{ config_id = 1005012, name = "SELECT_OPTION_5012", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_5012", action = "action_EVENT_SELECT_OPTION_5012", trigger_count = 0 },
{ config_id = 1005014, name = "ENTER_REGION_5014", event = EventType.EVENT_ENTER_REGION, source = "", condition = "", action = "action_EVENT_ENTER_REGION_5014" },
-- 判断符文点亮
{ config_id = 1005015, name = "VARIABLE_CHANGE_5015", event = EventType.EVENT_VARIABLE_CHANGE, source = "runes", condition = "", action = "action_EVENT_VARIABLE_CHANGE_5015", trigger_count = 0, tag = "901" },
-- 判断父挑战时间改变
{ config_id = 1005020, name = "VARIABLE_CHANGE_5020", event = EventType.EVENT_VARIABLE_CHANGE, source = "AddTime", condition = "condition_EVENT_VARIABLE_CHANGE_5020", action = "action_EVENT_VARIABLE_CHANGE_5020", trigger_count = 0 },
-- 符文激活1
{ config_id = 1005021, name = "VARIABLE_CHANGE_5021", event = EventType.EVENT_VARIABLE_CHANGE, source = "runes", condition = "condition_EVENT_VARIABLE_CHANGE_5021", action = "action_EVENT_VARIABLE_CHANGE_5021" },
-- 符文激活3
{ config_id = 1005022, name = "VARIABLE_CHANGE_5022", event = EventType.EVENT_VARIABLE_CHANGE, source = "runes", condition = "condition_EVENT_VARIABLE_CHANGE_5022", action = "action_EVENT_VARIABLE_CHANGE_5022" },
-- 符文激活2
{ config_id = 1005023, name = "VARIABLE_CHANGE_5023", event = EventType.EVENT_VARIABLE_CHANGE, source = "runes", condition = "condition_EVENT_VARIABLE_CHANGE_5023", action = "action_EVENT_VARIABLE_CHANGE_5023" },
{ config_id = 1005024, name = "GADGET_STATE_CHANGE_5024", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_5024", action = "", tag = "902" },
-- 符文激活2
{ config_id = 1005025, name = "VARIABLE_CHANGE_5025", event = EventType.EVENT_VARIABLE_CHANGE, source = "success", condition = "condition_EVENT_VARIABLE_CHANGE_5025", action = "action_EVENT_VARIABLE_CHANGE_5025", tag = "903" },
{ config_id = 1005026, name = "CHALLENGE_FAIL_5026", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "condition_EVENT_CHALLENGE_FAIL_5026", action = "action_EVENT_CHALLENGE_FAIL_5026", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "runes", value = 0, no_refresh = false },
{ config_id = 2, name = "AddTime", value = 0, no_refresh = false },
{ config_id = 3, name = "success", value = 0, no_refresh = false }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 5004, 5013, 5016, 5017, 5018, 5019 },
regions = { 5010, 5014 },
triggers = { "CHALLENGE_FAIL_5001", "TIME_AXIS_PASS_5002", "VARIABLE_CHANGE_5003", "SELECT_OPTION_5006", "TIMER_EVENT_5007", "ENTER_REGION_5010", "GADGET_CREATE_5011", "SELECT_OPTION_5012", "ENTER_REGION_5014", "VARIABLE_CHANGE_5015", "VARIABLE_CHANGE_5020", "VARIABLE_CHANGE_5021", "VARIABLE_CHANGE_5022", "VARIABLE_CHANGE_5023", "GADGET_STATE_CHANGE_5024", "VARIABLE_CHANGE_5025", "CHALLENGE_FAIL_5026" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { 5013, 5016 },
regions = { },
triggers = { "SELECT_OPTION_5012" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_5001(context, evt)
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 243004004, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 243004001, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 243004008, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 243004009, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 243004010, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 243004011, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 243004016, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 243004017, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
-- 挑战失败触发结算
if 0 ~= ScriptLib.FailMistTrialDungeonChallenge(context, 999) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : 结束挑战失败!!!!")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_TIME_AXIS_PASS_5002(context, evt)
-- 重新生成指定group,默认为独立随机
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 243004012 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_randall")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_5003(context, evt)
if evt.param1 == evt.param2 then return false end
if evt.param1 == evt.param2 then return false end
-- 判断变量"runes"为3
if ScriptLib.GetGroupVariableValue(context, "runes") ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_5003(context, evt)
-- 删除指定group 243004005 ;指定config5013;物件身上指定option30
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, defs.group_1, defs.gadget_switch, 58) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 将本组内变量名为 "runes" 的变量设置为 99
if 0 ~= ScriptLib.SetGroupVariableValue(context, "runes", 99) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_switch, {59}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 创建id为5008的gadget
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 5008 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
return -1
end
--子挑战 打开地板
ScriptLib.AttachChildChallenge(context, 999, 902, 230, {7,902,1,1},{},{success=1,fail=1})
ScriptLib.PrintContextLog(context, "操作台子挑战挂载!!!!!!!!")
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_5006(context, evt)
-- 判断是gadgetid 5013 option_id 30
if defs.gadget_switch ~= evt.param1 then
return false
end
if 58 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_5006(context, evt)
-- 调用提示id为 31040202 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001001) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_TIMER_EVENT_5007(context, evt)
-- 卸载指定gadget
if 0 ~= ScriptLib.RemoveEntityByConfigId(context, 243004005, EntityType.GADGET, 5016 ) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : remove_gadget_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ENTER_REGION_5010(context, evt)
if evt.param1 ~= 5010 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_5010(context, evt)
--修改天气为boss区域
--ScriptLib.SetWeatherAreaState(context, 10017 ,1)
--ScriptLib.PrintContextLog(context, "修改天气成功!!!!!!!!")
return 0
end
-- 触发条件
function condition_EVENT_GADGET_CREATE_5011(context, evt)
if defs.gadget_switch ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_5011(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_switch, {58}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
ScriptLib.PrintContextLog(context, "操作台选项!!!!!!!!")
-- 创建标识为"randball",时间节点为{30}的时间轴,true用于控制该时间轴是否循环
ScriptLib.InitTimeAxis(context, "randball", {30}, true)
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_5012(context, evt)
-- 判断是gadgetid 5013 option_id 7
if defs.gadget_switch ~= evt.param1 then
return false
end
if 59 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_5012(context, evt)
-- 将configid为 5016 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 5016, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 5008 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
return -1
end
-- 创建id为5009的gadget
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 5009 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
return -1
end
-- 延迟2秒后,向groupId为:243004005的对象,请求一次调用,并将string参数:"floor" 传递过去
if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 243004005, "floor", 2) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group")
return -1
end
-- 删除指定group 243004005 ;指定config5013;物件身上指定option7
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 243004005, 5013, 59) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
--子挑战 完成最终试练
ScriptLib.AttachChildChallenge(context, 999, 903, 231, {3,903,1,1},{},{success=99999,fail=1})
ScriptLib.PrintContextLog(context, "操作台子挑战挂载!!!!!!!!")
-- 调用提示id为 43001011 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001011) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_ENTER_REGION_5014(context, evt)
ScriptLib.CreateFatherChallenge(context, 999, 228, 900, {success = 99999, fail = 99999, fail_on_wipe=true})
ScriptLib.AttachChildChallenge(context, 999, 901, 229, {3,901,3,1},{},{success=0,fail=0})
ScriptLib.PrintContextLog(context, "挂载符文子挑战!!!!!!!!")
ScriptLib.StartFatherChallenge(context, 999)
ScriptLib.PrintContextLog(context, "父挑战开始!!!!!!!!")
ScriptLib.StartGallery(context, 7010)
-- 使灭队event失效
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "AvatarDie", 1, 243004014) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_5015(context, evt)
if evt.param1 == evt.param2 then return -1 end
ScriptLib.PrintContextLog(context, "符文计数改变了!!!!!!!!!!!!")
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_5020(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"AddTime"为1
if ScriptLib.GetGroupVariableValue(context, "AddTime") ~= 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_5020(context, evt)
--修改父挑战时间
ScriptLib.ModifyFatherChallengeProperty(context, defs.challenge_father, FatherChallengeProperty.DURATION, 300)
-- 变量"AddTime"赋值为0
ScriptLib.SetGroupVariableValue(context, "AddTime", 0)
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_5021(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"runes"为1
if ScriptLib.GetGroupVariableValue(context, "runes") ~= 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_5021(context, evt)
-- 调用提示id为 43001002 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001002) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_5022(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"runes"为3
if ScriptLib.GetGroupVariableValue(context, "runes") ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_5022(context, evt)
-- 调用提示id为 43001004 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001004) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_5023(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"runes"为2
if ScriptLib.GetGroupVariableValue(context, "runes") ~= 2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_5023(context, evt)
-- 调用提示id为 43001003 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001003) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_5024(context, evt)
if 5016 ~= evt.param2 or GadgetState.Default ~= evt.param1 then
return false
end
return true
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_5025(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"success"为1
if ScriptLib.GetGroupVariableValue(context, "success") ~= 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_5025(context, evt)
ScriptLib.PrintContextLog(context, "中控室光翼展开!!!!!!!!")
return 0
end
-- 触发条件
function condition_EVENT_CHALLENGE_FAIL_5026(context, evt)
if evt.param1 == 228 then
return false
end
return true
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_5026(context, evt)
-- 调用提示id为 43001010 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001010) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
require "AttachChildChallenge"
@@ -0,0 +1,107 @@
-- 基础信息
local base_info = {
group_id = 243004006
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 6001, gadget_id = 70350215, pos = { x = 72.166, y = 40.049, z = -37.860 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1 },
{ config_id = 6002, gadget_id = 70350216, pos = { x = -3.620, y = 40.049, z = -69.258 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 6003, gadget_id = 70350218, pos = { x = -24.411, y = 40.029, z = -28.806 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 },
{ config_id = 6004, gadget_id = 70350216, pos = { x = 11.289, y = 40.001, z = -35.640 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1 },
{ config_id = 6006, gadget_id = 70350218, pos = { x = -25.722, y = 40.003, z = -70.592 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 },
{ config_id = 6007, gadget_id = 70350216, pos = { x = 100.702, y = 40.089, z = -52.620 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 },
{ config_id = 6008, gadget_id = 70350215, pos = { x = -27.956, y = 39.999, z = -0.766 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 6009, gadget_id = 70220003, pos = { x = -32.400, y = 40.001, z = -8.666 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 },
{ config_id = 6010, gadget_id = 70220003, pos = { x = -32.291, y = 40.250, z = -1.609 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 },
{ config_id = 6011, gadget_id = 70220003, pos = { x = -32.357, y = 40.000, z = -5.903 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 },
{ config_id = 6015, gadget_id = 70350215, pos = { x = 64.503, y = 40.000, z = -54.931 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1 },
{ config_id = 6019, gadget_id = 70220043, pos = { x = -31.346, y = 40.000, z = -33.754 }, rot = { x = 0.000, y = 336.515, z = 0.000 }, level = 1 },
{ config_id = 6020, gadget_id = 70220003, pos = { x = 74.549, y = 40.000, z = -45.807 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 },
{ config_id = 6021, gadget_id = 70220003, pos = { x = 74.472, y = 40.002, z = -50.233 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 },
{ config_id = 6022, gadget_id = 70220035, pos = { x = -41.098, y = 40.000, z = -24.348 }, rot = { x = 0.000, y = 132.525, z = 0.000 }, level = 1 },
{ config_id = 6023, gadget_id = 70220035, pos = { x = 64.760, y = 40.000, z = -23.900 }, rot = { x = 0.000, y = 132.525, z = 0.000 }, level = 1 },
{ config_id = 6024, gadget_id = 70220035, pos = { x = 79.812, y = 39.990, z = -35.208 }, rot = { x = 0.000, y = 332.754, z = 0.000 }, level = 1 },
{ config_id = 6025, gadget_id = 70220010, pos = { x = 4.584, y = 40.003, z = -75.600 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 6026, gadget_id = 70220035, pos = { x = -12.230, y = 40.024, z = -71.661 }, rot = { x = 0.000, y = 132.525, z = 0.000 }, level = 1 },
{ config_id = 6027, gadget_id = 70220010, pos = { x = 32.198, y = -19.559, z = -46.567 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 6028, gadget_id = 70220010, pos = { x = 32.240, y = -19.559, z = -57.991 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 6029, gadget_id = 70220043, pos = { x = 21.127, y = -19.559, z = -52.206 }, rot = { x = 1.178, y = 122.644, z = 0.000 }, level = 1 },
{ config_id = 6030, gadget_id = 70220035, pos = { x = 44.147, y = -19.559, z = -52.703 }, rot = { x = 0.000, y = 273.140, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
}
-- 变量
variables = {
}
-- 废弃数据
garbages = {
gadgets = {
{ config_id = 6005, gadget_id = 70350218, pos = { x = 15.720, y = 40.002, z = -20.728 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 6012, gadget_id = 70220003, pos = { x = -20.555, y = 40.000, z = -8.849 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 },
{ config_id = 6013, gadget_id = 70220003, pos = { x = -20.442, y = 40.015, z = -1.794 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 },
{ config_id = 6014, gadget_id = 70220003, pos = { x = -20.508, y = 40.000, z = -6.086 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 },
{ config_id = 6016, gadget_id = 70220003, pos = { x = 59.221, y = 40.001, z = -52.977 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 },
{ config_id = 6017, gadget_id = 70220003, pos = { x = 59.333, y = 40.054, z = -45.979 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 },
{ config_id = 6018, gadget_id = 70220003, pos = { x = 59.262, y = 40.002, z = -50.080 }, rot = { x = 0.000, y = 90.882, z = 0.000 }, level = 1 }
}
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 6001, 6002, 6003, 6004, 6006, 6007, 6008, 6009, 6010, 6011, 6015, 6019, 6020, 6021, 6022, 6023, 6024, 6025, 6026, 6027, 6028, 6029, 6030 },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,587 @@
-- 基础信息
local base_info = {
group_id = 243004008
}
-- Trigger变量
local defs = {
group_main = 243004007,
group_1 = 243004008,
monster_1 = 8004,
monster_2 = 8006,
gadget_main = 7001,
challenge1 = 101,
challenge2 = 102,
Region1 = 8011,
Region2 = 8016,
challenge_father = 999,
group_core = 243004005,
galleryid = 7010
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 8004, monster_id = 21020601, pos = { x = 10.145, y = 40.013, z = -2.390 }, rot = { x = 0.000, y = 90.520, z = 0.000 }, level = 1 },
{ config_id = 8005, monster_id = 20011101, pos = { x = 12.298, y = 40.019, z = 1.266 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 8006, monster_id = 25070101, pos = { x = 19.856, y = 40.064, z = -7.989 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 8007, monster_id = 25070101, pos = { x = 20.038, y = 40.000, z = 4.001 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 8009, monster_id = 25030301, pos = { x = 10.385, y = 40.035, z = -10.122 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 8010, monster_id = 25030301, pos = { x = 9.763, y = 40.029, z = 4.606 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 8020, monster_id = 20011101, pos = { x = 13.021, y = 40.030, z = -6.495 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 8019, gadget_id = 70900205, pos = { x = 25.499, y = 32.453, z = -3.059 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 8011, shape = RegionShape.CUBIC, size = { x = 70.000, y = 40.000, z = 60.000 }, pos = { x = 17.700, y = 40.000, z = -5.500 } },
{ config_id = 8016, shape = RegionShape.CUBIC, size = { x = 70.000, y = 40.000, z = 60.000 }, pos = { x = 17.700, y = 40.000, z = -5.500 } }
}
-- 触发器
triggers = {
{ config_id = 1008001, name = "VARIABLE_CHANGE_8001", event = EventType.EVENT_VARIABLE_CHANGE, source = "key", condition = "condition_EVENT_VARIABLE_CHANGE_8001", action = "action_EVENT_VARIABLE_CHANGE_8001", trigger_count = 0 },
{ config_id = 1008002, name = "ANY_MONSTER_DIE_8002", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_8002", action = "action_EVENT_ANY_MONSTER_DIE_8002", trigger_count = 0 },
{ config_id = 1008003, name = "VARIABLE_CHANGE_8003", event = EventType.EVENT_VARIABLE_CHANGE, source = "key", condition = "condition_EVENT_VARIABLE_CHANGE_8003", action = "action_EVENT_VARIABLE_CHANGE_8003", trigger_count = 0 },
{ config_id = 1008008, name = "ANY_MONSTER_DIE_8008", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_8008", action = "action_EVENT_ANY_MONSTER_DIE_8008", trigger_count = 0 },
{ config_id = 1008011, name = "LEAVE_REGION_8011", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_8011", action = "action_EVENT_LEAVE_REGION_8011", trigger_count = 0 },
{ config_id = 1008012, name = "CHALLENGE_FAIL_8012", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "", action = "action_EVENT_CHALLENGE_FAIL_8012", trigger_count = 0 },
{ config_id = 1008013, name = "CHALLENGE_SUCCESS_8013", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_8013" },
{ config_id = 1008014, name = "ANY_MONSTER_LIVE_8014", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_8014", action = "action_EVENT_ANY_MONSTER_LIVE_8014", trigger_count = 0 },
{ config_id = 1008015, name = "ANY_MONSTER_LIVE_8015", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_8015", action = "action_EVENT_ANY_MONSTER_LIVE_8015" },
{ config_id = 1008016, name = "LEAVE_REGION_8016", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_8016", action = "action_EVENT_LEAVE_REGION_8016", trigger_count = 0 },
{ config_id = 1008017, name = "CHALLENGE_SUCCESS_8017", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "", condition = "", action = "" },
{ config_id = 1008018, name = "CHALLENGE_FAIL_8018", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "", action = "action_EVENT_CHALLENGE_FAIL_8018", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "c1", value = 0, no_refresh = false },
{ config_id = 2, name = "key", value = 0, no_refresh = false },
{ config_id = 3, name = "success", value = 0, no_refresh = false },
{ config_id = 4, name = "Gflag", value = 0, no_refresh = true }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 8019 },
regions = { },
triggers = { },
rand_weight = 0
},
{
-- suite_id = 2,
-- description = ,
monsters = { 8004, 8005, 8020 },
gadgets = { },
regions = { 8011 },
triggers = { "VARIABLE_CHANGE_8001", "ANY_MONSTER_DIE_8002", "LEAVE_REGION_8011", "ANY_MONSTER_LIVE_8014" },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = ,
monsters = { 8006, 8007, 8009, 8010 },
gadgets = { },
regions = { 8016 },
triggers = { "VARIABLE_CHANGE_8003", "ANY_MONSTER_DIE_8008", "ANY_MONSTER_LIVE_8015", "LEAVE_REGION_8016" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_8001(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为3
if ScriptLib.GetGroupVariableValue(context, "key") ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_8001(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
--【修改父挑战时间】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 1 then
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>1")
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "AddTime", 1, defs.group_core) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
return -1
end
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001005) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
ScriptLib.PrintContextLog(context, "父挑战时间已经修改")
end
--【复活】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 2 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 0)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 3 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 1)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 4 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 2)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【复活2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 5 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 3)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 6 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 4)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 7 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 5)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_8002(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_8002(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_8003(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为4
if ScriptLib.GetGroupVariableValue(context, "key") ~= 4 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_8003(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
--【修改父挑战时间】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 1 then
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>1")
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "AddTime", 1, defs.group_core) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
return -1
end
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001005) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
ScriptLib.PrintContextLog(context, "父挑战时间已经修改")
end
--【复活】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 2 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 0)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 3 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 1)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 4 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 2)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【复活2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 5 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 3)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 6 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 4)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 7 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 5)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_8008(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_8008(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_8011(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region1 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_8011(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
ScriptLib.PrintContextLog(context, "离开区域,挑战失败!!!!!!!!!!!")
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f1", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_8012(context, evt)
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f1", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_SUCCESS_8013(context, evt)
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 243004008, 5000, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_8014(context, evt)
if defs.monster_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_8014(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 3})
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_8015(context, evt)
if defs.monster_2 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_8015(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 4})
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_8016(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region2 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_8016(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
ScriptLib.PrintContextLog(context, "离开区域,挑战失败!!!!!!!!!!!")
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f1", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 3)
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_8018(context, evt)
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f1", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 3)
return 0
end
@@ -0,0 +1,578 @@
-- 基础信息
local base_info = {
group_id = 243004009
}
-- Trigger变量
local defs = {
group_main = 243004007,
group_1 = 243004009,
monster_1 = 9003,
monster_2 = 9006,
challenge1 = 201,
challenge2 = 202,
Region1 = 9011,
Region2 = 9019,
challenge_father = 999,
group_core = 243004005,
galleryid = 7010
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 9003, monster_id = 21030301, pos = { x = 64.472, y = 40.049, z = -75.392 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 9004, monster_id = 21020601, pos = { x = 68.724, y = 40.049, z = -76.810 }, rot = { x = 0.000, y = 83.591, z = 0.000 }, level = 1 },
{ config_id = 9005, monster_id = 21011401, pos = { x = 64.532, y = 40.000, z = -80.617 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 9006, monster_id = 22010201, pos = { x = 81.541, y = 40.049, z = -66.667 }, rot = { x = 0.000, y = 206.985, z = 0.000 }, level = 1 },
{ config_id = 9007, monster_id = 21010501, pos = { x = 66.966, y = 40.049, z = -85.720 }, rot = { x = 0.000, y = 53.013, z = 0.000 }, level = 1 },
{ config_id = 9008, monster_id = 21010501, pos = { x = 79.914, y = 40.049, z = -85.846 }, rot = { x = 0.000, y = 307.021, z = 0.000 }, level = 1 },
{ config_id = 9020, monster_id = 21011401, pos = { x = 64.103, y = 40.049, z = -68.435 }, rot = { x = 0.000, y = 81.669, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 9018, gadget_id = 70900205, pos = { x = 79.610, y = 33.906, z = -82.892 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 9011, shape = RegionShape.CUBIC, size = { x = 60.000, y = 40.000, z = 50.000 }, pos = { x = 75.900, y = 40.000, z = -67.700 } },
{ config_id = 9019, shape = RegionShape.CUBIC, size = { x = 60.000, y = 40.000, z = 50.000 }, pos = { x = 75.900, y = 40.000, z = -67.700 } }
}
-- 触发器
triggers = {
{ config_id = 1009001, name = "VARIABLE_CHANGE_9001", event = EventType.EVENT_VARIABLE_CHANGE, source = "key", condition = "condition_EVENT_VARIABLE_CHANGE_9001", action = "action_EVENT_VARIABLE_CHANGE_9001", trigger_count = 0 },
{ config_id = 1009002, name = "ANY_MONSTER_DIE_9002", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_9002", action = "action_EVENT_ANY_MONSTER_DIE_9002", trigger_count = 0 },
{ config_id = 1009011, name = "LEAVE_REGION_9011", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_9011", action = "action_EVENT_LEAVE_REGION_9011", trigger_count = 0 },
{ config_id = 1009012, name = "CHALLENGE_FAIL_9012", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "", action = "action_EVENT_CHALLENGE_FAIL_9012", trigger_count = 0 },
{ config_id = 1009013, name = "CHALLENGE_SUCCESS_9013", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "", condition = "", action = "" },
{ config_id = 1009014, name = "ANY_MONSTER_LIVE_9014", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_9014", action = "action_EVENT_ANY_MONSTER_LIVE_9014" },
{ config_id = 1009015, name = "ANY_MONSTER_LIVE_9015", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_9015", action = "action_EVENT_ANY_MONSTER_LIVE_9015" },
{ config_id = 1009016, name = "CHALLENGE_SUCCESS_9016", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "", condition = "", action = "" },
{ config_id = 1009017, name = "CHALLENGE_FAIL_9017", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "", action = "action_EVENT_CHALLENGE_FAIL_9017", trigger_count = 0 },
{ config_id = 1009019, name = "LEAVE_REGION_9019", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_9019", action = "action_EVENT_LEAVE_REGION_9019", trigger_count = 0 },
{ config_id = 1009021, name = "VARIABLE_CHANGE_9021", event = EventType.EVENT_VARIABLE_CHANGE, source = "key", condition = "condition_EVENT_VARIABLE_CHANGE_9021", action = "action_EVENT_VARIABLE_CHANGE_9021", trigger_count = 0 },
{ config_id = 1009022, name = "ANY_MONSTER_DIE_9022", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_9022", action = "action_EVENT_ANY_MONSTER_DIE_9022", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "c2", value = 0, no_refresh = false },
{ config_id = 2, name = "key", value = 0, no_refresh = false },
{ config_id = 3, name = "success", value = 0, no_refresh = false },
{ config_id = 4, name = "Gflag", value = 0, no_refresh = true }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 9018 },
regions = { },
triggers = { },
rand_weight = 0
},
{
-- suite_id = 2,
-- description = ,
monsters = { 9003, 9004, 9005, 9020 },
gadgets = { },
regions = { 9011 },
triggers = { "VARIABLE_CHANGE_9001", "ANY_MONSTER_DIE_9002", "LEAVE_REGION_9011", "ANY_MONSTER_LIVE_9014" },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = ,
monsters = { 9006, 9007, 9008 },
gadgets = { },
regions = { 9019 },
triggers = { "ANY_MONSTER_LIVE_9015", "LEAVE_REGION_9019", "VARIABLE_CHANGE_9021", "ANY_MONSTER_DIE_9022" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_9001(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为4
if ScriptLib.GetGroupVariableValue(context, "key") ~= 4 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_9001(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
--【修改父挑战时间】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 1 then
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>1")
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "AddTime", 1, defs.group_core) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
return -1
end
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001005) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
ScriptLib.PrintContextLog(context, "父挑战时间已经修改")
end
--【复活】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 2 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 0)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 3 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 1)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 4 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 2)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【复活2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 5 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 3)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 6 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 4)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 7 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 5)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_9002(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_9002(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_9011(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region1 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_9011(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
ScriptLib.PrintContextLog(context, "离开区域,挑战失败!!!!!!!!!!!")
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f2", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_9012(context, evt)
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f2", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_9014(context, evt)
if defs.monster_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_9014(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 4})
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_9015(context, evt)
if defs.monster_2 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_9015(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 3})
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_9017(context, evt)
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f2", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 3)
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_9019(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region2 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_9019(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
ScriptLib.PrintContextLog(context, "离开区域,挑战失败!!!!!!!!!!!")
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f2", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 3)
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_9021(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为3
if ScriptLib.GetGroupVariableValue(context, "key") ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_9021(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
--【修改父挑战时间】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 1 then
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>1")
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "AddTime", 1, defs.group_core) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
return -1
end
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001005) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
ScriptLib.PrintContextLog(context, "父挑战时间已经修改")
end
--【复活】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 2 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 0)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 3 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 1)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 4 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 2)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【复活2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 5 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 3)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 6 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 4)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 7 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 5)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_9022(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_9022(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
@@ -0,0 +1,580 @@
-- 基础信息
local base_info = {
group_id = 243004010
}
-- Trigger变量
local defs = {
group_main = 243004007,
group_1 = 243004010,
monster_1 = 10007,
monster_2 = 10002,
challenge1 = 301,
challenge2 = 302,
Region1 = 10012,
Region2 = 10020,
challenge_father = 999,
group_core = 243004005,
galleryid = 7010
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 10002, monster_id = 25070101, pos = { x = -9.863, y = 40.049, z = -55.857 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 10003, monster_id = 25070101, pos = { x = -8.844, y = 40.049, z = -44.437 }, rot = { x = 0.000, y = 140.438, z = 0.000 }, level = 1 },
{ config_id = 10004, monster_id = 25030301, pos = { x = 3.605, y = 40.002, z = -45.730 }, rot = { x = 0.000, y = 215.403, z = 0.000 }, level = 1 },
{ config_id = 10006, monster_id = 22010201, pos = { x = 3.881, y = 40.018, z = -50.589 }, rot = { x = 0.000, y = 283.992, z = 0.000 }, level = 1 },
{ config_id = 10007, monster_id = 21010501, pos = { x = -11.826, y = 40.049, z = -57.772 }, rot = { x = 0.000, y = 59.554, z = 0.000 }, level = 1 },
{ config_id = 10011, monster_id = 21010501, pos = { x = -11.905, y = 40.060, z = -42.473 }, rot = { x = 0.000, y = 118.037, z = 0.000 }, level = 1 },
{ config_id = 10021, monster_id = 25030301, pos = { x = 1.503, y = 40.021, z = -55.462 }, rot = { x = 0.000, y = 312.694, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 10019, gadget_id = 70900205, pos = { x = -9.326, y = 35.071, z = -55.516 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 10012, shape = RegionShape.CUBIC, size = { x = 65.000, y = 40.000, z = 50.000 }, pos = { x = -5.100, y = 40.000, z = -46.400 } },
{ config_id = 10020, shape = RegionShape.CUBIC, size = { x = 65.000, y = 40.000, z = 50.000 }, pos = { x = -5.100, y = 40.000, z = -46.400 } }
}
-- 触发器
triggers = {
{ config_id = 1010001, name = "VARIABLE_CHANGE_10001", event = EventType.EVENT_VARIABLE_CHANGE, source = "key", condition = "condition_EVENT_VARIABLE_CHANGE_10001", action = "action_EVENT_VARIABLE_CHANGE_10001", trigger_count = 0 },
{ config_id = 1010005, name = "ANY_MONSTER_DIE_10005", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_10005", action = "action_EVENT_ANY_MONSTER_DIE_10005", trigger_count = 0 },
{ config_id = 1010012, name = "LEAVE_REGION_10012", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_10012", action = "action_EVENT_LEAVE_REGION_10012", trigger_count = 0 },
{ config_id = 1010013, name = "CHALLENGE_FAIL_10013", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "", action = "action_EVENT_CHALLENGE_FAIL_10013", trigger_count = 0 },
{ config_id = 1010014, name = "CHALLENGE_SUCCESS_10014", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "", condition = "", action = "" },
{ config_id = 1010015, name = "ANY_MONSTER_LIVE_10015", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_10015", action = "action_EVENT_ANY_MONSTER_LIVE_10015" },
{ config_id = 1010016, name = "ANY_MONSTER_LIVE_10016", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_10016", action = "action_EVENT_ANY_MONSTER_LIVE_10016" },
{ config_id = 1010017, name = "CHALLENGE_FAIL_10017", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "", action = "action_EVENT_CHALLENGE_FAIL_10017", trigger_count = 0 },
{ config_id = 1010018, name = "CHALLENGE_SUCCESS_10018", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "", condition = "", action = "" },
{ config_id = 1010020, name = "LEAVE_REGION_10020", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_10020", action = "action_EVENT_LEAVE_REGION_10020", trigger_count = 0 },
{ config_id = 1010022, name = "VARIABLE_CHANGE_10022", event = EventType.EVENT_VARIABLE_CHANGE, source = "key", condition = "condition_EVENT_VARIABLE_CHANGE_10022", action = "action_EVENT_VARIABLE_CHANGE_10022", trigger_count = 0 },
{ config_id = 1010023, name = "ANY_MONSTER_DIE_10023", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_10023", action = "action_EVENT_ANY_MONSTER_DIE_10023", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "c3", value = 0, no_refresh = false },
{ config_id = 2, name = "key", value = 0, no_refresh = false },
{ config_id = 3, name = "success", value = 0, no_refresh = false },
{ config_id = 4, name = "Gflag", value = 0, no_refresh = true }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 10019 },
regions = { },
triggers = { },
rand_weight = 0
},
{
-- suite_id = 2,
-- description = ,
monsters = { 10006, 10007, 10011 },
gadgets = { },
regions = { 10012 },
triggers = { "VARIABLE_CHANGE_10001", "ANY_MONSTER_DIE_10005", "LEAVE_REGION_10012", "ANY_MONSTER_LIVE_10015" },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = ,
monsters = { 10002, 10003, 10004, 10021 },
gadgets = { },
regions = { 10020 },
triggers = { "ANY_MONSTER_LIVE_10016", "LEAVE_REGION_10020", "VARIABLE_CHANGE_10022", "ANY_MONSTER_DIE_10023" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_10001(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为3
if ScriptLib.GetGroupVariableValue(context, "key") ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_10001(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
--【修改父挑战时间】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 1 then
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>1")
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "AddTime", 1, defs.group_core) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
return -1
end
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001005) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
ScriptLib.PrintContextLog(context, "父挑战时间已经修改")
end
--【复活】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 2 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 0)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 3 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 1)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 4 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 2)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【复活2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 5 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 3)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 6 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 4)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 7 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 5)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_10005(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_10005(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_10012(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region1 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_10012(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
ScriptLib.PrintContextLog(context, "离开区域,挑战失败!!!!!!!!!!!")
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f3", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_10013(context, evt)
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f3", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_10015(context, evt)
if defs.monster_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_10015(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 3})
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_10016(context, evt)
if defs.monster_2 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_10016(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 4})
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_10017(context, evt)
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f3", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 3)
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_10020(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region2 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_10020(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
ScriptLib.PrintContextLog(context, "离开区域,挑战失败!!!!!!!!!!!")
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f3", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 3)
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_10022(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为4
if ScriptLib.GetGroupVariableValue(context, "key") ~= 4 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_10022(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
--【修改父挑战时间】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 1 then
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>1")
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "AddTime", 1, defs.group_core) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
return -1
end
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001005) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
ScriptLib.PrintContextLog(context, "父挑战时间已经修改")
end
--【复活】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 2 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 0)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 3 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 1)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 4 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 2)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【复活2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 5 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 3)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 6 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 4)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 7 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 5)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_10023(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_10023(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
@@ -0,0 +1,582 @@
-- 基础信息
local base_info = {
group_id = 243004011
}
-- Trigger变量
local defs = {
group_main = 243004007,
group_1 = 243004011,
monster_1 = 11003,
monster_2 = 11009,
challenge1 = 401,
Region1 = 11012,
Region2 = 11020,
challenge_father = 999,
group_core = 243004005,
galleryid = 7010
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 11003, monster_id = 21030301, pos = { x = 103.372, y = 40.000, z = -6.583 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 11004, monster_id = 21011401, pos = { x = 103.235, y = 40.003, z = -0.268 }, rot = { x = 0.000, y = 202.589, z = 0.000 }, level = 1 },
{ config_id = 11005, monster_id = 21011401, pos = { x = 102.761, y = 40.120, z = -12.164 }, rot = { x = 0.000, y = 315.661, z = 0.000 }, level = 1 },
{ config_id = 11009, monster_id = 20011101, pos = { x = 93.823, y = 40.031, z = -8.462 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 11010, monster_id = 21020601, pos = { x = 88.887, y = 40.000, z = -3.683 }, rot = { x = 0.000, y = 84.414, z = 0.000 }, level = 1 },
{ config_id = 11011, monster_id = 21020601, pos = { x = 91.940, y = 40.000, z = -4.035 }, rot = { x = 0.000, y = 97.480, z = 0.000 }, level = 1 },
{ config_id = 11021, monster_id = 20011101, pos = { x = 93.137, y = 40.004, z = -0.085 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 11019, gadget_id = 70900205, pos = { x = 98.040, y = 34.315, z = 6.398 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 11012, shape = RegionShape.CUBIC, size = { x = 50.000, y = 40.000, z = 45.000 }, pos = { x = 93.800, y = 40.000, z = -4.600 } },
{ config_id = 11020, shape = RegionShape.CUBIC, size = { x = 50.000, y = 40.000, z = 45.000 }, pos = { x = 93.800, y = 40.000, z = -4.600 } }
}
-- 触发器
triggers = {
{ config_id = 1011001, name = "VARIABLE_CHANGE_11001", event = EventType.EVENT_VARIABLE_CHANGE, source = "key", condition = "condition_EVENT_VARIABLE_CHANGE_11001", action = "action_EVENT_VARIABLE_CHANGE_11001", trigger_count = 0 },
{ config_id = 1011002, name = "ANY_MONSTER_DIE_11002", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_11002", action = "action_EVENT_ANY_MONSTER_DIE_11002", trigger_count = 0 },
{ config_id = 1011006, name = "VARIABLE_CHANGE_11006", event = EventType.EVENT_VARIABLE_CHANGE, source = "key", condition = "condition_EVENT_VARIABLE_CHANGE_11006", action = "action_EVENT_VARIABLE_CHANGE_11006", trigger_count = 0 },
{ config_id = 1011007, name = "ANY_MONSTER_DIE_11007", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_11007", action = "action_EVENT_ANY_MONSTER_DIE_11007", trigger_count = 0 },
{ config_id = 1011012, name = "LEAVE_REGION_11012", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_11012", action = "action_EVENT_LEAVE_REGION_11012", trigger_count = 0 },
{ config_id = 1011013, name = "CHALLENGE_FAIL_11013", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "", action = "action_EVENT_CHALLENGE_FAIL_11013", trigger_count = 0 },
{ config_id = 1011014, name = "CHALLENGE_SUCCESS_11014", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "", condition = "", action = "" },
{ config_id = 1011015, name = "ANY_MONSTER_LIVE_11015", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_11015", action = "action_EVENT_ANY_MONSTER_LIVE_11015" },
{ config_id = 1011016, name = "ANY_MONSTER_LIVE_11016", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_11016", action = "action_EVENT_ANY_MONSTER_LIVE_11016" },
{ config_id = 1011017, name = "CHALLENGE_FAIL_11017", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "", action = "action_EVENT_CHALLENGE_FAIL_11017", trigger_count = 0 },
{ config_id = 1011018, name = "CHALLENGE_SUCCESS_11018", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "", condition = "", action = "" },
{ config_id = 1011020, name = "LEAVE_REGION_11020", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_11020", action = "action_EVENT_LEAVE_REGION_11020", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "c4", value = 0, no_refresh = false },
{ config_id = 2, name = "key", value = 0, no_refresh = false },
{ config_id = 3, name = "success", value = 0, no_refresh = false },
{ config_id = 4, name = "Gflag", value = 0, no_refresh = true }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 11019 },
regions = { },
triggers = { },
rand_weight = 0
},
{
-- suite_id = 2,
-- description = ,
monsters = { 11003, 11004, 11005, 11010 },
gadgets = { },
regions = { 11012 },
triggers = { "VARIABLE_CHANGE_11001", "ANY_MONSTER_DIE_11002", "LEAVE_REGION_11012", "ANY_MONSTER_LIVE_11015" },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = ,
monsters = { 11009, 11011, 11021 },
gadgets = { },
regions = { 11020 },
triggers = { "VARIABLE_CHANGE_11006", "ANY_MONSTER_DIE_11007", "ANY_MONSTER_LIVE_11016", "LEAVE_REGION_11020" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_11001(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为4
if ScriptLib.GetGroupVariableValue(context, "key") ~= 4 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_11001(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
--【修改父挑战时间】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 1 then
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>1")
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "AddTime", 1, defs.group_core) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
return -1
end
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001005) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
ScriptLib.PrintContextLog(context, "父挑战时间已经修改")
end
--【复活】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 2 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 0)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 3 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 1)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 4 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 2)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【复活2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 5 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 3)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 6 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 4)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 7 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 5)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_11002(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_11002(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_11006(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为3
if ScriptLib.GetGroupVariableValue(context, "key") ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_11006(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
--【修改父挑战时间】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 1 then
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>1")
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "AddTime", 1, defs.group_core) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
return -1
end
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001005) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
ScriptLib.PrintContextLog(context, "父挑战时间已经修改")
end
--【复活】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 2 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 0)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 3 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 1)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 4 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 2)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【复活2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 5 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 3)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>2")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001006) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加攻击2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 6 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 4)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>3")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001007) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
--【加移速2】
if ScriptLib.GetGroupVariableValue(context, "Gflag") == 7 then
ScriptLib.AttachGalleryAbilityGroup(context, {}, defs.galleryid, 5)
ScriptLib.PrintContextLog(context, "Gflag>>>>>>>>>>>>>>>>>>>>>>>>>>>4")
-- 调用提示id为 400021 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001008) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_11007(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_11007(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_11012(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region1 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_11012(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
ScriptLib.PrintContextLog(context, "离开区域,挑战失败!!!!!!!!!!!")
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f4", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_11013(context, evt)
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f4", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_11015(context, evt)
if defs.monster_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_11015(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 4})
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_11016(context, evt)
if defs.monster_2 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_11016(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 3})
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_11017(context, evt)
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f4", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 3)
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_11020(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region2 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_11020(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
ScriptLib.PrintContextLog(context, "离开区域,挑战失败!!!!!!!!!!!")
-- 针对当前group内变量名为 "f1" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "f4", 1, defs.group_main) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 3)
return 0
end
@@ -0,0 +1,108 @@
-- 基础信息
local base_info = {
group_id = 243004012
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 12001, gadget_id = 70350245, pos = { x = 96.503, y = 40.544, z = -33.461 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12002, gadget_id = 70350245, pos = { x = 39.501, y = 40.544, z = 1.824 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12003, gadget_id = 70350246, pos = { x = 50.019, y = 40.544, z = -63.448 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12004, gadget_id = 70350246, pos = { x = -32.656, y = 40.544, z = -82.380 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12005, gadget_id = 70350247, pos = { x = -2.960, y = 40.544, z = -31.532 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12006, gadget_id = 70350247, pos = { x = -41.833, y = 40.544, z = -4.759 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12007, gadget_id = 70350245, pos = { x = 63.595, y = 40.544, z = -49.749 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12008, gadget_id = 70350245, pos = { x = 96.067, y = 40.544, z = -33.605 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12009, gadget_id = 70350246, pos = { x = 93.272, y = 40.544, z = -77.143 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12010, gadget_id = 70350246, pos = { x = -10.272, y = 40.544, z = -9.166 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12011, gadget_id = 70350247, pos = { x = -40.302, y = 40.544, z = -58.944 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12012, gadget_id = 70350247, pos = { x = 11.332, y = 40.544, z = -51.823 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12013, gadget_id = 70350245, pos = { x = -39.763, y = 40.544, z = -42.082 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12014, gadget_id = 70350245, pos = { x = 16.015, y = 40.544, z = -27.942 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12015, gadget_id = 70350246, pos = { x = 98.382, y = 40.544, z = -25.359 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12016, gadget_id = 70350246, pos = { x = 22.332, y = 40.544, z = -77.622 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12017, gadget_id = 70350247, pos = { x = -10.900, y = 40.544, z = -7.997 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12018, gadget_id = 70350247, pos = { x = 51.081, y = 40.544, z = 0.412 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 12019, gadget_id = 70900205, pos = { x = -6.284, y = 38.818, z = -49.793 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = true
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 12001, 12002, 12003, 12004, 12005, 12006 },
regions = { },
triggers = { },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { 12007, 12008, 12009, 12010, 12011, 12012 },
regions = { },
triggers = { },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = ,
monsters = { },
gadgets = { 12013, 12014, 12015, 12016, 12017, 12018 },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
@@ -0,0 +1,81 @@
-- 基础信息
local base_info = {
group_id = 243004013
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 13001, gadget_id = 70900205, pos = { x = 39.997, y = 39.978, z = -27.990 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 13002, shape = RegionShape.CUBIC, size = { x = 40.000, y = 20.000, z = 35.000 }, pos = { x = 17.667, y = 48.639, z = -1.610 } },
{ config_id = 13003, shape = RegionShape.CUBIC, size = { x = 35.000, y = 20.000, z = 35.000 }, pos = { x = -37.096, y = 48.639, z = -26.500 } },
{ config_id = 13004, shape = RegionShape.CUBIC, size = { x = 40.000, y = 20.000, z = 27.000 }, pos = { x = 0.727, y = 49.103, z = -48.023 } },
{ config_id = 13005, shape = RegionShape.CUBIC, size = { x = 40.000, y = 20.000, z = 27.000 }, pos = { x = -2.807, y = 49.103, z = -75.399 } },
{ config_id = 13006, shape = RegionShape.CUBIC, size = { x = 35.000, y = 20.000, z = 38.000 }, pos = { x = 74.380, y = 49.103, z = -72.616 } },
{ config_id = 13007, shape = RegionShape.CUBIC, size = { x = 35.000, y = 20.000, z = 32.000 }, pos = { x = 68.119, y = 49.103, z = -29.100 } },
{ config_id = 13008, shape = RegionShape.CUBIC, size = { x = 40.000, y = 20.000, z = 35.000 }, pos = { x = 99.627, y = 49.103, z = 5.188 } }
}
-- 触发器
triggers = {
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 13001 },
regions = { 13002, 13003, 13004, 13005, 13006, 13007, 13008 },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
require "V1_5/Challenge_SetEyePoint"
@@ -0,0 +1,95 @@
-- 基础信息
local base_info = {
group_id = 243004014
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 14002, gadget_id = 70900205, pos = { x = 25.910, y = 18.618, z = -42.466 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1014001, name = "DUNGEON_ALL_AVATAR_DIE_14001", event = EventType.EVENT_DUNGEON_ALL_AVATAR_DIE, source = "", condition = "condition_EVENT_DUNGEON_ALL_AVATAR_DIE_14001", action = "action_EVENT_DUNGEON_ALL_AVATAR_DIE_14001" }
}
-- 变量
variables = {
{ config_id = 1, name = "AvatarDie", value = 0, no_refresh = false }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 14002 },
regions = { },
triggers = { "DUNGEON_ALL_AVATAR_DIE_14001" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_DUNGEON_ALL_AVATAR_DIE_14001(context, evt)
-- 判断变量"AvatarDie"为0
if ScriptLib.GetGroupVariableValue(context, "AvatarDie") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_DUNGEON_ALL_AVATAR_DIE_14001(context, evt)
-- 挑战失败触发结算
if 0 ~= ScriptLib.FailMistTrialDungeonChallenge(context, 999) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : 结束挑战失败!!!!")
return -1
end
return 0
end
@@ -0,0 +1,372 @@
-- 基础信息
local base_info = {
group_id = 243004016
}
-- Trigger变量
local defs = {
gadget_1 = 16006,
group_1 = 243004016,
monster_1 = 16012,
monster_2 = 16002,
monster_3 = 16003,
monster_4 = 16004,
monster_5 = 16005,
monster_6 = 16012,
monster_7 = 16013,
monster_8 = 16014,
Region1 = 16015,
challenge1 = 2,
challenge_father = 999,
gadget_rune = 5018,
group_core = 243004005
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 16003, monster_id = 23010601, pos = { x = 8.643, y = 40.049, z = -77.131 }, rot = { x = 0.000, y = 238.164, z = 0.000 }, level = 1 },
{ config_id = 16012, monster_id = 23010101, pos = { x = 2.936, y = 40.049, z = -81.244 }, rot = { x = 0.000, y = 311.869, z = 0.000 }, level = 1 },
{ config_id = 16014, monster_id = 23010401, pos = { x = 5.386, y = 40.000, z = -71.902 }, rot = { x = 0.000, y = 238.164, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 16006, gadget_id = 70360001, pos = { x = -3.944, y = 41.018, z = -80.620 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 16015, shape = RegionShape.CUBIC, size = { x = 80.000, y = 40.000, z = 35.000 }, pos = { x = -2.900, y = 40.000, z = -77.600 } }
}
-- 触发器
triggers = {
{ config_id = 1016001, name = "VARIABLE_CHANGE_16001", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_16001", action = "action_EVENT_VARIABLE_CHANGE_16001", trigger_count = 0 },
{ config_id = 1016002, name = "ANY_MONSTER_DIE_16002", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_16002", action = "action_EVENT_ANY_MONSTER_DIE_16002", trigger_count = 0 },
{ config_id = 1016007, name = "GADGET_CREATE_16007", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_16007", action = "action_EVENT_GADGET_CREATE_16007" },
{ config_id = 1016008, name = "SELECT_OPTION_16008", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_16008", action = "action_EVENT_SELECT_OPTION_16008", trigger_count = 0 },
{ config_id = 1016009, name = "ANY_MONSTER_LIVE_16009", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_16009", action = "action_EVENT_ANY_MONSTER_LIVE_16009", trigger_count = 0 },
{ config_id = 1016010, name = "CHALLENGE_FAIL_16010", event = EventType.EVENT_CHALLENGE_FAIL, source = "2", condition = "", action = "action_EVENT_CHALLENGE_FAIL_16010", trigger_count = 0 },
{ config_id = 1016011, name = "CHALLENGE_SUCCESS_16011", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "2", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_16011" },
{ config_id = 1016015, name = "LEAVE_REGION_16015", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_16015", action = "action_EVENT_LEAVE_REGION_16015", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "key", value = 0, no_refresh = false },
{ config_id = 2, name = "success", value = 0, no_refresh = false }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 16006 },
regions = { 16015 },
triggers = { "VARIABLE_CHANGE_16001", "ANY_MONSTER_DIE_16002", "GADGET_CREATE_16007", "SELECT_OPTION_16008", "ANY_MONSTER_LIVE_16009", "LEAVE_REGION_16015" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { 16003, 16012, 16014 },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_16001(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为3
if ScriptLib.GetGroupVariableValue(context, "key") ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_16001(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 将本组内变量名为 "key" 的变量设置为 99
if 0 ~= ScriptLib.SetGroupVariableValue(context, "key", 99) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
ScriptLib.ChangeGroupVariableValueByGroup(context, "runes", 1, defs.group_core)
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
ScriptLib.PrintContextLog(context, "2号符文射线!!!!!!!!")
--[[ 触发镜头注目,注目位置为坐标(0,0,0),持续时间为2秒,并且为强制注目形式,不广播其他玩家
local pos = {x=-3.9, y=52, z=-80.6}
local pos_follow = {x=0, y=0, z=0}
if 0 ~= ScriptLib.BeginCameraSceneLook(context, { look_pos = pos, is_allow_input = false, duration = 2, is_force = true, is_broadcast = false, is_recover_keep_current = true, delay = 0,
is_set_follow_pos = false, follow_pos = pos_follow, is_force_walk = false, is_change_play_mode = false,
is_set_screen_XY = false, screen_x = 0, screen_y = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_cameraLook_Begin")
return -1
end
--]]
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_16002(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_16002(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
-- 触发条件
function condition_EVENT_GADGET_CREATE_16007(context, evt)
if defs.gadget_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_16007(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_16008(context, evt)
-- 判断是gadgetid 1003 option_id 177
if defs.gadget_1 ~= evt.param1 then
return false
end
if 7 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_16008(context, evt)
--刷新suite2
ScriptLib.AddExtraGroupSuite(context, defs.group_1, 2)
-- 删除指定group 243004001 ;指定config1003;物件身上指定option7
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, defs.group_1, defs.gadget_1, 7) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 将configid为 1003 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, defs.gadget_1, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_16009(context, evt)
if defs.monster_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_16009(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 3})
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
ScriptLib.PrintContextLog(context, "2号符文点亮!!!!!!!!")
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_16010(context, evt)
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
-- 改变指定group组243004001中, configid为1003的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_1, defs.gadget_1, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_SUCCESS_16011(context, evt)
ScriptLib.ChangeGroupVariableValueByGroup(context, "runes", 1, defs.group_core)
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
ScriptLib.PrintContextLog(context, "2号符文射线!!!!!!!!")
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_16015(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region1 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_16015(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "key", 0) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
-- 改变指定group组243004001中, configid为1003的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_1, defs.gadget_1, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
return 0
end
@@ -0,0 +1,377 @@
-- 基础信息
local base_info = {
group_id = 243004017
}
-- Trigger变量
local defs = {
gadget_1 = 17006,
group_1 = 243004017,
monster_1 = 17014,
monster_2 = 17002,
monster_3 = 17003,
monster_4 = 17004,
monster_5 = 17005,
monster_6 = 17012,
monster_7 = 17013,
monster_8 = 17014,
Region1 = 17015,
challenge1 = 3,
challenge_father = 999,
gadget_rune = 5019,
group_core = 243004005
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 17003, monster_id = 23010501, pos = { x = -30.802, y = 40.000, z = -30.985 }, rot = { x = 0.000, y = 354.726, z = 0.000 }, level = 1 },
{ config_id = 17004, monster_id = 23010101, pos = { x = -41.103, y = 40.000, z = -28.870 }, rot = { x = 0.000, y = 45.078, z = 0.000 }, level = 1 },
{ config_id = 17014, monster_id = 23010401, pos = { x = -36.876, y = 40.000, z = -34.498 }, rot = { x = 0.000, y = 354.726, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 17006, gadget_id = 70360001, pos = { x = -36.431, y = 41.004, z = -28.367 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 17015, shape = RegionShape.CUBIC, size = { x = 70.000, y = 40.000, z = 60.000 }, pos = { x = 17.700, y = 40.000, z = -5.500 } }
}
-- 触发器
triggers = {
{ config_id = 1017001, name = "VARIABLE_CHANGE_17001", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_17001", action = "action_EVENT_VARIABLE_CHANGE_17001", trigger_count = 0 },
{ config_id = 1017002, name = "ANY_MONSTER_DIE_17002", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_17002", action = "action_EVENT_ANY_MONSTER_DIE_17002", trigger_count = 0 },
{ config_id = 1017007, name = "GADGET_CREATE_17007", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_17007", action = "action_EVENT_GADGET_CREATE_17007" },
{ config_id = 1017008, name = "SELECT_OPTION_17008", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_17008", action = "action_EVENT_SELECT_OPTION_17008", trigger_count = 0 },
{ config_id = 1017009, name = "ANY_MONSTER_LIVE_17009", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_17009", action = "action_EVENT_ANY_MONSTER_LIVE_17009", trigger_count = 0 },
{ config_id = 1017010, name = "CHALLENGE_FAIL_17010", event = EventType.EVENT_CHALLENGE_FAIL, source = "3", condition = "", action = "action_EVENT_CHALLENGE_FAIL_17010", trigger_count = 0 },
{ config_id = 1017011, name = "CHALLENGE_SUCCESS_17011", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "3", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_17011", tag = "901" },
{ config_id = 1017015, name = "LEAVE_REGION_17015", event = EventType.EVENT_LEAVE_REGION, source = "", condition = "condition_EVENT_LEAVE_REGION_17015", action = "action_EVENT_LEAVE_REGION_17015", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "key", value = 0, no_refresh = false },
{ config_id = 2, name = "success", value = 0, no_refresh = false }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 17006 },
regions = { 17015 },
triggers = { "VARIABLE_CHANGE_17001", "ANY_MONSTER_DIE_17002", "GADGET_CREATE_17007", "SELECT_OPTION_17008", "ANY_MONSTER_LIVE_17009", "LEAVE_REGION_17015" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { 17003, 17004, 17014 },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_17001(context, evt)
if evt.param1 == evt.param2 then return false end
-- 判断变量"key"为3
if ScriptLib.GetGroupVariableValue(context, "key") ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_17001(context, evt)
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 将本组内变量名为 "key" 的变量设置为 99
if 0 ~= ScriptLib.SetGroupVariableValue(context, "key", 99) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
ScriptLib.ChangeGroupVariableValueByGroup(context, "runes", 1, defs.group_core)
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
ScriptLib.PrintContextLog(context, "3号符文射线!!!!!!!!")
--[[ 触发镜头注目,注目位置为坐标(0,0,0),持续时间为2秒,并且为强制注目形式,不广播其他玩家
local pos = {x=-36.3, y=52, z=-28.3}
local pos_follow = {x=0, y=0, z=0}
if 0 ~= ScriptLib.BeginCameraSceneLook(context, { look_pos = pos, is_allow_input = false, duration = 2, is_force = true, is_broadcast = false, is_recover_keep_current = true, delay = 0,
is_set_follow_pos = false, follow_pos = pos_follow, is_force_walk = false, is_change_play_mode = false,
is_set_screen_XY = false, screen_x = 0, screen_y = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_cameraLook_Begin")
return -1
end
--]]
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_17002(context, evt)
--检查configeID是否大于0
if 0 >= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_17002(context, evt)
-- 针对当前group内变量名为 "key" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "key", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
--通知父挑战积分+1
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddChildChallengeScore", {1})
return 0
end
-- 触发条件
function condition_EVENT_GADGET_CREATE_17007(context, evt)
if defs.gadget_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_17007(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_17008(context, evt)
-- 判断是gadgetid 1003 option_id 177
if defs.gadget_1 ~= evt.param1 then
return false
end
if 7 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_17008(context, evt)
--刷新suite2
ScriptLib.AddExtraGroupSuite(context, defs.group_1, 2)
-- 删除指定group 243004001 ;指定config1003;物件身上指定option7
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, defs.group_1, defs.gadget_1, 7) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
return -1
end
-- 将configid为 1003 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, defs.gadget_1, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_LIVE_17009(context, evt)
if defs.monster_1 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_LIVE_17009(context, evt)
--向编号999的父挑战挂接子挑战
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineFatherIndex",{defs.challenge_father})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "DefineChildChallengeScore",{ 1, 1})
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AttachChildChallengeFromDiffGroup",{defs.challenge1, 233, 3})
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
ScriptLib.PrintContextLog(context, "3号符文点亮!!!!!!!!!")
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_FAIL_17010(context, evt)
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
-- 改变指定group组243004001中, configid为1003的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_1, defs.gadget_1, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_CHALLENGE_SUCCESS_17011(context, evt)
ScriptLib.ChangeGroupVariableValueByGroup(context, "runes", 1, defs.group_core)
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
ScriptLib.PrintContextLog(context, "3号符文射线!!!!!!!!")
return 0
end
-- 触发条件
function condition_EVENT_LEAVE_REGION_17015(context, evt)
-- 判断是区域8011
if ScriptLib.GetRegionConfigId(context, { region_eid = evt.source_eid }) ~= defs.Region1 then
return false
end
-- 判断变量"success"为0
if ScriptLib.GetGroupVariableValue(context, "success") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_LEAVE_REGION_17015(context, evt)
--离开区域 挑战失败
ScriptLib.ExecuteGroupLua(context, defs.group_core, "StopChildChallengeFromDiffGroup", {defs.challenge1,0})
-- 将本组内变量名为 "success" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "key", 0) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
-- 改变指定group组243004001中, configid为1003的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_1, defs.gadget_1, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {7}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
-- 改变指定group组243004008中, configid为5000的gadget的state
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
return -1
end
return 0
end
@@ -0,0 +1,8 @@
{
"areas": {},
"doors": {},
"entities": {},
"forces": {},
"points": {},
"transRadius": 0.0
}
@@ -0,0 +1,23 @@
[
{
"area_id": 10024,
"points": [
{
"x": -68.50976,
"y": -136.7609
},
{
"x": -81.53466,
"y": 101.673447
},
{
"x": 179.74437,
"y": 91.02684
},
{
"x": 176.920288,
"y": -136.5556
}
]
}
]