Advertisement
Guest User

test

a guest
Oct 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.51 KB | None | 0 0
  1. function checkInv()
  2.     for i = 3, 6 do
  3.         if turtle.getItemCount(i) < 10 then
  4.             fillInv()
  5.             break
  6.         end
  7.        
  8.     end
  9.    
  10. end
  11.  
  12. function fillInv()
  13.     turtle.select(1)
  14.     turtle.placeUp()
  15.     for i=1,9 do
  16.         turtle.suckUp()
  17.         sleep(0.5)
  18.     end
  19.     turtle.digUp()
  20.    
  21. end
  22.  
  23. function checkFuel()
  24.     print(tostring(turtle.getFuelLevel() ) )
  25.     if turtle.getFuelLevel() < 10000 then
  26.         turtle.select(2)
  27.         turtle.placeUp()
  28.         turtle.suckUp()
  29.         turtle.select(3)
  30.         turtle.refuel(2)
  31.         turtle.select(2)
  32.         turtle.digUp()
  33.     end
  34. end
  35.  
  36.  
  37. function wire()
  38.     for i=1,9 do
  39.         if i == 5 then
  40.             turtle.select(6)
  41.             turtle.turnLeft()
  42.             turtle.forward()
  43.             turtle.turnLeft()
  44.             turtle.turnLeft()
  45.             turtle.placeDown()
  46.             turtle.forward()
  47.             turtle.forward()
  48.             turtle.turnLeft()
  49.             turtle.turnLeft()
  50.             turtle.placeDown()
  51.             turtle.forward()
  52.             turtle.turnRight()
  53.         end
  54.         turtle.select(4)
  55.         turtle.placeDown()
  56.         turtle.select(5)
  57.         turtle.placeDown()
  58.         turtle.forward()
  59.     end
  60.    
  61. end
  62.  
  63. function spaceing()
  64.     for i=1,2 do
  65.         turtle.select(4)
  66.         turtle.placeDown()
  67.         turtle.select(5)
  68.         turtle.placeDown()
  69.         turtle.forward()
  70.     end
  71. end
  72. checkInv()
  73.  
  74. sleep(50)
  75. for i=1, 9 do
  76.     wire()
  77.     spaceing()
  78.  
  79. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement