Advertisement
Guest User

importan

a guest
Apr 26th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.93 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 = "Pato momo y psyduck", answer2 = "Dona y pato de pocoyo", answer3 = "Goku y naruto", correctAnswer = "Psyduck y golduck", 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 = "Chica más sexy de la tribu por muchos", answer1 = "Yoab", answer2 = "Girlsexi", answer3 = "Loremg", correctAnswer = "Chibilucia", score = 999}
  42. multipleChoice[25] = {question = "Según los cálculos, quiénes son los dos chupamedias de la tribu?", answer1 = "Chibilucia y Shockraver", answer2 = "Shockraver y Loremg", answer3 = "Shockraver y Neelfr", correctAnswer = "Shockraver y yoab", score = 999}
  43. multipleChoice[26] = {question = "Qué admin nos visitó en la tribu?", answer1 = "Tigrounette", answer2 = "Zou", answer3 = "Melibellule", correctAnswer = "Pikashu", score = 999}
  44. multipleChoice[27] = {question = "Cuando se hace rol de Fnaf en la tribu quién es purple guy", answer1 = "Chibilucia", answer2 = "Agentegatu", answer3 = "Loremg", correctAnswer = "Yoab", score = 999}
  45. multipleChoice[28] = {question = "Cuando se hace rol de Fnaf en la tribu quién es Freddy", answer1 = "Chibilucia", answer2 = "Agentegatu", answer3 = "Loremg", correctAnswer = "Maximoya", score = 999}
  46. multipleChoice[29] = {question = "Cuando se hace rol de Fnaf en la tribu quién es Bonnie, answer1 = "Chibilucia", answer2 = "Agentegatu", answer3 = "Yoab", correctAnswer = "Loremg", score = 999}
  47. multipleChoice[30] = {question = "Cuando se hace rol de Fnaf en la tribu quién es Mangle", answer1 = "yoab", answer2 = "Agentegatu", answer3 = "Neelfr", correctAnswer = "Chibilucia", score = 999}
  48. multipleChoice[31] = {question = "Cuando se hace rol de Fnaf en la tribu quién es Foxy", answer1 = "Chibilucia", answer2 = "Yoab", answer3 = "Loremg", correctAnswer = "Agentegatu", score = 999}
  49. multipleChoice[32] = {question = "Yoab ama a...", answer1 = "Yoab", answer2 = "Chibilucia", answer3 = "Neelfr", correctAnswer = "Dadymevi", score = 999}
  50. multipleChoice[33] = {question = "Mechis se caracteriza por ser", answer1 = "una permamuteada", answer2 = "sida", answer3 = "Una zorra", correctAnswer = "Una loba", score = 999}
  51. multipleChoice[34] = {question = "Quién ganó sorteados#1", answer1 = "Chibilucia", answer2 = "Palacioslau", answer3 = "Yoab", correctAnswer = "Catroosdos", score = 999}
  52. multipleChoice[35] = {question = "Quién gano sorteados#2", answer1 = "Chibilucia", answer2 = "Catroosdos", answer3 = "Yoab", correctAnswer = "Palacioslau", score = 999}
  53. multipleChoice[36] = {question = "Cómo se llama la amiga del vídeo de loremg", answer1 = "Reglateta", answer2 = "Chibilucia", answer3 = "Regla", correctAnswer = "rlegarreta", score = 999}
  54. multipleChoice[37] = {question = "Alt de yoab", answer1 = "Yoabjefa", answer2 = "patoduck", answer3 = "patoab", correctAnswer = "Aipat", score = 999}
  55. multipleChoice[38] = {question = "Cómo se llama la tribu en la que hace aipat el concurso de looks", answer1 = "Duck land", answer2 = "All in one heart", answer3 = "Symphonica", correctAnswer = "Lyon mouse", score = 999}
  56. multipleChoice[39] = {question = "En la novela de tebi quién es la mejor amiga de loremg", answer1 = "La gemela de loremg", answer2 = "Yoab", answer3 = "Estebidiez", correctAnswer = "Chibilucia", score = 999}
  57. multipleChoice[40] = {question = "Cómo se llama las historias de Maximoya", answer1 = "Historia de amor patosa, Psyduck is love psyduck is live , familia patosa", answer2 = " Psyduck is love psyduck is live , familia patosa, CASTING GRAN HERMANOS SIMS", answer3 = "Internet ayudame y familia patosa, hola soy glozeel", correctAnswer = "Psyduck is love psyduck is live , familia patosa y Internet ayudame", score = 999}
  58. multipleChoice[41] = {question = "Nombre de la mejor historia de tebi", answer1 = "Duck land", answer2 = "Casting gran hermanos sims", answer3 = "Internet ayudame", correctAnswer = "Historia de amor patosa", score = 999}
  59. multipleChoice[42] = {question = "Quién gana la mayoría de eventos de fresas que hace shockraver", answer1 = "Loremg", answer2 = "Chibilucia", answer3 = "Maximoya", correctAnswer = "Yoab", score = 999}
  60. multipleChoice[43] = {question = "Aipat pertenece a", answer1 = "Shockraver", answer2 = "Pockiia", answer3 = "Til", correctAnswer = "Yoab", score = 999}
  61. multipleChoice[44] = {question = "Quiénes por el momento ponen mapas de los eventos en la tribu", answer1 = "Yoab y shock", answer2 = "Loremg y maxi", answer3 = "Loremg y tebi", correctAnswer = "Yoab y loremg", score = 999}
  62. multipleChoice[45] = {question = "Apodo más usado para Palacioslau", answer1 = "Pala", answer2 = "Lau", answer3 = "pato", correctAnswer = "Palo", score = 999}
  63. multipleChoice[46] = {question = "Pregunta imposible en qué número van por el hilo ,cuenta hasta 100 sin que lore comente", answer1 = "40", answer2 = "41", answer3 = "38", correctAnswer = "39", score = 999}
  64. multipleChoice[47] = {question = "Quién hizo un wallpaper de los ratones de la tribu", answer1 = "Dadymevi", answer2 = "Saranud", answer3 = "Loremg", correctAnswer = "Yoab", score = 999}
  65. multipleChoice[48] = {question = "Nombre del alt de Neelfr", answer1 = "Neels", answer2 = "nelllllllz", answer3 = "nelz", correctAnswer = "nellz", score = 999}
  66. multipleChoice[49] = {question = "Cantante favorito de palacioslau", answer1 = "Sia", answer2 = "Pato", answer3 = "Miley cyrus", correctAnswer = "Rihanna", score = 999}
  67. multipleChoice[50] = {question = "Qué paso con la cuenta de Plasmx", answer1 = "Vino una loba y se la comió", answer2 = "Ellokoproo le borró a todos sus amigos", answer3 = "ELLOKOPROOO hizo algo terrible insultó a todos y la volvió pública", correctAnswer = "Ellokopro la volvió pública y se la banearon", score = 999}
  68. ------List you trueAndFalse statements here.
  69. trueAndFalse[1] = {statement = "lORE ES PUTA?", answer = 4, score = 999}
  70. trueAndFalse[2] = {statement = "Chibi es la más amada de la tribu?", answer = 4, score = 999}
  71. trueAndFalse[3] = {statement = ".", answer = 4, score = 999}
  72. trueAndFalse[4] = {statement = ".", answer = 4, score = 999}
  73.  
  74. ---------------------------------
  75. --Script Init.
  76. ---------------------------------
  77. --Player and Text
  78. player = {}
  79. textBox = {}
  80. tpZONE = {}
  81. pID = 1000
  82. mode = 0 --Reference modeSet for values.
  83.  
  84. --Game Loop
  85. sec = 0 --Seconds
  86. rnd = 0 --Round
  87. rnm = "" --Round Name
  88. gm = 1 --Game Number
  89. ql = 0 --Last Question
  90. tl = 0 --Last Statement
  91. ca = 0 --Correct Answer
  92. sc = 0 --
  93.  
  94. --Reset Scores
  95. for n,p in pairs(tfm.get.room.playerList) do
  96. tfm.exec.setPlayerScore(n, 0, false)
  97. end
  98.  
  99. --Whenever a player enters the room || A new round starts
  100. function eventNewPlayer(n)
  101. player[n] =
  102. {
  103. id = pID,
  104. chosen = true,
  105. answer = 0
  106. }
  107. pID = pID + 100
  108. end
  109.  
  110. for p in pairs(tfm.get.room.playerList) do
  111. eventNewPlayer(p)
  112. end
  113.  
  114. function setChosen(n,b)
  115. player[n].chosen = b
  116. end
  117.  
  118. ---------------------------------
  119. --Every New Round
  120. ---------------------------------
  121. --Part 1
  122. function reset(m)
  123. mode = m
  124. local map = "0"
  125.  
  126. --Reset boxes
  127. for i=1,#textBox,1 do ui.removeTextArea(i,nil)
  128. table.remove(textBox,i)
  129. end
  130.  
  131. --Choosing a map.
  132. if mode == 1 then
  133. local maps = {"5826217"}
  134. map = maps[math.random(#maps)]
  135. elseif mode == 2 then
  136. local maps = {"5838948"}
  137. map = maps[math.random(#maps)]
  138. end
  139.  
  140. --Start game
  141. tfm.exec.disableAutoShaman(true)
  142. tfm.exec.newGame(map)
  143. tfm.exec.setGameTime(0)
  144. end
  145.  
  146. --Part 2
  147. function eventNewGame()
  148. tfm.exec.disableAutoNewGame(true)
  149. tfm.exec.disableAutoScore(true)
  150. tfm.exec.disableAfkDeath(true)
  151. tfm.exec.disableAutoTimeLeft(true)
  152. for p in pairs(tfm.get.room.playerList) do
  153. eventNewPlayer(p)
  154. end
  155.  
  156. --Finding the objects for textBoxes and teleport zones
  157. local xml = tfm.get.room.xmlMapInfo.xml
  158. local xmlGROUNDS = xml:match('<S>[^´]+</S>'):gsub("<S>","")
  159. for p in xmlGROUNDS:gmatch('<S[^/]+/>') do
  160. for i=0,15,1 do
  161. if p:match(string.format('lua="%s"',tostring(i))) then
  162. local l = p:match('L="[0-9]+"'):gsub('L="',''):gsub('"','')-2
  163. local h = p:match('H="[0-9]+"'):gsub('H="',''):gsub('"','')
  164. local x = p:match('X="[0-9]+"'):gsub('X="',''):gsub('"','')-(l/2)
  165. local y = p:match('Y="[0-9]+"'):gsub('Y="',''):gsub('"','')-(h/2)+1
  166. if mode == 1 then
  167. 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
  168. if i == 2 then textBox[2] = {x = x, y = y, w = l, h = h, event = "T", txt = "Timer"} end
  169. if i == 3 then textBox[3] = {x = x, y = y, w = l, h = h, event = "RT", txt = "Answer Red"} end
  170. if i == 4 then textBox[4] = {x = x, y = y, w = l, h = h, event = "BF", txt = "Answer Blue"} end
  171. if i == 5 then textBox[5] = {x = x, y = y, w = l, h = h, event = "G", txt = "Answer Green"} end
  172. if i == 6 then textBox[6] = {x = x, y = y, w = l, h = h, event = "O", txt = "Answer Orange"} end
  173. elseif mode == 2 then
  174. 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
  175. if i == 2 then textBox[2] = {x = x, y = y, w = l, h = h, event = "T", txt = "Timer"} end
  176. if i == 3 then textBox[3] = {x = x, y = y, w = l, h = h, event = "RT", txt = "True"} end
  177. if i == 4 then textBox[4] = {x = x, y = y, w = l, h = h, event = "BF", txt = "False"} end
  178. end
  179. if i >= 10 then
  180. x = p:match('X="[0-9]+"'):gsub('X="',''):gsub('"','')
  181. y = p:match('Y="[0-9]+"'):gsub('Y="',''):gsub('"','')
  182. tpZONE[i] = {x1 = x-(l/2), x2 = x+(l/2), y1 = y-(h/2), y2 = y+(h/2)}
  183. end
  184. end
  185. end
  186. end
  187.  
  188. local tbS = "<p align = 'center'><b>"
  189. local tbE = "</b></p>"
  190. for i = 1, #textBox, 1 do
  191. local cc = 0x010101
  192. if i == 2 then
  193. cc = 0x000A59
  194. elseif i >= 3 then
  195. cc = 0x010101
  196. end
  197. ui.addTextArea(i,
  198. string.format("%s<a href='event:%s'>%s</a>%s",tbS,textBox[i].event,textBox[i].txt,tbE)
  199. ,nil,textBox[i].x,textBox[i].y,textBox[i].w,textBox[i].h,cc,cc,1,false)
  200. end
  201. end
  202.  
  203. ---------------------------------
  204. --Buttons
  205. ---------------------------------
  206. function eventTextAreaCallback(id , n, event)
  207. if player[n].chosen == false then
  208. --Set chosen
  209. if id >= 3 and id <= 6 then
  210. player[n].answer = id
  211. setChosen(n,true)
  212. end
  213. --Move to a tp zone
  214. 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
  215. 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
  216. 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
  217. 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
  218. end
  219. end
  220.  
  221. ---------------------------------
  222. --Game Loop
  223. ---------------------------------
  224. function eventLoop()
  225. ui.updateTextArea(2,"<b><p align = 'center'>Time: "..math.ceil(sec).." "..rnm.."</p></b>")
  226. if sec > 0 then
  227. sec = sec-0.5
  228. else
  229. sec = 0
  230. end
  231.  
  232. --Round Start
  233. if rnd == 0 and sec == 0 then
  234. --Set map
  235. if modeSet == 0 then
  236. if gm < 3 then
  237. reset(1)
  238. elseif gm == 3 then
  239. reset(2)
  240. gm = 0
  241. end
  242. elseif modeSet == 1 then
  243. reset(1)
  244. elseif modeSet == 2 then
  245. reset(2)
  246. end
  247.  
  248. --Set values, and no choosing
  249. sec,rnd,rnm,gm,ca = 3,1,"Get Ready!",gm+1,0
  250. if roundTime == false then sec = 10 end
  251. for n,p in pairs(tfm.get.room.playerList) do
  252. setChosen(n,true)
  253. end
  254. end
  255.  
  256. --Question
  257. if rnd == 1 and sec == 0 then
  258. sec,rnd,rnm = 15,2,"Escoge..."
  259. if roundTime == false then rnd = 3 sec = 15 end
  260. local tbS,tbE = "<b><p align='center'>","</p></b>"
  261.  
  262. if mode == 1 then
  263. local q = math.random(1,#multipleChoice)
  264. if q == ql then
  265. q = math.random(1,#multipleChoice)
  266. else
  267. ql = q
  268. end
  269. 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))
  270. sc = multipleChoice[q].score
  271. local df,at = 0,{}
  272. for i=3,6,1 do at[i] = {v=i} end
  273. while df == 0 do df = at[math.random(3,6)].v end if df ~= 0 then
  274. 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
  275. while df == 0 do df = at[math.random(3,6)].v end if df ~= 0 then
  276. 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
  277. while df == 0 do df = at[math.random(3,6)].v end if df ~= 0 then
  278. 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
  279. while df == 0 do df = at[math.random(3,6)].v end if df ~= 0 then
  280. 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
  281. elseif mode == 2 then
  282. local q = math.random(1,#trueAndFalse)
  283. if q == tl then
  284. q = math.random(1,#trueAndFalse)
  285. else
  286. tl = q
  287. end
  288. 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))
  289. ca,sc = trueAndFalse[q].correctAnswer,trueAndFalse[q].score
  290. end
  291. for n,p in pairs(tfm.get.room.playerList) do
  292. setChosen(n,false)
  293. end
  294. end
  295.  
  296. if rnd == 2 and sec == 0 then --Final Answer
  297. sec,rnd,rnm = 1,3,"Seguro puedes cambiar?"
  298. for n,p in pairs(tfm.get.room.playerList) do
  299. setChosen(n,false)
  300. if player[n].answer == 0 then
  301. tfm.exec.killPlayer(n)
  302. end
  303. end
  304. end
  305.  
  306. if rnd == 3 and sec == 0 then --Round End
  307. sec,rnd,rnm = 10,0,"Winners!"
  308. if roundTime == false then sec = 5 end
  309. for n,p in pairs(tfm.get.room.playerList) do
  310. setChosen(n,true)
  311. if player[n].answer ~= ca then
  312. tfm.exec.killPlayer(n)
  313. else
  314. tfm.exec.giveCheese(n)
  315. tfm.exec.setPlayerScore(n,sc,true)
  316. end
  317. end
  318. end
  319. end
  320.  
  321. -------------------------------
  322. --The End...
  323. -------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement