Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.find("monitor")
- local periphList = peripheral.getNames()
- local function rebootAtSixTwentyFiveAM()
- local curTime = os.time()
- if curTime >= 6.20 and curTime <= 6.30 then
- local file
- local mode = fs.exists("reboot.log") and "a" or "w"
- file = fs.open("reboot.log", mode)
- file.write("(E:L10) OS Reboot: " .. os.date() .. "\n")
- file.close()
- os.reboot()
- end
- end
- while true do
- sleep(1)
- rebootAtSixTwentyFiveAM()
- local items = {}
- local pen = 0
- for i, periphName in pairs(periphList) do
- print("Cell")
- local periphType = peripheral.getType(periphName)
- if periphType == "ae2:energy_cell" then
- local Drive = peripheral.wrap(periphName)
- items = Drive.items()
- pen = pen + 1
- else
- if pen > 0 then
- break
- end
- sleep(5)
- print("No Cells")
- local file
- local mode = fs.exists("reboot.log") and "a" or "w"
- file = fs.open("reboot.log", mode)
- file.write("EBR:L29 OS Reboot: " .. os.date() .. "\n")
- file.close()
- os.reboot()
- end
- end
- monitor.clear()
- x, y = monitor.getSize()
- monitor.setTextColor(colors.purple)
- for i = 1, x do
- monitor.setCursorPos(i, 3)
- monitor.write(string.rep("-", i))
- end
- monitor.setTextColor(colors.white)
- monitor.setCursorPos(1, 1)
- monitor.write("Top 10 Biggest Items!")
- for i = 1, #items do
- monitor.setCursorPos(2, i)
- monitor.write(items[i])
- end
- end
- --getPatternsFor
- --getChannelEnergyDemand
- --getAverageEnergyIncome
- --pushItem
- --getCraftingCPUs
- --getCraftableItems
- --items
- --scheduleCrafting
- --pullFluid
- --tanks
- --getEnergyCapacity
- --getAverageEnergyDemand
- --getCraftableFluids
- --getChannelInformation
- --pushFluid
- --pullItem
- --getEnergy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement