Advertisement
dracoix

DM - Rule2

Nov 27th, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     --0123456789ABCDEF0123456789ABCDEF0123456789ABCDE
  2.     --0123456789ABCDEF0123456789AB
  3.      
  4.     local aText = {
  5.      "******** TOWN HELP ********",
  6.      "",
  7.      "Claim: (Need to be on plot)",
  8.      " '/plot claim'",
  9.      "Friends: (Adding Friends)",
  10.      " '/res friend add <name>",
  11.      " '/plot set perm friend on",
  12.      "Taxes: (50c per IRL day)",
  13.      " '/money' Checks your money",
  14.      " -Sell items at Spawn Shop",
  15.      " -Kill Mobs",
  16.      "Repo: (Lose Your Plot)",
  17.      " All items will be donated",
  18.      "to Dragons upon plot loss.",
  19.     }
  20.      
  21.     local sSide = "top"
  22.      
  23.     local function printCenter(mon, t)
  24.       local w, h = mon.getSize()
  25.       mon.clear()
  26.       local y = math.floor((h / 2) - (#t / 2))
  27.       for i, line in ipairs(t) do
  28.             local x = math.floor((w / 2) - (#line / 2))
  29.             mon.setCursorPos(x, y + i)
  30.             mon.write(line)
  31.       end
  32.     end
  33.      
  34.     local function printLeft(mon, t)
  35.       local w, h = mon.getSize()
  36.       mon.setTextScale(1)
  37.       mon.clear()
  38.       local y = math.floor((h / 2) - (#t / 2))
  39.       for i, line in ipairs(t) do
  40.             local x = 1
  41.             mon.setCursorPos(x, y + i)
  42.             mon.write(line)
  43.       end
  44.     end
  45.      
  46.     printLeft(peripheral.wrap(sSide), aText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement