Advertisement
Rexxus_

Farm

Feb 21st, 2020
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.00 KB | None | 0 0
  1. local clock = os.clock
  2. function sleep(n)  -- seconds
  3.   local t0 = clock()
  4.   while clock() - t0 <= n do end
  5. end
  6. function cassercipa()
  7.     a=0
  8.     while a<2 do
  9.     turtle.digDown()
  10.     turtle.forward()
  11.     a = a+1
  12.     end
  13. end
  14. function cultiver()
  15.     turtle.digDown()
  16.     turtle.digDown()
  17.     turtle.placeDown()
  18.     turtle.forward()
  19. end
  20. for i = 1, 16 do -- loop through the slots
  21.   turtle.select(i) -- change to the slot
  22.   if turtle.refuel(0) then -- if it's valid fuel
  23.     local halfStack = math.ceil(turtle.getItemCount(i)/2) -- work out half of the amount of fuel in the slot
  24.     turtle.refuel(halfStack) -- consume half the stack as fuel
  25.   end
  26. end
  27. sleep(2)
  28. turtle.forward()
  29. cassercipa()
  30. cultiver()
  31. cultiver()
  32. cultiver()
  33. turtle.forward()
  34. turtle.forward()
  35. turtle.forward()
  36. turtle.turnLeft()
  37. b=0
  38. turtle.forward()
  39. while b<7 do
  40.     cultiver()
  41.     b = b+1
  42. end
  43. turtle.turnRight()
  44. turtle.forward()
  45. turtle.turnRight()
  46. turtle.forward()
  47. cassercipa()
  48. cultiver()
  49. cultiver()
  50. cultiver()
  51. turtle.forward()
  52. turtle.forward()
  53. turtle.forward()
  54. turtle.turnRight()
  55. b=0
  56. turtle.forward()
  57. while b<7 do
  58.     cultiver()
  59.     b = b+1
  60. end
  61. turtle.turnRight()
  62. turtle.forward()
  63. turtle.turnRight()
  64. turtle.forward()
  65. b=0
  66. while b<6 do
  67.     cultiver()
  68.     b = b+1
  69. end
  70. turtle.back()
  71. turtle.turnLeft()
  72. turtle.forward()
  73. b=0
  74. while b<5 do
  75.     cultiver()
  76.     b = b+1
  77. end
  78. turtle.back()
  79. turtle.turnLeft()
  80. turtle.forward()
  81. turtle.turnLeft()
  82. b=0
  83. while b<6 do
  84.     cultiver()
  85.     b = b+1
  86. end
  87. turtle.back()
  88. turtle.turnRight()
  89. turtle.forward()
  90. turtle.turnRight()
  91. b=0
  92. while b<6 do
  93.     cultiver()
  94.     b = b+1
  95. end
  96. turtle.back()
  97. turtle.turnLeft()
  98. turtle.forward()
  99. turtle.turnLeft()
  100. b=0
  101. while b<6 do
  102.     cultiver()
  103.     b = b+1
  104. end
  105. turtle.back()
  106. turtle.turnRight()
  107. turtle.forward()
  108. turtle.turnRight()
  109. b=0
  110. while b<6 do
  111.     cultiver()
  112.     b = b+1
  113. end
  114. turtle.back()
  115. turtle.turnLeft()
  116. turtle.forward()
  117. turtle.turnLeft()
  118. b=0
  119. while b<6 do
  120.     cultiver()
  121.     b = b+1
  122. end
  123. turtle.turnRight()
  124. turtle.forward()
  125. turtle.turnLeft()
  126. turtle.forward()
  127. turtle.turnLeft()
  128. -- sleep(300)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement