Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variables
- turtle.select(1)
- height = 0
- local tArgs = { ... }
- local levelAlt = tonumber(tArgs[1])
- -- Functions
- local function tMove(distance)
- for i=1,distance do
- while turtle.forward() == false do
- turtle.dig()
- turtle.attack()
- sleep(0.5)
- end
- end
- end
- local function tDescend(distance)
- for i=1,distance do
- while turtle.down() == false do
- turtle.digDown()
- turtle.attackDown()
- sleep(0.5)
- end
- end
- end
- local function tAscend(distance)
- for i=1,distance do
- while turtle.up() == false do
- turtle.digUp()
- turtle.attackUp()
- sleep(0.5)
- end
- end
- end
- local function turnaround()
- turtle.turnRight()
- turtle.turnRight()
- end
- local function windowStrip()
- for j=1,4 do
- tMove(2)
- turtle.turnLeft()
- tMove(1)
- turtle.turnRight()
- tMove(3)
- turnaround()
- tMove(2)
- for i=1,4 do
- turtle.place()
- turtle.back()
- end
- tMove(1)
- turtle.turnLeft()
- tMove(1)
- turtle.turnRight()
- tMove(1)
- turtle.turnLeft()
- tMove(2)
- turnaround()
- tMove(1)
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.turnRight()
- turtle.back()
- turtle.place()
- turtle.turnRight()
- tMove(2)
- end
- end
- -- Startup
- term.clear()
- term.setCursorPos(1,1)
- print("Please place blocks as follows:")
- print("Slot 1 - Glass Panes (56)")
- print()
- print("Ground Level = 0")
- print("Press enter a level when ready:")
- level = read(input)
- -- Main Program
- tAscend(4*level)
- tMove(2)
- turtle.turnLeft()
- windowStrip()
- tAscend(1)
- windowStrip()
- tDescend(1)
- turtle.turnLeft()
- tMove(2)
- tDescend(4*level)
- turnaround()
Advertisement
Add Comment
Please, Sign In to add comment