Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ByteZz's ByteElevator--
- --vAlpha0.1 2/17/14--
- --Programmer Notes:
- --Currently only supports going up--
- --More functionality coming shortly!--
- elevator = function()
- print("Elevating "..elevateCount.." blocks")
- for elevateLoop = 1, elevateCount do
- turtle.up()
- end
- menuScreen()
- end
- menuScreen = function()
- print("ByteElevator vA0.1")
- print("Current Elevate Count: "..elevateCount")
- print("Change Elevate Count: 1")
- print("Help Me!: 2")
- print("Elevate Now! : 3")
- print("Choose answer using '1', '2' or '3': ")
- menuSelect = read()
- tonumber(menuSelect)
- term.clear()
- term.setCursorPos(1,1)
- end
- resetScreen = function()
- term.write("Please press any key to continue...")
- os.pullEvent("key")
- term.clear()
- term.setCursorPos(1,1)
- end
- helpScreen = function()
- print("Hi, this is the ByteElevator help screen!")
- resetScreen()
- print("This application is simple; it wants to make your Turtle an elevator!")
- resetScreen()
- print("You simply need to step on it, run the code and the elevator will take you up!")
- term.write("Press any key to return to the home screen...")
- os.pullEvent("key")
- term.clear()
- term.setCursorPos(1,1)
- end
- countOrHelp = function()
- if menuSelect == 1 then
- print("The current elevate count is "..elevateCount")
- print("Would you like to change the elevate count? (y/n)")
- helpMenuSelect = read()
- if helpMenuSelect == "y" then
- print("Input new elevate count in numbers:")
- elevateCount = read()
- tonumber(elevateCount)
- term.clear()
- term.setCursorPos(1,1)
- menuScreen()
- elseif menuSelect == 2 then
- helpScreen()
- else
- elevator()
- end
- elevateCount = 0
- local menuSelect = 0
- local helpMenuSelect = ""
- menuScreen()
Advertisement
Add Comment
Please, Sign In to add comment