Advertisement
NovaViper

My Powershell script flow chart

May 29th, 2017
569
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.11 KB | None | 0 0
  1. -Boot
  2. -Pre-phase
  3. -Declare consoleName = Console Master
  4. -Declare consoleVersion = 1.0
  5. -Declare prefix = consoleName + consoleVersion (i.e. Console Master 1.0)
  6. -Change console title to prefix
  7. -Post-phase
  8. -If the information for the server jar is missing OR If the information for the server Minecraft version is missing, go to first time setup menu
  9. -If this information does exist, move on to the main menu
  10. -If the console color information (this is created by the user) exists, then set the color for the entire console using the information
  11. -First Time Setup
  12. -Change console title to prefix + Setup (Jar: N/A, MC N/A)
  13. -Welcome the user to the console ("Welcome to Console Master 1.0!)
  14. -Prompt the user to enter the name of the server jar file
  15. -Prompt the user to enter the minecraft version the user jar is made for
  16. -Send the java arguments "java -Xms1G -Xmx1G -jar nameOfServerJar.jar -o true" to the basic information file
  17. -Ask user if they want to customize the console colors
  18. -Check if they say Yes (Y/y) or No (N/n), if they don't, tell them to enter vaild arguments
  19. -If they say yes, move on to the color selection menu
  20. -Color Selection
  21. -Dsiplay all possible colors and what format to enter them information
  22. -Prompt user to enter their color choices
  23. -Save the data to the basic information file, then move on to the main menu as well as set the colors
  24. -If they say no, move on to the main menu after 5 seconds
  25. -Main Menu
  26. -Display all possible operations
  27. 1.Start the Server
  28. 2.Settings
  29. 3.Exit
  30. -If the user selects 1, move on to the server process
  31. -If the user selects 2, move on to the settings menu
  32. -If the user selects 3, close the console
  33. -If the user selects anything else, tell them they need to select a vaild operations
  34.  
  35. -Server Process
  36. -Startup Phase
  37. -Change title to prefix + Minecraft Server Running
  38. -Indicate the start of server logs with a line
  39. -Check for Ngrok
  40. -If Ngrok is NOT activte, tell the user that it is not active and that it will start Ngrok
  41. -Start Ngrok with a custom title in ANOTHER console since Ngrok has its own menu
  42. -If Ngrok IS active, tell the user that it is active and it doesn't need to be started again
  43. -Gather the java arguments from the basic information file to run and alert the user of this
  44. -Once collected, alert the user that arguments are collected and are executed
  45. -Display the log from the server
  46. -Shutdown Phase
  47. *******This only executes once the server returns a finished signal
  48. -Change title to prefix + Minecraft Server Running
  49. -Indicate the end of server logs with a line
  50. -Ask the user if they want to restart the server (Yes/No)
  51. -If the user says yes, then rerun the server startup process
  52. -If the user says no, then ask if they want to close the console
  53. -If they say yes, then ask if they want to close Ngrok aswell
  54. -If they say yes, then alert the user that Ngrok is closing
  55. -Once Ngrok is closed, alert the user that it is closed
  56. -Prompt the user to press any button to close the console
  57. -Close the console
  58. -If they say no, then leave Ngrok alone and prompt the user to press any button to close the console
  59. -Close the console
  60. -If they say no, then ask if they want ONLY to close Ngrok
  61. -If they say yes, then leave the console alone and just close Ngrok and alert the user that it is closed
  62. -Then move back to the main menu after 5 seconds
  63. -If they say no, then return to the main menu after 5 seconds
  64. -Settings Menu
  65. -Display all possible operations
  66. 1.Coloring - Set The Color Scheme
  67. 2.Change Minecraft Version - Change What Version of Minecraft the Server is Using
  68. 3.RAM Allocation - Set RAM Allocation (Advanced)
  69. 4.Custom Arguments - Set custom arguments besides the RAM! (Advanced)
  70. 5.Factory Reset - [!!] Resets all settings back to first time setup
  71. 6.Back To Main Menu
  72. -If the user selects 1, move on to coloring selection just like in first time setup (EXCEPT that when the user finishes, they are returned to the settings menu)
  73. -If the user selects 2, move on to the minecraft version changing process
  74. -If the user selects 3, move on to the RAM allocation setup
  75. -If the user selects 4, move on to the custom arguments setup
  76. -If the user selects 5, move on to the factory reset process
  77. -If the user selects 6, return back to the main menu
  78. -If the user selects anything else, tell them they need to select a vaild operations
  79.  
  80. -Minecraft Version Changing
  81. -Prompt the user to enter a new Minecraft version
  82. -If the version is the same, tell the user they they have entered the same version number as before, then ask them again to enter a new one
  83. -Save the new version to the basic information file
  84. -Return to settings menu after 5 seconds
  85.  
  86. -RAM Allocation Setup
  87. -Prompt the user to enter the minimum amount of RAM in Megabytes (M) or Gigabytes (G)
  88. -Then prompt the user to enter the maximum amount of RAM in Megabytes (M) or Gigabytes (G)
  89. -Save this data to the arguments file and tell the user that the data is saved
  90. -Move on to settings menu after 5 seconds
  91.  
  92. -Custom Arguments Setup
  93. -Warn the user that they should only change the arguments if they know what they are doing
  94. -Display the user's current arugments taken from the arguments file
  95. -Ask the user are they sure that they want to change these arguments
  96. -If yes, then ask them enter new arguments, while displaying a the old arguments
  97. -Once the user wants to save, ask are they sure they want to save the new settings
  98. -If yes, then write over the old settings and save the new ones in the arguments file
  99. -Once saved, then move back to the settings menu after 5 seconds
  100. -If no, then allow the user to make chanages to the new arguments
  101. -If no, then return to the settings menu after 5 seconds
  102.  
  103. -Factory Reset
  104. -Warn the user that ALL settings will be lost and they would have to set up the console again; then ask do they want to proceed
  105. -If yes, then begin to erase all files and reset all variables
  106. -Once fully reset, move on to first time setup after 5 seconds
  107. -If no, then return to settings menu after 5 seconds
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement