Advertisement
Guest User

dig

a guest
Aug 22nd, 2014
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. function dig3()
  2.   repeat turtle.dig()
  3.   until turtle.forward() == true
  4.   turtle.digDown()
  5.   while turtle.digUp() == true do
  6.     sleep(0.4)
  7.   end
  8. end
  9.  
  10. print("place turtle on last torch, facing forward")
  11. print("put torches in slot 1, chests in slot 2 and press a button")
  12. print(turtle.getFuelLevel())
  13. read()
  14. turtle.turnLeft()
  15. for j = 1, turtle.getItemCount(1) do
  16.   turtle.select(1)
  17.   turtle.placeDown()
  18.   dig3()
  19.   for i = 1, 5 do
  20.     if turtle.getItemCount(16) > 0 then
  21.       turtle.select(2)
  22.       turtle.placeDown()
  23.       for k = 3, 16 do
  24.         turtle.select(k)
  25.         turtle.dropDown()
  26.       end
  27.       turtle.select(1)
  28.     end
  29.     if i % 2 == 1 then
  30.       turtle.turnRight()
  31.       dig3()
  32.       turtle.turnRight()
  33.       dig3()
  34.       dig3()
  35.     else
  36.       turtle.turnLeft()
  37.       dig3()
  38.       turtle.turnLeft()
  39.       dig3()
  40.       dig3()
  41.     end
  42.   end
  43.   turtle.turnLeft()
  44.   dig3()
  45.   turtle.forward()
  46.   turtle.turnLeft()
  47.   dig3()
  48. end
  49. turtle.select(1)
  50. turtle.placeDown()
  51. dig3()
  52. turtle.back()
  53. turtle.turnRight()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement