Advertisement
Guest User

start

a guest
Oct 30th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. local tText = {
  2. "Welcome to TrilogyGames",
  3. "Feed The Beast Monster",
  4. "Server",
  5. "http://trilogygames.org/"
  6. -- and you can add more if you want, just don't forget to put the commas (,) at the end of the lines (except for the last one)
  7. }
  8. local sSide = "left"
  9. local nTextSize = 1 -- change the text size here (from 1 to 5)
  10.  
  11. local function printCenter(mon, t)
  12.   local w, h = mon.getSize()
  13.   local y = math.floor((h / 2) - (#t / 2)) - 1
  14.   for i, line in ipairs(t) do
  15.         local x = math.floor((w / 2) - (#line / 2))
  16.         mon.setCursorPos(x, y + i)
  17.         mon.write(line)
  18.   end
  19. end
  20.  
  21. local mon = peripheral.wrap("top")
  22. mon.setTextScale(2.5)
  23. mon.setTextColour(2)
  24. printCenter(mon, tText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement