Advertisement
Guest User

glassTunnel

a guest
Dec 22nd, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | None | 0 0
  1. lenHoriz = 5
  2. lenVert = 10
  3. tunnelHeig = 5
  4. function placeHorizontalBackwards()
  5. for x=1,lenHoriz do
  6. turtle.placeDown()
  7. turtle.forward()
  8. end
  9. end
  10. function placeHorizontal()
  11. turtle.turnRight()
  12.  
  13. for x = 1,lenHoriz do
  14.   turtle.placeDown()
  15.   turtle.forward()
  16. end
  17. end
  18.  
  19. function returnLeft()
  20. turtle.turnLeft()
  21. turtle.turnLeft()
  22. for x = 1,lenHoriz do
  23. turtle.forward()
  24.  
  25. end
  26. turtle.turnRight()
  27.  
  28. end
  29.  
  30. function placeVert()
  31.  turtle.turnLeft()
  32.  for x = 1,tunnelHeig do
  33.  turtle.place()
  34.  turtle.up()
  35.  
  36.  
  37.  end
  38.  turtle.up()
  39.  turtle.turnRight()
  40.  placeHorizontal()  
  41.  turtle.down()
  42.  for x=1,tunnelHeig do
  43.  
  44.     turtle.down()
  45.     turtle.placeUp()
  46.          
  47.  end  
  48.   turtle.turnLeft()
  49.   turtle.turnLeft()
  50.   placeHorizontalBackwards()
  51.                    
  52.  
  53.  
  54.  
  55. end
  56. function sort()
  57.  
  58.  if turtle.getItemCount(turtle.getSelectedSlot()) < 1 then
  59.    k = turtle.getSelectedSlot()
  60.    k = k + 1
  61.    turtle.select(k)
  62.  
  63.  end
  64.  
  65.    
  66. end
  67.  
  68. for i = 1,lenVert do
  69.  
  70. placeVert()
  71. turtle.turnRight()
  72. turtle.forward()
  73. sort()
  74. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement