Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- INFO
- -- Computer muss mit einem Wired Modem an das ME-System angeschlossen
- -- und dann Aktiviert werden.
- -- Nur 2 Monitore müssen aufstellen da es nicht für mehr gedacht ist.
- -- Aufbau:
- -- Computer = C
- -- ME Controller = M
- -- Wired Modem = W
- -- Networking Cable = N
- -- Monitor = B
- -- Muss so aufgestellt werden: B-B-C-W-N-N-N-N-W-M
- -- Diese Variablen bitte richtig einstellen!
- meAdapter = "" -- Wired Modem Seite
- monitor = "" -- Monitor Seite
- Controller = "" -- Name des ME Controllers
- ------------------------------------------------------------------------
- types = 0
- bytes = 0
- net = peripheral.wrap(meAdapter)
- mon = peripheral.wrap(monitor)
- while true do
- maxTypes = net.callRemote(Controller,"getTotalItemTypes")
- curTypes = net.callRemote(Controller,"getStoredItemTypes")
- maxBytes = net.callRemote(Controller,"getTotalBytes")
- curBytes = maxBytes - net.callRemote(Controller,"getFreeBytes")
- types = curTypes/maxTypes
- types = types * 100
- types = math.floor(types+.5)
- bytes = curBytes/maxBytes
- bytes = bytes * 100
- bytes = math.floor(bytes+.5)
- mon.setCursorPos(1,1)
- mon.write("[ ] ")
- mon.setCursorPos(1,4)
- mon.write("[ ] ")
- if types > 9 then
- for i = 1,string.sub(types,0,1) do
- mon.setCursorPos(i + 1,1)
- mon.write("o")
- end
- end
- if bytes > 9 then
- for i = 1,string.sub(bytes,0,1) do
- mon.setCursorPos(i + 1,4)
- mon.write("o")
- end
- end
- if types == 100 then
- mon.setCursorPos(2,1)
- mon.write("oooooooooo")
- end
- if bytes == 100 then
- mon.setCursorPos(2,4)
- mon.write("oooooooooo")
- end
- mon.setCursorPos(1,2)
- mon.write("Types zu "..types.."% voll")
- mon.setCursorPos(1,5)
- mon.write("Bytes zu "..bytes.."% voll")
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment