Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- net = peripheral.wrap("left")
- bridge = peripheral.wrap("bottom")
- --methods = net.callRemote("me_access_terminal_2","listMethods")
- local t = "me_access_terminal_2"
- while true do
- local m = peripheral.wrap("top")
- m.clear() -- clear monitor
- bridge.clear() -- clear OPglasses
- -- variables
- totalbytes = net.callRemote(t,"getTotalBytes")
- usedbytes = net.callRemote(t,"getUsedBytes")
- freebytes = net.callRemote(t,"getFreeBytes")
- remainingtypes = net.callRemote(t,"getRemainingItemTypes")
- totaltypes = net.callRemote(t,"getTotalItemTypes")
- usedtypes = net.callRemote(t,"getStoredItemTypes")
- m.setCursorPos(2,1)
- m.setTextScale(1)
- m.write("ME Storage Status")
- m.setCursorPos(4,2)
- m.write(freebytes.." Bytes free of "..totalbytes.." Bytes")
- m.setCursorPos(4,3)
- m.write(remainingtypes.." ItemTypes free of "..totaltypes.." ItemTypes")
- --ByteCalc [[
- cc1 = usedbytes / totalbytes
- cc2 = cc1 * 100
- cc2 = math.ceil(cc2)
- aaa1 = totalbytes - freebytes
- aaa2 = aaa1 / totalbytes
- aaa3 = aaa2 * 100
- aaa3 = math.ceil(aaa3)
- --ByteCalc End
- --TypeCalc [[
- cc3 = usedtypes / totaltypes
- cc4 = cc3 * 100
- cc4 = math.ceil(cc4)
- ccc1 = totaltypes - remainingtypes
- ccc2 = ccc1 / totaltypes
- ccc3 = ccc2 * 100
- ccc3 = math.ceil(ccc3)
- --TypeCalc End
- text1 = bridge.addText(5,5,freebytes.." Bytes free of "..totalbytes.." Bytes",0xFFFFFF)
- text1.setText(freebytes.." Bytes free of "..totalbytes.." Bytes")
- text1.setScale(0.7)
- box1 = bridge.addBox(3,11,102,7,0x000000,0.8)
- box2 = bridge.addBox(4,12,100,5,0xFFFFFF,0.2)
- box3 = bridge.addBox(4,12,aaa3,5,0x3399FF,0.8)
- txtp1 = bridge.addText(107,12,aaa3.."%",0xFFFFFF)
- text2 = bridge.addText(5,25,remainingtypes.." ItemTypes free of "..totaltypes.." ItemTypes",0xFFFFFF)
- text2.setText(remainingtypes.." ItemTypes free of "..totaltypes.." ItemTypes")
- text2.setScale(0.7)
- box4 = bridge.addBox(3,31,102,7,0x000000,0.8)
- box5 = bridge.addBox(4,32,100,5,0xFFFFFF,0.2)
- box6 = bridge.addBox(4,32,ccc3,5,0x3399FF,0.8)
- txtp2 = bridge.addText(107,32,ccc3.."%",0xFFFFFF)
- --FIX for layer issues...
- box1.setZIndex(1)
- box2.setZIndex(2)
- box3.setZIndex(3)
- box4.setZIndex(1)
- box5.setZIndex(2)
- box6.setZIndex(3)
- text1.setZIndex(100)
- sleep(1.0)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement