Advertisement
jdroid91

nicoFix

Oct 6th, 2023
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. function refuel()
  2. cf = turtle.getFuelLevel()
  3. mf = turtle.getFuelLimit()
  4. fp = math.floor(cf/mf)*100
  5. if fp <= 50 then
  6. repeat
  7. turtle.select(2)
  8. turtle.refuel()
  9. until fp >=70
  10. end end
  11.  
  12. function TR()
  13. turtle.turnRight()
  14. turtle.forward()
  15. turtle.turnRight()
  16. end
  17.  
  18. function TL()
  19. turtle.turnLeft()
  20. turtle.forward()
  21. turtle.turnLeft()
  22. end
  23.  
  24. function keep()
  25. turtle.select(1)
  26. while turtle.detectDown() do
  27. for i = 3, 16 do
  28. turtle.select(i)
  29. turtle.dropDown()
  30. end end end
  31.  
  32. function farm()
  33. refuel()
  34. index = 5
  35. index2 = 5
  36. while true do
  37. while index > 0 do
  38. turtle.forward()
  39. index = index-1
  40.  
  41. while index == 0 and index2 == 5 do
  42. TL()
  43. index2 = index2-1
  44.  
  45. while index == 0 and index2 ==4 do
  46. TR()
  47.  
  48. index = 5
  49. end end end end end
  50.  
  51. farm()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement