Advertisement
dracoix

Dragons Market

Aug 17th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.31 KB | None | 0 0
  1. --0123456789ABCDEF0123456789ABCDEF0123456789ABCDE
  2.  
  3. local aText = {
  4.  "*************************************************",
  5.  " ",
  6.  " ",
  7.  " ",
  8.  "Welcome to Dragons' Market!",
  9.  " ",
  10.  " ",
  11.  " ",
  12.  "*************************************************",
  13. }
  14.  
  15. local bText = {
  16.   "*************************************************",
  17.   " ",
  18.   " ",
  19.   "We are one of the top factions!",
  20.   "Join us by '/f join Dragons'",
  21.   "Get gear at our landing base using '/f home'",
  22.   " ",
  23.   " ",
  24.   "*************************************************",
  25. }
  26.  
  27. local cText = {
  28.   "*************************************************",
  29.   " ",
  30.   " ",
  31.   "New to the server? Start out right!",
  32.   "Go mine, come trade, and get our tools!",
  33.   "Save yourself hours of mining.",
  34.   " ",
  35.   " ",
  36.   "*************************************************",
  37. }
  38.  
  39. local sSide = "back"
  40.  
  41. local function printCenter(mon, t)
  42.   local w, h = mon.getSize()
  43.   mon.clear()
  44.   local y = math.floor((h / 2) - (#t / 2))
  45.   for i, line in ipairs(t) do
  46.         local x = math.floor((w / 2) - (#line / 2))
  47.         mon.setCursorPos(x, y + i)
  48.         mon.write(line)
  49.   end
  50. end
  51.  
  52. while 0<1 do
  53. printCenter(peripheral.wrap(sSide), aText)
  54. os.sleep(5)
  55. printCenter(peripheral.wrap(sSide), bText)
  56. os.sleep(5)
  57. printCenter(peripheral.wrap(sSide), cText)
  58. os.sleep(5)
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement