Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # dig/bridge forward and then right
- lenF=18
- lenR=123
- slot = 1
- function DoOne()
- turtle.digUp()
- turtle.dig()
- if not turtle.detectDown() then
- success, errStr = turtle.placeDown()
- wrapped = False
- while errStr == "No items to place" do
- slot = slot + 1
- if slot==17 and wrapped then
- print(errStr)
- error()
- elseif slot==17 then
- slot=1
- wrap=True
- end
- turtle.select(slot)
- errStr = ''
- success, errStr = turtle.placeDown()
- end
- end
- turtle.forward()
- end
- if lenF>0 then
- for i=1,lenF do
- DoOne()
- end
- end
- if lenR>0 then
- turtle.turnRight()
- for i=1,lenR do
- DoOne()
- end
- turtle.turnRight()
- DoOne()
- turtle.turnRight()
- for i=1,lenR-1 do
- DoOne()
- end
- end
- if lenF>0 then
- turtle.turnLeft()
- for i=1,lenF-1 do
- DoOne()
- end
- end
Add Comment
Please, Sign In to add comment