Advertisement
MigasRocha

Cenouras New

Nov 25th, 2023
584
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. function refuel()
  2.  
  3.     if turtle.getFuelLevel() < 10 then
  4.         turtle.select(16)
  5.         turtle.placeUp()
  6.         turtle.suckUp()
  7.         turtle.refuel()
  8.         turtle.dropUp()
  9.         turtle.digUp()
  10.         turtle.select(1)
  11.     end
  12. end
  13.  
  14.  
  15.  
  16.  
  17. while true do
  18.     for frente =0,6 do
  19.         local sucess, data = turtle.inspect()
  20.         if sucess == true then
  21.             if data.state.age == 7 then
  22.                 turtle.dig()
  23.                 turtle.place()
  24.             end
  25.         end
  26.         turtle.turnLeft()
  27.         turtle.forward()
  28.         turtle.turnRight()
  29.     end
  30.        
  31.         refuel()
  32.         turtle.turnRight()
  33.  
  34.     for tras =0,6 do
  35.         turtle.forward()
  36.     end
  37.  
  38.     turtle.turnLeft()
  39.     if turtle.getItemCount(1) >= 1 then
  40.         turtle.select(1)
  41.         turtle.drop()
  42.        
  43.     end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement