Guest User

startup

a guest
Jun 27th, 2013
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  1. -- monitor redstone inputs and broadcast
  2. -- as required.
  3.  
  4. -- front = blue line
  5. -- left = red line
  6. -- back = orange line
  7. -- right = green line
  8.  
  9. -- initiate the wireless modem
  10. rednet.open("top")
  11.  
  12. while true do
  13.   os.pullEvent("redstone")
  14.  
  15.   -- check all inputs, broadcast as required
  16.     if rs.getInput("front") == true then
  17.       print("BLUE LINE ACTIVATE!")
  18.       rednet.broadcast("station_blue")
  19.     end
  20.  
  21.     if rs.getInput("left") == true then
  22.       print("RED LINE ACTIVATE!")
  23.       rednet.broadcast("station_red")
  24.     end
  25.    
  26.     if rs.getInput("back") == true then
  27.       print("ORANGE LINE ACTIVATE!")
  28.       rednet.broadcast("station_orange")
  29.     end
  30.    
  31.     if rs.getInput("right") == true then
  32.       print("GREEN LINE ACTIVATE!")
  33.       rednet.broadcast("station_green")
  34.     end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment