print("Green level system check.")
print("For higher level system checks please check")
print("from said levels.")
print("Type 'check' to check green level systems.")
while true do
local input = read()
if input == "check" then
textutils.slowPrint("Checking systems...")
rednet.broadcast("gdcheck")
local did, dmessage = rednet.recieve(5)
if not dmessage then
print("Error: Door offline.")
end
rednet.broadcast("glcheck")
local lid, lmessage = rednet.recieve(5)
if not lmessage then
print("Error: Light system offline.")
end
else
print("Type 'check' to check green level systems.")
print("Go to a higher level to check higher level")
print("systems.")
end
if dmessage == "gdgood" then
print("Green door online.")
end
if lmessage == "glgood" then
print("Green lights online.")
end
end
Note: It's probably worth noting I don't use rednet.open("side") because the computer this runs on uses the new bg function in startup to run multiple programs, one of which already opens a wireless modem on the back.EDIT: fixed a couple spelling errors. I can never spell receive right. Now it just does the slow print "Checking systems..." and restarts from the beginning of the loop.
Edited by applesauce10189, 23 April 2014 - 01:56 PM.











