Files
chuanqi-server-instance/LogicServer/data/functions/GlobalMiscExpand/ScriptTimeRun.txt

71 lines
1.6 KiB
Plaintext
Raw Normal View History

2024-12-16 13:51:31 +08:00
--ScriptTimeConfig中调用的方法放在这里,被全局脚本包含
--#include "data\config\misc\ScriptTimerSystemMsg.txt" once ScriptTImer执行的一些系统公告配置
--重置系统级的一些数据一个服在0点会调用一次
function ResetSysDate()
refreshStore()
System.RefeshWorldLevel()
end
--定时保存文件(商城动态文件)
function SaveFiles()
System.saveFiles()
end
--[[每日清除商城某些ladble的商品数据
0表示是普通的商城1表示限时抢购2-神秘商店3-绑定元宝商城4-职业宗师商店
玩家购买1、3的商品需要每天重置其购买数量
普通的商城:商品不限购
]]
function refreshStore()
System.refreshStore(3) --清空绑定元宝tab页的商品购买数据
System.refreshStore(1) --限时抢购
System.refreshStore(4) --职业宗师商店
end
--周一0点重置
function WeekReset()
end
--更新排行榜
function updateRankData()
System.updateRankData()
end
--每30分钟更新头衔在updateRankData后更新
function updateMaintainTopTitle()
System.CallmaintainTopTitle()
end
--ScriptTimer通用的系统公告
function SystemMsg(id)
id = tonumber(id)
local msgCfg
for i,v in ipairs(ScriptTimerSystemMsgConfig) do
if v.id == id then
msgCfg = v
end
end
if not msgCfg then
return
end
if type(msgCfg.CondFunc) == "function" then
if not msgCfg.CondFunc() then
return
end
end
System.broadcastTipmsg(msgCfg.msg, msgCfg.type)
end
--发送怪的死亡次数到后台
function CountMonsterDeadToLog()
--System.sendMonsterDeadToLog()
end
--发送物品产出统计
function CountItemOutPutToLog()
System.sendItemOutPutToLog()
end