Advertisement
xXExpchampXx

Boden

Apr 27th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.42 KB | None | 0 0
  1. print("Laenge?")
  2. l = tonumber(read())
  3.  
  4. print("Breite?")
  5. b = tonumber(read())
  6.  
  7. print("Tiefe?")
  8. t = tonumber(read())
  9.  
  10. right = true
  11.  
  12. turtle.select(1)
  13.  
  14. function forward()
  15.   while(not turtle.forward()) do
  16.     turtle.dig()
  17.   end
  18.  
  19. if turtle.detectDown() then
  20.  
  21.   if turtle.compareDown(1) == true then
  22.   else
  23.   turtle.digDown()
  24.   turtle.placeDown()
  25.  
  26.     if turtle.getItemCount(1) < 1 then
  27.  
  28. turtle.select(16)
  29. turtle.place()
  30.  
  31. turtle.select(1)
  32. turtle.drop()
  33. turtle.select(2)
  34. turtle.drop()
  35. turtle.select(3)
  36. turtle.drop()
  37. turtle.select(4)
  38. turtle.drop()
  39. turtle.select(5)
  40. turtle.drop()
  41. turtle.select(6)
  42. turtle.drop()
  43. turtle.select(7)
  44. turtle.drop()
  45. turtle.select(8)
  46. turtle.drop()
  47.  
  48.  
  49. turtle.dig()
  50. turtle.select(8)
  51. turtle.transferTo(16)
  52.  
  53.  
  54. turtle.select(15)
  55. turtle.place()
  56. turtle.select(1)
  57. turtle.suck()
  58. turtle.dig()
  59. turtle.select(2)
  60. turtle.transferTo(15)
  61.  
  62. turtle.select(1)
  63.  
  64. else
  65. print("Alles OK")
  66. end
  67.  
  68.   end
  69.  
  70.   else
  71.   turtle.placeDown()
  72.  
  73. end
  74. end
  75.  
  76. function down()
  77.   if turtle.detectDown() then
  78.     turtle.digDown()
  79.   end
  80. end
  81.  
  82. function turn()
  83.   if(right) then
  84.     turtle.turnRight()
  85.   else
  86.     turtle.turnLeft()
  87.   end
  88. end
  89.  
  90. for y=1,t do
  91.   for z=1,b do
  92.     for x=1,l-1 do
  93.       forward()
  94.     end
  95.     turn()
  96.     if(z ~= b) then
  97.       forward()
  98.     end
  99.     turn()
  100.     right = not right
  101.   end
  102.   if(y ~= t) then
  103.     down()
  104.   end
  105.   right = not right
  106. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement