[Tut] Making your own Server Launcher!

Results 1 to 4 of 4
  1. #1
    Account Upgraded | Title Enabled! B@ssMS is offline
    MemberRank
    Jul 2008 Join Date
    392Posts

    [Tut] Making your own Server Launcher!

    First of all, you need to know these commands.

    This launcher launches all of the bat files in one bat file o.o
    Credits to Moogra for the 'file' in his repack.

    Code:
    echo
    echo off
    @echo off
    pause 
    pause >nul
    ping
    -w
    erase
    start
    taskkill
    title
    color
    Q. Whats the different between echo off and @echo off?
    A.
    echo off shows that the echo has been turned off.
    @echo off doesn't show that echo has been turned off.

    Okay now, let's start on your bat file!
    First, make a notepad and call it anything you want, lets say you name it
    ServerStarter.bat
    First, you turn the echo off so that you don't get a messy screen.
    Code:
    @echo off
    Then you have to make a name for the bat file! Or else it'll be called
    Something Cmd.exe
    Code:
    @echo off
    title Server Starter
    After, you need to make commands, so that you don't forget them.
    Code:
    @echo off
    title Server Starter
    echo.
    echo.
    echo.
    echo Commands
    echo.
    echo start - Start OdinMS server
    echo shutdown - Shut down OdinMS server
    echo.
    What 'echo.' does it skip a line.
    Then, you have to make your commands work.
    Ex) to make start work, you need a command process.
    Code:
    :command
    set /p s="Enter command: "
    if "%s%"=="start" goto :start
    Now, when you type in 'start' it'll go to a line where it says
    'start'
    So you need to make one.
    Code:
    :start
    if "%a%"=="1" (
    echo MapleStory Is Active.
    echo.
    goto :command
    )
    color 4c
    title MapleStory: activating 0/3
    start /b launch_world.bat
    title MapleStory: activating 1/3
    ping localhost -w 10000 >nul
    start /b launch_login.bat
    title MapleStory: activating 2/3
    ping localhost -w 10000 >nul
    start /b launch_channel.bat
    title LunarStory: activating 3/3
    ping localhost -w 10000 >nul
    color fc
    title LunarStory: fully active
    set a=1
    echo.
    Q. What does start /b do?
    A. lt keeps the three bat files that launches your server in a neat ONE bat file.

    Q. What does ping localhost -w 10000 >nul
    A. lt sends packets to you own computer by 4. And it doesn't show the packets being recieved on your CMD, so it's clean.

    Q. What does set a=1 do?
    A. lt's just a required line.

    =-=======-=
    Let's say you wanted to make a shutdown command, repeat the step for 'start' so that you make a line command.
    Code:
    if "%s%"=="shutdown" goto :shutdown
    Then you need to kill the process that is STARTING the server.
    Code:
    :shutdown
    color 4c
    title MapleStory: shutting down
    ping localhost -w 100000 >nul
    taskkill /im cmd.exe
    Now, go out there and make your own starter!

    Oh, and for those stupid leechers, here. Have this. == Oh and so that you're not as lazy, l purposely added Errors, you have to fix them to make it work. :D
    PHP Code:
    @echo off
    set a
    =4
    TITLE LunarStory 
    -- Inactive
    color 1b
    :clear
    cls
    echo LunarStory Launcher
    echo    By LunarBass (C2008 All Rights Reserved.
    echo.
    echo 
    Commands:
    echo ---------
    echo 
    start Start OdinMS server
    echo shutdown Shut down OdinMS server
    echo restart Restart OdinMS server
    echo update Update OdinMS database
    echo clear Clear this window
    echo switch - Switch window types
    echo backup Backup files
    echo restore Restore files
    echo.

    command
    set 
    /p s="Enter command: "
    if "%s%"=="start" goto start
    if "%s%"=="shutdown" goto :shutdown
    if "%s%=="restart" goto :restart
    if "
    %s"=="update" goto :update
    if "
    %s%"=="clear" goto clear
    if "
    %s%"=="switch" goto :switch
    if "
    %s%"="backup" goto :backup
    if "
    %s%"=="restore" goto :restore
    echo Incorrect command!
    echo.
    goto :command

    :update
    start /b update.bat
    echo.
    echo Database updated!
    echo.
    goto :command

    :switch
    color 4c
    title LunarStory: switching
    ping localhost -s 100000 >nul
    start launcher.bat
    taskkill /im cmd.exe

    :backup
    if not exist backup mkdir backup
    if not exist backup\dist mkdir backup\dist
    copy "
    launch_*.bat" "backup\launch_*.bat" >nul
    copy "
    *.properties" "backup\*.properties" >nul
    if exist "
    *.jar" copy "*.jar" "backup\*.jar" >nul
    copy "
    dist\*.jar" "backup\dist\*.jar" >nul
    echo.
    echo Backed up!
    echo.
    goto :command

    :restore
    echo.
    echo Are you sure you want to restore? This cannot be undone!
    set /p c=[yn]: 
    if "
    %c%"=="y" (
    if exist "
    backup\launch_world.bat" (
    copy "
    backup\launch_*.bat" "launch_*.bat" >nuI
    copy "
    backup\*.properties" "*.properties" >nul
    if exist "
    backup\*.jar" copy "backup\*.jar" "*.jar" >nul
    copy "
    backup\di\*.jar" "dist\*.jar" >nul
    echo Restored!
    ) else (
    echo No files to restore!
    )
    ) else (
    echo Aborted
    )
    echo.
    goto :command

    :start
    if "
    %a%"="1" (
    echo LunarStory Is Active.
    echo.
    goto :command
    )
    color 4c
    title LunarStory: activating 0/3
    start b launch_world.bat
    title LunarStory: activating 1/3
    ping localhost -w 10000 >nul
    start /b launch_login.bat
    title LunarStory: activating 2/3
    ping localhost -w 10000 >nul
    start /b launch_channel.bat
    title LunarStory: activating 3/3
    ping localhost -w 10000 >nul
    color fc
    title LunarStory: fully active
    set 1
    echo.
    goto :command

    :shutdown
    color 4c
    title LunarMS: shutting down
    ping localhost -w 100000 >nul
    taskkill /m cmd.exe

    :restart
    color 4c
    title LunarMS -- Restarting
    ping localhost -w 100000 >nul
    start LunarMSStart.bat
    taskill /im cmd.exe 
    Last edited by B@ssMS; 28-08-08 at 02:50 AM.


  2. #2
    Account Upgraded | Title Enabled! candyman3435 is offline
    MemberRank
    May 2008 Join Date
    1,081Posts

    Re: [Guide] Making your own Server Launcher!

    alright my comments
    1) you started with [php] and ended with [/code]\
    2) this has been released before

  3. #3
    Account Upgraded | Title Enabled! B@ssMS is offline
    MemberRank
    Jul 2008 Join Date
    392Posts

    Re: [Guide] Making your own Server Launcher!

    Oh really? l didn't see, and l fixed it before you said it. xD

    Edit: No point of deleting it now? o.o

    Because l tried searching to see if there was a guide, and l looked around Rigged's [Release] thing. Didn't find one. So l thought l'd help out.

  4. #4
    Account Upgraded | Title Enabled! B@ssMS is offline
    MemberRank
    Jul 2008 Join Date
    392Posts

    Re: [Guide] Making your own Server Launcher!

    What the hell? candyman3435 got banned.. AGAIN?
    Post updated



Advertisement