mattjeanes

Quiz v2

Nov 14th, 2012
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.99 KB | None | 0 0
  1. function PLUGIN:GetTopics()
  2.     local t = {}
  3.     t.Names = {
  4.         "General Knowledge",
  5.         "Mathematics",
  6.         "Gaming",
  7.         "Computers"
  8.     }
  9.     t[1] = {
  10.         {"Who invented the first plane?", "The Wright Brothers"},
  11.         {"What is the capital of Australia?", "Canberra"},
  12.         {"What year did the Titanic sink?", "1912"},
  13.         {"What is the longest river in the world?", "Nile"},
  14.         {"What year was the British Queen's Diamond Jubilee?", "2012"},
  15.         {"Where was the 2012 Olympics Held?", "London"},
  16.         {"How many legs does a spider have?", "8"},
  17.         {"What does HTTP stand for?", "Hypertext Transfer Protocol"},
  18.         {"What year did World War 1 begin in?", "1914"},
  19.         {"What was Hitler's hobby before he became a Nazi?", "Art"},
  20.         {"Who keeps singing about babies?", "Justin Bieber"},
  21.         {"What is the most well-known dinosaur? (Spell it right!)", "Tyrannosaurus Rex"},
  22.         {"Who is the current US President?", "Obama"},
  23.         {"What is our planet named?", "Earth"},
  24.         {"What is 'Disneys' first name?", "Walt"}
  25.     }
  26.     t[2] = {
  27.         {"25+37", "62"},
  28.         {"99/3", "33"},
  29.         {"57-22", "35"},
  30.         {"What is 3 cubed?", "27"},
  31.         {"What's Pi to 3 decimal points?", "3.141"},
  32.         {"41*3", "123"},
  33.         {"What is 1+2+3...+1000", "500500"},
  34.         {"4^3", "64"},
  35.         {"237+953", "1190"},
  36.         {"666-321", "345"},
  37.         {"What does '^' do?", "Power"},
  38.         {"Who made the formula A^2 + B^2 = C^2?", "Pythagoras"},
  39.         {"(3*40)/2", "60"},
  40.         {"2+2", "4"},
  41.         {"23*3", "69"}
  42.     }
  43.     t[3] = {
  44.         {"Who's the C.E.O. of VALVe?", "Gabe Newell"},
  45.         {"What year was VALVe Corporation founded?", "1996"},
  46.         {"What year was Garry's Mod 10 released on Steam?", "2006"},
  47.         {"What was the third Elder Scrolls game?", "Morrowind"},
  48.         {"What company owns Garry's Mod?", "Facepunch Studios"},
  49.         {"What's the first Battlefield game?", "1942"},
  50.         {"Who originally created Minecraft?", {"Notch", "Markus Persson"}},
  51.         {"Name of the robot companion from Borderlands?", "Claptrap"},
  52.         {"What does Louis from Left 4 Dead often grab?", {"Pills", "Pillz"}},
  53.         {"What year was Left 4 Dead 2 released in?", "2009"},
  54.         {"Now you're thinking with..?", "Portals"},
  55.         {"What game by Digipen features the DeLorean?", "Nitronic Rush"},
  56.         {"Who made the original GMod Idiot Box?", "DasBoSchitt"}
  57.     }
  58.     t[4] = {
  59.         {"What does PC stand for? ", "Personal Computer"},
  60.         {"What is a keyboard an example of?", "Hardware"},
  61.         {"What does RAM stand for?", "Random Access Memory"},
  62.         {"What is the smallest measurement of memory", "Byte"},
  63.         {"What does ROM stand for?", "Read Only Memory"},
  64.         {"What does CPU stand for?", "Central Processing Unit"},
  65.         {"What two numbers are used in binary?", {"1 and 0", "1 0"}},
  66.         {"What is CPU speed measured in?", "Giga Hertz"},
  67.         {"What company makes Windows OS?", "Microsoft"},
  68.         {"How many MBs in 1GB?", "1024"}
  69.     }
  70.     for a=1,#t do
  71.         for i = #t[a], 2, -1 do -- backwards
  72.             local r = math.random(i) -- select a random number between 1 and i
  73.             t[a][i], t[a][r] = t[a][r], t[a][i] -- swap the randomly selected item to position i
  74.         end
  75.     end
  76.     return t
  77. end
Advertisement
Add Comment
Please, Sign In to add comment