Xyzzy

rain

Mar 29th, 2015
235
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("top")
  2. rsSide = "right"
  3.  
  4. while true do
  5.   local id, msg = rednet.receive()
  6.   print(msg)
  7.   if msg == "rainoff" then
  8.     if rs.getInput("back", true) then
  9.       print("received command")
  10.       rs.setOutput(rsSide, true)
  11.       sleep(1)
  12.       rs.setOutput(rsSide, false)
  13.       rednet.send(id, "done")
  14.       print("done")
  15.     else
  16.       print("received command")
  17.       print("not raining")
  18.       rednet.send(id, "norain")
  19.       print("done")
  20.     end
  21.   end
  22.   sleep(0.1)
  23. end
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×