Advertisement
Guest User

sign

a guest
Jan 24th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. function startMonitor()
  2.    monitor = peripheral.wrap("back")
  3.    wm, hm = monitor.getSize()
  4.    monitor.setTextScale(2)
  5.    term.setTextColor(colors.orange)
  6. end
  7. startMonitor()
  8.  
  9. local cwrite = function(text)
  10.                 local x2,y2 = monitor.getCursorPos()
  11.                 local x,y = monitor.getSize()
  12.                 monitor.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
  13.                
  14.             monitor.write(text)
  15. end
  16.  
  17. cwrite("Applied Energistics")  -- centers printed text to monitor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement