Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function digFwd()
- digFwdNoDeposit()
- checkDeposit()
- end
- local function digFwdNoDeposit()
- if not turtle.dig() do error("dig fail") end
- end
- local function digDown()
- digDownNoDeposit()
- checkDeposit()
- end
- local function digDownNoDeposit()
- if not turtle.digDown() do error("dig fail") end
- end
- local function checkDeposit()
- local item_count = turtle.getItemCount(14)
- if item_count > 0 then
- depositNow()
- end
- end
- local function depositNow()
- local chest_count = turtle.getItemCount(16)
- if item_count <= 0 then
- error("no chests")
- end
- turtle.select(16)
- turtle.turnRight()
- turtle.turnRight()
- digDownNoDeposit()
- turtle.place()
- for j=1,14 do
- turtle.transferTo(j)
- end
- turtle.turnRight()
- turtle.turnRight()
- end
- local forward_dist = 20
- local right_dist_over_two = 10
- while true do
- for j=1,right_dist_over_two do
- for i=1,forward_dist do
- digFwd()
- turtle.forward()
- end
- turtle.turnRight()
- digFwd()
- turtle.forward()
- turtle.turnRight()
- for i=1,forward_dist do
- digFwd()
- turtle.forward()
- end
- turtle.turnLeft()
- digFwd()
- turtle.forward()
- turtle.turnLeft()
- end
- depositNow()
- turtle.turnLeft()
- digDownNoDeposit()
- turtle.down()
- for j=1,right_dist_over_two * 2 do
- digFwdNoDeposit()
- turtle.forward()
- end
- turtle.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement