Tomodachi94

Machine Control (MANUAL)

Jul 18th, 2020
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. --Author: Tomodachi94
  2. --Platform: ComputerCraft basic commands
  3. --Last reviewed: 7/20/2020 V1.2.1
  4. --Last reviewed by: Tomodachi94
  5. --Installer: cJkn6xuk
  6. --Computer Lock (for this Program): LhAt2bPW
  7. while true do
  8. term.clear()
  9. --Clears the terminal
  10. term.setCursorPos(1, 1)
  11. --Fixes a glitch where, when something is printed, appears 4-5 lines from the top.
  12. machinename = ("Oil Rig Control")
  13. --Controls the name of the machine, which is printed in the program.
  14. term.setTextColor(colors.red)
  15. print(machinename)
  16. term.setTextColor(colors.yellow)
  17. print("Commands")
  18. term.setTextColor(colors.blue)
  19. print("logoff")
  20. print("terminal")
  21. print("on")
  22. print("off")
  23. print("update")
  24. print("")
  25. term.setTextColor(colors.white)
  26. input = read()
  27. if input == "logoff" then
  28. term.clear()
  29. term.setCursorPos(1, 1)
  30. shell.run("startup")
  31. break
  32. elseif input == "terminal" then
  33. break
  34. elseif input == "on" then
  35. rs.setOutput("bottom", false)
  36. elseif input == "off" then
  37. rs.setOutput("bottom", true)
  38. elseif input == "update" then
  39. shell.run("update")
  40. else
  41. print("Invalid command.")
  42. end
  43. end
Advertisement
Add Comment
Please, Sign In to add comment