更新配置表

This commit is contained in:
flswld
2023-01-29 13:00:55 +08:00
parent 0ab4fd1d18
commit 5fbe66113e
3108 changed files with 587829 additions and 26766 deletions

View File

@@ -0,0 +1,62 @@
--[[======================================
|| filename: Activity_Fungi
|| owner: zhangchi.chen
|| description: 蕈兽战斗白盒
|| LogName: TD
|| Protection: [Protection]
=======================================]]
local extraTriggers =
{
--{ config_id = 40000001, name = "group_load", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD", trigger_count = 0 },
--{ config_id = 40000002, name = "select_option", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "", action = "action_EVENT_SELECT_OPTION", trigger_count = 0 },
--{ config_id = 40000003, name = "monster_die", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "", action = "action_EVENT_ANY_MONSTER_DIE", trigger_count = 0 },
}
------ Local Functions -----------
function LF_Initialize_Level()
--- TRIGGER
for _, _trigger in pairs(extraTriggers) do
table.insert(triggers, _trigger)
end
return 0
end
--蕈兽放技能
function SLC_MushroomMonsterAlertDoSkill(context)
PrintLog(context,"蕈兽开始释放技能")
local beast = ScriptLib.GetMonsterConfigId(context, { monster_eid = context.source_entity_id })
ScriptLib.SetEntityServerGlobalValueByConfigId(context, beast, "SGV_Fungus_StartBurst_Immediately",1)
return 0
end
------ conditions & actions ------
--group加载
function SLC_Fungus1_Move(context)
ScriptLib.KillEntityByConfigId(context, { ScriptLib.GetGroupVariableValue(context, "fungi1"), entity_type=EntityType.MONSTER})
ScriptLib.CreateMonsterByConfigIdByPos(context, ScriptLib.GetGroupVariableValue(context, "fungi1"), point[LF_GetCloestPoint(context)].pos, {0,0,0})
return 0
end
function LF_GetCloestPoint(context)
local targetpos={0,0,0}
local uid=ScriptLib.GetSceneUidList(context)[1]
local avatarid=GetAvatarEntityIdByUid(context, uid)
local avatarpos=ScriptLib.GetPosByEntityId(context,avatarid)
local shortest_key=0
local shortest_path_square=10000000
for k,v in pairs(points) do
local pathlength_square=(v.pos.x-avatarpos.x)*(v.pos.x-avatarpos.x)+(v.pos.y-avatarpos.y)*(v.pos.y-avatarpos.y)+(v.pos.z-avatarpos.z)*(v.pos.z-avatarpos.z)
if pathlength_square<shortest_path_square then
shortest_key=k
end
end
return shortest_key
end
LF_Initialize_Level()

View File

@@ -0,0 +1,155 @@
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by binghong.shen.
--- DateTime: 2022/9/21 16:33
---
--[[======================================
|| filename: Activity_PacMan
|| owner: binghong.shen
|| description: 3.5吃豆人活动
|| LogName: PacMan
|| Protection: [Protection]
=======================================]]
--[[
测试gm
dungeon 91
run_lua 251015001 function func(context) \n ScriptLib.StartGallery(context, 34001) \n end
]]
--miscs配置内容
--[[
defs.moveback_pointarray_id = 1
]]
defs.teleportPointRangeMap ={
[1]={3,20}
}
local local_defs = {
worktop_option = 30110,
progress_key = 1,
team_global_value = "FEVER_LEVEL",
team_noswitch_pubishment = "NOSWITCH_PUNISHMENT",
team_has_switch = "HAS_SWITCHED_TEAM",
burn_effect_level = 2,
environment_change_level = 1,
base_upgrade_reminder = 358010102,
team_noswitch_pubishment_reminder = 144,
punish_inAdvance_reminder = 201
}
local Tri = {
[1] = { name = "group_load", config_id = 8000001, event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_group_load", trigger_count = 0},
[2] = { name = "gadget_talk_done", config_id = 8000002, event = EventType.EVENT_GADGETTALK_DONE, source = "", condition = "", action = "action_gadget_talk_done", trigger_count = 0},
[3] = { name = "gallery_pre_start", config_id = 8000003, event = EventType.EVENT_GALLERY_PRE_START, source = "", condition = "", action = "action_gallery_pre_start", trigger_count = 0},
[4] = { name = "dungeon_settle", config_id = 8000004, event = EventType.EVENT_DUNGEON_SETTLE, source = "", condition = "", action = "action_dungeon_settle", trigger_count = 0},
[5] = { name = "gallery_stop", config_id = 8000005, event = EventType.EVENT_GALLERY_STOP, source = "", condition = "", action = "action_gallery_stop", trigger_count = 0},
}
function Initialize()
for k,v in pairs(Tri) do
table.insert(triggers, v)
table.insert(suites[1].triggers, v.name)
end
--table.insert(variables,{ config_id=50000003,name = "fever_ratio", value = 1})
end
------------------------------------------------------------------
function action_group_load(context,evt)
ScriptLib.PrintContextLog(context,"PacMan groupLoad")
return 0
end
function action_gadget_talk_done(context,evt)
ScriptLib.PrintContextLog(context,"PacMan action_gadget_talk_done")
--
--local talkName = evt.source_name
--local talkID = evt.param2
--if talkID == 6800419 or talkName == 6800419 then
-- ScriptLib.CreateGadget(context, { config_id = defs.gadget_teleport })
--end
return 0
end
function action_gallery_pre_start(context,evt)
ScriptLib.PrintContextLog(context,"PacMan action_gallery_pre_start")
--local curGallery = evt.param1
--ScriptLib.SetGroupTempValue(context, "curGallery", curGallery, {})
--
--if defs then
-- if defs.gadget_bricks then
-- ScriptLib.CreateGadget(context, { config_id = defs.gadget_bricks })
-- end
-- if defs.gadget_airWall then
-- ScriptLib.CreateGadget(context, { config_id = defs.gadget_airWall })
-- end
--end
return 0
end
function action_dungeon_settle(context,evt)
ScriptLib.PrintContextLog(context,"PacMan action_dungeon_settle")
--
--local curGallery = ScriptLib.GetGroupTempValue(context, "curGallery", {})
--ScriptLib.StopGallery(context, curGallery, true)
return 0
end
function action_gallery_stop(context,evt)
ScriptLib.PrintContextLog(context,"PacMan action_gallery_stop")
--ScriptLib.RemoveEntityByConfigId(context, 0, EntityType.GADGET, defs.gadget_bricks)
--ScriptLib.RemoveEntityByConfigId(context, 0, EntityType.GADGET, defs.gadget_airWall)
return 0
end
function SLC_TeleportBack(context)
ScriptLib.PrintContextLog(context,"PacMan SLC_TeleportBack "..tostring(context.uid).." "..tostring(defs.moveback_pointarray_id))
local selectedPoint = LF_GetNearPoint(context)
if(selectedPoint~=-1)then
ScriptLib.PrintContextLog(context,"PacMan Move Back Point "..tostring(selectedPoint))
ScriptLib.MoveAvatarByPointArray(context, context.uid, defs.moveback_pointarray_id or 1, {selectedPoint,2,1}, {speed=10}, "{\"MarkType\":1,\"IgnoreCollisionWhenEnter\":true}")
end
return 0
end
function LF_GetNearPoint(context)
ScriptLib.PrintContextLog(context,"PacMan LF_GetNearPoint In")
local selectedPoint = -1
local avatarUid = context.uid
local avatarEntity = ScriptLib.GetAvatarEntityIdByUid(context, avatarUid)
if avatarEntity==0 then
return selectedPoint
end
local avatarPoint = ScriptLib.GetPosByEntityId(context, avatarEntity)
local pointRangeMin = defs.teleportPointRangeMap[defs.moveback_pointarray_id][1]
local pointRangeMax = defs.teleportPointRangeMap[defs.moveback_pointarray_id][2]
local curPointDistance = 100000
for i = pointRangeMin, pointRangeMax do
local arrayPointRet,arrayPointPos,arrayPointRot=ScriptLib.GetPlatformArrayInfoByPointId(context, defs.moveback_pointarray_id, i)
if(arrayPointRet~=-1)then
local deltaX = arrayPointPos.x - avatarPoint.x
local deltaY = arrayPointPos.y - avatarPoint.y
local deltaZ = arrayPointPos.z - avatarPoint.z
local distance = deltaX*deltaX + deltaY*deltaY + deltaZ*deltaZ
if(distance<curPointDistance)then
selectedPoint = i
curPointDistance = distance
end
end
end
return selectedPoint
end
------------------------------------------------------------------
Initialize()