Advertisement
Guest User

monctrl

a guest
Jun 1st, 2013
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. term.write("Looking for connected devices:")
  2.  
  3. for i, dev in pairs(peripheral.getNames()) do
  4.   print()
  5.   term.write("  " .. dev)
  6.   if(peripheral.getType(dev) == "monitor") then
  7.     term.write(" ready")
  8.     local mon = peripheral.wrap(dev)
  9.     mon.setBackgroundColor(colors.white)
  10.     mon.setTextColor(colors.black)
  11.     mon.setTextScale(2)
  12.     mon.setCursorPos(1,1)
  13.     mon.clear()
  14.     -- zacatek vypisu textu
  15.     mon.write(" Vitejte na")
  16.     mon.setCursorPos(3, 2)
  17.     mon.write(" Promenade!")
  18.   end
  19. end
  20. print()
  21. print("script ended")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement