Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --remote terminal program
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("Enter Password: ")
- sPassword = tostring(read())
- if sPassword == "Open Sesame" then
- rednet.send ( nDoorId, "safe to open" ) --nDoorId is the ID # of the door's computer
- end
- end
- --door program
- while true do
- ID, message = rednet.receive ( 5 )
- if ID == safeID and message == "safe to open" then --safeID being the remote terminal's ID #
- --do door opening code
- else
- os.sleep(0.5)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement