Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local btogo = 2000 --legth of the tunnel.
- local b = 0 --blocks walked.
- local tb = 0 -- blocks until next torch.
- local t = turtle.getItemCount(16)
- local i = 0
- local is = 15
- --loop to line 39.
- repeat
- --fuel.
- if btogo * 4 > turtle.getFuelLevel() then print("Need more fuel!")
- end
- --digging.
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- b = b + 1
- -- Torch placement.
- tb = tb + 1
- if tb == 9 then
- turtle.back()
- end
- if tb == 9 then
- turtle.select(16)
- end
- if tb == 9 then
- turtle.placeUp()
- end
- if tb == 9 then
- turtle.select(1)
- end
- if tb == 9 then
- tb = 0
- end
- --Inventory Management.
- i = i + 1
- if i == 100 then
- turtle.select(15)
- end
- if i == 100 then
- turtle.placeDown()
- end
- if i == 100 then
- turtle.select(1)
- end
- if i == 100 then
- repeat
- if i == 100 then
- is = is - 1
- end
- if i == 100 then
- turtle.select(is)
- end
- if i == 100 then
- turtle.dropDown()
- end
- until is == 1
- end
- if i == 100 then
- is = 15
- end
- if i == 100 then
- i = 0
- end
- until b == btogo
Advertisement
Add Comment
Please, Sign In to add comment