0
0
mirror of https://gitlab.com/YuukiPS/GC-Resources.git synced 2025-04-28 09:05:26 +00:00

switch log

This commit is contained in:
Yuuki 2024-01-16 22:53:55 +08:00
parent 0c40355670
commit 15f3fa996c
18 changed files with 234 additions and 593 deletions

View File

@ -48,12 +48,6 @@ local Global =
totalWaves = 1,
}
-- 打印日志
function PrintLog(context, content)
local log = "## [TowerDefence_Challenge_V3.0] TD_V3: "..content
ScriptLib.PrintContextLog(context, log)
end
-- 初始化Group的各种变量
function LF_Init_Challenge_Group()
@ -145,14 +139,14 @@ function action_STAGE_END(context, evt)
ScriptLib.ExecuteGroupLua(context, monster_group, "LF_StartWave", {defs.group_id, wave})
ScriptLib.StartSceneMultiStagePlayStage(context, 999, 0, Multistage.IrodoriChessKill, "battle"..wave,{})
PrintLog(context, "战斗阶段开始: "..wave)
ScriptLib.PrintContextLog(context, "战斗阶段开始: "..wave)
end
return 0
end
function action_group_load(context, evt)
PrintLog(context, "Challenge Group Load Begin.")
ScriptLib.PrintContextLog(context, "Challenge Group Load Begin.")
--ScriptLib.SetGroupVariableValue(context, "DieY", defs.dieY)
-- 初始化允许逃逸的怪物数量
@ -166,18 +160,18 @@ function action_group_load(context, evt)
-- local initBuildingPoints = defs.init_building_points or 1000
if 0 ~= ScriptLib.InitSceneMultistagePlay(context, 999, MultistagePlayType.IrodoriChess, {}, ScriptLib.GetSceneUidList(context)) then
PrintLog(context, "MultiStage初始化失败")
ScriptLib.PrintContextLog(context, "MultiStage初始化失败")
else
PrintLog(context, "成功设置MultiStage")
ScriptLib.PrintContextLog(context, "成功设置MultiStage")
end
-- 统计怪物总数量
ScriptLib.ExecuteGroupLua(context, monster_group, "set_monster_number_req", {defs.group_id})
PrintLog(context, "成功设置剩余怪物")
ScriptLib.PrintContextLog(context, "成功设置剩余怪物")
-- 通知服务器leftMonsters
ScriptLib.SetSceneMultiStagePlayValue(context, 999, "left_monsters", ScriptLib.GetGroupVariableValue(context, "left_monsters"), true)
PrintLog(context, "成功设置显示参数 left_monsters="..ScriptLib.GetGroupVariableValue(context, "left_monsters"))
ScriptLib.PrintContextLog(context, "成功设置显示参数 left_monsters="..ScriptLib.GetGroupVariableValue(context, "left_monsters"))
-- 生成路径引导特效
LF_AddRouteGuidePoints(context)
@ -190,9 +184,9 @@ function action_group_load(context, evt)
-- 开始第一阶段BUILD准备时间为10分钟
ScriptLib.StartSceneMultiStagePlayStage(context, 999, 600, Multistage.IrodoriChessBuild,"build"..ScriptLib.GetGroupVariableValue(context, "wave_ptr"),{})
PrintLog(context, "开始第一阶段挑战")
ScriptLib.PrintContextLog(context, "开始第一阶段挑战")
PrintLog(context, "Challenge Group Load End.")
ScriptLib.PrintContextLog(context, "Challenge Group Load End.")
return 0
end
@ -225,7 +219,7 @@ end
function LF_AddRouteGuidePoints(context)
if guide_routes == nil then
PrintLog(context, "GuideRoute is Nil.")
ScriptLib.PrintContextLog(context, "GuideRoute is Nil.")
return 0
end
@ -234,12 +228,12 @@ function LF_AddRouteGuidePoints(context)
for i = 1, #guide_routes do
local idx = ScriptLib.GetGroupVariableValue(context, "route_guide_points_index")
if -2 == ScriptLib.CreateGadgetByConfigIdByPos(context, guide_point_pool[idx], routes_start_point[guide_routes[i]].start_point, { x = 0.000, y = 0.000, z = 0.000 }) then
PrintLog(context, "Guide Points Not Enough")
ScriptLib.PrintContextLog(context, "Guide Points Not Enough")
return 0
end
if 0 ~= ScriptLib.SetPlatformPointArray(context, guide_point_pool[idx], guide_routes[i], routes_start_point[guide_routes[i]].points, { route_type = 0 }) then
PrintLog(context, "设置点阵失败")
ScriptLib.PrintContextLog(context, "设置点阵失败")
end
if idx >= #guide_point_pool then
@ -294,12 +288,12 @@ function wave_done(context, prev_context, param1, param2, param3)
local wave = ScriptLib.GetGroupVariableValue(context, "wave_ptr")
wave = wave + 1
ScriptLib.SetGroupVariableValue(context, "wave_ptr", wave)
PrintLog(context, "nextWave-"..wave)
ScriptLib.PrintContextLog(context, "nextWave-"..wave)
-- 游戏结束退出条件
if wave > Global.totalWaves then
ScriptLib.EndSceneMultiStagePlay(context, 999, true)
PrintLog(context, "所有波次结束")
ScriptLib.PrintContextLog(context, "所有波次结束")
return 0
end
@ -339,7 +333,7 @@ end
-- 处理局外选取的卡牌
function LF_GetPickedCards(context)
PrintLog(context, "设置局外选取的卡牌")
ScriptLib.PrintContextLog(context, "设置局外选取的卡牌")
local cards = ScriptLib.GetIrodoriChessSelectedCards(context, defs.group_id, 999)
-- 掉落击杀的怪物额外获得资源卡牌编号
@ -403,7 +397,7 @@ function LF_SpecialGameplayLevel1(context, prev_context, _isElite)
LF_AddBuildingPoints(context, prev_context, buildingPoint)
PrintLog(context, "地脉异常LV1增加"..buildingPoint.."点建造值")
ScriptLib.PrintContextLog(context, "地脉异常LV1增加"..buildingPoint.."点建造值")
return 0
end
@ -431,7 +425,7 @@ function LF_SpecialGameplayLevel3(context, prev_context, _isElite)
local N = 10
if towers < N then
LF_AddBuildingPoints(context, prev_context, buildingPoint)
PrintLog(context, "地脉异常LV3增加"..buildingPoint.."点建造值")
ScriptLib.PrintContextLog(context, "地脉异常LV3增加"..buildingPoint.."点建造值")
end
return 0
@ -440,7 +434,7 @@ end
-- 关卡4的地脉异常塔数<N时塔的伤害提升
function LF_SpecialGameplayLevel4(context, prev_context, param1)
PrintLog(context, "地脉异常4检查开始")
ScriptLib.PrintContextLog(context, "地脉异常4检查开始")
local currentLevel = defs.level or 0
@ -466,7 +460,7 @@ function LF_SpecialGameplayLevel4(context, prev_context, param1)
if currentLevel == 4 then
-- 满足开启条件
if towers < N and M4 == 0 then
PrintLog(context, "!开启L4地脉异常")
ScriptLib.PrintContextLog(context, "!开启L4地脉异常")
local sgvDeltaTbl =
{
@ -478,7 +472,7 @@ function LF_SpecialGameplayLevel4(context, prev_context, param1)
-- 满足关闭条件
if towers >= N and M4 == 1 then
PrintLog(context, "关闭L4地脉异常")
ScriptLib.PrintContextLog(context, "关闭L4地脉异常")
local sgvDeltaTbl =
{
SGV_AttackRatioUp = -1,
@ -492,7 +486,7 @@ function LF_SpecialGameplayLevel4(context, prev_context, param1)
if currentLevel == 8 then
-- 满足开启条件
if towers < N and M4 == 0 then
PrintLog(context, "!开启L4地脉异常")
ScriptLib.PrintContextLog(context, "!开启L4地脉异常")
local sgvDeltaTbl =
{
@ -504,7 +498,7 @@ function LF_SpecialGameplayLevel4(context, prev_context, param1)
-- 满足关闭条件
if towers >= N and M4 == 1 then
PrintLog(context, "关闭L4地脉异常")
ScriptLib.PrintContextLog(context, "关闭L4地脉异常")
local sgvDeltaTbl =
{
SGV_AttackRatioUp = -2,

View File

@ -66,17 +66,11 @@ local Global =
},
}
-- 打印日志
function PrintLog(context, content)
local log = "## [TowerDefence_Gear_V3.0] TD_V3: "..content
ScriptLib.PrintContextLog(context, log)
end
-- 判断创生物件是否是塔
function condition_TOWER_CREATE(context, evt)
local towerGadgetId = evt.param2
if Global.allTowerType[towerGadgetId] ~= nil then
PrintLog(context, "TowerGadgetId "..evt.param2.." Created.")
ScriptLib.PrintContextLog(context, "TowerGadgetId "..evt.param2.." Created.")
return true
end
return false
@ -123,7 +117,7 @@ function action_TOWER_DESTROY(context, evt)
end
function action_EVENT_GROUP_LOAD(context, evt)
PrintLog(context, "Gear Group Load Begin 1544")
ScriptLib.PrintContextLog(context, "Gear Group Load Begin 1544")
LF_Initialize_Fundations(context)
LF_Initialize_Towers(context)
@ -133,7 +127,7 @@ end
--
function action_CheckSpecialGameplayLevel4(context, evt)
PrintLog(context, "延时检查")
ScriptLib.PrintContextLog(context, "延时检查")
-- 地脉异常L4检查
ScriptLib.ExecuteGroupLua(context, defs.challange_group_id, "LF_SpecialGameplayLevel4", {0})
@ -150,7 +144,7 @@ function LF_AddTowerNum(context, towerGadgetId, num)
towers = towers + num
ScriptLib.SetGroupVariableValueByGroup(context, "towers", towers, 0)
PrintLog(context, "塔总数为: "..towers)
ScriptLib.PrintContextLog(context, "塔总数为: "..towers)
-- 延时检查地脉异常
ScriptLib.CreateGroupTimerEvent(context, defs.group_id, "delay", 1)
@ -177,22 +171,22 @@ end
-- 初始化预设塔
function LF_Initialize_Towers(context, prev_context, param1, param2, param3)
PrintLog(context, "Init Towers!")
ScriptLib.PrintContextLog(context, "Init Towers!")
if towerPrebuild == nil then
PrintLog(context, "towerPrebuild为nil")
ScriptLib.PrintContextLog(context, "towerPrebuild为nil")
else
--PrintLog(context, "towerPrebuild表长度"..#towerPrebuild)
--ScriptLib.PrintContextLog(context, "towerPrebuild表长度"..#towerPrebuild)
end
local prebuildTable = towerPrebuild or {}
PrintLog(context, "预设塔列表长度"..#prebuildTable)
ScriptLib.PrintContextLog(context, "预设塔列表长度"..#prebuildTable)
if 0 ~= ScriptLib.ForceSetIrodoriFoundationTowers(context, prebuildTable, defs.challange_group_id, 999) then
PrintLog(context, "设置预设塔失败!")
ScriptLib.PrintContextLog(context, "设置预设塔失败!")
else
PrintLog(context, "设置预设塔成功!")
ScriptLib.PrintContextLog(context, "设置预设塔成功!")
end
return 0
end
@ -200,7 +194,7 @@ end
-- SLC 地雷塔爆炸返还点数
function SLC_AddBuildingPointsWhenMineExploded(context)
PrintLog(context, "进入爆炸SLC判断")
ScriptLib.PrintContextLog(context, "进入爆炸SLC判断")
ScriptLib.ExecuteGroupLua(context, defs.challange_group_id, "LF_AddBuildingPoints", {20})
@ -211,7 +205,7 @@ end
function SLC_DestroyTower(context)
local entityId = context.source_entity_id
PrintLog(context, "destory entityId: "..entityId)
ScriptLib.PrintContextLog(context, "destory entityId: "..entityId)
ScriptLib.DestroyIrodoriChessTower(context, entityId, defs.challange_group_id, 999)

View File

@ -12,38 +12,6 @@
=======================================]]
--编辑器配置
--[[
local defs = {
group_id = 245002003,
gear_group_id = 245002002
}
-- DEFS_MISCS
route_map={
[1]={route_points={1,2,3,4,5,6,7,8,9,10},tags=2},
[2]={route_points={1,2,3,4,5,6,7,8,9,10},tags=4},
[3]={route_points={1,2,3,4,5,6,7,8,9,10},tags=8},
[4]={route_points={1,2,3,4,5,6,7,8,9,10},tags=16},
}
-- 刷怪方案。在MonsterWaveConfig中配置
local monsterTides = tides_level_01_sample
]]--
-- 怪物潮概念说明
-- WAVE: 轮次。显示在屏幕上的1/1轮
-- TIDE每个WAVE中的刷挂波次
-- 打印日志
function PrintLog(context, content)
local log = "## [TowerDefence_Monster_V3.0] TD_V3: "..content
ScriptLib.PrintContextLog(context, log)
end
-- 初始化一些trigger和var
function LF_Init_Monster_Group()
@ -81,12 +49,12 @@ end
function action_MONSTER_DIE_BEFORE_LEAVE_SCENE(context, evt)
PrintLog(context, "怪物在离开场景前死亡事件触发。")
ScriptLib.PrintContextLog(context, "怪物在离开场景前死亡事件触发。")
-- 根据monsterId判断死亡的怪物是否是【精英怪】
local eid = evt.source_eid
local mid = ScriptLib.GetMonsterIdByEntityId(context, eid)
PrintLog(context, "MONSTERID:"..mid)
ScriptLib.PrintContextLog(context, "MONSTERID:"..mid)
local eliteMonsters = superMonsters or {}
local isElite = 0
@ -113,10 +81,10 @@ function LF_GetDieFallBonusPoints(context, evt, _isElite)
local dieReason = evt.param3
if dieReason == nil then
PrintLog(context, "死亡原因未知")
ScriptLib.PrintContextLog(context, "死亡原因未知")
return 0
else
PrintLog(context, "死亡原因:"..dieReason)
ScriptLib.PrintContextLog(context, "死亡原因:"..dieReason)
end
local challengeGroup = ScriptLib.GetGroupVariableValue(context, "challenge_group")
@ -174,11 +142,11 @@ function set_monster_number_req(context, prev_context, _challengeGroup, param2,
local monstersLeft = 0
if monsterTides == nil or #monsterTides == 0 then
PrintLog(context, "monsterTides未配置")
ScriptLib.PrintContextLog(context, "monsterTides未配置")
return 0
end
PrintLog(context, "tide count:"..#monsterTides)
ScriptLib.PrintContextLog(context, "tide count:"..#monsterTides)
-- 计算当前WAVE的怪物总数
for i = 1, #monsterTides do
@ -188,7 +156,7 @@ function set_monster_number_req(context, prev_context, _challengeGroup, param2,
end
end
PrintLog(context, "剩余怪物总数"..monstersLeft)
ScriptLib.PrintContextLog(context, "剩余怪物总数"..monstersLeft)
ScriptLib.ExecuteGroupLua(context, _challengeGroup, "LF_InitLeftMonsterNum", {monstersLeft})
@ -207,7 +175,7 @@ function LF_SetTideMonsterNum(context, tide)
num = num + (tideConfigInfo[i].count * #tideConfigInfo[i].route)
end
PrintLog(context, "tide"..tide.."怪物数量设置为"..num)
ScriptLib.PrintContextLog(context, "tide"..tide.."怪物数量设置为"..num)
ScriptLib.SetGroupVariableValue(context, "currentTideMonsters", num)
ScriptLib.SetGroupVariableValue(context, "monster_kill_count", 0)
@ -218,7 +186,7 @@ end
-- @param2 当前wave编号
function LF_StartWave(context, prev_context, param1, param2, param3)
PrintLog(context, "WAVE开启")
ScriptLib.PrintContextLog(context, "WAVE开启")
local wave = param2
@ -243,7 +211,7 @@ function LF_MonsterTideOver(context)
if tide >= #monsterTides then
local challenge_group = ScriptLib.GetGroupVariableValue(context, "challenge_group")
ScriptLib.ExecuteGroupLua(context, challenge_group, "wave_done", {0})
PrintLog(context, "此WAVE的所有TIDE结束")
ScriptLib.PrintContextLog(context, "此WAVE的所有TIDE结束")
return 0
end
@ -266,18 +234,18 @@ function LF_StartTide(context, tide)
local monster_pool_table = monsterTides[tide][i].monster_package
if monster_pool_table == nil or #monster_pool_table == 0 then
PrintLog(context, "Tide"..tide.."的monster_pool_table没取到")
ScriptLib.PrintContextLog(context, "Tide"..tide.."的monster_pool_table没取到")
else
for i=1,#monster_pool_table do
PrintLog(context, "Tide"..tide.."的monster_pool_table="..monster_pool_table[i])
ScriptLib.PrintContextLog(context, "Tide"..tide.."的monster_pool_table="..monster_pool_table[i])
end
end
for j = 1, #monsterTides[tide][i].route do
if 0 ~= ScriptLib.AutoPoolMonsterTide(context, miniTide, defs.group_id, monster_pool_table, monsterTides[tide][i].route[j], route_map[monsterTides[tide][i].route[j]].route_points, affix, {total_count=monsterTides[tide][i].count, min_count=monsterTides[tide][i].min, max_count=monsterTides[tide][i].max, tag=route_map[monsterTides[tide][i].route[j]].tags,fill_time=5,fill_count=5}) then
PrintLog(context, "MiniTide"..miniTide.."AutoPool失败")
ScriptLib.PrintContextLog(context, "MiniTide"..miniTide.."AutoPool失败")
else
PrintLog(context, "MiniTide"..miniTide.."AutoPool成功")
ScriptLib.PrintContextLog(context, "MiniTide"..miniTide.."AutoPool成功")
end
miniTide = miniTide + 1
end

View File

@ -12,29 +12,8 @@
=======================================]]
--[[
-- Trigger变量
local defs = {
group_id = 245002013,
challenge_group_id = 245002001,
close_cd = 5,
reset_cd = 10,
}
-- DEFS_MISCS
-- 特殊机关
-- 关卡1光桥专用且只会放一组
local specialGears =
{
-- operatorConfigId
[1001] = {operatorEffectConfigId = 1002, bridgeConfigId = 1003},
}
--]]
-- 打印日志
function PrintLog(context, content)
function ScriptLib.PrintContextLog(context, content)
local print = 1
if print > 0 then
local log = "## [TowerDefence_SpecialGears_V3.0] TD_V3: "..content
@ -74,7 +53,7 @@ function LF_Initialize_Group(triggers, suites)
end
function action_EVENT_GROUP_LOAD(context, evt)
PrintLog(context, "SpecialGears Load.")
ScriptLib.PrintContextLog(context, "SpecialGears Load.")
return 0
end
@ -151,7 +130,7 @@ function action_EVENT_TIMER_EVENT_CLOSE(context, evt)
operator = operatorConfigId
end
PrintLog(context, "操作台ConfigId: "..operator)
ScriptLib.PrintContextLog(context, "操作台ConfigId: "..operator)
-- 操作台
ScriptLib.SetGadgetStateByConfigId(context, operator, 202)
@ -177,7 +156,7 @@ function action_EVENT_TIMER_EVENT_RESET(context, evt)
operator = operatorConfigId
end
PrintLog(context, "操作台ConfigId: "..operator)
ScriptLib.PrintContextLog(context, "操作台ConfigId: "..operator)
ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_id, operator, {4007})

View File

@ -6,13 +6,6 @@
|| Protection: [Protection]
=======================================]]
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_GravenCarve] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
-- 自定义插槽
@ -55,9 +48,9 @@ function action_enter_region(context, evt)
if evt.param1 == defs.guide_regionID then
-- TODO: 添加新的教程
if 0 ~= ScriptLib.AssignPlayerShowTemplateReminder(context,193,{param_uid_vec={},param_vec={},uid_vec={context.uid}}) then
PrintLog(context, "弹教程失败")
ScriptLib.PrintContextLog(context, "弹教程失败")
else
PrintLog(context, "教程UID:"..context.uid)
ScriptLib.PrintContextLog(context, "教程UID:"..context.uid)
end
end

View File

@ -23,12 +23,6 @@
-- 怪物潮模式配置 - 对应的monsterConfigId
-- local tideMonsters = {1001, 1002, 1003}
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_MonsterCamp] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
{ config_id = 40000001, name = "tri_group_load", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD", trigger_count = 0 },
@ -95,9 +89,9 @@ function action_EVENT_GROUP_WILL_UNLOAD(context, evt)
if ScriptLib.GetGroupVariableValue(context, "challenge_state") == 1 then
ScriptLib.SetGroupVariableValue(context, "challenge_state", 0)
if 0 == ScriptLib.PauseChallenge(context, 99) then
PrintLog(context, "暂停挑战成功")
ScriptLib.PrintContextLog(context, "暂停挑战成功")
else
PrintLog(context, "暂停挑战失败")
ScriptLib.PrintContextLog(context, "暂停挑战失败")
end
end
@ -105,7 +99,7 @@ function action_EVENT_GROUP_WILL_UNLOAD(context, evt)
end
function condition_monster_killed(context, evt)
PrintLog(context, "var_change : monster_killed "..evt.param2.." -> "..evt.param1)
ScriptLib.PrintContextLog(context, "var_change : monster_killed "..evt.param2.." -> "..evt.param1)
if evt.param1 > evt.param2 then
return true
end
@ -120,7 +114,7 @@ end
function action_EVENT_CHALLENGE_FAIL(context, evt)
ScriptLib.SetGroupVariableValue(context, "challenge_state", 0)
PrintLog(context, "挑战失败")
ScriptLib.PrintContextLog(context, "挑战失败")
return 0
end
@ -131,7 +125,7 @@ end
function action_EVENT_ANY_MONSTER_DIE(context, evt)
PrintLog(context, "怪物死亡")
ScriptLib.PrintContextLog(context, "怪物死亡")
-- 更新挑战进度
ScriptLib.ChangeGroupVariableValue(context, "monster_killed", 1)
local cur_progress = ScriptLib.GetGroupVariableValue(context, "monster_killed")
@ -167,9 +161,9 @@ end
-- 进入挑战区域
function action_EVENT_ENTER_REGION(context, evt)
PrintLog(context, "进入挑战区域")
ScriptLib.PrintContextLog(context, "进入挑战区域")
if 0 ~= ScriptLib.AssignPlayerShowTemplateReminder(context,191,{param_uid_vec={},param_vec={},uid_vec={context.uid}}) then
PrintLog(context, "弹教程失败")
ScriptLib.PrintContextLog(context, "弹教程失败")
end
LF_Try_Start_Challenge(context)
return 0
@ -182,10 +176,10 @@ function condition_EVENT_LEAVE_REGION(context, evt)
end
function action_EVENT_LEAVE_REGION(context, evt)
PrintLog(context, "离开挑战区域")
ScriptLib.PrintContextLog(context, "离开挑战区域")
if ScriptLib.GetGroupVariableValue(context, "challenge_state") == 1 then
if 0 == ScriptLib.PauseChallenge(context, 99) then
PrintLog(context, "暂停挑战成功")
ScriptLib.PrintContextLog(context, "暂停挑战成功")
end
end
return 0
@ -210,7 +204,7 @@ function LF_Try_Start_Challenge(context)
--参数1 event_type所在枚举序号 参数2 trigger_tag参数3 次数参数4Bool次数达成是否计为成功参数5初始次数值
if 0 ~= ScriptLib.StartChallenge(context, 99, defs.challenge_id, {3, 666, defs.target_count, 1, init_count}) then
PrintLog(context, "开启挑战失败")
ScriptLib.PrintContextLog(context, "开启挑战失败")
else
-- 成功开启挑战1
ScriptLib.MarkGroupLuaAction(context, "GravenInnocence_Camp_1", "", {})
@ -231,9 +225,9 @@ function LF_Try_Start_Challenge(context)
end
function LF_StartMonsterWave(context, wave)
PrintLog(context, "start wave: "..wave)
ScriptLib.PrintContextLog(context, "start wave: "..wave)
if wave > #monsterSuites then
PrintLog(context, "所有波次已完成")
ScriptLib.PrintContextLog(context, "所有波次已完成")
else
--ScriptLib.MarkGroupLuaAction(context, "GravenInnocence_Camp_2", "", {current_progress=wave, total_progress=#monsterSuites})
local suite = monsterSuites[wave]
@ -249,17 +243,17 @@ function LF_Try_Create_Monster(context)
local configId = tideMonsters[index+1]
if 0 == ScriptLib.CreateMonster(context, { config_id = configId, delay_time = 0}) then
PrintLog(context, "添加怪物成功")
ScriptLib.PrintContextLog(context, "添加怪物成功")
ScriptLib.SetGroupVariableValue(context, "monster_index", index + 1)
else
PrintLog(context, "添加怪物失败")
ScriptLib.PrintContextLog(context, "添加怪物失败")
end
end
end
-- 测试用
-- function LF_Reset_Level(context)
-- PrintLog(context, "重置关卡")
-- ScriptLib.PrintContextLog(context, "重置关卡")
-- ScriptLib.SetGroupVariableValue(context, "challenge_state", 0)
-- ScriptLib.SetGroupVariableValue(context, "current_wave", 1)
-- ScriptLib.SetGroupVariableValue(context, "monster_killed", 0)

View File

@ -6,71 +6,6 @@
|| Protection: ???
=======================================]]
--[[
local defs =
{
operator_id = 574048, --操作台的configid
option_id = 175, --操作台的option id
reminder_id = 400139, -- 每波刷怪弹出reminder提示
gallery_id = 25001,
}
local monster_list =
{
-- 第1波怪
[1] =
{
-- 精英怪configID, 精英怪全部死亡就刷下一波
elite_monster = {574001,574002},
-- 附属小怪configID每个id小怪死了之后重新刷出来
tide_mons = {574003, 574004, 574005, 574006, 574007},
-- 附属小怪的刷怪间隔
tide_mon_delay = 2,
-- 下一波怪
next = 2,
-- 刷下一波怪延迟
next_delay = 2,
elite_monster_energy = 10,
elite_monster_score = 10,
tide_mons_energy = 10,
tide_mons_score = 10,
},
-- 第2波怪
[2] =
{
-- 精英怪configID, 精英怪全部死亡就刷下一波
elite_monster = {574011,574012},
-- 附属小怪configID每个id小怪死了之后重新刷出来
tide_mons = {574013, 574014, 574015, 574016, 574017},
-- 附属小怪的刷怪间隔
tide_mon_delay = 2,
-- 下一波的ID
next = 3,
-- 刷下一波怪延迟
next_delay = 2,
elite_monster_energy = 10,
elite_monster_score = 10,
tide_mons_energy = 10,
tide_mons_score = 10,
},
}
--]]
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_MuqadasPotion] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
{ name = "tri_group_load", config_id = 40000001, event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_group_load", trigger_count = 0 },
@ -91,7 +26,7 @@ end
-- 团灭
function action_dungeon_all_avatar_die(context,evt)
if 0 ~= ScriptLib.StopGallery(context, defs.gallery_id, true) then
PrintLog(context, "Stop Gallery失败")
ScriptLib.PrintContextLog(context, "Stop Gallery失败")
end
--LF_Stop_Play(context, false)
return 0
@ -100,7 +35,7 @@ end
-- 副本结算
function action_dungeon_settle(context,evt)
if 0 ~= ScriptLib.StopGallery(context, defs.gallery_id, true) then
PrintLog(context, "Stop Gallery失败")
ScriptLib.PrintContextLog(context, "Stop Gallery失败")
end
--LF_Stop_Play(context, false)
return 0
@ -113,10 +48,10 @@ end
--group load后加载操作台选项
function action_group_load(context,evt)
PrintLog(context, "GroupLoad: 0608-1700")
ScriptLib.PrintContextLog(context, "GroupLoad: 0608-1700")
ScriptLib.SetGadgetStateByConfigId(context, defs.operator_id, 0)
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, base_info.group_id, defs.operator_id, {defs.option_id}) then
PrintLog(context, "设置操作选项失败")
ScriptLib.PrintContextLog(context, "设置操作选项失败")
end
return 0
end
@ -181,14 +116,14 @@ end
function action_timer_event(context, evt)
local timer_name = evt.source_name
if timer_name == "NEXTWAVE" then
PrintLog(context, "计时器-刷下一波怪物")
ScriptLib.PrintContextLog(context, "计时器-刷下一波怪物")
ScriptLib.ShowReminder(context, defs.reminder_id)
local current_wave = ScriptLib.GetGroupVariableValue(context, "current_wave")
local next_wave = monster_list[current_wave].next
LF_Create_Monster_Wave(context, next_wave)
else
PrintLog(context, "计时器-小怪复活"..timer_name)
ScriptLib.PrintContextLog(context, "计时器-小怪复活"..timer_name)
local monster_cid = tonumber(timer_name)
ScriptLib.CreateMonster(context, { config_id = monster_cid, delay_time = 0 })
end
@ -206,24 +141,24 @@ function LF_Update_Score(context, is_elite, wave)
if wave_info ~= nil then
if is_elite == 1 then
PrintLog(context, "精英怪死亡")
ScriptLib.PrintContextLog(context, "精英怪死亡")
score = wave_info.elite_monster_score or 0
energy = wave_info.elite_monster_energy or 0
else
PrintLog(context, "普通怪死亡")
ScriptLib.PrintContextLog(context, "普通怪死亡")
score = wave_info.tide_mons_score or 0
energy = wave_info.tide_mons_energy or 0
end
end
PrintLog(context, "怪物分数:"..score.."。怪物能量:"..energy)
ScriptLib.PrintContextLog(context, "怪物分数:"..score.."。怪物能量:"..energy)
ScriptLib.UpdatePlayerGalleryScore(context, defs.gallery_id, { ["add_score"] = score, ["add_energy"] = energy })
end
function LF_Create_Monster_Wave(context, wave)
PrintLog(context, "怪物波次:"..wave)
ScriptLib.PrintContextLog(context, "怪物波次:"..wave)
--ScriptLib.ShowReminder(context, defs.reminder_id)
@ -237,7 +172,7 @@ function LF_Create_Monster_Wave(context, wave)
local left_elites = #elites or 0
ScriptLib.SetGroupVariableValue(context, "left_elites", left_elites)
PrintLog(context, "该波次精英怪数量:"..left_elites)
ScriptLib.PrintContextLog(context, "该波次精英怪数量:"..left_elites)
--ScriptLib.SetGroupVariableValue(context, "wave_pause", 0)
-- 普通怪
@ -251,9 +186,9 @@ function LF_Cancel_Monster_Timers(context, wave)
local monsters = monster_list[wave].tide_mons
for _, _cid in pairs(monsters) do
if 0 ~= ScriptLib.CancelGroupTimerEvent(context, base_info.group_id, tostring(_cid)) then
PrintLog(context, "找不到Timer:".._cid)
ScriptLib.PrintContextLog(context, "找不到Timer:".._cid)
else
PrintLog(context, "取消TIMER成功:".._cid)
ScriptLib.PrintContextLog(context, "取消TIMER成功:".._cid)
end
end
end
@ -294,7 +229,7 @@ function LF_Stop_Play(context, success)
ScriptLib.SetGroupVariableValue(context, "level_stopped", 1)
-- if 0 ~= ScriptLib.StopGallery(context, defs.gallery_id, true) then
-- PrintLog(context, "Stop Gallery失败")
-- ScriptLib.PrintContextLog(context, "Stop Gallery失败")
-- end
-- 关卡重置

View File

@ -6,36 +6,6 @@
|| Protection: ???
=======================================]]
--[[
local defs = {
gallery_id = ,
--开启机关交互后,加载哪个/些suit
load_on_start = {2},
--开启机关的configIDSelectOption为175
starter_gadget = 0,
--终点region的configID
end_regionID = 0,
--玩法RegionID进入此圈开启性能优化在suit1
parkour_regions = {},
--全程终点在哪个suit,如果这个group非终点则配0
end_suite = 0,
--挑战限时秒
challenge_time = 300,
--镜头注目
look_pos = {x=555, y=555, z=555},
duration = 2,
}
]]--
local global =
{
father_challengeID = 2010050,
@ -69,11 +39,6 @@ local triggers_end =
}
---------- Basic Functions -------------
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_Parkour] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
--用于检查value是否在目标table中
function CheckIsInTable(context, value, check_table)
@ -127,18 +92,18 @@ function LF_InitChallenge(context)
-- 开父挑战再Attach保序
ScriptLib.CreateFatherChallenge(context, 1, global.father_challengeID, defs.challenge_time, {success = 10, fail = 5})
if 0 == ScriptLib.StartFatherChallenge(context, 1) then
--PrintLog(context, "开启父挑战成功")
--ScriptLib.PrintContextLog(context, "开启父挑战成功")
else
PrintLog(context, "开启父挑战失败")
ScriptLib.PrintContextLog(context, "开启父挑战失败")
end
-- param tableparam1-event类型, param2-Tag, param3:次数, param4:达到次数是否success
-- 限时到达
if 0 ~= ScriptLib.AttachChildChallenge(context, 1, 101, 2010051, {4, 666, 1, 1}, {}, {success = 10, fail = 5}) then
PrintLog(context, "子挑战2010051添加失败")
ScriptLib.PrintContextLog(context, "子挑战2010051添加失败")
end
-- 收集金币
if 0 ~= ScriptLib.AttachChildChallenge(context, 1, 102, 2010052, {3, 888, 999}, {}, {success = 0, fail = 0}) then
PrintLog(context, "子挑战2010052添加失败")
ScriptLib.PrintContextLog(context, "子挑战2010052添加失败")
end
return 0
@ -149,9 +114,9 @@ function LF_Try_StartTutorial(context)
--local ownerUid = context.owner_uid
if 0 ~= ScriptLib.AssignPlayerShowTemplateReminder(context,192,{param_uid_vec={},param_vec={},uid_vec={context.uid}}) then
PrintLog(context, "弹教程失败")
ScriptLib.PrintContextLog(context, "弹教程失败")
else
PrintLog(context, "弹教程成功")
ScriptLib.PrintContextLog(context, "弹教程成功")
end
return 0
@ -159,7 +124,7 @@ end
function LF_FailChallenge(context, reason)
PrintLog(context, "挑战失败处理")
ScriptLib.PrintContextLog(context, "挑战失败处理")
--停Gallery
--Reason 0-NONE 1-超时 2-客户端中断 3-lua设置成功 4-lua设置失败
ScriptLib.StopGalleryByReason(context, defs.gallery_id, reason)
@ -173,10 +138,10 @@ function LF_RevertVisionType(context)
local uidList = ScriptLib.GetSceneUidList(context)
for k, v in pairs(uidList) do
if 0 == ScriptLib.RevertPlayerRegionVision(context, v) then
PrintLog(context, "Revert Vision成功"..v)
ScriptLib.PrintContextLog(context, "Revert Vision成功"..v)
end
if 0 ~= ScriptLib.SetPlayerGroupVisionType(context, {v}, {1}) then
PrintLog(context, "设置VisionType失败"..v)
ScriptLib.PrintContextLog(context, "设置VisionType失败"..v)
end
end
return 0
@ -193,7 +158,7 @@ function CameraAction(context)
is_set_screen_XY = false, screen_x = 0, screen_y = 0 })
return 0
else
PrintLog(context, "缺少镜头参数")
ScriptLib.PrintContextLog(context, "缺少镜头参数")
end
return 0
end
@ -228,7 +193,7 @@ function SLC_Activity_Parkour_PickCoin(context)
-- pick_up为拾取类型。0金币
if 0 ~= ScriptLib.UpdatePlayerGalleryScore(context, defs.gallery_id, {["pick_up"] = 0}) then
PrintLog(context, "Gallery通信失败")
ScriptLib.PrintContextLog(context, "Gallery通信失败")
end
return 0
@ -237,7 +202,7 @@ end
---------- Triggers -----------
function action_gallery_stop(context, evt)
-- TEST
PrintLog(context, "GalleryID:"..evt.param1.."终止。原因:"..evt.param3)
ScriptLib.PrintContextLog(context, "GalleryID:"..evt.param1.."终止。原因:"..evt.param3)
--环境小动物恢复
ScriptLib.SwitchSceneEnvAnimal(context, 2)
--VisionType恢复
@ -262,7 +227,7 @@ function action_gadget_create(context, evt)
end
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, base_info.group_id, defs.starter_gadget, {175}) then
PrintLog(context, "设置操作台选项失败")
ScriptLib.PrintContextLog(context, "设置操作台选项失败")
return -1
end
@ -308,7 +273,7 @@ function action_select_option(context, evt)
--加载第一波suite
for k, v in pairs(defs.load_on_start) do
if 0 == ScriptLib.AddExtraGroupSuite(context, base_info.group_id, v) then
PrintLog(context, "加载suite"..v)
ScriptLib.PrintContextLog(context, "加载suite"..v)
end
end
@ -328,11 +293,11 @@ function action_select_option(context, evt)
--开启Gallery
if 0 ~= ScriptLib.StartGallery(context, defs.gallery_id) then
PrintLog(context, "开启Gallery失败")
ScriptLib.PrintContextLog(context, "开启Gallery失败")
else
PrintLog(context, "金币总数-"..global.total_coin_count)
ScriptLib.PrintContextLog(context, "金币总数-"..global.total_coin_count)
if 0 ~= ScriptLib.UpdatePlayerGalleryScore(context, defs.gallery_id, {["total_coin_count"] = global.total_coin_count}) then
PrintLog(context, "Gallery传金币数量失败")
ScriptLib.PrintContextLog(context, "Gallery传金币数量失败")
end
end
@ -348,7 +313,7 @@ function action_challenge_success(context,evt)
return -1
end
PrintLog(context, "挑战成功处理")
ScriptLib.PrintContextLog(context, "挑战成功处理")
--停Gallery
--Reason 0-NONE 1-超时 2-客户端中断 3-lua设置成功 4-lua设置失败
ScriptLib.StopGalleryByReason(context, defs.gallery_id, 3)
@ -375,11 +340,11 @@ function action_challenge_fail(context, evt)
else
if ScriptLib.IsPlayerAllAvatarDie(context, context.owner_uid) then
-- 团灭
PrintLog(context, "挑战失败-灭队")
ScriptLib.PrintContextLog(context, "挑战失败-灭队")
LF_FailChallenge(context, 8)
else
-- 主动中断
PrintLog(context, "挑战失败-客户端中断/其他")
ScriptLib.PrintContextLog(context, "挑战失败-客户端中断/其他")
LF_FailChallenge(context, 2)
end
end
@ -395,7 +360,7 @@ function action_enter_OptimizRegion(context, evt)
ScriptLib.ChangeGroupTempValue(context, "is_in_region", 1, {})
if ScriptLib.GetGroupTempValue(context, "challenge_state", {}) == 1 then
PrintLog(context, "进入跑酷区域"..evt.param1)
ScriptLib.PrintContextLog(context, "进入跑酷区域"..evt.param1)
end
end
@ -413,7 +378,7 @@ function action_leave_OptimizRegion(context,evt)
return 0
end
PrintLog(context, "出赛道区域"..evt.param1)
ScriptLib.PrintContextLog(context, "出赛道区域"..evt.param1)
--如果完全出圈了,触发挑战失败
local is_in_region = ScriptLib.GetGroupTempValue(context, "is_in_region", {})
@ -436,7 +401,7 @@ end
function action_group_will_unload(context,evt)
PrintLog(context, "GROUP UNLOAD.")
ScriptLib.PrintContextLog(context, "GROUP UNLOAD.")
return 0
end

View File

@ -6,22 +6,6 @@
|| Protection: ???
=======================================]]
-- @李鸿杰 还没布设相关GROUP
--[[
local defs =
{
-- Group对应的groupbundle
group_bundle_id = 0,
}
--]]
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_Photo] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
--{ config_id = 40000001, name = "tri_group_load", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD", trigger_count = 0 },
@ -47,7 +31,7 @@ local extraTriggers =
function action_EVENT_ANY_MONSTER_DIE(context, evt)
PrintLog(context, "小动物死亡/消失")
ScriptLib.PrintContextLog(context, "小动物死亡/消失")
-- @唐天鹏 小动物死亡/消失都会触发 event_any_monster_die
@ -70,7 +54,7 @@ function condition_EVENT_LEAVE_REGION(context, evt)
end
function action_EVENT_LEAVE_REGION(context, evt)
PrintLog(context, "离开区域")
ScriptLib.PrintContextLog(context, "离开区域")
-- 刷新小动物
ScriptLib.RefreshGroup(context, { group_id = base_info.group_id, suite = 1 })
return 0

View File

@ -6,68 +6,6 @@
|| Protection: ???
=======================================]]
--[[
local defs =
{
-- 挑战编号
challenge_id = 2009009,
-- 探查点交互选项ID
starter_option_id = 175,
-- 挖掘点交互选项ID
dig_option_id = 39,
-- 能量球所在suite
energy_ball_suite = 10,
-- 备用元素微粒suite
-- element_suite = 11,
}
-- 各玩法阶段配置
local play_stage =
{
[1] =
{
gallery_id = 26001,
-- 挑战限时
challenge_time = 300,
-- 收集元素微粒数量
element_target = 3,
-- 探查点configID
starter_operator_configID = ,
-- 挖掘点configID
dig_operator_configID = ,
-- 宝箱configID
treasure_configID = ,
-- 探查点suite
starter_operator_suite = ,
-- 玩法suite
level_suite = ,
-- 挖掘点suite
dig_operator_suite ,
-- 宝箱suite
treasure_suite = ,
},
[2] =
{
},
[3] =
{
}
}
-- 备用元素微粒的configID
local extra_elements =
{
73017,73018,73019,73020,73021,73022,73023,73024
}
]]--
local extraTriggers =
{
--测试用
@ -106,11 +44,6 @@ local extraTriggers =
}
---------- Basic Functions -------------
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_TreasureSeelie] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
--------- Level Functions -----------
function LF_Initialize_Group(triggers, suites)
@ -154,7 +87,7 @@ end
-- 重置关卡
function LF_Reset_Level(context)
PrintLog(context, "LF_Reset_Level")
ScriptLib.PrintContextLog(context, "LF_Reset_Level")
-- 修复区域完成后的仙灵BUG区域探索完成后不再重置
if ScriptLib.GetGroupVariableValue(context, "stage_counter") >= 3 then
-- 通知小道具卸下
@ -173,7 +106,7 @@ end
-- 第stage个探查点被发现
function LF_SearchPoint_Found(context, stage)
PrintLog(context, "发现探查点:"..stage)
ScriptLib.PrintContextLog(context, "发现探查点:"..stage)
ScriptLib.ShowReminder(context, 600128)
-- 存档
@ -185,7 +118,7 @@ end
-- 第stage个挖掘点被发现
function LF_DigPoint_Found(context, stage)
PrintLog(context, "发现挖掘点:"..stage)
ScriptLib.PrintContextLog(context, "发现挖掘点:"..stage)
-- 存档
ScriptLib.SetGroupVariableValue(context, "stage_progress"..stage, 2)
@ -249,7 +182,7 @@ function LF_Dig_Point_Interacted(context, configID)
ScriptLib.AddExtraGroupSuite(context, base_info.group_id, suite_index)
-- 仙灵回身边
PrintLog(context, "仙灵回身边")
ScriptLib.PrintContextLog(context, "仙灵回身边")
ScriptLib.SetGroupVariableValue(context, "seelie_out", 0)
LF_Objects_Display(context, true)
@ -272,7 +205,7 @@ function LF_Objects_Display(context, is_display)
end
end
PrintLog(context, "显示能量球&探查点")
ScriptLib.PrintContextLog(context, "显示能量球&探查点")
else
-- 隐藏全部探查点
@ -288,14 +221,14 @@ function LF_Objects_Display(context, is_display)
-- 卸载能量球suite
LF_Show_Energy_Balls(context, false)
PrintLog(context, "隐藏能量球&探查点")
ScriptLib.PrintContextLog(context, "隐藏能量球&探查点")
end
end
-- 开启第stage个玩法
function LF_Start_Play(context, stage)
PrintLog(context, "开启玩法阶段"..stage)
ScriptLib.PrintContextLog(context, "开启玩法阶段"..stage)
ScriptLib.SetGroupVariableValue(context, "current_challenge_stage", stage)
ScriptLib.SetGroupVariableValue(context, "element_used", 0)
@ -312,7 +245,7 @@ function LF_Start_Play(context, stage)
ScriptLib.DelWorktopOptionByGroupId(context, base_info.group_id, configID, defs.starter_option_id)
-- 隐藏小道具
PrintLog(context, "仙灵飞出去")
ScriptLib.PrintContextLog(context, "仙灵飞出去")
ScriptLib.SetGroupVariableValue(context, "seelie_out", 1)
-- 能量球和探查点不可见
@ -325,17 +258,17 @@ function LF_Start_Play(context, stage)
-- 开Gallery
local gallery_id = play_stage[stage].gallery_id
if 0 ~= ScriptLib.StartGallery(context, gallery_id) then
PrintLog(context, "开启Gallery失败")
ScriptLib.PrintContextLog(context, "开启Gallery失败")
end
local progress_tbl = {0, play_stage[stage].element_target}
PrintLog(context, "进度需求:"..play_stage[stage].element_target)
ScriptLib.PrintContextLog(context, "进度需求:"..play_stage[stage].element_target)
ScriptLib.InitGalleryProgressScore(context, "Seelie", gallery_id, progress_tbl, GalleryProgressScoreUIType.GALLERY_PROGRESS_SCORE_UI_TYPE_TREASURE, GalleryProgressScoreType.GALLERY_PROGRESS_SCORE_NO_DEGRADE)
end
function LF_Stop_Play(context, stage, success)
PrintLog(context, "stop stage"..stage)
ScriptLib.PrintContextLog(context, "stop stage"..stage)
ScriptLib.SetGroupVariableValue(context, "element_counter", 0)
@ -363,13 +296,13 @@ function LF_Player_Can_See(context)
return false
end
local seelie_out = ScriptLib.GetGroupVariableValue(context, "seelie_out")
PrintLog(context, "小道具离体:"..seelie_out)
ScriptLib.PrintContextLog(context, "小道具离体:"..seelie_out)
--local widget_equipped = ScriptLib.GetGroupVariableValue(context, "seelie_equipped")
--[[if context.owner_uid == nil then
PrintLog(context, "LF_Player_Can_See : owner_uid=nil")
ScriptLib.PrintContextLog(context, "LF_Player_Can_See : owner_uid=nil")
else
PrintLog(context, "LF_Player_Can_See : owner_uid="..context.owner_uid)
ScriptLib.PrintContextLog(context, "LF_Player_Can_See : owner_uid="..context.owner_uid)
end--]]
local uid_list = ScriptLib.GetSceneUidList(context)
host_uid = context.owner_uid
@ -381,7 +314,7 @@ function LF_Player_Can_See(context)
widget_equipped = 0
end
PrintLog(context, "小道具装备:"..widget_equipped)
ScriptLib.PrintContextLog(context, "小道具装备:"..widget_equipped)
if seelie_out == 0 and widget_equipped == 1 then
return true
@ -392,7 +325,7 @@ end
-- function LF_Get_Owner_UID(context)
-- local UidList = ScriptLib.GetSceneUidList(context)
-- local ownerUid = UidList[1]
-- PrintLog(context, "OWNER_UID:"..ownerUid)
-- ScriptLib.PrintContextLog(context, "OWNER_UID:"..ownerUid)
-- return ownerUid
-- end
@ -430,7 +363,7 @@ function LF_Show_Dig_Point(context, stage, show)
else
-- 切状态隐藏mark
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, configID, 201) then
PrintLog(context, "隐藏挖掘点mark失败")
ScriptLib.PrintContextLog(context, "隐藏挖掘点mark失败")
end
--ScriptLib.RemoveExtraGroupSuite(context, base_info.group_id, suite_index)
end
@ -461,7 +394,7 @@ function LF_Init_Challenge(context, stage)
end
c_index = stage * 10 +c_index
if 0 ~= ScriptLib.StartChallenge(context, c_index, defs.challenge_id, {challenge_time, 3, 666, target}) then
PrintLog(context, "开启挑战失败")
ScriptLib.PrintContextLog(context, "开启挑战失败")
else
local uid_list = ScriptLib.GetSceneUidList(context)
for i,uid in ipairs(uid_list) do
@ -477,7 +410,7 @@ function LF_Set_Seelie_Light_Level(context, light_level)
--local ownerUid = LF_Get_Owner_UID(context)
local ownerUid = ScriptLib.GetSceneOwnerUid(context)
if 0 == ScriptLib.SetTeamServerGlobalValue(context, ownerUid, "SGV_SeelieLightLevel", light_level) then
PrintLog(context, "设置仙灵亮度等级:"..light_level)
ScriptLib.PrintContextLog(context, "设置仙灵亮度等级:"..light_level)
end
if light_level == 3 then
@ -543,7 +476,7 @@ function SLC_Activity_TreasureSeelie_PickEnergyBall(context)
num = num + 1
ScriptLib.SetGroupVariableValue(context, "energy_ball_counter", num)
PrintLog(context, "拾取能量球"..num)
ScriptLib.PrintContextLog(context, "拾取能量球"..num)
-- 仙灵表现(亮度)
@ -579,15 +512,15 @@ function SLC_Activity_TreasureSeelie_PickElementParticle(context)
local num = ScriptLib.GetGroupVariableValue(context, "element_counter")
num = num + 1
ScriptLib.SetGroupVariableValue(context, "element_counter", num)
PrintLog(context, "拾元素微粒"..num)
ScriptLib.PrintContextLog(context, "拾元素微粒"..num)
-- Gallery通信
local stage = ScriptLib.GetGroupVariableValue(context, "current_challenge_stage")
PrintLog(context, "stage:"..stage)
ScriptLib.PrintContextLog(context, "stage:"..stage)
if stage > 0 then
local gallery_id = play_stage[stage].gallery_id
PrintLog(context, "galleryID:"..gallery_id)
ScriptLib.PrintContextLog(context, "galleryID:"..gallery_id)
ScriptLib.AddGalleryProgressScore(context, "Seelie", gallery_id, 1)
end
@ -596,7 +529,7 @@ end
-- 仙灵小道具玩家主动操作 (0-卸下, 1-装备)
function SLC_Activity_TreasureSeelie_SeelieEquipStateChanged(context, equipped)
PrintLog(context, "仙灵小道具装备状态:"..equipped)
ScriptLib.PrintContextLog(context, "仙灵小道具装备状态:"..equipped)
--ScriptLib.SetGroupVariableValue(context, "seelie_equipped", math.floor(equipped))
if equipped == 1 then
@ -627,7 +560,7 @@ end
function action_group_load(context, evt)
PrintLog(context, "寻宝仙灵 GROUP LOAD: 0610-1314")
ScriptLib.PrintContextLog(context, "寻宝仙灵 GROUP LOAD: 0610-1314")
LF_Load_Level(context)
return 0
end
@ -638,7 +571,7 @@ function action_enter_region(context, evt)
if context.uid ~= context.owner_uid then
return -1
end
PrintLog(context, "进入玩法区域")
ScriptLib.PrintContextLog(context, "进入玩法区域")
if ScriptLib.GetGroupVariableValue(context, "stage_counter") >= 3 then
return 0
@ -681,7 +614,7 @@ function action_enter_region(context, evt)
if ScriptLib.IsChallengeStartedByChallengeId(context, defs.challenge_id) then
ScriptLib.SetPlayerGroupVisionType(context, {context.uid}, {0})
ScriptLib.ForbidPlayerRegionVision(context, context.uid)
PrintLog(context, "进入挑战区域")
ScriptLib.PrintContextLog(context, "进入挑战区域")
return 0
else
break
@ -699,7 +632,7 @@ function action_leave_region(context, evt)
if context.uid ~= context.owner_uid then
return -1
end
PrintLog(context, "离开玩法区域")
ScriptLib.PrintContextLog(context, "离开玩法区域")
ScriptLib.SetGroupTempValue(context, "widget_first_used", 0, {})
-- 将未结束的挑战设置失败
@ -715,7 +648,7 @@ function action_leave_region(context, evt)
return 0
elseif stage ~= 0 and evt.param1 == play_stage[stage].optimize_region then
if ScriptLib.IsChallengeStartedByChallengeId(context, defs.challenge_id) then
PrintLog(context, "离开玩法区域")
ScriptLib.PrintContextLog(context, "离开玩法区域")
ScriptLib.SetPlayerGroupVisionType(context, {context.uid}, {1})
ScriptLib.RevertPlayerRegionVision(context, context.uid)
if context.uid ~= context.owner_uid then
@ -749,7 +682,7 @@ function action_gadget_create(context, evt)
LF_Show_Search_Point(context, i, false)
end
elseif configID == play_stage[i].dig_operator_configID then
PrintLog(context, "挖掘点create")
ScriptLib.PrintContextLog(context, "挖掘点create")
if progress == 2 then
ScriptLib.SetWorktopOptionsByGroupId(context, base_info.group_id, configID, {defs.dig_option_id})
end
@ -760,7 +693,7 @@ function action_gadget_create(context, evt)
end
function action_var_seelie_out(context, evt)
PrintLog(context, "seelie_out变化")
ScriptLib.PrintContextLog(context, "seelie_out变化")
ScriptLib.SetTeamServerGlobalValue(context, context.owner_uid, "SGV_SeelieInvisible", evt.param1)
return 0
end
@ -768,7 +701,7 @@ end
-- 操作台交互
function action_select_option(context, evt)
PrintLog(context, "操作台选项事件")
ScriptLib.PrintContextLog(context, "操作台选项事件")
local config_id = evt.param1
local option_id = evt.param2
@ -821,17 +754,17 @@ function action_challenge_fail(context, evt)
LF_Stop_Play(context, stage, false)
-- 仙灵回身边
PrintLog(context, "仙灵回身边")
ScriptLib.PrintContextLog(context, "仙灵回身边")
ScriptLib.SetGroupVariableValue(context, "seelie_out", 0)
LF_Objects_Display(context, true)
-- 联机不能确保情况
local uid_list = ScriptLib.GetSceneUidList(context)
--PrintLog(context, "离开玩法区域")
--ScriptLib.PrintContextLog(context, "离开玩法区域")
return 0
end
function condition_gadget_state_change(context, evt)
PrintLog(context, evt.param2.."|"..evt.param1.."->"..evt.param3)
ScriptLib.PrintContextLog(context, evt.param2.."|"..evt.param1.."->"..evt.param3)
if evt.param1 ~= 102 then
return false
else return true
@ -843,7 +776,7 @@ function action_gadget_state_change(context, evt)
local new_state = evt.param1
if new_state == 102 then
PrintLog(context, "宝箱打开")
ScriptLib.PrintContextLog(context, "宝箱打开")
-- 宝箱的configID
local configID = evt.param2
@ -864,7 +797,7 @@ function action_gadget_state_change(context, evt)
-- 总进度+1
ScriptLib.ChangeGroupVariableValue(context, "stage_counter", 1)
local counter = ScriptLib.GetGroupVariableValue(context, "stage_counter")
PrintLog(context, "区域完成进度:"..counter)
ScriptLib.PrintContextLog(context, "区域完成进度:"..counter)
local order = ScriptLib.GetTreasureSeelieDayByGroupId(context, 0)
-- Reminder "显示宝箱进度"
if counter == 1 then
@ -877,12 +810,12 @@ function action_gadget_state_change(context, evt)
ScriptLib.MarkGroupLuaAction(context, "ActivityTreasureSeelie2", "", {["region_order"] = order, ["region_progress_type"] = 2, ["dig_point_order"] = stage, ["token_progress"] = 120, ["token_goal"] = 180})
elseif counter == 3 then
ScriptLib.ShowReminder(context, 600131)
PrintLog(context, "区域完成")
ScriptLib.PrintContextLog(context, "区域完成")
-- 运营埋点区域完成挖掘点3完成
ScriptLib.MarkGroupLuaAction(context, "ActivityTreasureSeelie2", "", {["region_order"] = order, ["region_progress_type"] = 1, ["dig_point_order"] = stage, ["token_progress"] = 180, ["token_goal"] = 180})
-- 活动cond中直接做掉了,按理不需要lua处理,改为卸载自身 by siyu.li
--if 0 ~= ScriptLib.DeactivateGroupLinkBundle(context, base_info.group_id) then
-- PrintLog(context, "关闭黄圈失败")
-- ScriptLib.PrintContextLog(context, "关闭黄圈失败")
--end
ScriptLib.SetTeamServerGlobalValue(context, context.owner_uid, "SGV_SeelieGameplayGroup", 0)
--ScriptLib.updateBundleMarkShowStateByGroupId(context, base_info.group_id, false)
@ -895,7 +828,7 @@ end
--卸载保护
function action_group_will_unload(context,evt)
PrintLog(context, "GROUP UNLOAD.")
ScriptLib.PrintContextLog(context, "GROUP UNLOAD.")
LF_Reset_Level(context)
return 0
end
@ -914,10 +847,10 @@ function action_monster_die(context, evt)
local cid = extra_elements[index]
local ret = ScriptLib.CreateGadgetByConfigIdByPos(context, cid, {x=pos.x,y=pos.y,z=pos.z}, {x=0.000,y=0.000,z=0.000})
--PrintLog(context, "ret"..ret)
--ScriptLib.PrintContextLog(context, "ret"..ret)
-- if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, cid, 201) then
-- PrintLog(context, "改元素微粒状态失败")
-- ScriptLib.PrintContextLog(context, "改元素微粒状态失败")
-- end
return 0

View File

@ -6,19 +6,6 @@
|| Protection: [Protection]
=======================================]]
---
-- defs.small_region_id
-- defs.big_region_id
-- LD布设
-- 大小两个Region
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_WorldBoss] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
--{ config_id = 40000001, name = "tri_monster_die", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE", action = "action_EVENT_ANY_MONSTER_DIE", trigger_count = 0},
@ -38,7 +25,7 @@ local extraTriggers =
-- function action_EVENT_ANY_MONSTER_DIE(context, evt)
-- if 0 ~= ScriptLib.CreateGadget(context, { config_id = defs.chest_config_id }) then
-- PrintLog(context, "生成宝箱失败")
-- ScriptLib.PrintContextLog(context, "生成宝箱失败")
-- return -1
-- end
-- return 0
@ -50,7 +37,7 @@ function condition_EVENT_ENTER_REGION(context, evt)
end
function action_EVENT_ENTER_REGION(context, evt)
PrintLog(context, "进入内圈")
ScriptLib.PrintContextLog(context, "进入内圈")
ScriptLib.SetPlayerEyePoint(context, defs.small_region_id, defs.big_region_id)
return 0
end
@ -63,7 +50,7 @@ end
-- 触发操作
function action_EVENT_LEAVE_REGION(context, evt)
PrintLog(context, "离开外圈")
ScriptLib.PrintContextLog(context, "离开外圈")
if context.uid ~= 0 then
ScriptLib.ClearPlayerEyePoint(context, defs.small_region_id)
end
@ -75,7 +62,7 @@ end
-- charge_type: 0-负电荷 1-正电荷
function SLC_Activity_Boss_Watcher_Charge(context, charge_type)
PrintLog(context, "电荷类型:"..charge_type)
ScriptLib.PrintContextLog(context, "电荷类型:"..charge_type)
local uidlist = ScriptLib.GetSceneUidList(context)
for i = 1, #uidlist do

View File

@ -6,23 +6,6 @@
|| Protection: [Protection]
=======================================]]
--[[
local questLockInfo=
{
[1]={
[1]={uplock=true}
[2]={uplock=true,downlock=true }
},
[2]={
[2]={downlock=true }
},
}
]]
local globalInfo=
{
platformConfigId=1001,
@ -47,12 +30,6 @@ local floorSummonInfo =
[3]={console=1007},
}
-- 打印日志
function PrintLog(context, content)
local log = "## [LibraryElevator] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
{ config_id = 40000001, name = "tri_select_option", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "", action = "action_EVENT_SELECT_OPTION", trigger_count = 0 },
@ -80,7 +57,7 @@ end
function LF_SetConsoleOptions(context,floor)
if floorInfo[floor]==nil then
PrintLog(context, "没有该楼层")
ScriptLib.PrintContextLog(context, "没有该楼层")
return 0
end
--获取任务进度
@ -89,14 +66,14 @@ function LF_SetConsoleOptions(context,floor)
--底层只上向上按钮
if floor==1 then
if questLockInfo[progress]~=nil and questLockInfo[progress][floor]~=nil and questLockInfo[progress][floor].uplock==true then
PrintLog(context, "向上被锁")
ScriptLib.PrintContextLog(context, "向上被锁")
else
ScriptLib.SetWorktopOptionsByGroupId(context, 0, consoleConfigId, {globalInfo.upOption})
end
--顶层只上向下按钮
elseif floor==#floorInfo then
if questLockInfo[progress]~=nil and questLockInfo[progress][floor]~=nil and questLockInfo[progress][floor].downlock==true then
PrintLog(context, "向下被锁")
ScriptLib.PrintContextLog(context, "向下被锁")
else
ScriptLib.SetWorktopOptionsByGroupId(context, 0, consoleConfigId, {globalInfo.downOption})
end
@ -122,7 +99,7 @@ end
function LF_DeleteConsoleOptions(context,floor)
if floorInfo[floor]==nil then
PrintLog(context, "没有该楼层")
ScriptLib.PrintContextLog(context, "没有该楼层")
return 0
end
local consoleConfigId=floorInfo[floor].console
@ -155,7 +132,7 @@ function LF_FindSummonLevel(context,configId)
return i
end
end
PrintLog(context, "召唤楼层未找到")
ScriptLib.PrintContextLog(context, "召唤楼层未找到")
return -1
end
@ -184,7 +161,7 @@ function action_EVENT_GROUP_LOAD(context, evt)
end
function action_EVENT_PLATFORM_REACH_POINT(context, evt)
PrintLog(context, "action_EVENT_PLATFORM_REACH_POINT")
ScriptLib.PrintContextLog(context, "action_EVENT_PLATFORM_REACH_POINT")
local curFloor=ScriptLib.GetGroupVariableValue(context, "currentFloor")
LF_SetConsoleOptions(context,curFloor)
return 0
@ -209,7 +186,7 @@ function action_EVENT_SELECT_OPTION(context, evt)
LF_DeleteConsoleOptions(context,curFloor)
LF_MovePlatform(context,curFloor,summonFloor)
else
PrintLog(context, "按钮触发错误")
ScriptLib.PrintContextLog(context, "按钮触发错误")
end
return 0
end

View File

@ -6,8 +6,6 @@
|| Protection: [Protection]
=======================================]]
local battleStartConsole = 1001
local beastSkillConsole={
[1]=1033,
@ -44,15 +42,6 @@ local gearOptionInfo=
}
}
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_BattleMushroomMonster] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
{ config_id = 40000001, name = "group_load", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD", trigger_count = 0 },

View File

@ -6,12 +6,6 @@
|| Protection: [Protection]
=======================================]]
--[[
local custom_level={
[81013]={max_count=5}
}
]]--
local global_info=
{
attackLevel={groupId=247101001,galleryId=28021,max_wave=3},
@ -29,12 +23,6 @@ local global_info=
phase_two_awardball_cd=10,
}
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_BattleMushroomMonster_BattleGroup] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
{ config_id = 40000001, name = "group_load", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD", trigger_count = 0 },
@ -74,7 +62,7 @@ function LF_GetWaveNumber(context)
elseif base_info.group_id==global_info.defenseLevel.groupId then
return global_info.defenseLevel.max_wave
end
PrintLog(context, "战斗总波次获取失败")
ScriptLib.PrintContextLog(context, "战斗总波次获取失败")
return 0
end
@ -82,11 +70,11 @@ end
function LF_SetRandomResult(context)
local fungusFighterTrainingParams=ScriptLib.GetCurFungusFighterTrainingParams(context)
if #fungusFighterTrainingParams<3 then
PrintLog(context, "地城ID获取失败")
ScriptLib.PrintContextLog(context, "地城ID获取失败")
return 0
end
if fungus_strategy_info[fungusFighterTrainingParams[1]]==nil then
PrintLog(context, "地城ID获取失败")
ScriptLib.PrintContextLog(context, "地城ID获取失败")
end
local dungeonId=fungusFighterTrainingParams[1]
@ -102,11 +90,11 @@ function LF_SetRandomResult(context)
if i==1 then
ScriptLib.SetGroupVariableValue(context, "index",index)
ScriptLib.SetGroupVariableValue(context, "waveIndex",waveIndex)
PrintLog(context, "第一波上传记录结果")
ScriptLib.PrintContextLog(context, "第一波上传记录结果")
end
end
if 0 ~= ScriptLib.SetCurFungusFighterTrainingParams(context, {rand_index=999,monster_pool_list=upLoadPool}) then
PrintLog(context, "随机结果上传失败")
ScriptLib.PrintContextLog(context, "随机结果上传失败")
end
end
--[[
@ -118,7 +106,7 @@ function LF_SetRandomResult(context)
if curRound==1 then
ScriptLib.SetGroupVariableValue(context, "index",index)
ScriptLib.SetGroupVariableValue(context, "waveIndex",waveIndex)
PrintLog(context, "第一波上传记录结果")
ScriptLib.PrintContextLog(context, "第一波上传记录结果")
end
ScriptLib.SetCurFungusFighterTrainingParams(context, {rand_index=100*index+waveIndex,monster_pool_list=fungus_strategy_info[dungeonId][index][curRound][waveIndex].monster_package})
end
@ -132,14 +120,14 @@ function LF_GetGalleryId(context)
elseif base_info.group_id==global_info.defenseLevel.groupId then
return global_info.defenseLevel.galleryId
end
PrintLog(context, "galleryid获取失败")
ScriptLib.PrintContextLog(context, "galleryid获取失败")
return 0
end
function LF_GetMonsterConfig(context)
local fungusFighterTrainingParams=ScriptLib.GetCurFungusFighterTrainingParams(context)
if #fungusFighterTrainingParams<3 then
PrintLog(context, "地城ID获取失败")
ScriptLib.PrintContextLog(context, "地城ID获取失败")
return 0
end
local curRound=fungusFighterTrainingParams[2]
@ -151,20 +139,20 @@ function LF_GetMonsterConfig(context)
return fungus_strategy_info[fungusFighterTrainingParams[1]][index][curRound][waveIndex]
elseif fungusFighterTrainingParams[2] > 1 then
local pool=fungusFighterTrainingParams[3+curRound]
PrintLog(context, "获取pool:"..pool)
ScriptLib.PrintContextLog(context, "获取pool:"..pool)
return monsterPoolReverseTable[pool]
--local multiIndex=fungusFighterTrainingParams[3]
--waveIndex=multiIndex%100
--index=(multiIndex-waveIndex)/100
end
PrintLog(context, "MonsterConfig获取失败")
ScriptLib.PrintContextLog(context, "MonsterConfig获取失败")
return 0
end
function LF_Random(context,num)
math.randomseed(ScriptLib.GetServerTime(context))
local ret=math.random(num)
PrintLog(context, "随机结果为"..ret)
ScriptLib.PrintContextLog(context, "随机结果为"..ret)
return ret
end
@ -194,7 +182,7 @@ end
------ Server Lua Call Functions -----------
function SLC_AwardBall_Catch(context)
PrintLog(context, "玩家吃球")
ScriptLib.PrintContextLog(context, "玩家吃球")
ScriptLib.MarkGroupLuaAction(context, "FungusFighter_6",ScriptLib.GetGalleryTransaction(context, LF_GetGalleryId(context)) , {})
local index=LF_Random(context,global_info.maxEffectNum)
local monsterList=ScriptLib.GetGroupAliveMonsterList(context, base_info.group_id)
@ -238,13 +226,13 @@ function SLC_AwardBall_Catch(context)
ScriptLib.UpdatePlayerGalleryScore(context, LF_GetGalleryId(context), {["buff_id"]=3,["buff_last_time"]=global_info.awardball_skillthree_effecttime})
ScriptLib.ShowReminder(context, 400215)
else
PrintLog(context, "吃球随机结果错误")
ScriptLib.PrintContextLog(context, "吃球随机结果错误")
end
return 0
end
function SLC_EnemyMonsterReviveSkill(context,param1)
PrintLog(context, "点名怪物"..param1)
ScriptLib.PrintContextLog(context, "点名怪物"..param1)
local beast = ScriptLib.GetMonsterConfigId(context, { monster_eid = context.source_entity_id })
ScriptLib.SetEntityServerGlobalValueByConfigId(context, beast, "SGV_Revive_Skill_Flag", param1)
return 0
@ -253,7 +241,7 @@ end
------ conditions & actions ------
--group加载
function action_EVENT_GROUP_LOAD(context, evt)
PrintLog(context, "group load")
ScriptLib.PrintContextLog(context, "group load")
LF_RefreshVariables(context)
LF_SetRandomResult(context)
return 0
@ -262,17 +250,17 @@ end
--蕈兽选择完毕,开启挑战
--1.dungeonid 2.round 3.randindex
function action_EVENT_TRAINING_FUNGUS_SELECT_DONE(context, evt)
PrintLog(context, "已选择蕈兽")
PrintLog(context, "准备开启gallery:"..LF_GetGalleryId(context))
ScriptLib.PrintContextLog(context, "已选择蕈兽")
ScriptLib.PrintContextLog(context, "准备开启gallery:"..LF_GetGalleryId(context))
if not ScriptLib.IsGalleryStart(context,LF_GetGalleryId(context)) then
local bindSGV=ScriptLib.GetTeamServerGlobalValue(context, ScriptLib.GetSceneOwnerUid(context),"SGV_Fungus_Burst_Count")
local monsterConfig=LF_GetMonsterConfig(context)
ScriptLib.SetPlayerStartGallery(context, LF_GetGalleryId(context), {ScriptLib.GetSceneOwnerUid(context)})
ScriptLib.SetGadgetStateByConfigId(context, defs.start_gear, 202)
PrintLog(context, "gallery已开启")
ScriptLib.PrintContextLog(context, "gallery已开启")
local fungusFighterTrainingParams=ScriptLib.GetCurFungusFighterTrainingParams(context)
if #fungusFighterTrainingParams<3 then
PrintLog(context, "地城ID获取失败")
ScriptLib.PrintContextLog(context, "地城ID获取失败")
return 0
end
--如果不是第一间,要创建开局奖励球
@ -290,9 +278,9 @@ function action_EVENT_TRAINING_FUNGUS_SELECT_DONE(context, evt)
ScriptLib.UpdatePlayerGalleryScore(context, LF_GetGalleryId(context), {["max_monster_count"]=monsterConfig.total_count,
["killed_monster_count"]=0,rest_skill_count=bindSGV,max_skill_count=global_info.max_skill_count})
if -1==ScriptLib.AutoPoolMonsterTide(context, 1, base_info.group_id, monsterConfig.monster_package,0, {}, {}, {sgv_map = {SGV_Revive_Skill_Flag = 0},total_count=monsterConfig.total_count, min_count=monsterConfig.min_count, max_count=monsterConfig.max_count,fill_time=monsterConfig.fill_time or 0,fill_count=monsterConfig.fill_count or 0,is_tag_bit_match=true,is_ordered = true}) then
PrintLog(context, "怪物潮初始化失败"..monsterConfig.monster_package[1])
ScriptLib.PrintContextLog(context, "怪物潮初始化失败"..monsterConfig.monster_package[1])
else
PrintLog(context, "怪物潮开启"..monsterConfig.monster_package[1])
ScriptLib.PrintContextLog(context, "怪物潮开启"..monsterConfig.monster_package[1])
end
end
--准备产球时间轴
@ -311,16 +299,16 @@ function action_EVENT_TRAINING_FUNGUS_SELECT_DONE(context, evt)
--最后要开镜头
ScriptLib.CreateGadget(context, { config_id = defs.camGadget })
else
PrintLog(context, "gallery重复开启检查配置")
ScriptLib.PrintContextLog(context, "gallery重复开启检查配置")
end
return 0
end
--怪物死亡增加gallery计数
function action_EVENT_ANY_MONSTER_DIE(context, evt)
PrintLog(context, "怪物死亡")
ScriptLib.PrintContextLog(context, "怪物死亡")
if not ScriptLib.IsGalleryStart(context,LF_GetGalleryId(context)) then
PrintLog(context, "怪物死亡,gallery未开启")
ScriptLib.PrintContextLog(context, "怪物死亡,gallery未开启")
return 0
end
local killMonsters=ScriptLib.GetGroupVariableValue(context, "killedMonsters")
@ -343,7 +331,7 @@ end
--产球
function action_EVENT_TIME_AXIS_PASS(context, evt)
PrintLog(context, "时间轴触发"..evt.source_name)
ScriptLib.PrintContextLog(context, "时间轴触发"..evt.source_name)
if evt.source_name=="PhaseTwoStart" then
ScriptLib.SetGroupVariableValue(context, "phaseTwoStart",1)
return 0
@ -402,9 +390,9 @@ function action_EVENT_ANY_GADGET_DIE(context, evt)
end
end
if containsKey==true or evt.param1==defs.awardball_configid then
PrintLog(context, "助威球死亡")
ScriptLib.PrintContextLog(context, "助威球死亡")
local awardballNum=ScriptLib.CheckRemainGadgetCountByGroupId(context, {group_id = base_info.group_id,gadget_id={global_info.awardball_gadget_id}})
PrintLog(context, "剩余助威球数量"..awardballNum)
ScriptLib.PrintContextLog(context, "剩余助威球数量"..awardballNum)
if awardballNum==0 then
local hostUid=ScriptLib.GetSceneOwnerUid(context)
ScriptLib.RevokePlayerShowTemplateReminder(context, 212, {hostUid})
@ -417,7 +405,7 @@ end
--gallery结束恢复逻辑
function action_EVENT_GALLERY_STOP(context, evt)
PrintLog(context, "event gallery stop")
ScriptLib.PrintContextLog(context, "event gallery stop")
--关时间轴
ScriptLib.EndTimeAxis(context,"AwardBallGenerate")
--回收reminder
@ -457,9 +445,9 @@ end
--处理积分球的reminder显示
function action_EVENT_GADGET_CREATE(context, evt)
if evt.param2 == global_info.awardball_gadget_id then
PrintLog(context, "GADGET_CREATE_助威球创建")
ScriptLib.PrintContextLog(context, "GADGET_CREATE_助威球创建")
local awardballNum=ScriptLib.CheckRemainGadgetCountByGroupId(context, {group_id = base_info.group_id,gadget_id={global_info.awardball_gadget_id}})
PrintLog(context, "剩余助威球数量"..awardballNum)
ScriptLib.PrintContextLog(context, "剩余助威球数量"..awardballNum)
if awardballNum>0 and ScriptLib.GetGroupTempValue(context,"templateReminderShow",{})==0 then
local hostUid=ScriptLib.GetSceneOwnerUid(context)
ScriptLib.AssignPlayerShowTemplateReminder(context,212,{is_need_cache=true, param_uid_vec={},param_vec={},uid_vec={hostUid}})

View File

@ -11,11 +11,6 @@ global_info=
attackLevel={groupId=247101002,galleryId=28021,max_wave=3},
defenseLevel={groupId=247102002,galleryId=28022,max_wave=1}
}
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_BattleMushroomMonster_FungusGroup] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
@ -49,7 +44,7 @@ function LF_GetGalleryId(context)
elseif base_info.group_id==global_info.defenseLevel.groupId then
return global_info.defenseLevel.galleryId
end
PrintLog(context, "galleryid获取失败")
ScriptLib.PrintContextLog(context, "galleryid获取失败")
return 0
end
@ -67,14 +62,14 @@ end
------ Server Lua Call Functions -----------
--怪物cd重置
function SLC_MushroomMonsterAlertRefreshSkill(context)
PrintLog(context,"蕈兽技能CD重置")
ScriptLib.PrintContextLog(context,"蕈兽技能CD重置")
local beast = ScriptLib.GetMonsterConfigId(context, { monster_eid = context.source_entity_id })
ScriptLib.SetEntityServerGlobalValueByConfigId(context, beast, "SGV_Fungus_StartBurst_Immediately",0)
return 0
end
--蕈兽放技能
function SLC_MushroomMonsterAlertDoSkill(context)
PrintLog(context,"蕈兽开始释放技能")
ScriptLib.PrintContextLog(context,"蕈兽开始释放技能")
if ScriptLib.GetTeamServerGlobalValue(context, context.owner_uid, "SGV_Fungus_Burst_Count")>0 or defs.isFungusQuestGroup==1 then
local beast = ScriptLib.GetMonsterConfigId(context, { monster_eid = context.source_entity_id })
local fungusMonsterId=ScriptLib.GetMonsterIdByEntityId(context, context.source_entity_id)
@ -98,13 +93,13 @@ end
------ conditions & actions ------
--group加载
function action_EVENT_GROUP_LOAD(context, evt)
PrintLog(context, "group load")
ScriptLib.PrintContextLog(context, "group load")
LF_ResetVariables(context)
return 0
end
function action_EVENT_ANY_MONSTER_DIE(context, evt)
PrintLog(context, "蕈兽死亡")
ScriptLib.PrintContextLog(context, "蕈兽死亡")
--如果本房间没开过复活机关,开一个
if ScriptLib.GetGroupVariableValue(context, "RebornGearUsed")==0 then
local backupFungusList = ScriptLib.GetCurFungusFighterTrainingValidBackupFungusIdList(context)
@ -127,7 +122,7 @@ function action_EVENT_VARIABLE_CHANGE(context, evt)
end
function action_EVENT_ANY_MONSTER_LIVE(context, evt)
PrintLog(context, "蕈兽创生")
ScriptLib.PrintContextLog(context, "蕈兽创生")
--无脑设
if defs.reborn_gear ~= nil then
ScriptLib.SetGadgetStateByConfigId(context, defs.reborn_gear, 0)

View File

@ -6,19 +6,6 @@
|| Protection: [Protection]
=======================================]]
--[[
local mushroomBeastInfo =
{
[1]={configId=85006,maxProgress=300,normal=10,active=20,dieOut=30,patrolRoute={1,2,3,4,5,6}},
[2]={configId=85007,maxProgress=300,normal=10,active=20,dieOut=30,patrolRoute={7,8,9,10,11,12,13}}
}
local groupInfo =
{
pointArrayId = 110200025,
}
]]
local globalInfo =
{
maxProgress=1200,
@ -31,12 +18,6 @@ local globalInfo =
}
}
-- 打印日志
function PrintLog(context, content)
local log = "## [Activity_CatchMushroomMonster] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
{ config_id = 40000001, name = "group_load", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD", trigger_count = 0 },
@ -101,7 +82,7 @@ function LF_SetFungusRoute(context,fungusConfigId,pointArrayId,routePoints,route
local fungusMonsterId=ScriptLib.GetMonsterIdByEntityId(context, fungusEntityId)
local fungusType=LF_GetFungusType(context,fungusMonsterId)
if fungusType==0 then
PrintLog(context, "蕈兽怪物id不在任何分类中")
ScriptLib.PrintContextLog(context, "蕈兽怪物id不在任何分类中")
elseif fungusType==1 then
ScriptLib.SetPlatformPointArray(context, fungusConfigId, pointArrayId, routePoints, { route_type = route_type,speed_level=2 })
elseif fungusType==2 then
@ -118,7 +99,7 @@ function LF_SetAlertBeastTarget(context,inputConfigId)
if v.configId==inputConfigId then
ScriptLib.SetGroupVariableValue(context, inputConfigId.."isAlert",1)
local avatarEntity=ScriptLib.GetAvatarEntityIdByUid(context,context.owner_uid)
PrintLog(context,"avatar entity"..avatarEntity)
ScriptLib.PrintContextLog(context,"avatar entity"..avatarEntity)
local monsterEid = ScriptLib.GetEntityIdByConfigId(context, inputConfigId)
local maxDistance=0
local targetPoint=0
@ -130,7 +111,7 @@ function LF_SetAlertBeastTarget(context,inputConfigId)
end
end
if targetPoint~=0 then
PrintLog(context,"逃逸目标点"..targetPoint)
ScriptLib.PrintContextLog(context,"逃逸目标点"..targetPoint)
if ScriptLib.GetGroupVariableValue(context, v.configId.."targetPoint") ~= targetPoint then
LF_SetFungusRoute(context,inputConfigId,groupInfo.pointArrayId,{targetPoint},0)
ScriptLib.SetGroupVariableValue(context, v.configId.."targetPoint",targetPoint)
@ -221,14 +202,14 @@ function LF_CalculateXZRotate(context,x1,y1,x2,y2)
local cos=(x1*x2+y1*y2)/(math.sqrt(x1*x1+y1*y1)*math.sqrt(x2*x2+y2*y2))
local rotate=math.deg(math.acos(cos))
local output=math.abs(180-(180-rotate)%360)
--PrintLog(context, "计算夹角"..output)
--ScriptLib.PrintContextLog(context, "计算夹角"..output)
return output
end
--蕈兽是否存活
function LF_MonsterIsAlive(context,configId)
local monsterList=ScriptLib.GetGroupAliveMonsterList(context, base_info.group_id)
--PrintLog(context,"存活怪物数量:"..#monsterList)
--ScriptLib.PrintContextLog(context,"存活怪物数量:"..#monsterList)
for _,v in pairs(monsterList) do
if v==configId then
return true
@ -265,7 +246,7 @@ function LF_IsFungusInRegion(context,configId,regionId)
return true
end
end
PrintLog(context, "蕈兽出圈判定逻辑错误")
ScriptLib.PrintContextLog(context, "蕈兽出圈判定逻辑错误")
return false
end
@ -283,12 +264,12 @@ end
function LF_InitFungusBehaviour(context,v)
local fungusMonsterId=LF_GetFungusMonsterId(context,v.configId)
local isCaptured=ScriptLib.IsFungusCaptured(context, ScriptLib.GetSceneOwnerUid(context) ,fungusMonsterId)
PrintLog(context, "查询蕈兽捕捉情况:"..v.configId.."|"..tostring(isCaptured))
ScriptLib.PrintContextLog(context, "查询蕈兽捕捉情况:"..v.configId.."|"..tostring(isCaptured))
if isCaptured==0 then
--ScriptLib.KillEntityByConfigId(context, { config_id = v.configId,entity_type=EntityType.MONSTER })
ScriptLib.CreateMonster(context, {config_id=v.configId, delay_time=0, server_global_value={["SGV_MushroomMonster_Alert"]=0}})
elseif isCaptured==-1 then
PrintLog(context,"查询蕈兽捕捉失败:"..v.configId)
ScriptLib.PrintContextLog(context,"查询蕈兽捕捉失败:"..v.configId)
end
if LF_MonsterIsAlive(context,v.configId) then
ScriptLib.SetGroupVariableValue(context, v.configId.."isAlert",0)
@ -330,7 +311,7 @@ end
--怪物受惊通知group开始逃跑
function SLC_MushroomMonsterAlert(context)
PrintLog(context,"蕈兽受到惊吓")
ScriptLib.PrintContextLog(context,"蕈兽受到惊吓")
--进入惊吓状态
local beast = ScriptLib.GetMonsterConfigId(context, { monster_eid = context.source_entity_id })
--local beast = ScriptLib.GetGadgetConfigId(context, { gadget_eid = context.source_entity_id })
@ -341,7 +322,7 @@ end
--怪物被打到,通知加分
function SLC_MushroomMonsterCatch(context,param1)
PrintLog(context,"蕈兽被命中")
ScriptLib.PrintContextLog(context,"蕈兽被命中")
local beast = ScriptLib.GetMonsterConfigId(context, { monster_eid = context.source_entity_id })
--local beast = ScriptLib.GetGadgetConfigId(context, { gadget_eid = context.source_entity_id })
--ScriptLib.ChangeGroupVariableValue(context, beast.."progress", 100)
@ -351,14 +332,14 @@ function SLC_MushroomMonsterCatch(context,param1)
--埋点
local isFinished=0
if monsterId~=nil then
PrintLog(context,"蕈兽monsterid"..monsterId)
ScriptLib.PrintContextLog(context,"蕈兽monsterid"..monsterId)
else
PrintLog(context,"蕈兽monsterid为空")
ScriptLib.PrintContextLog(context,"蕈兽monsterid为空")
end
local curProgress=ScriptLib.GetGalleryProgressScore(context,tostring(monsterId),defs.gallery_id)
--数据校验
if curProgress==-1 then
PrintLog(context,"蕈兽抓捕值获取失败")
ScriptLib.PrintContextLog(context,"蕈兽抓捕值获取失败")
return 0
end
for k,v in pairs(mushroomBeastInfo) do
@ -370,7 +351,7 @@ function SLC_MushroomMonsterCatch(context,param1)
elseif param1==2 then
addProgress=v.dieOut
else
PrintLog(context,"蕈兽三态获取失败")
ScriptLib.PrintContextLog(context,"蕈兽三态获取失败")
end
break
end
@ -379,10 +360,10 @@ function SLC_MushroomMonsterCatch(context,param1)
--尝试结算gallery
if curProgress+addProgress >= maxProgress then
if ScriptLib.UpdatePlayerGalleryScore(context, defs.gallery_id, {["group_id"]=base_info.group_id,["config_id"]=beast})==0 then
PrintLog(context,"蕈兽抓捕结果成功")
ScriptLib.PrintContextLog(context,"蕈兽抓捕结果成功")
ScriptLib.AddGalleryProgressScore(context, tostring(monsterId), defs.gallery_id, addProgress)
ScriptLib.KillEntityByConfigId(context, { config_id = beast,entity_type=EntityType.MONSTER })
PrintLog(context,"kill蕈兽成功")
ScriptLib.PrintContextLog(context,"kill蕈兽成功")
--看下是不是所有蕈兽都抓住了
if LF_AFungusCatched(context) then
isFinished=1
@ -395,11 +376,11 @@ function SLC_MushroomMonsterCatch(context,param1)
ScriptLib.MarkGroupLuaAction(context, "FungusFighter_2",ScriptLib.GetGalleryTransaction(context, defs.gallery_id) , {["monster_id"] = monsterId,["cur_progress"]=curProgress+addProgress,["total_progress"]=maxProgress,["is_finish"]=isFinished})
return 0
else
PrintLog(context,"蕈兽抓捕结果上传失败")
ScriptLib.PrintContextLog(context,"蕈兽抓捕结果上传失败")
end
else
ScriptLib.AddGalleryProgressScore(context, tostring(monsterId), defs.gallery_id, addProgress)
PrintLog(context,"分值"..curProgress+addProgress.."/"..maxProgress)
ScriptLib.PrintContextLog(context,"分值"..curProgress+addProgress.."/"..maxProgress)
--埋点
ScriptLib.MarkGroupLuaAction(context, "FungusFighter_2",ScriptLib.GetGalleryTransaction(context, defs.gallery_id) , {["monster_id"] = monsterId,["cur_progress"]=curProgress+addProgress,["total_progress"]=maxProgress,["is_finish"]=isFinished})
return 0
@ -421,9 +402,9 @@ function action_EVENT_GROUP_WILL_UNLOAD(context, evt)
end
--group加载
function action_EVENT_GROUP_LOAD(context, evt)
PrintLog(context, "group load")
ScriptLib.PrintContextLog(context, "group load")
if ScriptLib.CheckIsInMpMode(context) or ScriptLib.GetGroupVariableValue(context, "has_succeeded") == 1 then
PrintLog(context,"联机模式或玩法已完成,玩法不做初始化")
ScriptLib.PrintContextLog(context,"联机模式或玩法已完成,玩法不做初始化")
return 0
else
for k,v in pairs(mushroomBeastInfo) do
@ -441,12 +422,12 @@ end
--玩家进入玩法区域
function action_EVENT_ENTER_REGION(context, evt)
PrintLog(context, "enter play region")
ScriptLib.PrintContextLog(context, "enter play region")
if evt.param1 ~= defs.play_region then
return 0
end
if ScriptLib.CheckIsInMpMode(context) then
PrintLog(context,"联机模式下进圈不开gallery")
ScriptLib.PrintContextLog(context,"联机模式下进圈不开gallery")
ScriptLib.ShowReminder(context, 400211)
return 0
end
@ -456,7 +437,7 @@ function action_EVENT_ENTER_REGION(context, evt)
end
--增补,如果玩法已完成,则不再开启玩法
if ScriptLib.GetGroupVariableValue(context, "has_succeeded") == 1 then
PrintLog(context,"玩法已完成,玩法不做初始化")
ScriptLib.PrintContextLog(context,"玩法已完成,玩法不做初始化")
return 0
end
--主机进圈开gallery
@ -468,10 +449,10 @@ function action_EVENT_ENTER_REGION(context, evt)
local monsterId=LF_GetFungusMonsterId(context,v.configId)
if LF_MonsterIsAlive(context,v.configId)==false then
ScriptLib.InitGalleryProgressWithScore(context, tostring(monsterId), defs.gallery_id, {0,globalInfo.maxProgress},globalInfo.maxProgress, GalleryProgressScoreUIType.GALLERY_PROGRESS_SCORE_UI_TYPE_DIG,GalleryProgressScoreType.GALLERY_PROGRESS_SCORE_NONE)
PrintLog(context, "怪物:"..v.configId.."已捕获")
ScriptLib.PrintContextLog(context, "怪物:"..v.configId.."已捕获")
else
ScriptLib.InitGalleryProgressWithScore(context, tostring(monsterId), defs.gallery_id, {0,globalInfo.maxProgress},0, GalleryProgressScoreUIType.GALLERY_PROGRESS_SCORE_UI_TYPE_DIG,GalleryProgressScoreType.GALLERY_PROGRESS_SCORE_NONE)
PrintLog(context, "怪物:"..v.configId.."未捕获")
ScriptLib.PrintContextLog(context, "怪物:"..v.configId.."未捕获")
end
end
end
@ -487,7 +468,7 @@ function action_EVENT_LEAVE_REGION(context, evt)
if evt.param1 ~= defs.exit_region then
return 0
end
PrintLog(context, "leave play region")
ScriptLib.PrintContextLog(context, "leave play region")
--出圈的不是主机,就啥也不干
if context.uid~=ScriptLib.GetSceneOwnerUid(context) then
return 0
@ -504,7 +485,7 @@ end
--蕈兽到达路点 evt.param3:点阵的点
function action_EVENT_PLATFORM_ARRIVAL(context, evt)
PrintLog(context, "platform arrival")
ScriptLib.PrintContextLog(context, "platform arrival")
if ScriptLib.GetGroupVariableValue(context, evt.param1.."isAlert") == 1 then
ScriptLib.SetGroupVariableValue(context, evt.param1.."isAlert",0)
ScriptLib.SetGroupVariableValue(context, evt.param1.."startPoint",ScriptLib.GetGroupVariableValue(context, evt.param1.."targetPoint"))
@ -522,13 +503,13 @@ function action_EVENT_TIME_AXIS_PASS(context, evt)
local hostUid=ScriptLib.GetSceneOwnerUid(context)
--如果没装小道具且没显示,提示
if (not ScriptLib.IsWidgetEquipped(context, hostUid, 220073)) and ScriptLib.GetGroupTempValue(context,"templateReminderShow",{})==0 then
PrintLog(context, "提示装小道具")
ScriptLib.PrintContextLog(context, "提示装小道具")
ScriptLib.AssignPlayerShowTemplateReminder(context,204,{param_uid_vec={},param_vec={},uid_vec={hostUid}})
ScriptLib.SetGroupTempValue(context,"templateReminderShow",1,{})
end
--如果装了小道具且正在显示,去掉提示
if ScriptLib.IsWidgetEquipped(context, hostUid, 220073) and ScriptLib.GetGroupTempValue(context,"templateReminderShow",{})==1 then
PrintLog(context, "下掉提示装小道具")
ScriptLib.PrintContextLog(context, "下掉提示装小道具")
ScriptLib.RevokePlayerShowTemplateReminder(context, 204, {hostUid})
ScriptLib.SetGroupTempValue(context,"templateReminderShow",0,{})
end
@ -550,7 +531,7 @@ function action_EVENT_TIME_AXIS_PASS(context, evt)
for k,v in pairs(mushroomBeastInfo) do
if LF_MonsterIsAlive(context,v.configId) then
if LF_IsFungusInRegion(context,v.configId,defs.play_region)==false then
PrintLog(context, "蕈兽出界重置:"..v.configId)
ScriptLib.PrintContextLog(context, "蕈兽出界重置:"..v.configId)
--ScriptLib.RemoveEntityByConfigId(context, base_info.group_id, EntityType.MONSTER, v.configId)
--LF_InitFungusBehaviour(context,v)
ScriptLib.KillEntityByConfigId(context, { config_id = v.configId,entity_type=EntityType.MONSTER })
@ -562,7 +543,7 @@ function action_EVENT_TIME_AXIS_PASS(context, evt)
end
function action_EVENT_GALLERY_START(context, evt)
PrintLog(context, "event gallery start")
ScriptLib.PrintContextLog(context, "event gallery start")
--埋点
ScriptLib.MarkGroupLuaAction(context, "FungusFighter_1",ScriptLib.GetGalleryTransaction(context, defs.gallery_id) , {})
--起提醒用的时间轴
@ -571,7 +552,7 @@ function action_EVENT_GALLERY_START(context, evt)
end
function action_EVENT_GALLERY_STOP(context, evt)
PrintLog(context, "event gallery stop")
ScriptLib.PrintContextLog(context, "event gallery stop")
--关时间轴
local hostUid=ScriptLib.GetSceneOwnerUid(context)
ScriptLib.EndTimeAxis(context,"itemCheck")
@ -581,7 +562,7 @@ function action_EVENT_GALLERY_STOP(context, evt)
end
function action_EVENT_ANY_MONSTER_DIE(context, evt)
PrintLog(context, "monster die")
ScriptLib.PrintContextLog(context, "monster die")
--如果蕈兽意外死亡,重置一下
for k,v in pairs(mushroomBeastInfo) do
if v.configId==evt.param1 then

View File

@ -15,12 +15,6 @@ local bossMonsterId=
29070105
}
-- 打印日志
function PrintLog(context, content)
local log = "## [Boss_Battle_Process_Scaramouche_Quest] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
{ config_id = 40000001, name = "monster_die", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "", action = "action_EVENT_ANY_MONSTER_DIE", trigger_count = 0 },
@ -91,7 +85,7 @@ function action_EVENT_TIME_AXIS_PASS(context, evt)
ScriptLib.AddSceneTag(context, 20168 ,1202)
end
end
PrintLog(context, "没找到传送目标点")
ScriptLib.PrintContextLog(context, "没找到传送目标点")
ScriptLib.InitTimeAxis(context,"YAxisCheck",{5},true)
end
@ -129,7 +123,7 @@ end
function action_EVENT_ANY_MONSTER_LIVE(context, evt)
--进入方法的log
PrintLog(context, "monster alive:"..evt.param1)
ScriptLib.PrintContextLog(context, "monster alive:"..evt.param1)
local monsterEntityId=ScriptLib.GetEntityIdByConfigId(context, evt.param1)
local monsterId=ScriptLib.GetMonsterIdByEntityId(context, monsterEntityId)
if LF_IsBossMonster(context,monsterId) then
@ -140,13 +134,13 @@ end
function action_EVENT_QUEST_FINISH(context, evt)
--进入方法的log
PrintLog(context, "quest finish:"..evt.param1)
ScriptLib.PrintContextLog(context, "quest finish:"..evt.param1)
return 0
end
function action_EVENT_QUEST_START(context, evt)
--进入方法的log
PrintLog(context, "quest start:"..evt.param1)
ScriptLib.PrintContextLog(context, "quest start:"..evt.param1)
--根据任务ID来决定做什么处理
--一开始隐藏一阶段boss听任务的创
if evt.param1==defs.questBossAppear then

View File

@ -6,15 +6,6 @@
|| Protection: [Protection]
=======================================]]
-- 打印日志
function PrintLog(context, content)
local log = "## [PubAnimal] TD: "..content
ScriptLib.PrintContextLog(context, log)
end
local extraTriggers =
{
{ config_id = 40000001, name = "tavern_refresh", event = EventType.EVENT_GCG_TAVERN_SCENE_REFRESH, source = "", condition = "", action = "action_EVENT_GCG_TAVERN_SCENE_REFRESH", trigger_count = 0 },
@ -39,7 +30,7 @@ end
--任务进度改变刷一下按钮锁定状态
function action_EVENT_GCG_TAVERN_SCENE_REFRESH(context, evt)
--开始刷新NPC
PrintLog(context, "开始刷新小动物")
ScriptLib.PrintContextLog(context, "开始刷新小动物")
--执行刷新
ScriptLib.RefreshGroup(context, { group_id = 0, suite = evt.param1 })
return 0