Guest User

startup

a guest
Jun 27th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. rednet.open("top")
  2.  
  3. while true do
  4.   local senderId, message, distance = rednet.receive()
  5.  
  6.   -- disable all the current lights
  7.  
  8.   redstone.setOutput("left", false)
  9.   redstone.setOutput("right", false)
  10.   redstone.setOutput("front", false)
  11.   redstone.setOutput("back", false)
  12.      
  13.              
  14.   if message == "station_orange" then
  15.     redstone.setOutput("left", true)
  16.   end
  17.  
  18.   if message == "station_red" then
  19.     redstone.setOutput("back", true)
  20.   end
  21.  
  22.   if message == "station_blue" then
  23.     redstone.setOutput("right", true)
  24.   end
  25.  
  26.   if message == "station_green" then
  27.     redstone.setOutput("front", true)
  28.   end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment