Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet_side = "top"
- raise_lift_message = "raise_lift"
- lower_lift_message = "lower_lift"
- activate_lift_message = "startup_lift"
- deactivate_lift_message = "shutdown_lift"
- -- This is the time delay in seconds before the lift starts moving.
- activation_delay = 3
- rednet.open(rednet_side)
- function bc (message)
- rednet.broadcast(message)
- end
- while true do
- command = io.read()
- if command == "r" then
- os.sleep(activation_delay)
- bc("raise_lift")
- bc("startup_lift")
- elseif command == "l" then
- os.sleep(activation_delay)
- bc("lower_lift")
- bc("startup_lift")
- elseif command == "a" then
- bc("startup_lift")
- elseif command == "d" then
- bc("shutdown_lift")
- end
- term.clear()
- term.setCursorPos(0, 0)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement