Advertisement
Guest User

trivia

a guest
Apr 27th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.76 KB | None | 0 0
  1. ---------------------------------
  2. --Game Set-up
  3. ---------------------------------
  4.     modeSet = 1
  5.     --[[#0 = Normal || #1 = QnA Only || #2 = TnF Only]]--
  6.     roundTime = true
  7.     --[[#true = Longer Round Time || #false = Shorter Round Time]]--
  8.    
  9. ---------------------------------
  10. --Questions/Statements
  11. ---------------------------------
  12.     multipleChoice = {}
  13.     --[[ multipleChoice[#] = {question = "?", answer1 = "A", answer2 = "B", answer3 = "C", correctAnswer = "D", score = 999} ]]--
  14.     trueAndFalse = {}
  15.     --[[ trueAndFalse[#] = {statement = ".", answer = "true 3/false 4", score = 999} ]]--
  16.    
  17. ------List your multipleChoice questions here.
  18.     multipleChoice[1] = {question = "Quién creo Duck land?", answer1 = "Yoab", answer2 = "palacioslau", answer3 = "Maximoya", correctAnswer = "Loremg", score = 999}
  19.     multipleChoice[2] = {question = "Qué miembro ha sido más veces expulsado?", answer1 = "Yoab", answer2 = "Palacioslau", answer3 = "Mmechitass", correctAnswer = "Shockraver", score = 999}
  20.     multipleChoice[3] = {question = "Qué parejas son reales en la tribu?", answer1 = "Yoab y Saranud", answer2 = "Chibilucia y loremg", answer3 = "Maximoya y agentegatu", correctAnswer = "Loremg y Palo", score = 999}
  21.     multipleChoice[4] = {question = "Cuántos puntos obtuvieron los patos momo", answer1 = "0", answer2 = "4", answer3 = "3", correctAnswer = "2", score = 999}
  22.        multipleChoice[5] = {question = "Quién regaló pieles a casi toda la tribu?", answer1 = "Plasmx", answer2 = "José", answer3 = "Yoab", correctAnswer = "Saranud", score = 999}
  23.     multipleChoice[6] = {question = "Catros ama a?", answer1 = "Loremg", answer2 = "THEJKB", answer3 = "anoniimouser", correctAnswer = "Mocodulce", score = 999}
  24.     multipleChoice[7] = {question = "Quién es el miembro que jamás se conecta?", answer1 = "Altdemaxi", answer2 = "Loremg", answer3 = "Agentegatu", correctAnswer = "Nintenducks", score = 999}
  25.     multipleChoice[8] = {question = "Tan fuerte es tu corazón elásticooooo", answer1 = "Muerdo polvo una vez más", answer2 = "Cuidado o lo podrás romper", answer3 = "Cuando lo estiras fuerte ten más cuidadooo", correctAnswer = "Tu espada lo podrá romper", score = 999}
  26.     multipleChoice[9] = {question = "Qué es lo que más dice Mmechitass?", answer1 = "Fuck", answer2 = "perra", answer3 = "zorra", correctAnswer = "Lmao", score = 999}
  27.     multipleChoice[10] = {question = "Cómo se llama el vídeo dedicado a loremg", answer1 = "Loremg is life", answer2 = "Queen Loremg", answer3 = "Pa ti loremg s2", correctAnswer = "Princess Loremg", score = 999}
  28.     multipleChoice[11] = {question = "Miembro más fresudo", answer1 = "Yoab", answer2 = "Loremg", answer3 = "Chibilucia", correctAnswer = "Saranud", score = 999}
  29.     multipleChoice[12] = {question = "Qué patos fueron escogidos para la 2da guerra de PATOS", answer1 = "Loremg is life", answer2 = "Queen Loremg", answer3 = "Pa ti loremg s2", correctAnswer = "Princess Loremg", score = 999}
  30.     multipleChoice[13] = {question = "Cuántas secciones tiene el subforo de la tribu", answer1 = "4", answer2 = "2", answer3 = "3", correctAnswer = "6", score = 999}
  31.     multipleChoice[14] = {question = "Quién ha dejado la tribu más veces?", answer1 = "Shockraver", answer2 = "Girlsexi", answer3 = "Chibilucia", correctAnswer = "Yoab", score = 999}
  32.     multipleChoice[15] = {question = "Quién se hace creer la más puta", answer1 = "Chibilucia", answer2 = "Girlsexi", answer3 = "Neelfr", correctAnswer = "Mmechitass", score = 999}
  33. multipleChoice[16] = {question = "Quién canta el taxi en la tribu", answer1 = "Maxi", answer2 = "Girlsexi", answer3 = "Neelfr", correctAnswer = "Saranud", score = 999}
  34. multipleChoice[17] = {question = "Quién murió en la novela de tebi", answer1 = "Chibilucia", answer2 = "Yoab", answer3 = "Loremg", correctAnswer = "Estebidiez", score = 999}
  35. multipleChoice[18] = {question = "Quién se hace creer la más puta", answer1 = "Chibilucia", answer2 = "Girlsexi", answer3 = "Neelfr", correctAnswer = "Mmechitass", score = 999}
  36. multipleChoice[19] = {question = "En la tribu quién insulta más a irwingxxxxxxx?", answer1 = "Loremg", answer2 = "Girlsexi", answer3 = "Chibilucia", correctAnswer = "Maximoya", score = 999}
  37. multipleChoice[20] = {question = "Quién es el miembro más reciente en la tribu?", answer1 = "Loremg", answer2 = "Dadymevi", answer3 = "Morita", correctAnswer = "Yolomaria", score = 999}
  38. multipleChoice[21] = {question = "En los juegos de shock cuál es el minijuego más pedido", answer1 = "Crowdsurf", answer2 = "Escapa de tebi", answer3 = "Prophunt", correctAnswer = "Cl", score = 999}
  39. multipleChoice[22] = {question = "Quién es el/la que publica más en el hilo discusiones de la tribu", answer1 = "Loremg", answer2 = "Neelfr", answer3 = "Yoab", correctAnswer = "Chibilucia", score = 999}
  40. multipleChoice[23] = {question = "Miembro que más habla", answer1 = "Chibilucia", answer2 = "Agentegatu", answer3 = "Neelfr", correctAnswer = "Maximoya", score = 999}
  41. multipleChoice[24] = {question = "Irwing es?", answer1 = "hermosa", answer2 = "bella", answer3 = "guapa y dibuja hermoso", correctAnswer = "Ninguna de las anteriores", score = 999}
  42. multipleChoice[25] = {question = "Una frase de Loremg es?", answer1 = "si la vida te da limones haz limonada", answer2 = "XDDDDDD", answer3 = "Princess loremg", correctAnswer = "Shock menstrua fresas", score = 999}
  43. multipleChoice[26] = {question = "Chibi es de", answer1 = "Loremg", answer2 = "Yoab", answer3 = "Neelfr", correctAnswer = "España", score = 999}
  44. multipleChoice[27] = {question = "De qué país es Loremg", answer1 = "Chile", answer2 = "Haiti", answer3 = "Colombia", correctAnswer = "Argentina", score = 999}
  45. multipleChoice[28] = {question = "Chibilucia aparece", answer1 = "Bailando salsa choke", answer2 = "Comer pasta", answer3 = "Follar con loremg", correctAnswer = "Bailar harlem shake", score = 999}
  46. multipleChoice[29] = {question = "De qué país es yoab", answer1 = "De algún país de áfrica", answer2 = "España", answer3 = "EEUU", correctAnswer = "Colombia", score = 999}
  47. multipleChoice[30] = {question = "Cuántos puntos tienes en estos momentos", answer1 = "1000", answer2 = "Más de 9000 - vegeta", answer3 = "1000", correctAnswer = "algún pinche número no manches", score = 999}
  48. multipleChoice[31] = {question = "Cómo es el ritmo de Princess Loremg", answer1 = "tintintin", answer2 = "Fiufiufiu", answer3 = "paparipanpon", correctAnswer = "tuntuntunrutuntuntun", score = 999}
  49. multipleChoice[32] = {question = "Amante de plasmx", answer1 = "Loremg", answer2 = "Todos", answer3 = "Palo", correctAnswer = "tu también", score = 999}
  50. multipleChoice[33] = {question = "Qué Admin nos visitó", answer1 = "Melibellule", answer2 = "Galaktine", answer3 = "Tu tío Tigrounette", correctAnswer = "Pikashu", score = 999}
  51. multipleChoice[34] = {question = "Quién hace de yuno en noche de AIOH", answer1 = "Chibilucia", answer2 = "Agentegatu", answer3 = "Yunowears", correctAnswer = "Maximoya", score = 999}
  52. multipleChoice[35] = {question = "Chupamedias de la tribu", answer1 = "Chibilucia", answer2 = "Yoab", answer3 = "Weephaz", correctAnswer = "Shockraver", score = 999}
  53. multipleChoice[36] = {question = "Quién es Matiascp en noche de AIOH", answer1 = "Maxi", answer2 = "Loremg", answer3 = "Saranud", correctAnswer = "Yoab", score = 999}
  54. multipleChoice[37] = {question = "Quién es Irwingxxxxxx en noche de AIOH", answer1 = "Maxi", answer2 = "Girlsexi", answer3 = "Chibilucia", correctAnswer = "Loremg", score = 999}
  55. multipleChoice[38] = {question = "Quién es Marcelinebam en noche de AIOH", answer1 = "Agentegatu", answer2 = "Saranud", answer3 = "Chibilucia", correctAnswer = "Mellamomile", score = 999}
  56. multipleChoice[39] = {question = "Apodo para matiascp", answer1 = "Jotocp", answer2 = "Elmejorcp", answer3 = "Mariocp", correctAnswer = "Marinacp", score = 999}
  57. multipleChoice[40] = {question = "Quién creo la primera guerra de patos", answer1 = "Loremg", answer2 = "Palacioslau", answer3 = "maximoya", correctAnswer = "Yoab", score = 999}
  58. multipleChoice[41] = {question = "Quién creo la Segunda guerra de patos", answer1 = "Loremg", answer2 = "Yoab", answer3 = "maximoya", correctAnswer = "Palacioslau", score = 999}
  59. multipleChoice[42] = {question = "Cuántos minijuegos o eventos hay", answer1 = "5", answer2 = "6", answer3 = "8", correctAnswer = "7", score = 999}
  60. multipleChoice[43] = {question = "Tribu que más nos odian", answer1 = "Aioh", answer2 = "Lyon mouse", answer3 = "De tus asco nace mi fama", correctAnswer = "Night with AIOH", score = 999}
  61. multipleChoice[44] = {question = "Mejor creador de mapas según lore y yoab", answer1 = "Yoab", answer2 = "Loremg", answer3 = "Estebidiez", correctAnswer = "Rpalopor", score = 999}
  62. multipleChoice[45] = {question = "Cuál de estas cuentas no es un alt", answer1 = "Aipat", answer2 = "Teamonoob", answer3 = "Lorequack", correctAnswer = "elalbumjet", score = 999}
  63. multipleChoice[46] = {question = "plasmx ahora es", answer1 = "elalbumyet", answer2 = "Tealbunjet", answer3 = "Plasmxxx", correctAnswer = "elalbumjet", score = 999}
  64. multipleChoice[47] = {question = "Mechitass está", answer1 = "Mute", answer2 = "Baneada", answer3 = "Follada", correctAnswer = "Permamute", score = 999}
  65. multipleChoice[48] = {question = "Jfaq está", answer1 = "Mute", answer2 = "Banperma", answer3 = "Follado por loremg", correctAnswer = "Baneada", score = 999}
  66. multipleChoice[49] = {question = "Según Maximoya yoab se calienta con", answer1 = "Calvin Harris", answer2 = "Neelfr", answer3 = "Dadymevi", correctAnswer = "Escuiquirin", score = 999}
  67. multipleChoice[50] = {question = "Supuesta pareja gay en la tribu", answer1 = "Neelfr y agentegatu", answer2 = "Agentegatu y Catroosdos", answer3 = "Maximoya y Dadymevi", correctAnswer = "Agentegatu y Maximoya", score = 999}
  68. multipleChoice[51] = {question = "Pareja Lésbica basada en una historia", answer1 = "Saranud y yoab", answer2 = "Chibilucia y Loremg", answer3 = "Girlsexi y Loremg", correctAnswer = "Saranud y Chibilucia", score = 999}
  69. multipleChoice[52] = {question = "En la historia de tebi se puede afirmar que lore", answer1 = "Era la novia de Su amiga chibilucia", answer2 = "Era la supuesta hija de Chibilucia", answer3 = "Tenía herpés y sida", correctAnswer = "Tenía una gemela escondida en el sótano de ella", score = 999}
  70. multiplechoice[53] = {question = "En la historia de tebi se puede afirmar que Yoab", answer1 = "Era Una puta de mierda", answer2 = "Era la supuesta hija de Chibilucia", answer3 = "Era la novia de Palacioslau", correctAnswer = "dijo ser la supuesta madre de lore", score = 999}
  71. multipleChoice[54] = {question = "Segundo nombre de loremg", answer1 = "Catalina", answer2 = "María", answer3 = "Camila", correctAnswer = "No tiene", score = 999}
  72. multipleChoice[55] = {question = "nombre real de yoab", answer1 = "Dayana", answer2 = "María", answer3 = "Yoab", correctAnswer = "Diana", score = 999}
  73. multipleChoice[56] = {question = "nombre real de Maximoya", answer1 = "Max", answer2 = "Mario", answer3 = "Masionlo", correctAnswer = "Maximiliano", score = 999}
  74. multipleChoice[57] = {question = "nombre real de Neelfr", answer1 = "Friley", answer2 = "Francisco", answer3 = "Fran", correctAnswer = "Franco", score = 999}
  75. multipleChoice[58] = {question = "nombre real de Chibilucia", answer1 = "Lucy", answer2 = "Lucia", answer3 = "Lucianda", correctAnswer = "Lucía", score = 999}
  76. ----List you trueAndFalse statements here.
  77.     trueAndFalse[1] = {statement = "lORE ES PUTA?", answer = 4, score = 999}
  78.     trueAndFalse[2] = {statement = "Chibi es la más amada de la tribu?", answer = 4, score = 999}
  79.     trueAndFalse[3] = {statement = ".", answer = 4, score = 999}
  80.     trueAndFalse[4] = {statement = ".", answer = 4, score = 999}
  81.    
  82. ---------------------------------
  83. --Script Init.
  84. ---------------------------------
  85.     --Player and Text
  86.     player = {}
  87.     textBox = {}
  88.     tpZONE = {}
  89.     pID = 1000
  90.     mode = 0 --Reference modeSet for values.
  91.    
  92.     --Game Loop
  93.     sec = 0 --Seconds
  94.     rnd = 0 --Round
  95.     rnm = "" --Round Name
  96.     gm = 1 --Game Number
  97.     ql = 0 --Last Question
  98.     tl = 0 --Last Statement
  99.     ca = 0 --Correct Answer
  100.     sc = 0 --
  101.    
  102.     --Reset Scores
  103.     for n,p in pairs(tfm.get.room.playerList) do
  104.         tfm.exec.setPlayerScore(n, 0, false)
  105.     end
  106.    
  107.     --Whenever a player enters the room || A new round starts
  108.     function eventNewPlayer(n)
  109.         player[n] =
  110.         {
  111.             id = pID,
  112.             chosen = true,
  113.             answer = 0
  114.         }
  115.         pID = pID + 100
  116.     end
  117.    
  118.     for p in pairs(tfm.get.room.playerList) do
  119.         eventNewPlayer(p)
  120.     end
  121.    
  122.     function setChosen(n,b)
  123.         player[n].chosen = b
  124.     end
  125.    
  126. ---------------------------------
  127. --Every New Round
  128. ---------------------------------
  129.     --Part 1
  130.     function reset(m)
  131.         mode = m
  132.         local map = "0"
  133.        
  134.         --Reset boxes
  135.         for i=1,#textBox,1 do ui.removeTextArea(i,nil)
  136.             table.remove(textBox,i)
  137.         end
  138.        
  139.         --Choosing a map.
  140.         if mode == 1 then
  141.             local maps = {"5826217"}
  142.             map = maps[math.random(#maps)]
  143.         elseif mode == 2 then
  144.             local maps = {"5838948"}
  145.             map = maps[math.random(#maps)]
  146.         end
  147.        
  148.         --Start game
  149.         tfm.exec.disableAutoShaman(true)
  150.         tfm.exec.newGame(map)
  151.         tfm.exec.setGameTime(0)
  152.     end
  153.    
  154.     --Part 2
  155.     function eventNewGame()
  156.         tfm.exec.disableAutoNewGame(true)
  157.         tfm.exec.disableAutoScore(true)
  158.         tfm.exec.disableAfkDeath(true)
  159.         tfm.exec.disableAutoTimeLeft(true)
  160.         for p in pairs(tfm.get.room.playerList) do
  161.             eventNewPlayer(p)
  162.         end
  163.          
  164.         --Finding the objects for textBoxes and teleport zones
  165.         local xml = tfm.get.room.xmlMapInfo.xml
  166.         local xmlGROUNDS = xml:match('<S>[^´]+</S>'):gsub("<S>","")
  167.         for p in xmlGROUNDS:gmatch('<S[^/]+/>') do
  168.             for i=0,15,1 do
  169.                 if p:match(string.format('lua="%s"',tostring(i))) then
  170.                     local l = p:match('L="[0-9]+"'):gsub('L="',''):gsub('"','')-2
  171.                     local h = p:match('H="[0-9]+"'):gsub('H="',''):gsub('"','')
  172.                     local x = p:match('X="[0-9]+"'):gsub('X="',''):gsub('"','')-(l/2)
  173.                     local y = p:match('Y="[0-9]+"'):gsub('Y="',''):gsub('"','')-(h/2)+1
  174.                     if mode == 1 then
  175.                         if i == 1 then textBox[1] = {x = x, y = y, w = l, h = h, event = "Q", txt = "Question will be Here\n<font color='#CB546B'>Click for Help</font>"} end
  176.                         if i == 2 then textBox[2] = {x = x, y = y, w = l, h = h, event = "T", txt = "Timer"} end
  177.                         if i == 3 then textBox[3] = {x = x, y = y, w = l, h = h, event = "RT", txt = "Answer Red"} end
  178.                         if i == 4 then textBox[4] = {x = x, y = y, w = l, h = h, event = "BF", txt = "Answer Blue"} end
  179.                         if i == 5 then textBox[5] = {x = x, y = y, w = l, h = h, event = "G", txt = "Answer Green"} end
  180.                         if i == 6 then textBox[6] = {x = x, y = y, w = l, h = h, event = "O", txt = "Answer Orange"} end
  181.                     elseif mode == 2 then
  182.                         if i == 1 then textBox[1] = {x = x, y = y, w = l, h = h, event = "Q", txt = "Question will be Here\n<font color='#CB546B'>Click for Help</font>"} end
  183.                         if i == 2 then textBox[2] = {x = x, y = y, w = l, h = h, event = "T", txt = "Timer"} end
  184.                         if i == 3 then textBox[3] = {x = x, y = y, w = l, h = h, event = "RT", txt = "True"} end
  185.                         if i == 4 then textBox[4] = {x = x, y = y, w = l, h = h, event = "BF", txt = "False"} end
  186.                     end              
  187.                     if i >= 10 then
  188.                         x = p:match('X="[0-9]+"'):gsub('X="',''):gsub('"','')
  189.                         y = p:match('Y="[0-9]+"'):gsub('Y="',''):gsub('"','')
  190.                         tpZONE[i] = {x1 = x-(l/2), x2 = x+(l/2), y1 = y-(h/2), y2 = y+(h/2)}
  191.                     end
  192.                 end
  193.             end
  194.         end
  195.  
  196.         local tbS = "<p align = 'center'><b>"
  197.         local tbE = "</b></p>"
  198.         for i = 1, #textBox, 1 do
  199.             local cc = 0x010101
  200.             if i == 2 then
  201.                 cc = 0x000A59
  202.             elseif i >= 3 then
  203.                 cc = 0x010101
  204.             end
  205.             ui.addTextArea(i,
  206.                 string.format("%s<a href='event:%s'>%s</a>%s",tbS,textBox[i].event,textBox[i].txt,tbE)
  207.             ,nil,textBox[i].x,textBox[i].y,textBox[i].w,textBox[i].h,cc,cc,1,false)
  208.         end
  209.     end
  210.  
  211. ---------------------------------
  212. --Buttons
  213. ---------------------------------
  214.     function eventTextAreaCallback(id , n, event)
  215.         if player[n].chosen == false then
  216.             --Set chosen
  217.             if id >= 3 and id <= 6 then
  218.                 player[n].answer = id
  219.                 setChosen(n,true)
  220.             end
  221.             --Move to a tp zone
  222.             if event == "RT" then tfm.exec.movePlayer(n,math.random(tpZONE[10].x1,tpZONE[10].x2),math.random(tpZONE[10].y1,tpZONE[10].y2),false) end
  223.             if event == "BF" then tfm.exec.movePlayer(n,math.random(tpZONE[11].x1,tpZONE[11].x2),math.random(tpZONE[11].y1,tpZONE[11].y2),false) end
  224.             if event == "G" then tfm.exec.movePlayer(n,math.random(tpZONE[12].x1,tpZONE[12].x2),math.random(tpZONE[12].y1,tpZONE[12].y2),false) end
  225.             if event == "O" then tfm.exec.movePlayer(n,math.random(tpZONE[13].x1,tpZONE[13].x2),math.random(tpZONE[13].y1,tpZONE[13].y2),false) end
  226.         end
  227.     end
  228.    
  229. ---------------------------------
  230. --Game Loop
  231. ---------------------------------
  232.     function eventLoop()
  233.         ui.updateTextArea(2,"<b><p align = 'center'>Time: "..math.ceil(sec).." "..rnm.."</p></b>")
  234.         if sec > 0 then
  235.             sec = sec-0.5
  236.         else
  237.             sec = 0
  238.         end
  239.  
  240.         --Round Start
  241.         if rnd == 0 and sec == 0 then
  242.             --Set map
  243.             if modeSet == 0 then
  244.                 if gm < 3 then
  245.                     reset(1)
  246.                 elseif gm == 3 then
  247.                     reset(2)
  248.                     gm = 0
  249.                 end
  250.             elseif modeSet == 1 then
  251.                 reset(1)
  252.             elseif modeSet == 2 then
  253.                 reset(2)
  254.             end
  255.            
  256.             --Set values, and no choosing
  257.             sec,rnd,rnm,gm,ca = 3,1,"Get Ready!",gm+1,0
  258.             if roundTime == false then sec = 10 end
  259.             for n,p in pairs(tfm.get.room.playerList) do
  260.                 setChosen(n,true)
  261.             end
  262.         end
  263.  
  264.         --Question
  265.         if rnd == 1 and sec == 0 then
  266.             sec,rnd,rnm = 15,2,"Escoge..."
  267.             if roundTime == false then rnd = 3 sec = 15 end
  268.             local tbS,tbE = "<b><p align='center'>","</p></b>"
  269.  
  270.             if mode == 1 then
  271.                 local q = math.random(1,#multipleChoice)
  272.                 if q == ql then
  273.                     q = math.random(1,#multipleChoice)
  274.                  else
  275.                     ql = q
  276.                 end
  277.                 ui.updateTextArea(1,string.format("%s<a href='event:%s'>%s\nScore: %s</a>%s",tbS,textBox[1].event,multipleChoice[q].question,multipleChoice[q].score,tbE))
  278.                 sc = multipleChoice[q].score
  279.                 local df,at = 0,{}
  280.                 for i=3,6,1 do at[i] = {v=i} end
  281.                 while df == 0 do df = at[math.random(3,6)].v end if df ~= 0 then
  282.                     ui.updateTextArea(df,string.format("%s<a href='event:%s'>%s</a>%s",tbS,textBox[df].event,multipleChoice[q].answer1,tbE)) at[df].v = 0 df = 0 end
  283.                 while df == 0 do df = at[math.random(3,6)].v end if df ~= 0 then
  284.                     ui.updateTextArea(df,string.format("%s<a href='event:%s'>%s</a>%s",tbS,textBox[df].event,multipleChoice[q].answer2,tbE)) at[df].v = 0 df = 0 end
  285.                 while df == 0 do df = at[math.random(3,6)].v end if df ~= 0 then
  286.                     ui.updateTextArea(df,string.format("%s<a href='event:%s'>%s</a>%s",tbS,textBox[df].event,multipleChoice[q].answer3,tbE)) at[df].v = 0 df = 0 end
  287.                 while df == 0 do df = at[math.random(3,6)].v end if df ~= 0 then
  288.                     ui.updateTextArea(df,string.format("%s<a href='event:%s'>%s</a>%s",tbS,textBox[df].event,multipleChoice[q].correctAnswer,tbE)) ca = df at[df].v = 0 df = 0 end
  289.             elseif mode == 2 then
  290.                 local q = math.random(1,#trueAndFalse)
  291.                 if q == tl then
  292.                     q = math.random(1,#trueAndFalse)
  293.                 else
  294.                     tl = q
  295.                 end
  296.                 ui.updateTextArea(1,string.format("%s<a href='event:%s'>%s     Score: %s</a>%s",tbS,textBox[1].event,trueAndFalse[q].statement,trueAndFalse[q].score,tbE))
  297.                 ca,sc = trueAndFalse[q].correctAnswer,trueAndFalse[q].score
  298.             end
  299.             for n,p in pairs(tfm.get.room.playerList) do
  300.                 setChosen(n,false)
  301.             end
  302.         end
  303.        
  304.         if rnd == 2 and sec == 0  then --Final Answer
  305.             sec,rnd,rnm = 1,3,"Seguro puedes cambiar?"
  306.             for n,p in pairs(tfm.get.room.playerList) do
  307.                 setChosen(n,false)
  308.                 if player[n].answer == 0 then
  309.                     tfm.exec.killPlayer(n)
  310.                 end
  311.             end
  312.         end
  313.  
  314.         if rnd == 3 and sec == 0 then --Round End
  315.             sec,rnd,rnm = 3,0,"winners!"
  316.             if roundTime == false then sec = 5 end
  317.             for n,p in pairs(tfm.get.room.playerList) do
  318.                 setChosen(n,true)
  319.                 if player[n].answer ~= ca  then
  320.                     tfm.exec.killPlayer(n)
  321.                 else
  322.                     tfm.exec.giveCheese(n)
  323.                     tfm.exec.setPlayerScore(n,sc,true)
  324.                 end
  325.             end
  326.         end
  327.     end
  328.    
  329. -------------------------------
  330. --The End...
  331. -------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement