Advertisement
Zulfur

computercraft usine arbre

Aug 18th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. local n = 1
  2. local fuel = turtle.getFuelLevel()
  3.  
  4. while n==1 do
  5.  
  6. for k=1,4 do
  7. turtle.forward()
  8. turtle.suckDown()
  9. end
  10.  
  11. if turtle.detectDown() then
  12.  
  13. fuel = turtle.getFuelLevel()
  14. if fuel < 240 then
  15. turtle.select(15)
  16. turtle.refuel(3)
  17. turtle.select(1)
  18. end
  19.  
  20. if turtle.detect() then
  21. turtle.select(15)
  22. turtle.suck()
  23. turtle.select(16)
  24. turtle.drop(64)
  25. turtle.select(15)
  26. local x = turtle.getItemCount()
  27. x = x - 5
  28. turtle.drop(x)
  29.  
  30. turtle.turnRight()
  31. turtle.forward()
  32. turtle.turnLeft()
  33.  
  34. turtle.select(9)
  35. turtle.suck()
  36. turtle.select(10)
  37. turtle.drop(64)
  38. turtle.select(9)
  39. local y = turtle.getItemCount()
  40. y = y - 16
  41. turtle.drop(y)
  42.  
  43. turtle.turnRight()
  44. turtle.forward()
  45. turtle.turnLeft()
  46.  
  47. for a=1,3 do
  48. turtle.select(a)
  49. turtle.drop(64)
  50.  
  51. turtle.turnRight()
  52. turtle.forward()
  53. turtle.turnLeft()
  54.  
  55. else
  56.  
  57. turtle.turnRight()
  58. shell.run("go forward 3")
  59. turtle.turnRight()
  60.  
  61. end
  62.  
  63. else
  64.  
  65. turtle.turnLeft()
  66.  
  67. if turtle.detect() then
  68.  
  69. turtle.dig()
  70. turtle.forward()
  71. turtle.digDown()
  72. turtle.select(9)
  73. turtle.placeDown()
  74. turtle.select(1)
  75.  
  76. while turtle.detectUp() do
  77. turtle.digUp()
  78. turtle.up()
  79. end
  80.  
  81. while not turtle.detectDown() do
  82. turtle.down()
  83. end
  84.  
  85. turtle.turnLeft()
  86. turtle.turnLeft()
  87. turtle.forward()
  88. turtle.turnLeft()
  89.  
  90. else
  91.  
  92. turtle.turnRight()
  93.  
  94. end
  95.  
  96. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement