Drakaxx

vider eau

Apr 17th, 2019
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. profondeur = 3
  2. largeur = 2
  3. hauteur = 2
  4.  
  5. function xPlace()
  6. local data = turtle.getItemDetail()
  7.  
  8. if data then
  9. turtle.place()
  10. else
  11. pos = pos + 1
  12. turtle.select(pos)
  13. turtle.place()
  14. end
  15. end
  16.  
  17. function xProcessProfondeur()
  18. for n=1,profondeur do
  19. turtle.back()
  20. if debut == 0 then
  21. xPlace()
  22. else
  23. debut = 0
  24. end
  25. end
  26. end
  27.  
  28. function xTurnLeft()
  29. turtle.turnLeft()
  30. turtle.back()
  31. xPlace()
  32. turtle.turnLeft()
  33. end
  34.  
  35. function xTurnRight()
  36. debut = 1
  37. turtle.turnRight()
  38. turtle.back()
  39. turtle.turnRight()
  40. end
  41.  
  42. function xProcessLargeur()
  43. l = 0
  44. for m=1,largeur do
  45. xProcessProfondeur()
  46. xTurnLeft()
  47. xProcessProfondeur()
  48. xTurnRight()
  49. l = l + 2
  50. end
  51. end
  52.  
  53. function xTurnUp()
  54. while q > 0 do
  55. turtle.up()
  56. q = q - 1
  57. end
  58. end
  59.  
  60. function xTurnDown()
  61. for n=1,1 do
  62. turtle.down()
  63. end
  64. wThrow()
  65. end
  66.  
  67. function xSuckUp()
  68. pos = 1
  69. turtle.suckUp()
  70. end
  71.  
  72. function xGoBack()
  73. turtle.turnLeft()
  74. while l >= 1 do
  75. turtle.forward()
  76. l = l - 1
  77. end
  78. turtle.turnRight()
  79. t = q
  80. while q > 0 do
  81. turtle.up()
  82. q = q - 1
  83. end
  84. q = t
  85. xSuckUp()
  86.  
  87. for v=1,p do
  88. turtle.down()
  89. end
  90. end
  91.  
  92. p = 0
  93. q = 1
  94. debut = 1
  95.  
  96. pos = 1
  97. turtle.select(pos)
  98.  
  99. for p=1,hauteur do
  100. xProcessLargeur()
  101. xGoBack()
  102. turtle.down()
  103. q = q + 1
  104. p = p + 1
  105. end
  106.  
  107. xTurnUp()
Advertisement
Add Comment
Please, Sign In to add comment