Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("monitor_38")
- node = peripheral.wrap("tt_aspectContainer_132")
- rednet.open("back")
- max = "init"
- function checknode()
- if not peripheral.isPresent("tt_aspectContainer_132") then
- mon.clear()
- mon.setTextScale(.5)
- mon.setCursorPos(5,25)
- mon.write("Reboot the Node's peripheral")
- sleep(5)
- node = peripheral.wrap("tt_aspectContainer_132")
- checknode()
- end
- mon.clear()
- mon.setTextScale(.5)
- mon.setCursorPos(10,1)
- mon.write("Current Node Contain :")
- line = 2
- maxaspect = 1
- aspectslist = node.getAspects()
- for k,v in pairs(aspectslist) do
- line = line + 1
- aspectcount = node.getAspectCount(v)
- mon.setCursorPos(10,line)
- if max == v then
- mon.setTextColor(colors.green)
- end
- mon.write(v .."")
- mon.setCursorPos(23,line)
- mon.write(": ".. aspectcount)
- mon.setTextColor(colors.white)
- if maxaspect < aspectcount then
- maxaspect = aspectcount
- max = v
- end
- end
- --if minaspect < 10 then
- --valmsg = "no"
- --end
- --if minaspect > 10 then
- -- valmsg = "yes"
- -- end
- --print(valmsg)
- end
- while true do
- checknode()
- sleep(1)
- end
Add Comment
Please, Sign In to add comment