Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("label set Redstoner")
- shell.run("clear")
- rednet.close("right")
- rednet.close("left")
- rednet.close("top")
- rednet.close("bottom")
- rednet.close("front")
- rednet.close("back")
- if peripheral.isPresent("right") then
- print("Opening Modem on the right...")
- rednet.open("right")
- end
- if peripheral.isPresent("left") then
- print("Opening Modem on the left...")
- rednet.open("left")
- end
- if peripheral.isPresent("top") then
- print("Opening Modem on the top...")
- rednet.open("top")
- end
- if peripheral.isPresent("bottom") then
- print("Opening Modem on the bottom...")
- rednet.open("bottom")
- end
- if peripheral.isPresent("front") then
- print("Opening Modem on the front...")
- rednet.open("front")
- end
- if peripheral.isPresent("back") then
- print("Opening Modem on the back...")
- rednet.open("back")
- end
- x,y,z=rednet.receive()
- print(y)
- if y == "on" then
- redstone.setOutput("right", true)
- redstone.setOutput("left", true)
- redstone.setOutput("front", true)
- redstone.setOutput("back", true)
- redstone.setOutput("top", true)
- redstone.setOutput("bottom", true)
- shell.run("startup")
- end
- if y == "off" then
- redstone.setOutput("right", false)
- redstone.setOutput("left", false)
- redstone.setOutput("front", false)
- redstone.setOutput("back", false)
- redstone.setOutput("top", false)
- redstone.setOutput("bottom", false)
- shell.run("startup")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement