Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wirelessSide = "back" --the pocket computer modem is always on the back
- local wireless = peripheral.wrap(wirelessSide)
- rednet.open(wirelessSide)
- print("Opened modem on "..wirelessSide.." side")
- wireless.open(65535) -- adding this channel will allow rednet repeaters to send the message farther
- rednet.send(9, "request") --put then ID of your reactor linked computer (the one running the server code) where 9 is.
- if rednet.receive(2) then --wait 2 seconds to get a reply from the reactor server or assume it is busy
- id, message = rednet.receive()
- print ("Reactor Computer " .. id .. " answered")
- print ("-" .. message .. " ")
- i, m = rednet.receive() --shouldn't this be id not i?
- print ("-" .. m .. " ")
- id2, m2 = rednet.receive()
- print ("-" .. m2 .. " ")
- os.sleep(3) --give the user 3 seconds to read the information before clearing and returning to the main shell
- term.clear()
- term.setCursorPos(1,1)
- --error()
- --os.reboot()
- return
- else
- print("The reactor was busy, please try again.")
- sleep(1)
- return
- end
- return
- -- The Server computer program is at /AGq32UqZ
- -- Original code by Dukrobber
- -- Updates by blackrabt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement