Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- :start
- title CraftBukkit
- Color 2
- IF EXIST RAM.txt Set /P RAM=<RAM.txt
- IF EXIST RAM.txt goto Ready
- IF NOT EXIST RAM.txt Echo Text file does not exist. Trying to create one...
- SET /P RAM=Ram (in GB, only 1-10)?
- IF /i "%RAM%"=="1" echo "1"> RAM.txt
- If /i "%RAM%"=="2" echo "2"> RAM.txt
- If /i "%RAM%"=="3" echo "3"> RAM.txt
- If /i "%RAM%"=="4" echo "4"> RAM.txt
- If /i "%RAM%"=="5" echo "5"> RAM.txt
- If /i "%RAM%"=="6" echo "6"> RAM.txt
- If /i "%RAM%"=="7" echo "7"> RAM.txt
- If /i "%RAM%"=="8" echo "8"> RAM.txt
- If /i "%RAM%"=="9" echo "9"> RAM.txt
- If /i "%RAM%"=="10" echo "10"> RAM.txt
- echo File created successfully
- goto NF
- :Ready
- If /i "%RAM%"==""1"" goto 1_gb
- If /i "%RAM%"==""2"" goto 2_gb
- If /i "%RAM%"==""3"" goto 3_gb
- If /i "%RAM%"==""4"" goto 4_gb
- If /i "%RAM%"==""5"" goto 5_gb
- If /i "%RAM%"==""6"" goto 6_gb
- If /i "%RAM%"==""7"" goto 7_gb
- If /i "%RAM%"==""8"" goto 8_gb
- If /i "%RAM%"==""9"" goto 9_gb
- If /i "%RAM%"==""10"" goto 10_gb
- goto error
- :NF
- If /i "%RAM%"=="1" goto 1_gb
- If /i "%RAM%"=="2" goto 2_gb
- If /i "%RAM%"=="3" goto 3_gb
- If /i "%RAM%"=="4" goto 4_gb
- If /i "%RAM%"=="5" goto 5_gb
- If /i "%RAM%"=="6" goto 6_gb
- If /i "%RAM%"=="7" goto 7_gb
- If /i "%RAM%"=="8" goto 8_gb
- If /i "%RAM%"=="9" goto 9_gb
- If /i "%RAM%"=="10" goto 10_gb
- goto error
- :1_gb
- Echo Starting with 1 GB ram...
- java -Xincgc -Xmx1000M -jar craftbukkit.jar "
- goto end
- :2_gb
- Echo Starting with 2 GB ram...
- java -Xincgc -Xmx2000M -jar craftbukkit.jar "
- goto end
- :3_gb
- Echo Starting with 3 GB ram...
- java -Xincgc -Xmx3000M -jar craftbukkit.jar "
- goto end
- :4_gb
- Echo Starting with 4 GB ram...
- java -Xincgc -Xmx4000M -jar craftbukkit.jar "
- goto end
- :5_gb
- Echo Starting with 5 GB ram...
- java -Xincgc -Xmx5000M -jar craftbukkit.jar "
- goto end
- :6_gb
- Echo Starting with 6 GB ram...
- java -Xincgc -Xmx6000M -jar craftbukkit.jar "
- goto end
- :7_gb
- Echo Starting with 7 GB ram...
- java -Xincgc -Xmx7000M -jar craftbukkit.jar "
- goto end
- :8_gb
- Echo Starting with 8 GB ram...
- java -Xincgc -Xmx8000M -jar craftbukkit.jar "
- goto end
- :9_gb
- Echo Starting with 9 GB ram...
- java -Xincgc -Xmx9000M -jar craftbukkit.jar "
- goto end
- :10_gb
- Echo Starting with 10 GB ram...
- java -Xincgc -Xmx10000M -jar craftbukkit.jar "
- goto end
- :end
- echo You can now exit this window.
- echo 10
- ping 1.1.1.1 -n 1 -w 1000 >NUL
- echo 9
- ping 1.1.1.1 -n 1 -w 1000 >NUL
- echo 8
- ping 1.1.1.1 -n 1 -w 1000 >NUL
- echo 7
- ping 1.1.1.1 -n 1 -w 1000 >NUL
- echo 6
- ping 1.1.1.1 -n 1 -w 1000 >NUL
- echo 5
- ping 1.1.1.1 -n 1 -w 1000 >NUL
- echo 4
- ping 1.1.1.1 -n 1 -w 1000 >NUL
- echo 3
- ping 1.1.1.1 -n 1 -w 1000 >NUL
- echo 2
- ping 1.1.1.1 -n 1 -w 1000 >NUL
- echo 1
- ping 1.1.1.1 -n 1 -w 1000 >NUL
- echo 0 Starting...
- PING 1.1.1.1 -n 1 -w 1000 >NUL
- goto start
- :error
- echo Error! the RAM.txt must only include a number from 1 to 10. NOT SPACE like "4 "
- echo if the file is ok it should read "[number]"
- pause
Advertisement
Add Comment
Please, Sign In to add comment