Advertisement
PaymentOption

Random Paste

Aug 29th, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. local tText = {
  2. "random gibberish"
  3. }
  4. local sSide = "right"
  5. local nTextSize = 2
  6. local function printCenter(mon, t)
  7. local w, h = mon.getSize()
  8. local y = math.floor((h / 3) - (#t / 3)) - 1
  9. for i, line in ipairs(t) do
  10. local x = math.floor((w / 5) - (#line / 5))
  11. mon.setCursorPos(x, y + i)
  12. mon.write(line)
  13. end
  14. end
  15. local mon = peripheral.wrap(sSide)
  16. mon.setTextScale(nTextSize)
  17. printCenter(mon, tText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement