Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat
- shell.run("clear")
- write "Is the door O or C? "
- oc = string.lower(read())
- until oc == "o" or oc == "c"
- shell.run("clear")
- while true do
- if(rs.getInput("top"))then
- if(oc == "o")then
- rednet.broadcast("TurtleDoor.Close")
- oc = "c"
- print "Door Closing!"
- sleep(1) -- Amount of seconds it takes to close
- else
- rednet.broadcast("TurtleDoor.Open")
- oc = "o"
- print "Door Opening!"
- sleep(1) -- Amount of seconds it takes to open
- end
- shell.run("clear")
- else
- sleep(0.1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement