Advertisement
Tomyf4

TurtleReactorInserter

Jan 30th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. reactordist = 9
  2.  
  3. while true do
  4. if turtle.getFuelLevel() > reactordist*2 then
  5. if turtle.suck() == true then
  6. turtle.suck()
  7. else
  8. print("Nothing in Chest")
  9. break
  10. end
  11. sleep(1)
  12. turtle.turnLeft()
  13. for i = 1, reactordist do
  14. turtle.forward()
  15. end
  16. sleep(1)
  17. if turtle.drop() == true then
  18. turtle.drop()
  19. else
  20. print("No place to put Fuel Rod")
  21. putinchest = 1
  22. end
  23. sleep(1)
  24. for j = 1, reactordist do
  25. turtle.back()
  26. end
  27. turtle.turnRight()
  28. sleep(1)
  29. if putinchest == 1 and turtle.drop() == true then
  30. turtle.drop()
  31. print("Since i was unable to insert fuel, returning it to chest")
  32. break
  33. elseif putinchest == 1 and turtle.drop() == false then
  34. print("Unable to insert into chest..stopping")
  35. break
  36. else
  37. print("Job's Done")
  38. break
  39. end
  40. else
  41. print("Needs more fuel")
  42. break
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement