Advertisement
alditojeje

Untitled

Aug 27th, 2020
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.05 KB | None | 0 0
  1. --[[
  2. Cosas por hacer ;v
  3. Contador
  4. Sistema dificultad
  5.  
  6.  
  7. Minijuegos:
  8. Repetir una secuencia de caritas
  9. ¡Estás congelado! [congelar a toda la sala]
  10. ¡Ahora estas atado a X! [pareja]
  11. Alguien tiene que morir! // Aparecen objetos de chaman que intentan matarte
  12. Haz X click en la pantalla
  13. Tas chikito
  14. Transformar a alguien en vamp, alejarlo de los demas, cuando alguien más se transforme, se muera
  15. Elije tu número de la suerte
  16. ¡Haz click para generar una explosión! [just one for person, not too explosive]
  17. Abraza a alguien U//w//U r
  18. Cuanto es 10x10?
  19. El ultimo en hacer click muere
  20. Escribe !hate [nombreDeJugador] para matar al jugador mas odiado
  21. Cuál es el número de tu titulo? [pa hard i guess] wtf imposible SI ES POSIBLE
  22. Escribe el nombre de tu tribu ["Ninguno"] si no tienes
  23. ¿En que fecha te registraste?
  24. Cuántos puntos tienes?
  25. Quedate CAMINANDO hacia la derecha
  26. Ten cuidado! Tienes super velocidad carnal! // tu rata se ha vuelto loka
  27. Saltar es mas pesado // tfm.exec.movePlayer(name, 0, 0, true, 0, 100, true)
  28.  
  29.  
  30. PONER QUE SE DESACTIVE MEEP AL INICIAR NUEVO MAPA, player.info[nombre].alive = true TAMBIÉN
  31.  
  32. ]]
  33. local counter = 0
  34. local seconds = 20
  35. local rounds = 0
  36. local difficulty = 0
  37. local message = ""
  38. local player = {info = {}}
  39. local playersAlive = {}
  40. local killPlayers = {}
  41. local counterMinigames = 0
  42. --local timeNewRound = os.time() + 2000 -- Empieza con 15s extras
  43. local timeNewRound = os.time()
  44. local frases = {"Fafee es el mejor Funcorp", "Esternocleidomastoideo", "Electroencefalografia", "Fafee es el peor Funcorp", "Up: 368 W: 0 Z: 0"}
  45. local numMatar = 0
  46.  
  47. tfm.exec.disableAutoNewGame()
  48. tfm.exec.disableAutoShaman()
  49. tfm.exec.disableAutoTimeLeft()
  50. tfm.exec.disablePhysicalConsumables()
  51. tfm.exec.disableAutoScore()
  52.  
  53. ui.addTextArea(0, "<R><font size='20'><p align='center'>" .. seconds .. "</R>", nil, 378, 32, 30, 30, 0x2B2B2B, 0x121212, 0.7, true) -- Tiempo
  54.  
  55. addGender = function(nombre)
  56. if tfm.get.room.playerList[nombre].gender == 2 then
  57. player.info[nombre].genero = "masculino"
  58. elseif tfm.get.room.playerList[nombre].gender == 1 then
  59. player.info[nombre].genero = "femenino"
  60. else
  61. player.info[nombre].genero = "ninguno"
  62. end
  63. end
  64.  
  65. stats = function()
  66. for _, nombre in pairs(playersAlive) do
  67. player.info[nombre].roundWin = false
  68. player.info[nombre].clicks = 0
  69. player.info[nombre].countE = 0
  70. player.info[nombre].team = ""
  71. player.info[nombre].clicksTextareas = 0
  72. player.info[nombre].numero = 0
  73. addGender(nombre)
  74. counterMinigames = 0
  75. end
  76. end
  77.  
  78. teclasPlayer = function (nombre)
  79. tfm.exec.bindKeyboard(nombre, 37, true, true) -- Arrow Left
  80. tfm.exec.bindKeyboard(nombre, 38, true, true) -- Arrow UP
  81. tfm.exec.bindKeyboard(nombre, 39, true, true) -- Arrow Right
  82. tfm.exec.bindKeyboard(nombre, 40, true, true) -- Arrow Down
  83. tfm.exec.bindKeyboard(nombre, 83, true, true) -- S
  84. tfm.exec.bindKeyboard(nombre, 87, true, true) -- W
  85. tfm.exec.bindKeyboard(nombre, 90, true, true) -- Z
  86. tfm.exec.bindKeyboard(nombre, 65, true, true) -- A
  87. tfm.exec.bindKeyboard(nombre, 68, true, true) -- D
  88. tfm.exec.bindKeyboard(nombre, 81, true, true) -- Q
  89. tfm.exec.bindKeyboard(nombre, 69, true, true) -- E
  90. end
  91.  
  92. eventNewPlayer = function (nombre)
  93. table.insert(playersAlive, nombre)
  94. player.info[nombre] = {}
  95. player.info[nombre].alive = true
  96. -- player.info[nombre].roundWin = false -- ESTOS SE AGREGAN EN STATS()
  97. -- player.info[nombre].clicks = 0 -- ESTOS SE AGREGAN EN STATS()
  98. system.bindMouse(nombre, true)
  99. teclasPlayer(nombre)
  100. -- addGender(nombre) -- ESTOS SE AGREGAN EN STATS()
  101. end
  102.  
  103. for i, k in pairs(tfm.get.room.playerList) do
  104. eventNewPlayer(i)
  105. end
  106.  
  107. eventMouse = function (nombre, posX, posY)
  108. if player.info[nombre].alive then
  109. if minigame == 3 then
  110. player.info[nombre].clicks = player.info[nombre].clicks + 1
  111. if player.info[nombre].clicks >= 10 then
  112. player.info[nombre].roundWin = true
  113. end
  114. end
  115. end
  116. end
  117.  
  118. infoGame = function (message)
  119. ui.addTextArea(1, "<BV><font size='20'><p align='center'><b>" .. message .."</BV></b>", nil, 150, 360, 500, 30, 0x2B2B2B, 0x121212, 0.7, true)
  120. end
  121.  
  122. eventChatMessage = function (nombre, mensaje)
  123. if player.info[nombre].alive then
  124. if minigame == 1 then
  125. if mensaje:lower() == player.info[nombre].genero then
  126. player.info[nombre].roundWin = true
  127. end
  128. elseif minigame == 11 then
  129. tfm.exec.killPlayer(nombre)
  130. elseif (minigame == 15) and mensaje == tostring(numeroMinigame) then
  131. player.info[nombre].roundWin = true
  132. elseif minigame == 18 and mensaje == "2010" then
  133. player.info[nombre].roundWin = true
  134. elseif minigame == 21 and mensaje:lower() == frases[frase]:lower() then
  135.  
  136. elseif minigame == 22 and tonumber(mensaje) and tonumber(mensaje) > 0 and tonumber(mensaje) <= 10 then
  137. player.info[nombre].numero = tonumber(mensaje)
  138. end
  139. end -- end playerAlive
  140. end
  141.  
  142. saberDificultad = function ()
  143. if difficulty == 0 then
  144. return "<PT>Fácil</PT>"
  145. elseif difficulty == 1 then
  146. return "<A:ACTIVE>Medio</A:ACTIVE>"
  147. elseif difficulty == 2 then
  148. return "<R>Difícil</R>"
  149. elseif difficulty == 3 then
  150. return "<font color='#F93018'>Experto</font>"
  151. end
  152. end
  153.  
  154. clickTextareas = function ()
  155. for i = 100, cantidad + 100 do
  156. ui.addTextArea(i, "<BV><font size='34'><p align='center'><a href='event:clicksTextarea'>•</BV>", nil, math.random(10, 790), math.random(50, 300), 0, 0, 0, 0, 0, true)
  157. end
  158. end
  159.  
  160. newRound = function()
  161. rounds = rounds + 1
  162. if rounds == 10 or rounds == 20 or rounds == 30 or rounds == 50 then -- En las rondas 5, 10, 20 y 30 aumenta la difcultad
  163. difficulty = difficulty + 1
  164. end
  165. ui.setMapName ("<N>Dificultad: </N>" .. saberDificultad() .. " <G>|</G> <N>Ronda: </N><BV>" .. rounds)
  166. stats()
  167. for i = 100, 130 do -- remove all
  168. ui.removeTextArea(i, nil)
  169. end
  170. ui.removeTextArea(7, nil) -- remove ganador palta/aguacate
  171. if difficulty == 0 then -- EASY
  172. minigame = math.random(20)
  173. minigame = 23
  174. seconds = 10
  175. if minigame == 1 then
  176. message = "¡Escribe el género de tu perfil!"
  177. elseif minigame == 2 then
  178. message = "¡Esquiva la lava!"
  179. allWin()
  180. elseif minigame == 3 then
  181. seconds = seconds - 2
  182. message = "¡Haz click en la pantalla 10 veces!"
  183. elseif minigame == 4 then
  184. seconds = seconds - 4
  185. message = "¡Quedate MIRANDO hacia la derecha!"
  186. elseif minigame == 5 then
  187. seconds = seconds - 4
  188. message = "¡Quedate MIRANDO hacia la izquierda!"
  189. elseif minigame == 6 then
  190. message= "¡Agachate para cavar tu tumba!"
  191. allWin()
  192. elseif minigame == 7 then
  193. message = "¡No saltes!"
  194. allWin()
  195. elseif minigame == 8 then
  196. message = "¡No te muevas!"
  197. allWin()
  198. elseif minigame == 9 then
  199. message = "Lanza confeti 5 veces"
  200. elseif minigame == 10 then
  201. seconds = 6
  202. message = "¡Baila!"
  203. elseif minigame == 11 then
  204. message = "Si mandas un mensaje, ¡mueres!"
  205. allWin()
  206. elseif minigame == 12 then
  207. seconds = 6
  208. message = "¡Todos tienen meep!"
  209. allWin()
  210. meep(true)
  211. elseif minigame == 13 then
  212. message = "¡No te muevas hacia la derecha!"
  213. allWin()
  214. elseif minigame == 14 then
  215. message = "¡No te muevas hacia la izquierda!"
  216. allWin()
  217. elseif minigame == 15 then
  218. numeroMinigame = math.random(1000000, 10000000)
  219. message = "Escribe este numero: <R>" .. numeroMinigame .. "</R>"
  220. elseif minigame == 16 then
  221. message = "¿Palta o aguacate? ¡Morirá el peor equipo!"
  222. ui.addTextArea(5, "<A:ACTIVE><font size='16'><p align='center'><a href='event:palta'><b>Palta</a></PT>", nil, 140, 160, 0, 30, 0x2B2B2B, 0x121212, 0.7, true)
  223. ui.addTextArea(6, "<A:ACTIVE><font size='16'><p align='center'><a href='event:aguacate'><b>Aguacate</a></PT>", nil, 600, 160, 0, 30, 0x2B2B2B, 0x121212, 0.7, true)
  224. elseif minigame == 17 then
  225. message = "¡Haz click en todos los puntos!"
  226. seconds = 21
  227. cantidad = 10
  228. clickTextareas(cantidad)
  229. elseif minigame == 18 then
  230. message = "¿En qué año se publicó Transformice?"
  231. elseif minigame == 19 then
  232. message = "¡Pon la bandera de Argentina!"
  233. elseif minigame == 20 then
  234. allWin()
  235. seconds = 26
  236. poscX, poscY, rotacion = math.random(10,790), math.random(20, 200), math.random(90, 120)
  237. if poscX >= 400 then
  238. rotacion = rotacion * -1
  239. end
  240. message = "¡Esquiva los cañones!"
  241. elseif minigame == 21 then
  242. frase = math.random(1, #frases)
  243. message = 'Escribe: "<R>' .. frases[frase] .. '</R>"'
  244. elseif minigame == 22 then
  245. message = "Escribe un número del 1 al 10"
  246. numMatar = math.random(1, 10)
  247. elseif minigame == 23 then
  248. message = "¡Pon la bandera de Chile!"
  249. end
  250. elseif difficulty == 1 then -- MEDIUM
  251.  
  252. elseif difficulty == 2 then -- HARD
  253.  
  254. elseif difficulty == 3 then -- EXPERT
  255.  
  256. end
  257. infoGame(message)
  258. end
  259.  
  260. eventTextAreaCallback = function (id, nombre, callback)
  261. if player.info[nombre].alive then
  262. if minigame == 16 then
  263. if callback == "palta" then
  264. player.info[nombre].team = "palta"
  265. tfm.exec.chatMessage("¡Ahora estás en el equipo Palta!", nombre)
  266. else
  267. player.info[nombre].team = "aguacate"
  268. tfm.exec.chatMessage("¡Ahora estás en el equipo Aguacate!", nombre)
  269. end
  270. elseif minigame == 17 then
  271. if callback == 'clicksTextarea' then
  272. ui.removeTextArea(id, nombre)
  273. player.info[nombre].clicksTextareas = player.info[nombre].clicksTextareas + 1
  274. if player.info[nombre].clicksTextareas >= cantidad then
  275. player.info[nombre].roundWin = true
  276. end
  277. end
  278. end
  279. end -- end playerAlive
  280. end
  281.  
  282. meep = function(activo)
  283. for _, nombre in pairs(playersAlive) do
  284. tfm.exec.giveMeep(nombre, activo)
  285. end
  286. end
  287.  
  288. removeItem = function (myTable, key)
  289. for i, keyTable in ipairs(myTable) do
  290. if keyTable == key then
  291. table.remove(myTable, i)
  292. return
  293. end
  294. end
  295. end
  296.  
  297. rondaTerminada = function ()
  298. if minigame == 4 then
  299. for _, nombre in pairs(playersAlive) do
  300. if tfm.get.room.playerList[nombre].isFacingRight then
  301. player.info[nombre].roundWin = true
  302. end
  303. end
  304. elseif minigame == 5 then
  305. for _, nombre in pairs(playersAlive) do
  306. if not tfm.get.room.playerList[nombre].isFacingRight then
  307. player.info[nombre].roundWin = true
  308. end
  309. end
  310. elseif minigame == 16 then
  311. contPalta = 0
  312. contAguacate = 0
  313. ui.removeTextArea(5, nil)
  314. ui.removeTextArea(6, nil)
  315. for _, nombre in pairs(playersAlive) do
  316. if player.info[nombre].team == "palta" then
  317. contPalta = contPalta + 1
  318. elseif player.info[nombre].team == "aguacate" then
  319. contAguacate = contAguacate + 1
  320. end
  321. end
  322. if contPalta > contAguacate then
  323. ganadorFruta = "Palta"
  324. elseif contPalta < contAguacate then
  325. ganadorFruta = "Aguacate"
  326. else
  327. ganadorFruta = "¡Empate!"
  328. end
  329. ui.addTextArea(7, "<BV><font size='20'><p align='center'><b>El ganador es: <R>" .. ganadorFruta .. "</R></BV>", nil, 150, 360, 500, 30, 0x2B2B2B, 0x121212, 0.7, true)
  330. for _, nombre in pairs(playersAlive) do
  331. if (player.info[nombre].team == ganadorFruta:lower()) or ganadorFruta == "¡Empate!" then
  332. player.info[nombre].roundWin = true
  333. end
  334. end
  335. elseif minigame == 22 then
  336. for _, nombre in pairs(playersAlive) do
  337. if player.info[nombre].numero ~= numMatar and player.info[nombre].numero > 0 then
  338. player.info[nombre].roundWin = true
  339. end
  340. end
  341. ui.addTextArea(7, "<BV><font size='20'><p align='center'><b>¡Todos los números<R> " .. numMatar .. " </R>moriran!</BV>", nil, 150, 360, 500, 30, 0x2B2B2B, 0x121212, 0.7, true)
  342. end
  343. minigame = 999
  344.  
  345. for _, nombre in pairs(playersAlive) do -- agregar al array kilLPlayers todos los jugadores que no hayan termiando la ronda.
  346. if not player.info[nombre].roundWin then
  347. table.insert(killPlayers, nombre)
  348. end
  349. end
  350. for _, nombre in pairs(killPlayers) do -- los mata, y los elimina de playersAlive
  351. tfm.exec.killPlayer(nombre)
  352. removeItem(playersAlive, nombre)
  353. end
  354. killPlayers = {}
  355. ui.removeTextArea(1, nil)
  356. timeNewRound = os.time()
  357. end
  358.  
  359. eventEmotePlayed = function(nombre, idEmote, bandera)
  360. if player.info[nombre].alive then
  361. if minigame == 10 and idEmote == 0 then
  362. player.info[nombre].roundWin = true
  363. elseif minigame == 19 and idEmote == 10 and bandera == "ar" then
  364. player.info[nombre].roundWin = true
  365. elseif minigame == 23 and idEmote == 10 and bandera == "cl" then
  366. player.info[nombre].roundWin = true
  367. end
  368. end
  369. end
  370.  
  371. eventPlayerDied = function(nombre)
  372. removeItem(playersAlive, nombre)
  373. player.info[nombre].alive = false
  374. end
  375.  
  376. allWin = function()
  377. for i, k in pairs(playersAlive) do
  378. player.info[k].roundWin = true
  379. end
  380. end
  381.  
  382. tfm.exec.newGame('7773692')
  383. tfm.exec.setGameTime(100000)
  384.  
  385. eventLoop = function (elapsed, remaining)
  386. counter = counter + 1 -- cada 0.5s el contador aumenta en 1
  387. if counter >= 2 and seconds > 0 then -- si pasó 1s entonces..
  388. seconds = seconds - 1 -- se resta 1s
  389. ui.updateTextArea(0, "<R><font size='20'><p align='center'>" .. seconds .. "</R>", nil) -- se actualiza el textarea
  390. counter = 0
  391.  
  392. if minigame == 2 then
  393. counterMinigames = counterMinigames + 1
  394. if counterMinigames >= 2 then
  395. rainLava(800, 0, 30, 30)
  396. counterMinigames = 0
  397. end
  398. elseif minigame == 20 then
  399. counterMinigames = counterMinigames + 1
  400. if counterMinigames == 1 then
  401. tfm.exec.addShamanObject(0, poscX-7, poscY-7, rotacion + 180)
  402. elseif counterMinigames >= 2 then
  403. spawnearCn()
  404. end
  405. end
  406. if seconds == 0 then
  407. rondaTerminada()
  408. end
  409. end
  410.  
  411. if timeNewRound < os.time() - 5000 then
  412. timeNewRound = 9999999999999
  413. newRound()
  414. end
  415. end
  416.  
  417. spawnearCn = function ()
  418. tfm.exec.addShamanObject(math.random(1701,1714), poscX, poscY, rotacion, 10, 10)
  419. counterMinigames = 0
  420. poscX, poscY, rotacion = math.random(10,790), math.random(20, 200), math.random(90, 120)
  421. if poscX >= 400 then
  422. rotacion = rotacion * -1
  423. end
  424. end
  425.  
  426. rainLava = function(mapLength, id, lavaWidht, lavaHeigth)
  427. tfm.exec.addPhysicObject(id, math.random(mapLength), 0, {
  428. type = 3,
  429. width = lavaWidht,
  430. height = lavaHeigth,
  431. friction = 0.2,
  432. restitution = 9999,
  433. miceCollision = true,
  434. groundCollision = false,
  435. dynamic = true,
  436. fixedRotation = true,
  437. mass = 10,
  438. linearDamping = 0
  439. })
  440. end
  441.  
  442. eventKeyboard = function(nombre, key, down, posX, posY)
  443. if player.info[nombre].alive then
  444. if (minigame == 6) and (key == 40 or key == 83) and (not tfm.get.room.playerList[nombre].isDead) then -- Se coloca entre () la primera condición para que si alguna de las dos es true pase a la siguiente.
  445. tfm.exec.killPlayer(nombre)
  446. tfm.exec.addShamanObject(90, posX, posY)
  447. elseif (minigame == 7) and (key == 38 or key == 87 or key == 90) then
  448. tfm.exec.killPlayer(nombre)
  449. elseif (minigame == 8) and (key == 38 or key == 39 or key == 37 or key == 87 or key == 90 or key == 40 or key == 83 or key == 65 or key == 68 or key == 81) then
  450. tfm.exec.killPlayer(nombre)
  451. elseif minigame == 9 and key == 69 then
  452. player.info[nombre].countE = player.info[nombre].countE + 1
  453. if player.info[nombre].countE >= 5 then
  454. player.info[nombre].roundWin = true
  455. end
  456. elseif (minigame == 13) and (key == 39 or key == 68) then
  457. tfm.exec.killPlayer(nombre)
  458. elseif (minigame == 14) and (key == 37 or key == 81) then
  459. tfm.exec.killPlayer(nombre)
  460. end
  461. end -- END Playeralive
  462. end
  463.  
  464.  
  465. -- MAYBE AGREGAR, BOMBAS CON ESPACIO:
  466. --[[
  467. local toDespawn = {}
  468. local mice = {}
  469. local countdownBomb = 2000 -- Segundos para poder colocar otra bomba
  470. local countDownExplode = 1000 -- Segundos para que explote la bomba.
  471. local power = 100 -- Fuerza con la que empujará a las ratas.
  472. local area = 60 -- Área de empuje
  473. local miceOnly = false -- Cambiar a "true" (sin las comillas) en caso de que quieras que los objetos en la sala no se muevan
  474.  
  475. function main()
  476. table.foreach(tfm.get.room.playerList, eventNewPlayer)
  477. end
  478.  
  479. function eventNewPlayer(name)
  480. if not mice[name] then
  481. mice[name] = {
  482. timeStamp = os.time()
  483. }
  484. end
  485. tfm.exec.bindKeyboard(name, 32, true, true)
  486. end
  487.  
  488. function eventLoop(time, remaining)
  489. for i, bomb in ipairs(toDespawn) do
  490. if bomb[1] <= os.time() - countDownExplode then
  491. local x = tfm.get.room.objectList[bomb[2]]--.x
  492. -- local y = tfm.get.room.objectList[bomb[2]]--.y
  493. --[[
  494. tfm.exec.removeObject(bomb[2])
  495. table.remove(toDespawn, i)
  496. tfm.exec.explosion(x, y, power, area, miceOnly)
  497. end
  498. end
  499. end
  500.  
  501. function eventKeyboard(name, key, down, x, y)
  502. if mice[name].timeStamp < os.time() - countdownBomb then
  503. local bomb = tfm.exec.addShamanObject(23, x, y)
  504. mice[name].timeStamp = os.time()
  505. table.insert(toDespawn, {os.time(), bomb})
  506. end
  507. end
  508.  
  509. main()
  510.  
  511. ]]
  512.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement