Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monitor = peripheral.wrap("back")
- modem = peripheral.wrap("left")
- term.redirect(monitor) --output zum bildschirm
- term.clear() --bildschirm leeren
- monitor.setTextScale(1.25)
- currcharge = 0
- charges = {}
- --variable grenzen--
- local maxcharge = 300000000
- local stopcharge = 45000000
- local startcharge = 400000
- --------------------
- while true do
- term.setCursorPos(1,1)
- for i = 111, 116, 1 do
- modem.open(i)
- local a, b, kanal, d, charge, f = os.pullEvent("modem_message")
- charges[kanal] = tonumber(charge)
- currcharge = currcharge + charge
- modem.close(i)
- end
- term.setCursorPos(4, 1)
- term.setTextColor(colors.green)
- print("-==POWERNET OVERVIEW=-")
- term.setTextColor(colors.white)
- if rs.getInput("front") then
- term.setCursorPos(2,8)
- term.setBackgroundColor(colors.green)
- print(" Reaktor1 ")
- term.setCursorPos(2,9)
- print(" ")
- term.setCursorPos(2,10)
- print(" AN ")
- term.setBackgroundColor(colors.black)
- else
- term.setCursorPos(2, 8)
- term.setBackgroundColor(colors.red)
- print(" Reaktor1 ")
- term.setCursorPos(2, 9)
- print(" ")
- term.setCursorPos(2, 10)
- print(" AUS ")
- term.setBackgroundColor(colors.black)
- end
- if rs.getInput("bright") then
- term.setCursorPos(8,8)
- term.setBackgroundColor(colors.green)
- print(" Reaktor2 ")
- term.setCursorPos(8,9)
- print(" ")
- term.setCursorPos(8,10)
- print(" AN ")
- term.setBackgroundColor(colors.black)
- else
- term.setCursorPos(8, 8)
- term.setBackgroundColor(colors.red)
- print(" Reaktor2 ")
- term.setCursorPos(8, 9)
- print(" ")
- term.setCursorPos(8, 10)
- print(" AUS ")
- term.setBackgroundColor(colors.black)
- end
- term.setCursorPos(3,3)
- print("Stored: "..currcharge.."RF, "..math.floor(currcharge/3000000).."% ")
- currcharge = 0
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement