Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = {...}
- local lenght = tArgs[1]
- local width = tArgs[2]
- local height = tArgs[3]
- width = width - 1
- height = height - 2
- print("write <left>, <right> or <middle>")
- term.write("Which side to start from?>")
- sideCheck = read()
- print("The turtle will start from the "..sideCheck.." and make stairs")
- ErrorMessage = 0
- if sideCheck == "left" then
- ErrorMessage = ErrorMessage + 1
- end
- if sideCheck == "right" then
- ErrorMessage = ErrorMessage + 1
- end
- if sideCheck == "middle" then
- ErrorMessage = ErrorMessage + 1
- end
- if ErrorMessage == 0 then
- print("There is no such mode")
- return
- end
- print("write <up> or <down>")
- term.write("Which way to go?>")
- upOrDownCheck = read()
- print("The turtle will go "..upOrDownCheck.." aswell as going "..sideCheck)
- errorMessage = 0
- upOrDownCheck == "up" then
- errorMessage = errorMessage + 1
- end
- if sideCheck == "down" then
- errorMessage = errorMessage + 1
- end
- if errorMessage == 0 then
- print("There is no such mode")
- return
- end
- function ReturnPoint()
- for i = 1, tArgs[2] do
- turtle.back()
- end
- end
- function forwardDig()
- while turtle.digUp() == true do
- sleep(0.4)
- end
- while turtle.dig() == true do
- sleep(0.4)
- end
- while turtle.forward() == false do
- sleep(0.4)
- turtle.attack()
- turtle.dig()
- end
- end
- function heightDig()
- while turtle.digUp() == true do
- sleep(0.4)
- end
- for i = 1, tArgs[3] do
- while turtle.digUp() == true do
- sleep(0.4)
- end
- turtle.up()
- end
- for i = 1, tArgs[3] do
- while turtle.down() == false do
- turtle.attackDown()
- turtle.attack()
- end
- end
- end
- function leftStairs()
- turtle.turnRight()
- for i = 1, tArgs[2] do
- heightDig()
- forwardDig()
- ReturnPoint()
- end
- end
- function rightStairs()
- turtle.turnLeft()
- for i = 1, tArgs[2] do
- heightDig()
- forwardDig()
- ReturnPoint()
- end
- end
- function middleStairs()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement