Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.wrap("right")
- rednet.open("right")
- if rednet.isOpen() then
- print("Rednet online")
- else
- print("Rednet failed to load")
- return
- end
- function recSig()
- local id, msg = rednet.receive()
- if id == 2 or id == 4 or id == 10 then
- if msg == "windmill" then
- if redstone.getOutput("top") then
- redstone.setOutput("top", false)
- else
- redstone.setOutput("top", true)
- end
- end
- end
- if msg == nil and redstone.getOutput("top") then
- sleep(10)
- redstone.setOutput("top", false)
- elseif msg == "windmill" and redstone.getOutput("top") then
- redstone.setOutput("top", false)
- end
- end
- while true do recSig() end
Advertisement
Add Comment
Please, Sign In to add comment