Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t = peripheral.wrap("monitor_49")
- local store = {peripheral.wrap("draconic_rf_storage_0"), peripheral.wrap("draconic_rf_storage_1")}
- function toRead(l)
- local pow = math.floor(math.log(l)/math.log(1000))
- local temp = {"","K","M","B","T","Q"}
- return (math.ceil( ( ( l/ (1000^pow) )*1000 )-0.5)/1000)..temp[pow+1]
- end
- while true do
- os.queueEvent("random_event")
- os.pullEvent()
- t.clear()
- local st = (store[1]).getEnergyStored()+(store[2]).getEnergyStored()
- t.setCursorPos(10,1)
- t.write("Rf/Stored")
- t.setCursorPos(2,2)
- t.setTextScale(3)
- t.write(toRead(st).. " Rf/Stored.")
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement