Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ######### DATOR 1
- rednet.open("SIDA")
- -- COMMAND LIST
- print("Type "wheat on/off" to enable/disable wheat farm")
- print("Type "tree on/off" to enable/disable tree farm")
- print("Type "rubber on/off" to enable/disable rubber farm")
- -- ON
- if message == "wheat on" then
- rednet.send(ID, "won")
- end
- if message == "tree on" then
- rednet.send(ID, "ton")
- end
- if message == "rubber on" then
- rednet.send(ID, "ron")
- end
- -- OFF
- if message == "wheat off" then
- rednet.send(ID, "woff")
- end
- if message == "tree off" then
- rednet.send(ID, "toff")
- end
- if message == "rubber off" then
- rednet.send(ID, "roff")
- end
- -- ENABLED/DISABLED LIST
- message = rednet.receive()
- -- ON
- if message == "won1" then
- print("Wheat farm [enabled]")
- end
- if message == "ton1" then
- print("Tree farm [enabled]")
- end
- if message == "ron1" then
- print("Rubber farm [enabled]")
- end
- -- OFF
- if message == "woff1" then
- print("Wheat farm [disabled]")
- end
- if message == "toff1" then
- print("Tree farm [disabled]")
- end
- if message == "roff1" then
- print("Rubber farm [disabled]")
- end
- -- ######### DATOR 2
- rednet.open("SIDA")
- message = rednet.receive()
- -- ON
- if message == "won1" then
- rs.setOutput("SIDA", true)
- rednet.send(ID, "won1")
- end
- if message == "ton1" then
- rs.setOutput("SIDA", true)
- rednet.send(ID, "ton1")
- end
- if message == "ron1" then
- rs.setOutput("SIDA", true)
- rednet.send(ID, "ron1")
- end
- -- OFF
- if message == "woff1" then
- rs.setOutput("SIDA", false)
- rednet.send(ID, "woff1")
- end
- if message == "toff1" then
- rs.setOutput("SIDA", false)
- rednet.send(ID, "toff1")
- end
- if message == "roff1" then
- rs.setOutput("SIDA", false)
- rednet.send(ID, "roff1")
- end
Advertisement
Add Comment
Please, Sign In to add comment