Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function digIt()
- while turtle.detect() do
- turtle.dig()
- os.sleep(0.5)
- end
- turtle.forward()
- while turtle.detectDown() or turtle.detectUp() do
- turtle.digUp()
- turtle.digDown()
- end
- end
- function placeTorch()
- turtle.down()
- turtle.back()
- turtle.select(16)
- turtle.placeUp()
- turtle.forward()
- turtle.up()
- end
- function side(m)
- for i = 1, 1 do
- digIt()
- end
- if m % 2 == 0 then
- turtle.turnRight()
- digIt()
- else
- turtle.turnLeft()
- digIt()
- end
- end
- --function store()
- -- if turtle.getItemCount(16) ~= 0 then
- -- turtle.dig()
- -- turtle.select(1)
- -- turtle.place()
- -- for i = 3, 16 do
- -- turtle.select(i)
- -- turtle.drop()
- -- end
- -- turtle.select(1)
- -- turtle.dig()
- -- end
- --end
- local run = 0
- local length = 0
- local j = 0
- local k = 0
- local m = 0
- local turn = 0
- term.write("Number of Strips: ")
- run = read()
- term.write("Length of Strips: ")
- length = read()
- length = length - 4
- side(m)
- m = m + 1
- for iter = 1, run do
- if iter == 2 then
- length = length - 1
- end
- for i = 1, length do
- k = i - 1
- j = k % 7
- if j == 1 then
- -- placeTorch()
- end
- if turn == (length - 1) then
- side(m)
- side(m)
- m = m + 1
- turn = 0
- -- store()
- else
- turn = turn + 1
- -- store()
- end
- digIt()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement