mirror of
https://gitlab.com/YuukiPS/GC-Resources.git
synced 2025-01-08 12:07:53 +08:00
More placeholders 3.6 scene lua
This commit is contained in:
parent
08b0cec016
commit
f4fa96dd62
@ -1,4 +1,4 @@
|
||||
-- 地图配置
|
||||
-- map configuration
|
||||
scene_config = {
|
||||
begin_pos = { x = -512.0, z = -512.0 },
|
||||
size = { x = 1024.0, z = 1024.0 },
|
||||
@ -9,10 +9,10 @@ scene_config = {
|
||||
vision_anchor = { x = -1000.0, z = -1000.0 }
|
||||
}
|
||||
|
||||
-- 所有的区块
|
||||
-- all blocks
|
||||
blocks = { 20179 }
|
||||
|
||||
-- 所有的区块范围坐标
|
||||
-- All block bounds coordinates
|
||||
block_rects = {
|
||||
{ min = { x = -512.0, z = -512.0 }, max = { x = 512.0, z = 512.0 } }
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
-- 所有的group
|
||||
-- all groups
|
||||
groups = {
|
||||
{ id = 220192001, refresh_id = 1, pos = { x = 100, y = 10.5, z = 99.5 } }
|
||||
{ id = 220179001, refresh_id = 1, pos = { x = 100, y = 10.5, z = 99.5 } },
|
||||
{ id = 220179002, refresh_id = 1, pos = { x = 299.999, y = 10.2, z = 99.999 } }
|
||||
}
|
57
Resources/Scripts/Scene/20179/scene20179_group220179001.lua
Normal file
57
Resources/Scripts/Scene/20179/scene20179_group220179001.lua
Normal file
@ -0,0 +1,57 @@
|
||||
local base_info = {
|
||||
group_id = 220179001
|
||||
}
|
||||
|
||||
monsters = {
|
||||
{ config_id = 1028, monster_id = 29080103, pos = { x = 100, y = 10.271, z = 100 }, rot = { x = 0.000, y = 161.345, z = 0.000 }, level = 32, title_id = 171, special_name_id = 13, isElite = true }
|
||||
}
|
||||
|
||||
npcs = {
|
||||
}
|
||||
|
||||
gadgets = {
|
||||
{ config_id = 1001, gadget_id = 70291046, pos = { x = 100, y = 10.271, z = 100 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 90, is_enable_interact = true },
|
||||
{ config_id = 1025, gadget_id = 70291045, pos = { x = 100.381, y = 37.317, z = 100.265 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 90, is_enable_interact = true },
|
||||
{ config_id = 1026, gadget_id = 70290986, pos = { x = 100, y = 10.251, z = 100 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 90, is_enable_interact = true },
|
||||
{ config_id = 1027, gadget_id = 70290987, pos = { x = 100, y = 10.251, z = 100 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 90, is_enable_interact = true },
|
||||
{ config_id = 1029, gadget_id = 70290954, pos = { x = 100, y = 10.2, z = 100 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 90, is_enable_interact = true },
|
||||
{ config_id = 1039, gadget_id = 70290995, pos = { x = 204.242, y = 10.001, z = 115.858 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 90, is_enable_interact = true },
|
||||
}
|
||||
|
||||
regions = {
|
||||
}
|
||||
|
||||
triggers = {
|
||||
{ config_id = 1001028, name = "ANY_MONSTER_DIE_1028", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_1028", action = "action_EVENT_ANY_MONSTER_DIE_1028", trigger_count = 0 }
|
||||
}
|
||||
|
||||
variables = {
|
||||
}
|
||||
|
||||
init_config = {
|
||||
suite = 1,
|
||||
end_suite = 0,
|
||||
rand_suite = false
|
||||
}
|
||||
|
||||
suites = {
|
||||
{
|
||||
monsters = { 1028 },
|
||||
gadgets = { 1001, 1025, 1026, 1027, 1029, 1039 },
|
||||
regions = { },
|
||||
triggers = { "ANY_MONSTER_DIE_1028" },
|
||||
rand_weight = 100
|
||||
}
|
||||
}
|
||||
|
||||
function condition_EVENT_ANY_MONSTER_DIE_1028(context, evt)
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set condition monster 1")
|
||||
return true
|
||||
end
|
||||
|
||||
function action_EVENT_ANY_MONSTER_DIE_1028(context, evt)
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set die action monster 1 and refresh group 2")
|
||||
ScriptLib.PlayCutScene(context, 121, 0)
|
||||
ScriptLib.RefreshGroup(context, { group_id = 220179002, suite = 1 })
|
||||
return true
|
||||
end
|
69
Resources/Scripts/Scene/20179/scene20179_group220179002.lua
Normal file
69
Resources/Scripts/Scene/20179/scene20179_group220179002.lua
Normal file
@ -0,0 +1,69 @@
|
||||
local base_info = {
|
||||
group_id = 220179002
|
||||
}
|
||||
|
||||
monsters = {
|
||||
{ config_id = 1029, monster_id = 29080104, pos = { x = 298.354, y = 10.271, z = 109.712 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 32, title_id = 173, special_name_id = 14, isElite = true }
|
||||
}
|
||||
|
||||
npcs = {
|
||||
}
|
||||
|
||||
gadgets = {
|
||||
{ config_id = 2001, gadget_id = 70291045, pos = { x = 300.381, y = 37.317, z = 300.381 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 90, is_enable_interact = true },
|
||||
{ config_id = 2002, gadget_id = 70290986, pos = { x = 300, y = 10.251, z = 300 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 90, is_enable_interact = true },
|
||||
{ config_id = 2006, gadget_id = 70290964, pos = { x = 299.999, y = 10.2, z = 299.999 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 90, is_enable_interact = true },
|
||||
{ config_id = 2007, gadget_id = 70360001, pos = { x = 299.999, y = 10.2, z = 299.999 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 90, is_enable_interact = true },
|
||||
-- git
|
||||
{ config_id = 2008, gadget_id = 70210106, pos = { x = 301.228, y = 10.271, z = 95.719 }, rot = { x = 0, y = 21, z = 0 }, level = 1, drop_tag = "「正机之神」", persistent = true, boss_chest = { monster_config_id=1029, resin=60, life_time = 1800, take_num = 1} }
|
||||
}
|
||||
|
||||
regions = {
|
||||
}
|
||||
|
||||
triggers = {
|
||||
{ config_id = 1001029, name = "ANY_MONSTER_DIE_1029", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_1029", action = "action_EVENT_ANY_MONSTER_DIE_1029", trigger_count = 0 },
|
||||
{ config_id = 1001029, name = "ANY_MONSTER_LIVE_1029", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_1029", action = "action_EVENT_ANY_MONSTER_LIVE_1029", trigger_count = 0 }
|
||||
}
|
||||
|
||||
variables = {
|
||||
}
|
||||
|
||||
init_config = {
|
||||
suite = 1,
|
||||
end_suite = 0,
|
||||
rand_suite = false
|
||||
}
|
||||
|
||||
suites = {
|
||||
{
|
||||
monsters = { 1029 },
|
||||
gadgets = { 2006, 2002, 2001, 2007 },
|
||||
regions = { },
|
||||
triggers = { "ANY_MONSTER_LIVE_1029", "ANY_MONSTER_DIE_1029" },
|
||||
rand_weight = 100
|
||||
}
|
||||
}
|
||||
|
||||
function condition_EVENT_ANY_MONSTER_DIE_1029(context, evt)
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set die condition monster 2")
|
||||
return true
|
||||
end
|
||||
|
||||
function action_EVENT_ANY_MONSTER_DIE_1029(context, evt)
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set die action monster 2")
|
||||
ScriptLib.CreateGadget(context, { config_id = 2008 })
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add")
|
||||
return true
|
||||
end
|
||||
|
||||
function condition_EVENT_ANY_MONSTER_LIVE_1029(context, evt)
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set live condition monster 2")
|
||||
return true
|
||||
end
|
||||
|
||||
function action_EVENT_ANY_MONSTER_LIVE_1029(context, evt)
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set live action monster 2")
|
||||
--todo
|
||||
return true
|
||||
end
|
@ -1,63 +0,0 @@
|
||||
local base_info = {
|
||||
group_id = 220192001
|
||||
}
|
||||
|
||||
monsters = {
|
||||
{ config_id = 1696001, monster_id = 29080101, pos = { x = 100, y = 10.5, z = 99.5 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 100, drop_tag = "大史莱姆", area_id = 19, title_id = 173, special_name_id = 13 }
|
||||
}
|
||||
|
||||
npcs = {}
|
||||
|
||||
gadgets = {}
|
||||
|
||||
regions = {}
|
||||
|
||||
triggers = {
|
||||
{ config_id = 1001023, name = "ANY_MONSTER_LIVE_1023", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_1023", action = "action_EVENT_ANY_MONSTER_LIVE_1023", trigger_count = 0 }
|
||||
}
|
||||
|
||||
variables = {
|
||||
{ config_id = 1, name = "challenge", value = 0, no_refresh = false }
|
||||
}
|
||||
|
||||
init_config = {
|
||||
suite = 1,
|
||||
end_suite = 0,
|
||||
rand_suite = false
|
||||
}
|
||||
|
||||
suites = {
|
||||
--Show Monster
|
||||
{
|
||||
monsters = {1696001},
|
||||
gadgets = {},
|
||||
regions = {},
|
||||
triggers = {"CHALLENGE_SUCCESS_1004", "CHALLENGE_FAIL_1005", "ANY_MONSTER_LIVE_1023"},
|
||||
rand_weight = 100
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-- 触发条件
|
||||
function condition_EVENT_ANY_MONSTER_LIVE_1023(context, evt)
|
||||
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : Monster")
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_CHALLENGE_SUCCESS_1004(context, evt)
|
||||
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : suc")
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_CHALLENGE_FAIL_1005(context, evt)
|
||||
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : faild")
|
||||
|
||||
return 0
|
||||
end
|
24
Resources/Scripts/Scene/33752/scene33752.lua
Normal file
24
Resources/Scripts/Scene/33752/scene33752.lua
Normal file
@ -0,0 +1,24 @@
|
||||
-- 地图配置
|
||||
scene_config = {
|
||||
begin_pos = { x = -531.5, z = -519.5 },
|
||||
size = { x = 1008.4, z = 1008.4 },
|
||||
born_pos = { x = 0.000, y = -0.176, z = 18.001 },
|
||||
born_rot = { x = 0.000, y = 180.000, z = 0.000 },
|
||||
die_y = -20,
|
||||
city_id = 1,
|
||||
vision_anchor = { x = -1000.0, z = -1000.0 }
|
||||
}
|
||||
|
||||
-- 所有的区块
|
||||
blocks = { 33752 }
|
||||
|
||||
-- 所有的区块范围坐标
|
||||
block_rects = {
|
||||
{ min = { x = -531.5, z = -519.5 }, max = { x = 476.9, z = 488.9 } }
|
||||
}
|
||||
|
||||
-- Dummy Points
|
||||
dummy_points = { }
|
||||
|
||||
-- Routes
|
||||
routes_config = { }
|
8
Resources/Scripts/Scene/33752/scene33752_block33752.lua
Normal file
8
Resources/Scripts/Scene/33752/scene33752_block33752.lua
Normal file
@ -0,0 +1,8 @@
|
||||
-- 所有的group
|
||||
groups = {
|
||||
{ id = 233752001, refresh_id = 1, pos = { x = -2.010, y = -0.127, z = -0.941 }, forbid_monster_die_types = { "CHANGE_HP_SUB_DRAWN", "CHANGE_HP_SUB_ABYSS" } },
|
||||
{ id = 233752002, refresh_id = 1, pos = { x = 1.122, y = -0.176, z = 8.208 }, forbid_monster_die_types = { "CHANGE_HP_SUB_DRAWN", "CHANGE_HP_SUB_ABYSS" } },
|
||||
{ id = 233752003, refresh_id = 1, pos = { x = -0.154, y = -0.176, z = -9.743 }, forbid_monster_die_types = { "CHANGE_HP_SUB_DRAWN", "CHANGE_HP_SUB_ABYSS" } },
|
||||
{ id = 233752004, refresh_id = 1003, pos = { x = 5.377, y = -0.176, z = 1.013 }, forbid_monster_die_types = { "CHANGE_HP_SUB_DRAWN", "CHANGE_HP_SUB_ABYSS" } },
|
||||
{ id = 233752005, refresh_id = 1001, pos = { x = 5.377, y = -0.176, z = 1.013 }, forbid_monster_die_types = { "CHANGE_HP_SUB_DRAWN", "CHANGE_HP_SUB_ABYSS" } }
|
||||
}
|
91
Resources/Scripts/Scene/33752/scene33752_group233752001.lua
Normal file
91
Resources/Scripts/Scene/33752/scene33752_group233752001.lua
Normal file
@ -0,0 +1,91 @@
|
||||
-- 基础信息
|
||||
local base_info = {
|
||||
group_id = 233752001
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 怪物
|
||||
monsters = {
|
||||
}
|
||||
|
||||
-- NPC
|
||||
npcs = {
|
||||
}
|
||||
|
||||
-- 装置
|
||||
gadgets = {
|
||||
{ config_id = 1001, gadget_id = 70350053, pos = { x = -0.020, y = -0.083, z = 0.009 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||||
{ config_id = 1002, gadget_id = 70350054, pos = { x = 0.028, y = -0.098, z = 0.031 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||||
}
|
||||
|
||||
-- 区域
|
||||
regions = {
|
||||
}
|
||||
|
||||
-- 触发器
|
||||
triggers = {
|
||||
{ config_id = 1001003, name = "DUNGEON_SETTLE_1003", event = EventType.EVENT_DUNGEON_SETTLE, source = "", condition = "", action = "action_EVENT_DUNGEON_SETTLE_1003" }
|
||||
}
|
||||
|
||||
-- 变量
|
||||
variables = {
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 初始化配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 初始化时创建
|
||||
init_config = {
|
||||
suite = 1,
|
||||
end_suite = 0,
|
||||
rand_suite = false
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 小组配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
suites = {
|
||||
{
|
||||
-- suite_id = 1,
|
||||
-- description = ,
|
||||
monsters = { },
|
||||
gadgets = { 1001, 1002 },
|
||||
regions = { },
|
||||
triggers = { "DUNGEON_SETTLE_1003" },
|
||||
rand_weight = 100
|
||||
}
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 触发器
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_DUNGEON_SETTLE_1003(context, evt)
|
||||
-- 改变指定group组233752001中, configid为1001的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752001, 1001, GadgetState.Default) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 改变指定group组233752001中, configid为1002的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752001, 1002, GadgetState.Default) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
75
Resources/Scripts/Scene/33752/scene33752_group233752002.lua
Normal file
75
Resources/Scripts/Scene/33752/scene33752_group233752002.lua
Normal file
@ -0,0 +1,75 @@
|
||||
-- 基础信息
|
||||
local base_info = {
|
||||
group_id = 233752002
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 怪物
|
||||
monsters = {
|
||||
}
|
||||
|
||||
-- NPC
|
||||
npcs = {
|
||||
}
|
||||
|
||||
-- 装置
|
||||
gadgets = {
|
||||
{ config_id = 2001, gadget_id = 70900205, pos = { x = 0.000, y = -1.333, z = 0.000 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, state = GadgetState.GearStart },
|
||||
{ config_id = 2002, gadget_id = 70900205, pos = { x = 0.000, y = -1.333, z = 0.000 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||||
}
|
||||
|
||||
-- 区域
|
||||
regions = {
|
||||
}
|
||||
|
||||
-- 触发器
|
||||
triggers = {
|
||||
}
|
||||
|
||||
-- 变量
|
||||
variables = {
|
||||
{ config_id = 1, name = "stage", value = 0, no_refresh = false },
|
||||
{ config_id = 2, name = "TPL_TIME", value = 0, no_refresh = false }
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 初始化配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 初始化时创建
|
||||
init_config = {
|
||||
suite = 1,
|
||||
end_suite = 0,
|
||||
rand_suite = false
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 小组配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
suites = {
|
||||
{
|
||||
-- suite_id = 1,
|
||||
-- description = ,
|
||||
monsters = { },
|
||||
gadgets = { 2001, 2002 },
|
||||
regions = { },
|
||||
triggers = { },
|
||||
rand_weight = 100
|
||||
}
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 触发器
|
||||
--
|
||||
--================================================================
|
211
Resources/Scripts/Scene/33752/scene33752_group233752003.lua
Normal file
211
Resources/Scripts/Scene/33752/scene33752_group233752003.lua
Normal file
@ -0,0 +1,211 @@
|
||||
-- 基础信息
|
||||
local base_info = {
|
||||
group_id = 233752003
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 怪物
|
||||
monsters = {
|
||||
}
|
||||
|
||||
-- NPC
|
||||
npcs = {
|
||||
}
|
||||
|
||||
-- 装置
|
||||
gadgets = {
|
||||
{ config_id = 3001, gadget_id = 70360010, pos = { x = 0.062, y = -0.521, z = -0.057 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||||
}
|
||||
|
||||
-- 区域
|
||||
regions = {
|
||||
}
|
||||
|
||||
-- 触发器
|
||||
triggers = {
|
||||
{ config_id = 1003002, name = "GADGET_CREATE_3002", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_3002", action = "action_EVENT_GADGET_CREATE_3002" },
|
||||
{ config_id = 1003003, name = "SELECT_OPTION_3003", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_3003", action = "action_EVENT_SELECT_OPTION_3003", trigger_count = 0 },
|
||||
{ config_id = 1003004, name = "SELECT_OPTION_3004", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_3004", action = "action_EVENT_SELECT_OPTION_3004", trigger_count = 0 }
|
||||
}
|
||||
|
||||
-- 变量
|
||||
variables = {
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 初始化配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 初始化时创建
|
||||
init_config = {
|
||||
suite = 1,
|
||||
end_suite = 0,
|
||||
rand_suite = false
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 小组配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
suites = {
|
||||
{
|
||||
-- suite_id = 1,
|
||||
-- description = ,
|
||||
monsters = { },
|
||||
gadgets = { 3001 },
|
||||
regions = { },
|
||||
triggers = { "GADGET_CREATE_3002", "SELECT_OPTION_3003", "SELECT_OPTION_3004" },
|
||||
rand_weight = 100
|
||||
}
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 触发器
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 触发条件
|
||||
function condition_EVENT_GADGET_CREATE_3002(context, evt)
|
||||
if 3001 ~= evt.param1 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_GADGET_CREATE_3002(context, evt)
|
||||
-- 设置操作台选项
|
||||
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 233752003, 3001, {175}) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
-- 触发条件
|
||||
function condition_EVENT_SELECT_OPTION_3003(context, evt)
|
||||
-- 判断是gadgetid 3001 option_id 175
|
||||
if 3001 ~= evt.param1 then
|
||||
return false
|
||||
end
|
||||
|
||||
if 175 ~= evt.param2 then
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
-- 判断变量"stage"为0
|
||||
if ScriptLib.GetGroupVariableValueByGroup(context, "stage", 233752002) ~= 0 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_SELECT_OPTION_3003(context, evt)
|
||||
-- 爬塔是否允许使用技能( is_allow_use_skill=0或1,表示不允许或允许使用主动技能)
|
||||
if 0 ~= ScriptLib.SetIsAllowUseSkill(context, 1) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : tower_allow_use_skill")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 添加suite2的新内容
|
||||
ScriptLib.AddExtraGroupSuite(context, 233752004, 2)
|
||||
|
||||
-- 删除指定group: 233752003 ;指定config:3001;物件身上指定option:175;
|
||||
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 233752003, 3001, 175) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 改变指定group组233752003中, configid为3001的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752003, 3001, GadgetState.GearStop) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 改变指定group组233752001中, configid为1001的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752001, 1001, GadgetState.GearStart) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 改变指定group组233752001中, configid为1002的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752001, 1002, GadgetState.GearStart) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
-- 触发条件
|
||||
function condition_EVENT_SELECT_OPTION_3004(context, evt)
|
||||
-- 判断是gadgetid 3001 option_id 176
|
||||
if 3001 ~= evt.param1 then
|
||||
return false
|
||||
end
|
||||
|
||||
if 176 ~= evt.param2 then
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
-- 判断变量"stage"为1
|
||||
if ScriptLib.GetGroupVariableValueByGroup(context, "stage", 233752002) ~= 1 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_SELECT_OPTION_3004(context, evt)
|
||||
-- 爬塔是否允许使用技能( is_allow_use_skill=0或1,表示不允许或允许使用主动技能)
|
||||
if 0 ~= ScriptLib.SetIsAllowUseSkill(context, 1) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : tower_allow_use_skill")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 添加suite2的新内容
|
||||
ScriptLib.AddExtraGroupSuite(context, 233752005, 2)
|
||||
|
||||
-- 删除指定group: 233752003 ;指定config:3001;物件身上指定option:176;
|
||||
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 233752003, 3001, 176) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 改变指定group组233752003中, configid为3001的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752003, 3001, GadgetState.GearStop) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 改变指定group组233752001中, configid为1001的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752001, 1001, GadgetState.GearStart) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 改变指定group组233752001中, configid为1002的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752001, 1002, GadgetState.GearStart) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
241
Resources/Scripts/Scene/33752/scene33752_group233752004.lua
Normal file
241
Resources/Scripts/Scene/33752/scene33752_group233752004.lua
Normal file
@ -0,0 +1,241 @@
|
||||
-- 基础信息
|
||||
local base_info = {
|
||||
group_id = 233752004
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 怪物
|
||||
monsters = {
|
||||
{ config_id = 4001, monster_id = 22100301, pos = { x = 0.010, y = -0.102, z = -9.018 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true },
|
||||
{ config_id = 4004, monster_id = 22100201, pos = { x = 0.010, y = -0.102, z = -7.024 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 1 },
|
||||
{ config_id = 4005, monster_id = 26100101, pos = { x = 5.036, y = -0.102, z = 7.041 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true },
|
||||
{ config_id = 4006, monster_id = 22100101, pos = { x = 5.036, y = -0.102, z = -7.033 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 1 },
|
||||
{ config_id = 4007, monster_id = 21040201, pos = { x = 5.036, y = -0.102, z = -8.027 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true },
|
||||
{ config_id = 4008, monster_id = 21040201, pos = { x = -5.040, y = -0.102, z = -8.050 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true },
|
||||
{ config_id = 4009, monster_id = 25100101, pos = { x = -5.040, y = -0.102, z = -7.033 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 1 },
|
||||
{ config_id = 4011, monster_id = 26100201, pos = { x = -8.066, y = -0.102, z = -2.975 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, disableWander = true },
|
||||
{ config_id = 4012, monster_id = 26100201, pos = { x = -8.066, y = -0.102, z = 3.134 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, disableWander = true },
|
||||
{ config_id = 4013, monster_id = 26100101, pos = { x = 8.037, y = -0.102, z = -2.975 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1, disableWander = true },
|
||||
{ config_id = 4016, monster_id = 26100101, pos = { x = 8.036, y = -0.102, z = 3.134 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1, disableWander = true },
|
||||
{ config_id = 4017, monster_id = 26100201, pos = { x = -5.040, y = -0.102, z = 7.018 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true }
|
||||
}
|
||||
|
||||
-- NPC
|
||||
npcs = {
|
||||
}
|
||||
|
||||
-- 装置
|
||||
gadgets = {
|
||||
{ config_id = 4010, gadget_id = 70900205, pos = { x = 6.204, y = -1.386, z = 3.136 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||||
}
|
||||
|
||||
-- 区域
|
||||
regions = {
|
||||
}
|
||||
|
||||
-- 触发器
|
||||
triggers = {
|
||||
{ config_id = 1004002, name = "ANY_MONSTER_DIE_4002", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_4002", action = "action_EVENT_ANY_MONSTER_DIE_4002" },
|
||||
{ config_id = 1004003, name = "ANY_MONSTER_LIVE_4003", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_4003", action = "action_EVENT_ANY_MONSTER_LIVE_4003" },
|
||||
{ config_id = 1004014, name = "CHALLENGE_SUCCESS_4014", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "1", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_4014" },
|
||||
{ config_id = 1004015, name = "CHALLENGE_FAIL_4015", event = EventType.EVENT_CHALLENGE_FAIL, source = "1", condition = "", action = "action_EVENT_CHALLENGE_FAIL_4015" }
|
||||
}
|
||||
|
||||
-- 变量
|
||||
variables = {
|
||||
{ config_id = 1, name = "monster_wave", value = 0, no_refresh = false }
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 初始化配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 初始化时创建
|
||||
init_config = {
|
||||
suite = 1,
|
||||
end_suite = 0,
|
||||
rand_suite = false
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 小组配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
suites = {
|
||||
{
|
||||
-- suite_id = 1,
|
||||
-- description = ,
|
||||
monsters = { },
|
||||
gadgets = { 4010 },
|
||||
regions = { },
|
||||
triggers = { },
|
||||
rand_weight = 100
|
||||
},
|
||||
{
|
||||
-- suite_id = 2,
|
||||
-- description = ,
|
||||
monsters = { 4001, 4007, 4008, 4011, 4012, 4013, 4016 },
|
||||
gadgets = { 4010 },
|
||||
regions = { },
|
||||
triggers = { "ANY_MONSTER_DIE_4002", "ANY_MONSTER_LIVE_4003", "CHALLENGE_SUCCESS_4014", "CHALLENGE_FAIL_4015" },
|
||||
rand_weight = 100
|
||||
},
|
||||
{
|
||||
-- suite_id = 3,
|
||||
-- description = ,
|
||||
monsters = { 4004, 4005, 4006, 4009, 4017 },
|
||||
gadgets = { 4010 },
|
||||
regions = { },
|
||||
triggers = { "CHALLENGE_SUCCESS_4014", "CHALLENGE_FAIL_4015" },
|
||||
rand_weight = 100
|
||||
},
|
||||
{
|
||||
-- suite_id = 4,
|
||||
-- description = ,
|
||||
monsters = { },
|
||||
gadgets = { },
|
||||
regions = { },
|
||||
triggers = { },
|
||||
rand_weight = 100
|
||||
}
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 触发器
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 触发条件
|
||||
function condition_EVENT_ANY_MONSTER_DIE_4002(context, evt)
|
||||
-- 判断剩余怪物数量是否是0
|
||||
if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
|
||||
return false
|
||||
end
|
||||
|
||||
-- 判断变量"monster_wave"为1
|
||||
if ScriptLib.GetGroupVariableValue(context, "monster_wave") ~= 1 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_ANY_MONSTER_DIE_4002(context, evt)
|
||||
-- 添加suite3的新内容
|
||||
ScriptLib.AddExtraGroupSuite(context, 233752004, 3)
|
||||
|
||||
-- 将本组内变量名为 "monster_wave" 的变量设置为 2
|
||||
if 0 ~= ScriptLib.SetGroupVariableValue(context, "monster_wave", 2) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
-- 触发条件
|
||||
function condition_EVENT_ANY_MONSTER_LIVE_4003(context, evt)
|
||||
if 4001 ~= evt.param1 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_ANY_MONSTER_LIVE_4003(context, evt)
|
||||
-- 针对当前group内变量名为 "monster_wave" 的变量,进行修改,变化值为 1
|
||||
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "monster_wave", 1) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 创建编号为1(该挑战的识别id),挑战内容为197的区域挑战,具体参数填写方式,见DungeonChallengeData表中的注释,所有填写的值都必须是int类型
|
||||
if 0 ~= ScriptLib.ActiveChallenge(context, 1, 197, 600, 233752004, 12, 0) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_CHALLENGE_SUCCESS_4014(context, evt)
|
||||
-- 将剩余时间记录在触发此challenge的group变量TPL_TIME中
|
||||
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "TPL_TIME", evt.param2, 233752002) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : save_challenge_remainTime")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 爬塔是否允许使用技能( is_allow_use_skill=0或1,表示不允许或允许使用主动技能)
|
||||
if 0 ~= ScriptLib.SetIsAllowUseSkill(context, 0) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : tower_allow_use_skill")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 将本组内变量名为 "stage" 的变量设置为 1
|
||||
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "stage", 1, 233752002) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 爬塔更换队伍2
|
||||
if 0 ~= ScriptLib.TowerMirrorTeamSetUp(context, 2) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : tower_team_setup")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 改变指定group组233752003中, configid为3001的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752003, 3001, GadgetState.Default) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 设置操作台选项
|
||||
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 233752003, 3001, {176}) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 改变指定group组233752001中, configid为1001的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752001, 1001, GadgetState.Default) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 改变指定group组233752001中, configid为1002的gadget的state
|
||||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 233752001, 1002, GadgetState.Default) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_CHALLENGE_FAIL_4015(context, evt)
|
||||
-- 重新生成指定group,指定suite
|
||||
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 233752004, suite = 1 }) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 地城失败结算
|
||||
if 0 ~= ScriptLib.CauseDungeonFail(context) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cause_dungeonfail")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
191
Resources/Scripts/Scene/33752/scene33752_group233752005.lua
Normal file
191
Resources/Scripts/Scene/33752/scene33752_group233752005.lua
Normal file
@ -0,0 +1,191 @@
|
||||
-- 基础信息
|
||||
local base_info = {
|
||||
group_id = 233752005
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 怪物
|
||||
monsters = {
|
||||
{ config_id = 5002, monster_id = 25410101, pos = { x = -4.013, y = -0.102, z = 10.064 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true },
|
||||
{ config_id = 5003, monster_id = 25410201, pos = { x = 4.100, y = -0.102, z = 10.064 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 1 },
|
||||
{ config_id = 5006, monster_id = 24040101, pos = { x = 0.029, y = -0.102, z = -7.067 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 5222 }, isElite = true, pose_id = 1 },
|
||||
{ config_id = 5007, monster_id = 24040301, pos = { x = -4.032, y = -0.102, z = -10.042 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 5222 }, isElite = true, pose_id = 1 },
|
||||
{ config_id = 5008, monster_id = 24040201, pos = { x = 4.050, y = -0.102, z = -10.042 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 5222 }, isElite = true, pose_id = 1 }
|
||||
}
|
||||
|
||||
-- NPC
|
||||
npcs = {
|
||||
}
|
||||
|
||||
-- 装置
|
||||
gadgets = {
|
||||
{ config_id = 5011, gadget_id = 70900205, pos = { x = 6.204, y = -1.386, z = 3.136 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||||
}
|
||||
|
||||
-- 区域
|
||||
regions = {
|
||||
}
|
||||
|
||||
-- 触发器
|
||||
triggers = {
|
||||
{ config_id = 1005004, name = "ANY_MONSTER_LIVE_5004", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_5004", action = "action_EVENT_ANY_MONSTER_LIVE_5004" },
|
||||
{ config_id = 1005005, name = "ANY_MONSTER_DIE_5005", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_5005", action = "action_EVENT_ANY_MONSTER_DIE_5005" },
|
||||
{ config_id = 1005015, name = "CHALLENGE_SUCCESS_5015", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "2", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_5015" },
|
||||
{ config_id = 1005016, name = "CHALLENGE_FAIL_5016", event = EventType.EVENT_CHALLENGE_FAIL, source = "2", condition = "", action = "action_EVENT_CHALLENGE_FAIL_5016" }
|
||||
}
|
||||
|
||||
-- 变量
|
||||
variables = {
|
||||
{ config_id = 1, name = "monster_wave", value = 0, no_refresh = false }
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 初始化配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 初始化时创建
|
||||
init_config = {
|
||||
suite = 1,
|
||||
end_suite = 0,
|
||||
rand_suite = false
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 小组配置
|
||||
--
|
||||
--================================================================
|
||||
|
||||
suites = {
|
||||
{
|
||||
-- suite_id = 1,
|
||||
-- description = ,
|
||||
monsters = { },
|
||||
gadgets = { 5011 },
|
||||
regions = { },
|
||||
triggers = { },
|
||||
rand_weight = 100
|
||||
},
|
||||
{
|
||||
-- suite_id = 2,
|
||||
-- description = suite_2,
|
||||
monsters = { 5006, 5007, 5008 },
|
||||
gadgets = { 5011 },
|
||||
regions = { },
|
||||
triggers = { "ANY_MONSTER_LIVE_5004", "ANY_MONSTER_DIE_5005", "CHALLENGE_SUCCESS_5015", "CHALLENGE_FAIL_5016" },
|
||||
rand_weight = 100
|
||||
},
|
||||
{
|
||||
-- suite_id = 3,
|
||||
-- description = ,
|
||||
monsters = { 5002, 5003 },
|
||||
gadgets = { },
|
||||
regions = { },
|
||||
triggers = { "CHALLENGE_SUCCESS_5015", "CHALLENGE_FAIL_5016" },
|
||||
rand_weight = 100
|
||||
}
|
||||
}
|
||||
|
||||
--================================================================
|
||||
--
|
||||
-- 触发器
|
||||
--
|
||||
--================================================================
|
||||
|
||||
-- 触发条件
|
||||
function condition_EVENT_ANY_MONSTER_LIVE_5004(context, evt)
|
||||
if 5006 ~= evt.param1 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_ANY_MONSTER_LIVE_5004(context, evt)
|
||||
-- 创建编号为2(该挑战的识别id),挑战内容为198的区域挑战,param1必须为时间
|
||||
-- 从233752002的变量TPL_TIME中取出对应值并开启挑战
|
||||
local tpl_time = ScriptLib.GetGroupVariableValueByGroup(context, "TPL_TIME", 233752002)
|
||||
if tpl_time == nil or tpl_time < 0 then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge_by_remainTime")
|
||||
return -1
|
||||
elseif tpl_time < 1 then
|
||||
tpl_time = 0
|
||||
end
|
||||
if 0 ~= ScriptLib.ActiveChallenge(context, 2, 198, tpl_time, 233752005, 5, 0) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge_by_remainTime")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 针对当前group内变量名为 "monster_wave" 的变量,进行修改,变化值为 1
|
||||
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "monster_wave", 1) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
-- 触发条件
|
||||
function condition_EVENT_ANY_MONSTER_DIE_5005(context, evt)
|
||||
-- 判断剩余怪物数量是否是0
|
||||
if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
|
||||
return false
|
||||
end
|
||||
|
||||
-- 判断变量"monster_wave"为1
|
||||
if ScriptLib.GetGroupVariableValue(context, "monster_wave") ~= 1 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_ANY_MONSTER_DIE_5005(context, evt)
|
||||
-- 添加suite3的新内容
|
||||
ScriptLib.AddExtraGroupSuite(context, 233752005, 3)
|
||||
|
||||
-- 将本组内变量名为 "monster_wave" 的变量设置为 2
|
||||
if 0 ~= ScriptLib.SetGroupVariableValue(context, "monster_wave", 2) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_CHALLENGE_SUCCESS_5015(context, evt)
|
||||
-- 将本组内变量名为 "stage" 的变量设置为 2
|
||||
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "stage", 2, 233752002) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
-- 触发操作
|
||||
function action_EVENT_CHALLENGE_FAIL_5016(context, evt)
|
||||
-- 重新生成指定group,指定suite
|
||||
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 233752005, suite = 1 }) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
|
||||
return -1
|
||||
end
|
||||
|
||||
-- 地城失败结算
|
||||
if 0 ~= ScriptLib.CauseDungeonFail(context) then
|
||||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cause_dungeonfail")
|
||||
return -1
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
Loading…
Reference in New Issue
Block a user