Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loop = 0
- page = 0
- -- Disclaimer
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.red)
- print("Notice: This program is still a Work in Progress")
- print("because of this, some functionality is broken, missing, or incomplete")
- print("If something breaks, wait for the program to be completed")
- print("chances are I will have fixed it by then")
- print(" ")
- print("Program will begin in 10 seconds")
- sleep(10)
- -- Main Program
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.cyan)
- print("Welcome to the CC Coding Tutorial Program")
- print("This program will teach you about some commands you can use in a program, what each command does, and how to use them")
- print("Make sure you have a monitor attached to this computer before you begin. It will be used to display each lesson")
- print("A 6 wide by 4 tall monitor is recommended")
- print("Press the Enter button to continue")
- read()
- while true do
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.yellow)
- print("Do you wish to review the lessons, or do you want to test what you know?")
- print("Select \"review\" or \"test\" or \"exit\"")
- input = read()
- if input == "review" then
- loop = 1
- page = 1
- while loop == 1 do
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.lime)
- print("Lesson Overview")
- if page == 1 then
- term.setTextColor(colors.lime)
- print("Lesson 1 - Introduction")
- print("Lesson 2 - Basic Commands")
- print("Lesson 3 - Variables")
- print("Lesson 4 - Text")
- print("Lesson 5 - Colors")
- print("Lesson 6 - Statements")
- print("Type \"next\" for the next page")
- elseif page == 2 then
- term.setTextColor(colors.lime)
- print("Lesson 7 - Loops")
- print("Lesson 7.1 - Loops Cont.")
- print("Lesson 8 - Redstone")
- print("Lesson 8.1 - Redstone Cont.")
- print("Lesson 9 - File System")
- print("Lesson 9.1 - File System Cont.")
- print("Type \"back\" for the last page")
- end
- term.setTextColor(colors.lime)
- print("Type \"menu\" for the main menu")
- print("Please select the lesson number you want: ")
- input = read()
- if input == "next" then
- if page == 2 then
- term.setTextColor(colors.red)
- print("No more pages")
- sleep(2)
- else
- page = 2
- end
- elseif input == "back" then
- if page == 1 then
- term.setTextColor(colors.red)
- print("No more pages")
- sleep(2)
- else
- page = 1
- end
- elseif input == "menu" then
- loop = 0
- elseif input == "1" then
- shell.run("section1")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "2" then
- shell.run("section2")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "3" then
- shell.run("section3")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "4" then
- shell.run("section4")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "5" then
- shell.run("section5")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "6" then
- shell.run("section6")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "7" then
- shell.run("section7")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "7.1" then
- shell.run("section71")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "8" then
- shell.run("section8")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "8.1" then
- shell.run("section81")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "9" then
- shell.run("section9")
- print("See monitor for lesson")
- sleep(3)
- elseif input == "9.1" then
- shell.run("section91")
- print("See monitor for lesson")
- sleep(3)
- else
- term.setTextColor(colors.red)
- print("Invalid Selection")
- sleep(2)
- end
- end
- elseif input == "test" then
- loop = 1
- while loop == 1 do
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.purple)
- print("Lesson Test Overview \n ")
- print("Lesson 2 - Basic Commands")
- print("Lesson 3 - Variables")
- print("Lesson 4 - Text")
- print("Lesson 5 - Colors")
- print("Lesson 6 - Statements")
- print("Lesson 7 - Loops")
- print("Lesson 8 - Redstone")
- print("Lesson 9 - File System")
- print("Type \"menu\" for the main menu \n ")
- print("Please select the lesson number you want: ")
- input = read()
- if input == "menu" then
- loop = 0
- elseif input == "2" then
- print("Starting Test")
- sleep(2)
- shell.run("section2Test")
- elseif input == "3" then
- print("Starting Test")
- sleep(2)
- shell.run("section3Test")
- sleep(3)
- elseif input == "4" then
- print("No Test Available")
- sleep(3)
- elseif input == "5" then
- print("No Test Available")
- sleep(3)
- elseif input == "6" then
- print("No Test Available")
- sleep(3)
- elseif input == "7" then
- print("No Test Available")
- sleep(3)
- elseif input == "8" then
- print("No Test Available")
- sleep(3)
- elseif input == "9" then
- print("No Test Available")
- sleep(3)
- else
- term.setTextColor(colors.red)
- print("Invalid Selection")
- sleep(2)
- end
- end
- elseif input == "exit" then
- break;
- else
- term.setTextColor(colors.red)
- print("Invalid Selection")
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement