startGameServer.ps1 967 B

123456789101112131415161718192021222324252627282930
  1. $OutputEncoding = New-Object -typename System.Text.UTF8Encoding
  2. $a = (Get-Host).UI.RawUI
  3. $a.WindowTitle = "L2J - Game Server Console"
  4. do
  5. {
  6. switch ($LASTEXITCODE)
  7. {
  8. -1 { cls; "Starting L2J Game Server."; break; }
  9. 2 { cls; "Restarting L2J Game Server."; break; }
  10. }
  11. ""
  12. # -------------------------------------
  13. # Default parameters for a basic server.
  14. java "-Djava.util.logging.manager=com.l2jserver.util.L2LogManager" -Xms1024m -Xmx1024m -cp "./../libs/*;l2jserver.jar" com.l2jserver.gameserver.GameServer
  15. #
  16. # If you have a big server and lots of memory, you could experiment for example with
  17. # java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts
  18. # -------------------------------------
  19. }
  20. while ($LASTEXITCODE -like 2)
  21. if ($LASTEXITCODE -like 1)
  22. {
  23. "Server Terminated Abnormally";
  24. }
  25. else
  26. {
  27. "Server Terminated";
  28. }