Advertisement
nobotious

reactor refiller

Jul 25th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. reactor = peripheral.wrap("left")
  2. local depleted = "down"
  3. local fresh = "up"
  4. while true do
  5. local i = 1
  6. repeat
  7. print(i)
  8.  
  9.  
  10. if reactor.getStackInSlot(i)~=nill then
  11. if reactor.getStackInSlot(i).name=="reactorUraniumSimple" then
  12. print("FILLED")
  13. sleep(1)
  14. else
  15. print("DEPLETED")
  16. reactor.pushItem(depleted,i)
  17. print("ROD REMOVED")
  18. reactor.pullItem(fresh,2,1,i)
  19. print("NEW ROD INSERTED")
  20. sleep(1)
  21. end
  22. end
  23.  
  24. if reactor.getStackInSlot(i)==nill then
  25. print("EMPTY SLOT")
  26. reactor.pullItem(fresh,2,1,i)
  27. print("NEW ROD INSERTED")
  28. sleep(1)
  29. end
  30. i = i + 2
  31. until i == 55
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement