thatparadox

PIMmfsu

Jul 16th, 2014
274
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mfsu = peripheral.wrap("front")
  2.  
  3. while true do
  4. for slot, qty in pairs(mfsu.getAllStacks()) do
  5. for k,v in pairs(mfsu.getStackInSlot(slot)) do
  6. if k == "maxEnergyStored" then
  7. maxEng = v
  8. elseif k == "energyStored" then
  9. eng = v
  10. end
  11. if eng == maxEng then
  12. rs.setOutput("top",true)
  13. os.sleep(0.1)
  14. rs.setOutput("top",false)
  15. end
  16. end
  17. end
  18. os.sleep(0.1)
  19. end
RAW Paste Data