Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- shell.run("redstone", "set", "left", "15")
- while true do
- senderId, msg, protocol = rednet.receive()
- print(senderId)
- print(msg)
- print(protocol)
- if (msg == "left") and (senderId == 43) then
- print(msg .. " command received, redstone off")
- shell.run("redstone", "set", "left", "0")
- elseif (msg ~= "left") then
- print(msg .. " command received, redstone on")
- shell.run("redstone", "set", "left", "15")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement