xFlyDr

4 Wood Farmer

May 23rd, 2019
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. t=turtle
  2.  
  3. t.select(16)
  4. for i=1, 4 do
  5. t.place()
  6. t.turnRight()
  7. end
  8. t.up()
  9.  
  10. turtle.select(15)
  11. turtle.refuel(5)
  12.  
  13. print("The fuel level is: "..turtle.getFuelLevel())
  14.  
  15. while 1 == 1 do
  16. turtle.select(15)
  17. turtle.refuel(5)
  18.  
  19. print("The fuel level is: "..turtle.getFuelLevel())
  20. if not turtle.detect() then
  21. os.sleep(5)
  22. t.turnRight()
  23. else
  24. t.down()
  25. t.dig()
  26. t.forward()
  27. h=0
  28. while turtle.detectUp() do
  29. h=h+1
  30. t.digUp()
  31. t.up()
  32. end
  33. for i=1, h do
  34. t.down()
  35. end
  36.  
  37. t.back()
  38. t.select(16)
  39. t.place()
  40. t.up()
  41. t.turnRight()
  42. end
  43.  
  44. end
Add Comment
Please, Sign In to add comment