Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 KB | None | 0 0
  1. rednet.open("right")
  2. monitor = peripheral.wrap("back")
  3. term.redirect(monitor)
  4. term.setCursorBlink(false)
  5. term.setCursorPos(1,1)
  6. while true do
  7.   term.clear()
  8.   term.setCursorPos(1,1)
  9. --  os.pullEvent( "rednet_message" )
  10.   id,message = rednet.receive()
  11.   while id==5 do
  12.     if message==('system1') then
  13.       term.setTextColor(colors.pink)
  14.       term.write("hacking")
  15.     else
  16.       term.setTextColor(colors.white    )
  17.       term.write("system 1 ok")
  18.     end
  19.   end
  20.   os.sleep(1)
  21.   id,message = rednet.receive()
  22.   while id==6 do
  23.     if message==('system2') then
  24.       term.setTextColor(colors.pink)
  25.       print()
  26.       term.write("hacking")
  27.     else
  28.       term.setTextColor(colors.white)
  29.       print()
  30.       term.write("system 2 ok")
  31.     end
  32.   end
  33.   os.sleep(1)
  34.   id,message = rednet.receive()
  35.   while id==7 do
  36.     if message==('system3') then
  37.       term.setTextColor(colors.pink)
  38.       print()
  39.       term.write("hacking")
  40.     else
  41.       term.setTextColor(colors.white)
  42.       print()
  43.       term.write("system 3 ok")
  44.     end
  45.   end
  46.   os.sleep(5)
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement