Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Config --
- monSide = "right" -- Side the monitor is on relative to the computer --
- title = " -- DirePlayers -- " -- Title of the list --
- opstitle = " -- DireOP's -- " -- OP's Title --
- adminstitle = " -- DireAdmins -- " -- Admins Title --
- playerstitle = " -- DireMembers -- " -- Players Title --
- ops = {
- "Zatharus28",
- "MoparDan"
- }
- admins = {
- "Drega1642",
- "Tikaran"
- }
- players = {
- "RustikGaming",
- "Wolfpax181",
- "AnotherPlatypus",
- "Desexeh",
- "Kibakichi",
- "MaliceRoyal",
- "RyuMarksmen",
- "SoulLion",
- "Malsvir_Sjach",
- "TutorMC"
- }
- -- Code --
- -- mon = peripheral.wrap(monSide)
- -- term.redirect( mon )
- local function pcenter(input)
- local size = {term.getSize()}
- local pos = {term.getCursorPos()}
- if input then
- term.setCursorPos(size[1] / 2 - string.len(input) / 2, pos[2])
- write(input)
- end
- end
- local function scrollat(input, starty, endy, delay)
- if not input then
- term.clear()
- term.setCursorPos(1, 1)
- print("USAGE: scrollat(table-of-scrolling-values, y-value-at-which-the-nest-starts, y-value-at-which-the-nest-stops, the-time-in-seconds-between-each-scroll)")
- end
- if type(input) ~= "table" then
- print("incorrect input")
- return nil
- end
- delay = delay or 1
- local scrolled = 0
- while true do
- for y = starty, endy do
- term.setCursorPos(1, y)
- local current = y + scrolled - starty + 1
- if current > #input then
- current = current - #input
- end
- local size = {term.getSize()}
- for a = 1, size[1] - 1 do
- write(" ")
- end
- pcenter(input[current])
- end
- scrolled = scrolled + 1
- if scrolled > #input then
- scrolled = 1
- end
- sleep(delay)
- end
- end
- local tBanned = {}
- table.insert(tBanned, opstitle)
- for i = 1, #ops do table.insert(tBanned, ops[i]) end
- table.insert(tBanned, " ")
- table.insert(tBanned, adminstitle)
- for i = 1, #admins do table.insert(tBanned, admins[i]) end
- table.insert(tBanned, " ")
- table.insert(tBanned, playerstitle)
- for i = 1, #players do table.insert(tBanned, players[i]) end
- table.insert(tBanned, " ")
- term.clear()
- term.setCursorPos(1, 1)
- pcenter(title)
- local size = {term.getSize()}
- scrollat(tBanned, 3, size[2] - 1, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement