Advertisement
Alexr360

Stargate Coords

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