Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor");
- for a, b in pairs(rs.getSides()) do
- if peripheral.getType(b) == "sensor" then
- local prox = sensor.wrap(b);
- break
- end
- end
- for a, b in pairs(rs.getSides()) do
- if peripheral.getType(b) == "monitor" then
- mon = peripheral.wrap(b);
- break
- end
- end
- while true do
- tar = prox.getTargets();
- count = 0;
- for name, basicDetails in pairs(tar) do
- local moreDetails = prox.getTargetDetails(name);
- print(textutils.serialize(moreDetails))
- end
- sleep(1);
- end
Advertisement
Add Comment
Please, Sign In to add comment