Stravides

mineshaft

Jan 3rd, 2014
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. aArgs = {...}
  2. local depth = aArgs[1]
  3.  
  4. function digForward()
  5.   turtle.dig()
  6.   while turtle.forward() == false do
  7.     turtle.dig()
  8.   end    
  9. end
  10.  
  11. function digUp()
  12.   turtle.digUp()
  13.   while turtle.up() == false do
  14.     turtle.digUp()
  15.   end
  16. end
  17.  
  18. for i = 1, depth, 1 do
  19.   turtle.digDown()
  20.   turtle.down()
  21.   if i > 1 then
  22.     turtle.placeUp()
  23.   end
  24. end
  25.  
  26. turtle.turnRight()
  27.  
  28. digForward()
  29. turtle.digUp()
  30. digForward()
  31.  
  32. for i = 1, depth - 1, 1 do
  33.   digUp()
  34.   if i == 2 then
  35.     turtle.turnRight()
  36.     digForward()
  37.     turtle.turnRight()
  38.     turtle.turnRight()
  39.     turtle.select(2)
  40.     turtle.place()  
  41.     digUp()
  42.     turtle.select(4)
  43.     turtle.placeDown()
  44.     digForward()
  45.     turtle.dig()
  46.     turtle.select(3)
  47.     turtle.place()
  48.   end
  49. end
  50.  
  51. turtle.turnLeft()
  52. turtle.forward()
  53. turtle.turnLeft()
  54.  
  55. turtle.select(1)
Advertisement
Add Comment
Please, Sign In to add comment