Advertisement
Guest User

monitor

a guest
Jul 27th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. local mon = peripheral.wrap("top")
  2. local x,y = mon.getSize()
  3.  
  4.  
  5. mon.clear()
  6. mon.setCursorPos(1,1)
  7.  
  8. function horBar()
  9.   for i=1, x do
  10.     mon.write('-')
  11.   end
  12. end
  13.  
  14. function vertBar()
  15.   for i=2, y-1 do
  16.     mon.setCursorPos(1,i)
  17.     mon.write('|')
  18.     mon.setCursorPos(x,i)
  19.     mon.write('|')
  20.   end
  21. end
  22.  
  23. local array logo = {"",
  24.  
  25.  
  26. horBar()
  27. vertBar()
  28. mon.setCursorPos(1,y)
  29. horBar()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement