Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local totalCap = 0
- local totalStore = 0
- local percent = 0
- local mfsu
- local capacitor = capacitors.get(capacitorName)
- os.startTimer(1)
- while true do
- totalCap = 10000000
- totalStore = peripheral.call("back", getEUStored())
- -- Calculate a percentage
- percent = math.ceil(totalStore / totalCap) * 100
- -- Analogue redstone output
- redstone.setAnalogOutput("right", (math.ceil(totalStore / totalCap) * 15))
- os.pullEvent("timer")
- os.startTimer(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment