mineral = { ["Native Copper"]="Rusty looking", ["Graphite"]="Black/Dirt looking", ["Dolomite"]="White/crystal-like", ["Calcite"]="Clear/Crystal like", ["Pyrite"]="Gold looking", ["Chalcopyrite"]="Gold looking", ["Alabaster"]="No desc. Alabaster", ["Selenite"]="Crystal glass like", ["Satin spar"]="Pink shing", ["Barite"]="Shiny", ["Crystalline Quartz"]="Diamond look", ["Rose Quartz"]="Pinkish/Crystal look", ["Chert"]="Yellow/Tan color", ["Chalcedony"]="Crystal look", ["Orhtoclase Feldspar"]="Pinkish", ["Plagioclase Feldspar"]="Yellowish", ["Biotite Mica"]="Brown/Black flaky", ["Muscovite Mica"]="Shiny/Flaky", ["Talc"]="Grey", ["Kaolin"]="White/Chalky", ["Hornblende"]="No desc. Hornblende", ["Spodumene"]="White/grey", ["Tourmaline"]="Green/blue color", ["Magnetite"]="No desc. Magnetite", ["Hematite"]="Rusty", ["Limonite"]="Dark brown", ["Bauxite"]="Orange/brown color", ["Fluorite"]="Sea green", ["Halite"]="Crystal like plastic", ["Apatite"]="Food lol." } local function getRandomIndexes(t) local count = 0 for i,v in pairs(t) do count = count + 1 end local rand1 = math.random(count/3) local rand2 = rand1 + math.random(count/3) local rand3 = rand2 + math.random(count/3) local res1, res2, res3 local num = 1 for index, _ in pairs(t) do if num == rand1 then res1 = index end if num == rand2 then res2 = index end if num == rand3 then res3 = index end num = num + 1 end return res1, res2, res3 end term.clear() term.setCursorPos(1,1) while true do sel = math.random(1,3) numq, numw, nume = getRandomIndexes(mineral) print("The mineral description is!") print(mineral[numq].." ..") print("") print("The three ones are") if sel == 1 then print(numq) print(numw) print(nume) elseif sel == 2 then print(numw) print(numq) print(nume) else print(numw) print(nume) print(numq) end print("") resp = read() if resp == numq then print("Correct!") sleep(1) else print("Wrong.. The right one is..") print(numq) sleep(1) end term.clear() term.setCursorPos(1,1) end