Advertisement
Guest User

startup

a guest
Apr 16th, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. local host = 1
  2. rednet.open("front")
  3. local mon = peripheral.wrap("top")
  4. mon.setBackgroundColor(colors.black)
  5. mon.clear()
  6. rednet.send(host,"ping")
  7. local status = rednet.receive()
  8. mon.setBackgroundColor(tonumber(status))
  9. mon.clear()
  10. while true do
  11.   local event, a, b = os.pullEvent()
  12.   if event == "rednet_message" and a == host then
  13.     mon.setBackgroundColor(tonumber(status))
  14.     mon.clear()
  15.   elseif event == "monitor_touch" then
  16.     rednet.send("host","open")_
  17.   end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement