Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Function to clear the screen
- local function clearScreen()
- term.clear()
- term.setCursorPos(1, 1)
- end
- -- Function to display a string with a label
- local function displayLabel(x, y, label, text)
- term.setCursorPos(x, y)
- term.setTextColor(colors.yellow)
- write(label .. ": ")
- term.setTextColor(colors.white)
- print(text)
- end
- -- Main function to run the program
- local function main()
- clearScreen()
- -- Initialize table to store strings and labels
- local strings = {
- {label = "Citadel", text = {14,6,10,2,20,33,23,17,0}},
- {label = "A-Base", text = {14,26,30,21,35,2,18,22,0}},
- {label = "Stripmine", text = {32,9,1,12,31,10,24,23,0}},
- {label = "Nether", text = {28,25,14,19,18,26,32,31,0}},
- {label = "Abydos", text = {26,6,14,31,11,29,0}},
- {label = "The End", text = {14,30,6,13,17,23,0}},
- {label = "Cavum Tenebrae", text = {18,7,3,36,25,15,0}},
- {label = "Chulak", text = {8,1,22,14,36,19,0}},
- {label = "Otherside", text = {21,38,36,34,35,37,0}}
- }
- -- Display strings and labels
- for i, data in ipairs(strings) do
- displayLabel(1, i, data.label, data.text)
- end
- end
- -- Run the main function
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement