Advertisement
STATEDLIGHT

rules

Mar 19th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. local tText = {
  2. "RULES", -- you can change the lines here
  3. "1. No Griefing",
  4. "2. Do not build more than 5k from spawn",
  5. "3. PVP is allowed, but dont kill for items",
  6. "4. Do not steal/raid",
  7. "5. No racism or sexiest remarks",
  8. "6. Don't be an idiot",
  9. "7. Make sure you have fun :)"
  10. -- 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)
  11. }
  12. local sSide = "left"
  13. local nTextSize = 1 -- change the text size here (from 1 to 5)
  14.  
  15. local function printCenter(mon, t)
  16. local w, h = mon.getSize()
  17. local y = math.floor((h / 2) - (#t / 2)) - 1
  18. for i, line in ipairs(t) do
  19. local x = math.floor((w / 2) - (#line / 2))
  20. mon.setCursorPos(x, y + i)
  21. mon.write(line)
  22. end
  23. end
  24.  
  25. local mon = peripheral.wrap(sSide)
  26. mon.setTextScale(nTextSize)
  27. printCenter(mon, tText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement