rosaage

Untitled

Dec 17th, 2011
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. @ECHO OFF
  2. :start
  3. title CraftBukkit
  4.  
  5. Color 2
  6. IF EXIST RAM.txt Set /P RAM=<RAM.txt
  7. IF EXIST RAM.txt goto Ready
  8.  
  9. IF NOT EXIST RAM.txt Echo Text file does not exist. Trying to create one...
  10. SET /P RAM=Ram (in GB, only 1-10)?
  11. IF /i "%RAM%"=="1" echo "1"> RAM.txt
  12. If /i "%RAM%"=="2" echo "2"> RAM.txt
  13. If /i "%RAM%"=="3" echo "3"> RAM.txt
  14. If /i "%RAM%"=="4" echo "4"> RAM.txt
  15. If /i "%RAM%"=="5" echo "5"> RAM.txt
  16. If /i "%RAM%"=="6" echo "6"> RAM.txt
  17. If /i "%RAM%"=="7" echo "7"> RAM.txt
  18. If /i "%RAM%"=="8" echo "8"> RAM.txt
  19. If /i "%RAM%"=="9" echo "9"> RAM.txt
  20. If /i "%RAM%"=="10" echo "10"> RAM.txt
  21. echo File created successfully
  22. goto NF
  23.  
  24. :Ready
  25. If /i "%RAM%"==""1"" goto 1_gb
  26. If /i "%RAM%"==""2"" goto 2_gb
  27. If /i "%RAM%"==""3"" goto 3_gb
  28. If /i "%RAM%"==""4"" goto 4_gb
  29. If /i "%RAM%"==""5"" goto 5_gb
  30. If /i "%RAM%"==""6"" goto 6_gb
  31. If /i "%RAM%"==""7"" goto 7_gb
  32. If /i "%RAM%"==""8"" goto 8_gb
  33. If /i "%RAM%"==""9"" goto 9_gb
  34. If /i "%RAM%"==""10"" goto 10_gb
  35. goto error
  36.  
  37. :NF
  38. If /i "%RAM%"=="1" goto 1_gb
  39. If /i "%RAM%"=="2" goto 2_gb
  40. If /i "%RAM%"=="3" goto 3_gb
  41. If /i "%RAM%"=="4" goto 4_gb
  42. If /i "%RAM%"=="5" goto 5_gb
  43. If /i "%RAM%"=="6" goto 6_gb
  44. If /i "%RAM%"=="7" goto 7_gb
  45. If /i "%RAM%"=="8" goto 8_gb
  46. If /i "%RAM%"=="9" goto 9_gb
  47. If /i "%RAM%"=="10" goto 10_gb
  48. goto error
  49.  
  50. :1_gb
  51. Echo Starting with 1 GB ram...
  52. java -Xincgc -Xmx1000M -jar craftbukkit.jar "
  53. goto end
  54.  
  55. :2_gb
  56. Echo Starting with 2 GB ram...
  57. java -Xincgc -Xmx2000M -jar craftbukkit.jar "
  58. goto end
  59.  
  60. :3_gb
  61. Echo Starting with 3 GB ram...
  62. java -Xincgc -Xmx3000M -jar craftbukkit.jar "
  63. goto end
  64.  
  65. :4_gb
  66. Echo Starting with 4 GB ram...
  67. java -Xincgc -Xmx4000M -jar craftbukkit.jar "
  68. goto end
  69.  
  70. :5_gb
  71. Echo Starting with 5 GB ram...
  72. java -Xincgc -Xmx5000M -jar craftbukkit.jar "
  73. goto end
  74.  
  75. :6_gb
  76. Echo Starting with 6 GB ram...
  77. java -Xincgc -Xmx6000M -jar craftbukkit.jar "
  78. goto end
  79.  
  80. :7_gb
  81. Echo Starting with 7 GB ram...
  82. java -Xincgc -Xmx7000M -jar craftbukkit.jar "
  83. goto end
  84.  
  85. :8_gb
  86. Echo Starting with 8 GB ram...
  87. java -Xincgc -Xmx8000M -jar craftbukkit.jar "
  88. goto end
  89.  
  90. :9_gb
  91. Echo Starting with 9 GB ram...
  92. java -Xincgc -Xmx9000M -jar craftbukkit.jar "
  93. goto end
  94.  
  95. :10_gb
  96. Echo Starting with 10 GB ram...
  97. java -Xincgc -Xmx10000M -jar craftbukkit.jar "
  98. goto end
  99.  
  100. :end
  101.  
  102. echo You can now exit this window.
  103. echo 10
  104. ping 1.1.1.1 -n 1 -w 1000 >NUL
  105. echo 9
  106. ping 1.1.1.1 -n 1 -w 1000 >NUL
  107. echo 8
  108. ping 1.1.1.1 -n 1 -w 1000 >NUL
  109. echo 7
  110. ping 1.1.1.1 -n 1 -w 1000 >NUL
  111. echo 6
  112. ping 1.1.1.1 -n 1 -w 1000 >NUL
  113. echo 5
  114. ping 1.1.1.1 -n 1 -w 1000 >NUL
  115. echo 4
  116. ping 1.1.1.1 -n 1 -w 1000 >NUL
  117. echo 3
  118. ping 1.1.1.1 -n 1 -w 1000 >NUL
  119. echo 2
  120. ping 1.1.1.1 -n 1 -w 1000 >NUL
  121. echo 1
  122. ping 1.1.1.1 -n 1 -w 1000 >NUL
  123. echo 0 Starting...
  124. PING 1.1.1.1 -n 1 -w 1000 >NUL
  125. goto start
  126.  
  127. :error
  128. echo Error! the RAM.txt must only include a number from 1 to 10. NOT SPACE like "4 "
  129. echo if the file is ok it should read "[number]"
  130. pause
Advertisement
Add Comment
Please, Sign In to add comment