Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Author: Tomodachi94
- --Platform: ComputerCraft basic commands
- --Last reviewed: 7/20/2020 V1.2.1
- --Last reviewed by: Tomodachi94
- --Installer: cJkn6xuk
- --Computer Lock (for this Program): LhAt2bPW
- while true do
- term.clear()
- --Clears the terminal
- term.setCursorPos(1, 1)
- --Fixes a glitch where, when something is printed, appears 4-5 lines from the top.
- machinename = ("Oil Rig Control")
- --Controls the name of the machine, which is printed in the program.
- term.setTextColor(colors.red)
- print(machinename)
- term.setTextColor(colors.yellow)
- print("Commands")
- term.setTextColor(colors.blue)
- print("logoff")
- print("terminal")
- print("on")
- print("off")
- print("update")
- print("")
- term.setTextColor(colors.white)
- input = read()
- if input == "logoff" then
- term.clear()
- term.setCursorPos(1, 1)
- shell.run("startup")
- break
- elseif input == "terminal" then
- break
- elseif input == "on" then
- rs.setOutput("bottom", false)
- elseif input == "off" then
- rs.setOutput("bottom", true)
- elseif input == "update" then
- shell.run("update")
- else
- print("Invalid command.")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment