Guest User

shaft

a guest
Sep 21st, 2012
625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. print("how far?")
  4. local x
  5. local y
  6. x = read()
  7. y = 0
  8. print("mining " ..x.. " meters")
  9.  
  10. turtle.select(1)
  11.  
  12. for i = 1, x do
  13.    turtle.dig()
  14.    turtle.forward()
  15.    turtle.digUp()
  16.    y = y+1
  17.     while y>5 do
  18.      turtle.placeUp()
  19.      y = y-6
  20.     end
  21. end
  22.  
  23. turtle.turnLeft()
  24. turtle.turnLeft()
  25.  
  26. for i = 1, x do
  27.   turtle.forward()
  28. end
  29.  
  30. turtle.turnRight()
  31.  
  32. for i = 2, 16 do
  33.   turtle.select(i)
  34.   turtle.drop()
  35. end
  36.  
  37. turtle.turnRight()
  38.  
  39. print("mining cycle completed")
Advertisement
Add Comment
Please, Sign In to add comment