Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Cosas por hacer ;v
- Contador
- Sistema dificultad
- Minijuegos:
- Repetir una secuencia de caritas
- Pregunta: en que año se creó transformice
- ¡Estás congelado! [congelar a toda la sala]
- ¡Ahora estas atado a X! [pareja]
- Alguien tiene que morir! // Aparecen objetos de chaman que intentan matarte
- Haz X click en la pantalla
- Tas chikito
- Transformar a alguien en vamp, alejarlo de los demas, cuando alguien más se transforme, se muera
- Elije tu número de la suerte
- ¡Haz click para generar una explosión! [just one for person, not too explosive]
- Pon la bandera de X[chile, arg] pais!
- Abraza a alguien U//w//U r
- Copia la siguiente frase: "mi mama me mima", etc,etc
- Cuanto es 10x10?
- El ultimo en hacer click muere
- Escoje un bando. Palta o aguacate? [dos textareas, el mas bajo, mueren TODOS]
- Escribe !hate [nombreDeJugador] para matar al jugador mas odiado
- Cuál es el número de tu titulo? [pa hard i guess] wtf imposible SI ES POSIBLE
- Escribe el nombre de tu tribu ["Ninguno"] si no tienes
- ¿En que fecha te registraste?
- ¿Estás muerto? o.O
- Cuántos puntos tienes?
- Quedate CAMINANDO hacia la derecha
- Lluvia de cañones!
- Está lloviendo lava!
- Presiona X veces X tecla!
- Ten cuidado! Tienes super velocidad carnal! // tu rata se ha vuelto loka
- Saltar es mas pesado // tfm.exec.movePlayer(name, 0, 0, true, 0, 100, true)
- PONER QUE SE DESACTIVE MEEP AL INICIAR NUEVO MAPA, player.info[nombre].alive = true TAMBIÉN
- ]]
- local counter = 0
- local seconds = 20
- local rounds = 0
- local difficulty = 0
- local message = ""
- local player = {info = {}}
- local playersAlive = {}
- local killPlayers = {}
- local counterMinigames = 0
- --local timeNewRound = os.time() + 2000 -- Empieza con 15s extras
- local timeNewRound = os.time()
- local frases = {}
- tfm.exec.disableAutoNewGame()
- tfm.exec.disableAutoShaman()
- tfm.exec.disableAutoTimeLeft()
- tfm.exec.disablePhysicalConsumables()
- tfm.exec.disableAutoScore()
- ui.addTextArea(0, "<R><font size='20'><p align='center'>" .. seconds .. "</R>", nil, 378, 32, 30, 30, 0x2B2B2B, 0x121212, 0.7, true) -- Tiempo
- addGender = function(nombre)
- if tfm.get.room.playerList[nombre].gender == 2 then
- player.info[nombre].genero = "masculino"
- elseif tfm.get.room.playerList[nombre].gender == 1 then
- player.info[nombre].genero = "femenino"
- else
- player.info[nombre].genero = "ninguno"
- end
- end
- stats = function()
- for _, nombre in pairs(playersAlive) do
- player.info[nombre].roundWin = false
- player.info[nombre].clicks = 0
- player.info[nombre].countE = 0
- player.info[nombre].team = ""
- player.info[nombre].clicksTextareas = 0
- addGender(nombre)
- counterMinigames = 0
- end
- end
- teclasPlayer = function (nombre)
- tfm.exec.bindKeyboard(nombre, 37, true, true) -- Arrow Left
- tfm.exec.bindKeyboard(nombre, 38, true, true) -- Arrow UP
- tfm.exec.bindKeyboard(nombre, 39, true, true) -- Arrow Right
- tfm.exec.bindKeyboard(nombre, 40, true, true) -- Arrow Down
- tfm.exec.bindKeyboard(nombre, 83, true, true) -- S
- tfm.exec.bindKeyboard(nombre, 87, true, true) -- W
- tfm.exec.bindKeyboard(nombre, 90, true, true) -- Z
- tfm.exec.bindKeyboard(nombre, 65, true, true) -- A
- tfm.exec.bindKeyboard(nombre, 68, true, true) -- D
- tfm.exec.bindKeyboard(nombre, 81, true, true) -- Q
- tfm.exec.bindKeyboard(nombre, 69, true, true) -- E
- end
- eventNewPlayer = function (nombre)
- table.insert(playersAlive, nombre)
- player.info[nombre] = {}
- player.info[nombre].alive = true
- -- player.info[nombre].roundWin = false -- ESTOS SE AGREGAN EN STATS()
- -- player.info[nombre].clicks = 0 -- ESTOS SE AGREGAN EN STATS()
- system.bindMouse(nombre, true)
- teclasPlayer(nombre)
- -- addGender(nombre) -- ESTOS SE AGREGAN EN STATS()
- end
- for i, k in pairs(tfm.get.room.playerList) do
- eventNewPlayer(i)
- end
- eventMouse = function (nombre, posX, posY)
- if player.info[nombre].alive then
- if minigame == 3 then
- player.info[nombre].clicks = player.info[nombre].clicks + 1
- if player.info[nombre].clicks >= 10 then
- player.info[nombre].roundWin = true
- end
- end
- end
- end
- infoGame = function (message)
- ui.addTextArea(1, "<BV><font size='20'><p align='center'><b>" .. message .."</BV></b>", nil, 150, 360, 500, 30, 0x2B2B2B, 0x121212, 0.7, true)
- end
- eventChatMessage = function (nombre, mensaje)
- if player.info[nombre].alive then
- if minigame == 1 then
- if mensaje:lower() == player.info[nombre].genero then
- player.info[nombre].roundWin = true
- end
- elseif minigame == 11 then
- tfm.exec.killPlayer(nombre)
- elseif (minigame == 15) and mensaje == tostring(numeroMinigame) then
- player.info[nombre].roundWin = true
- elseif minigame == 18 and mensaje == "2010" then
- player.info[nombre].roundWin = true
- end
- end -- end playerAlive
- end
- saberDificultad = function ()
- if difficulty == 0 then
- return "<PT>Fácil</PT>"
- elseif difficulty == 1 then
- return "<A:ACTIVE>Medio</A:ACTIVE>"
- elseif difficulty == 2 then
- return "<R>Difícil</R>"
- elseif difficulty == 3 then
- return "<font color='#F93018'>Experto</font>"
- end
- end
- clickTextareas = function ()
- for i = 100, cantidad + 100 do
- 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)
- end
- end
- newRound = function()
- rounds = rounds + 1
- if rounds == 5 or rounds == 10 or rounds == 20 or rounds == 30 then -- En las rondas 5, 10, 20 y 30 aumenta la difcultad
- difficulty = difficulty + 1
- end
- ui.setMapName ("<N>Dificultad: </N>" .. saberDificultad() .. " <G>|</G> <N>Ronda: </N><BV>" .. rounds)
- stats()
- for i = 100, 130 do -- remove all
- ui.removeTextArea(i, nil)
- end
- ui.removeTextArea(7, nil) -- remove ganador palta/aguacate
- if difficulty == 0 then -- EASY
- minigame = math.random(16)
- minigame = 16
- seconds = 10
- if minigame == 1 then
- message = "¡Escribe el género de tu perfil!"
- elseif minigame == 2 then
- message = "¡Esquiva la lava!"
- allWin()
- elseif minigame == 3 then
- seconds = seconds - 2
- message = "¡Haz click en la pantalla 10 veces!"
- elseif minigame == 4 then
- seconds = seconds - 4
- message = "¡Quedate MIRANDO hacia la derecha!"
- elseif minigame == 5 then
- seconds = seconds - 4
- message = "¡Quedate MIRANDO hacia la izquierda!"
- elseif minigame == 6 then
- message= "¡Agachate para cavar tu tumba!"
- allWin()
- elseif minigame == 7 then
- message = "¡No saltes!"
- allWin()
- elseif minigame == 8 then
- message = "¡No te muevas!"
- allWin()
- elseif minigame == 9 then
- message = "Lanza confeti 5 veces"
- elseif minigame == 10 then
- seconds = 6
- message = "¡Baila!"
- elseif minigame == 11 then
- message = "Si mandas un mensaje, ¡mueres!"
- allWin()
- elseif minigame == 12 then
- seconds = 6
- message = "¡Todos tienen meep!"
- allWin()
- meep(true)
- elseif minigame == 13 then
- message = "¡No te muevas hacia la derecha!"
- allWin()
- elseif minigame == 14 then
- message = "¡No te muevas hacia la izquierda!"
- allWin()
- elseif minigame == 15 then
- numeroMinigame = math.random(1000000, 10000000)
- message = "Escribe este numero: <R>" .. numeroMinigame .. "</R>"
- elseif minigame == 16 then
- message = "¿Palta o aguacate? ¡Morirá el peor equipo!"
- 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)
- 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)
- elseif minigame == 17 then
- message = "¡Haz click en todos los puntos!"
- seconds = 21
- cantidad = 10
- clickTextareas(cantidad)
- elseif minigame == 18 then
- message = "¿En qué año se publicó Transformice?"
- elseif minigame == 19 then
- message = "¡Pon la bandera de Argentina!"
- elseif minigame == 20 then
- allWin()
- seconds = 26
- poscX, poscY, rotacion = math.random(10,790), math.random(20, 200), math.random(90, 120)
- if poscX >= 400 then
- rotacion = rotacion * -1
- end
- message = "¡Esquiva los cañones!"
- end
- elseif difficulty == 1 then -- MEDIUM
- elseif difficulty == 2 then -- HARD
- elseif difficulty == 3 then -- EXPERT
- end
- infoGame(message)
- end
- eventTextAreaCallback = function (id, nombre, callback)
- if player.info[nombre].alive then
- if minigame == 16 then
- if callback == "palta" then
- player.info[nombre].team = "palta"
- tfm.exec.chatMessage("¡Ahora estás en el equipo Palta!", nil)
- else
- player.info[nombre].team = "aguacate"
- tfm.exec.chatMessage("¡Ahora estás en el equipo Aguacate!", nil)
- end
- elseif minigame == 17 then
- if callback == 'clicksTextarea' then
- ui.removeTextArea(id, nombre)
- player.info[nombre].clicksTextareas = player.info[nombre].clicksTextareas + 1
- if player.info[nombre].clicksTextareas >= cantidad then
- player.info[nombre].roundWin = true
- end
- end
- end
- end -- end playerAlive
- end
- meep = function(activo)
- for _, nombre in pairs(playersAlive) do
- tfm.exec.giveMeep(nombre, activo)
- end
- end
- removeItem = function (myTable, key)
- for i, keyTable in ipairs(myTable) do
- if keyTable == key then
- table.remove(myTable, i)
- return
- end
- end
- end
- rondaTerminada = function ()
- if minigame == 4 then
- for _, nombre in pairs(playersAlive) do
- if tfm.get.room.playerList[nombre].isFacingRight then
- player.info[nombre].roundWin = true
- end
- end
- elseif minigame == 5 then
- for _, nombre in pairs(playersAlive) do
- if not tfm.get.room.playerList[nombre].isFacingRight then
- player.info[nombre].roundWin = true
- end
- end
- elseif minigame == 16 then
- contPalta = 0
- contAguacate = 0
- ui.removeTextArea(5, nil)
- ui.removeTextArea(6, nil)
- for _, nombre in pairs(playersAlive) do
- if player.info[nombre].team == "palta" then
- contPalta = contPalta + 1
- elseif player.info[nombre].team == "aguacate" then
- contAguacate = contAguacate + 1
- end
- end
- if contPalta > contAguacate then
- ganadorFruta = "Palta"
- elseif contPalta < contAguacate then
- ganadorFruta = "Aguacate"
- else
- ganadorFruta = "¡Empate!"
- end
- ui.addTextArea(7, "<BV><font size='16'><p align='center'><b>El ganador es: <R>" .. ganadorFruta .. "</R></BV>", nil, 280, 160, 0, 30, 0x2B2B2B, 0x121212, 0.7, true)
- for _, nombre in pairs(playersAlive) do
- if (player.info[nombre].team == ganadorFruta:lower()) or ganadorFruta == "¡Empate!" then
- player.info[nombre].roundWin = true
- end
- end
- end
- minigame = 999
- for _, nombre in pairs(playersAlive) do -- agregar al array kilLPlayers todos los jugadores que no hayan termiando la ronda.
- if not player.info[nombre].roundWin then
- table.insert(killPlayers, nombre)
- end
- end
- for _, nombre in pairs(killPlayers) do -- los mata, y los elimina de playersAlive
- tfm.exec.killPlayer(nombre)
- removeItem(playersAlive, nombre)
- end
- killPlayers = {}
- ui.removeTextArea(1, nil)
- timeNewRound = os.time()
- end
- eventEmotePlayed = function(nombre, idEmote, bandera)
- if player.info[nombre].alive then
- if minigame == 10 and idEmote == 0 then
- player.info[nombre].roundWin = true
- elseif minigame == 19 and idEmote == 10 and bandera == "ar" then
- player.info[nombre].roundWin = true
- end
- end
- end
- eventPlayerDied = function(nombre)
- removeItem(playersAlive, nombre)
- player.info[nombre].alive = false
- end
- allWin = function()
- for i, k in pairs(playersAlive) do
- player.info[k].roundWin = true
- end
- end
- tfm.exec.newGame('7773692')
- tfm.exec.setGameTime(100000)
- eventLoop = function (elapsed, remaining)
- counter = counter + 1 -- cada 0.5s el contador aumenta en 1
- if counter >= 2 and seconds > 0 then -- si pasó 1s entonces..
- seconds = seconds - 1 -- se resta 1s
- ui.updateTextArea(0, "<R><font size='20'><p align='center'>" .. seconds .. "</R>", nil) -- se actualiza el textarea
- counter = 0
- if minigame == 2 then
- counterMinigames = counterMinigames + 1
- if counterMinigames >= 2 then
- rainLava(800, 0, 30, 30)
- counterMinigames = 0
- end
- elseif minigame == 20 then
- counterMinigames = counterMinigames + 1
- if counterMinigames == 1 then
- tfm.exec.addShamanObject(0, poscX-7, poscY-7, rotacion + 180)
- elseif counterMinigames >= 2 then
- spawnearCn()
- end
- end
- if seconds == 0 then
- rondaTerminada()
- end
- end
- if timeNewRound < os.time() - 5000 then
- timeNewRound = 9999999999999
- newRound()
- end
- end
- spawnearCn = function ()
- tfm.exec.addShamanObject(math.random(1701,1714), poscX, poscY, rotacion, 10, 10)
- counterMinigames = 0
- poscX, poscY, rotacion = math.random(10,790), math.random(20, 200), math.random(90, 120)
- if poscX >= 400 then
- rotacion = rotacion * -1
- end
- end
- rainLava = function(mapLength, id, lavaWidht, lavaHeigth)
- tfm.exec.addPhysicObject(id, math.random(mapLength), 0, {
- type = 3,
- width = lavaWidht,
- height = lavaHeigth,
- friction = 0.2,
- restitution = 9999,
- miceCollision = true,
- groundCollision = false,
- dynamic = true,
- fixedRotation = true,
- mass = 10,
- linearDamping = 0
- })
- end
- eventKeyboard = function(nombre, key, down, posX, posY)
- if player.info[nombre].alive then
- 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.
- tfm.exec.killPlayer(nombre)
- tfm.exec.addShamanObject(90, posX, posY)
- elseif (minigame == 7) and (key == 38 or key == 87 or key == 90) then
- tfm.exec.killPlayer(nombre)
- 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
- tfm.exec.killPlayer(nombre)
- elseif minigame == 9 and key == 69 then
- player.info[nombre].countE = player.info[nombre].countE + 1
- if player.info[nombre].countE >= 5 then
- player.info[nombre].roundWin = true
- end
- elseif (minigame == 13) and (key == 39 or key == 68) then
- tfm.exec.killPlayer(nombre)
- elseif (minigame == 14) and (key == 37 or key == 81) then
- tfm.exec.killPlayer(nombre)
- end
- end -- END Playeralive
- end
- -- MAYBE AGREGAR, BOMBAS CON ESPACIO:
- --[[
- local toDespawn = {}
- local mice = {}
- local countdownBomb = 2000 -- Segundos para poder colocar otra bomba
- local countDownExplode = 1000 -- Segundos para que explote la bomba.
- local power = 100 -- Fuerza con la que empujará a las ratas.
- local area = 60 -- Área de empuje
- local miceOnly = false -- Cambiar a "true" (sin las comillas) en caso de que quieras que los objetos en la sala no se muevan
- function main()
- table.foreach(tfm.get.room.playerList, eventNewPlayer)
- end
- function eventNewPlayer(name)
- if not mice[name] then
- mice[name] = {
- timeStamp = os.time()
- }
- end
- tfm.exec.bindKeyboard(name, 32, true, true)
- end
- function eventLoop(time, remaining)
- for i, bomb in ipairs(toDespawn) do
- if bomb[1] <= os.time() - countDownExplode then
- local x = tfm.get.room.objectList[bomb[2]]--.x
- -- local y = tfm.get.room.objectList[bomb[2]]--.y
- --[[
- tfm.exec.removeObject(bomb[2])
- table.remove(toDespawn, i)
- tfm.exec.explosion(x, y, power, area, miceOnly)
- end
- end
- end
- function eventKeyboard(name, key, down, x, y)
- if mice[name].timeStamp < os.time() - countdownBomb then
- local bomb = tfm.exec.addShamanObject(23, x, y)
- mice[name].timeStamp = os.time()
- table.insert(toDespawn, {os.time(), bomb})
- end
- end
- main()
- ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement