Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function next()
- z = k+1
- for i= 1,z do
- turtle.forward()
- end
- end
- function put()
- if w==1 then
- turtle.digDown()
- turtle.down()
- turtle.digDown()
- turtle.select(1)
- turtle.placeDown()
- turtle.up()
- turtle.select(2)
- turtle.placeDown()
- elseif w==2 then
- turtle.digUp()
- turtle.Up()
- turtle.digUp()
- turtle.select(1)
- turtle.placeUp()
- turtle.down()
- turtle.select(2)
- turtle.placeUp()
- else
- print("Dude I told ya 1 or 2 didn't I?")
- os.sleep(10)
- os.reboot()
- end
- end
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function nextRow()
- x = l+1
- if r%2 == 1 then
- turtle.turnLeft()
- for p= 1,x do
- turtle.forward()
- end
- turtle.turnLeft()
- r = r+1
- else
- turtle.turnRight()
- for p= 1,x do
- turtle.forward()
- end
- turtle.turnRight()
- r = r+1
- end
- end
- function questions()
- clear()
- print("How many blocks apart?")
- k = tonumber(read())
- clear()
- print("How many blocks between rows?")
- l = tonumber(read())
- clear()
- print("How many in a row?")
- m = tonumber(read())
- clear()
- print("how many rows?")
- n = tonumber(read())
- clear()
- print("where to turn first? Type in 1 for left 2 for right.")
- r = tonumber(read())
- clear()
- print("floor or ceeling? (1 for floor 2 for ceeling.")
- w = tonumber(read())
- clear()
- end
- questions()
- print("working")
- for j= 1,n do
- put()
- for o= 1,m-1 do
- next()
- put()
- end
- nextRow()
- end
Advertisement
Add Comment
Please, Sign In to add comment