[Share]Gameserver.bat autorebooter L2J 

Status
Not open for further replies.
Junior Spellweaver
Joined
Sep 3, 2006
Messages
148
Reaction score
0
Ok so i made this coz i was kinda bored..
well anyways.
i made it that when u issue a shutdown on the server, when it shuts down, it normally tells u Server terminated, press any key to continue.
Well ive removed that.
Now instead of Press any key to continue, you have 2 options, you can either start the server again or quit the cmd.I did this for the people that dont wana locate their gameserver.bat file and open it all over, instead just have it open all the time.

These are the codes u gota add:
Code:
:question
set choix=q
set /p choix=(Start) or (Quit) 
if /i %choix%==Start goto start
if /i %choix%==Quit goto exit
:exit
exit

so this is what the entire gameserver should look like if ur running L2JFree DP.
Code:
@echo off
title Game Server Console
:start
echo Starting l2jfree
echo.

SET OLDCLASSPATH=%CLASSPATH%
call setenv.bat

REM -------------------------------------
REM Default parameters for a basic server.
java -Dfile.encoding=UTF-8 -Xmx512m com.l2jfree.gameserver.GameServer
REM
REM For debug purpose (for devs), use this :
REM java -Dfile.encoding=UTF-8 -Xmx512m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7456 net.sf.l2j.gameserver.GameServer 
REM If you have a big server and lots of memory, you could experiment for example with
REM java -server -Dfile.encoding=UTF-8 -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts
REM -------------------------------------

SET CLASSPATH=%OLDCLASSPATH%

if ERRORLEVEL 2 goto restart
if ERRORLEVEL 1 goto error
goto end
:restart
echo.
echo Admin Restart ...
echo.
goto start
:error
echo.
echo Server Terminated Abnormaly
echo.
:end
echo.
echo server terminated
echo.
:question
set choix=q
set /p choix=(Start) or (Quit) 
if /i %choix%==Start goto start
if /i %choix%==Quit goto exit
:exit
exit
pause

Here's a screenshot:

l1qu1d1c3 - [Share]Gameserver.bat autorebooter - RaGEZONE Forums

l1qu1d1c3 - [Share]Gameserver.bat autorebooter - RaGEZONE Forums
 
Wow, nice idea thx for this idea ^^
I have modified my one to :

Code:
:question
set choix=q
set /p choix=Press S to Start or Q to Quit : 
if /i %choix%==S goto start
if /i %choix%==Q goto exit
:exit
exit

Because I don't want to type "start" or "quit" all the time :p
l1qu1d1c3 - [Share]Gameserver.bat autorebooter - RaGEZONE Forums
 
k thanks for moving it to right section.
did u do it right mano69? i think u gota put the S in ( ) and the Q in ( )..it should be (S) to Start or (Q) to Quit.
 
Nice add, i modded my servers with it today, great option never knew i could do that.

got mine setup like this:
loginserver.bat said:
:question
set choix=q
echo ***************************************************
echo Choose one of the Following now that Termination was activated.
echo ***************************************************
set /p choix= R TO [Restart] LoginServer or X to [Exit] LoginServer
if /i %choix%==R goto start
if /i %choix%==X goto exit
:exit
exit
pause


anyways, thanks alot !
 
nice idea,
u think the following is possible to
when the gameserver is started u can reboot it with some command.
and not after u terminated the server but just randomly if the server started alrdy
and possible to give an announcement in the L2world?
 
Status
Not open for further replies.
Back