Advertisement
ValveCantCount

fuelMaintain

Oct 30th, 2020 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. interface = peripheral.wrap("back")
  2. chest = peripheral.wrap("left")
  3. pulverizer = peripheral.wrap("right")
  4. items = interface.getAvailableItems()
  5. oreid = {}
  6.  
  7. for k,v in pairs(items) do
  8. if v.fingerprint.id == "BigReactors:YelloriteOre" then
  9. oreid = v.fingerprint
  10. break
  11. end
  12. end
  13.  
  14. while true do
  15. stack = chest.getStackInSlot(1)
  16. if stack.qty <= 32 then
  17. print("refueling...")
  18. interface.exportItem(oreid,"north",16)
  19. print("waiting for refueling to finish...")
  20. while not pulverizer.getStackInSlot(1) do
  21. os.sleep(1)
  22. end
  23. while pulverizer.getStackInSlot(1) do
  24. os.sleep(1)
  25. end
  26. print("refueling finished!")
  27. end
  28. os.sleep(1)
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement