Project Zomboid

Project Zomboid

Not enough ratings
僵尸毁灭工程专用服务器自动更新脚本
By Colorful and 1 collaborators
一个定期自动重启服务端的bat脚本,由Miku39编写。
   
Award
Favorite
Favorited
Unfavorite
服务器脚本
新建一个记事本文件,在里面输入
@echo off & setlocal enabledelayedexpansion color 3F title Project Zomboid服务器管理器 chcp 65001 & cls & echo= set nTime=86400 ::*****设置服务器重启时间,单位秒****** set /a strTime_d=!nTime! / 86400 set /a strTime_h=!nTime! %% 86400 / 3600 set /a strTime_m=!nTime! %% 86400 %% 3600 / 60 set /a strTime_s=!nTime! %% 60 :restart echo 停止服务器... taskkill /f /im java.exe taskkill /f /im javaw.exe taskkill /f /im ProjectZomboid64.exe echo 开始更新... cd C:\steamcmd\steamcmd.exe ::*****将这里改为你的steamcmd路径***** steamcmd +login anonymous +app_update 380870 +quit echo 启动服务器... cd "C:\steamcmd\steamapps\common\Project Zomboid Dedicated Server" ::*****将这里改为你的服务端路径***** start StartServer64.bat echo 服务器启动中,将在!strTime_d!天!strTime_h!时!strTime_m!分!strTime_s!秒后重启! timeout !nTime! echo 服务器重启... goto restart
将里面的nTime设置为服务器重启的时间,将“C:\steamcmd\steamcmd.exe”替换为你的steamcmd的路径,将"C:\steamcmd\steamapps\common\Project Zomboid Dedicated Server"替换为你的服务端路径,重命名为projectZomboidServerAutoRestartScript.bat,双击运行即可。
Linux系统
如果你是Linux系统,可以试试这篇指南。
https://steamproxy.net/sharedfiles/filedetails/?id=2715217742