kriNon

Untitled

Dec 29th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. local totalStore = 0
  2. local percent = 0
  3. local mfsu
  4. local totalCap = 10000000
  5. public totalStore = 0
  6.  
  7. os.startTimer(1)
  8.  
  9. while true do
  10. totalCap = 10000000
  11. totalStore = peripheral.call("back", getEUStored())
  12.  
  13. -- Calculate a percentage
  14. percent = math.ceil(totalStore / totalCap) * 100
  15.  
  16. -- Analogue redstone output
  17. redstone.setAnalogOutput("right", (math.ceil(totalStore / totalCap) * 15))
  18.  
  19. os.pullEvent("timer")
  20. os.startTimer(1)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment