mackpack

Rainmaker

Mar 24th, 2013
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. box = peripheral.wrap("right")
  2. while true do
  3.     event1, player, message = os.pullEvent("chat")
  4.     if ( string.lower(message) == "rain off" ) and ( rs.getInput("left") == true ) then
  5.         rs.setOutput("front", true)
  6.         sleep(1)
  7.         rs.setOutput("front", false)
  8.     elseif ( string.lower(message) == "rain on" ) and ( rs.getInput("left") ~= true ) then
  9.         rs.setOutput("back", true)
  10.         sleep(1)
  11.         rs.setOutput("back", false)
  12.     end
  13.     sleep(1)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment