• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTRestarter v.best

Itutorial

Legendary OT User
Joined
Dec 23, 2014
Messages
2,339
Solutions
68
Reaction score
1,024
I know there are 10000 but this one was the only one that worked for me. Very simple.

.bat file set up

Code:
@echo off 

:START
tasklist /FI "IMAGENAME eq TheForgottenServer.exe" 2>NUL | find /I /N "TheForgottenServer.exe">NUL
if "%ERRORLEVEL%"=="0" GOTO START
if "%ERRORLEVEL%"=="1" GOTO LAUNCHPROGRAM


:LAUNCHPROGRAM

start "" "C:\Users\dakine053\Desktop\TFS\TheForgottenServer.exe"
GOTO START


Keep in mind that what ever your server file is called is what needs to be put for the IMAGENAME.... So if the compiler is called Otserv.exe it needs to be...... "IMAGENAME eq Otserv.exe"
 
What's the point of the if errorlevel?

Just use this
Code:
echo off
title yourservername
cls
:controllerini
theforgottenserver.exe
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo ::  Your Server crashed, the restarter is restarting your Server.            ::
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto :controllerini
 
Back
Top