Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
- else
- print("oops")
- print(pos[2])
- print(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 = {"Hyper Kinetic Lens", "Red Matter Furnace", "Computercraft", "Volcanite Amulet", "Black Hole Chest", "Mercurial Eye", "Black Hole Band", "Watch of Flowing Time", "Evertide Amulet", "Nova Catalyst", "Wireless Tracker", "Destruction Catalyst", "Wireless Transceiver", "Wireless Sniffer", "Wireless Remote", "Wireless Map", "World Anchor", "Rings Of Arcana", "Nova Cataclysm", "Gem Armor", "Void Ring", "Nukes, TNT, ITNT, Dynamite, Sticky Dynamite", "Alchemical Tome", "DarkMatter Pedestal", "Teleport Tether", "REP", "Mining Laser", "Crafting Bench 3", "All Energy Collectors","Block Breaker", "Terraformer","RM Tools & Armor", "DM Tools & Armor", "Philosopher's Stone"}
- term.clear()
- term.setCursorPos(1,1)
- pcenter("--Banned List--")
- local size={term.getSize()}
- scrollat(tBanned,3,size[2]-1,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement