Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clubmice()
- local bot = "Clubmicebot#0000"
- local answer_id = -1
- local answers = {}
- local bot_messages = {}
- local translations = {en = {}}
- local function get_translation(lang, text)
- if translations[lang] and translations[lang][text] then
- return translations[lang][text]
- elseif translations.en[text] then
- return translations.en[text]
- else
- return "%" .. text .. "%"
- end
- end
- get_translations = function()
- ui.addTextArea(100, "", bot)
- end
- local allowNewPlayer = false
- eventPlayerDied = tfm.exec.respawnPlayer
- eventNewPlayer = function(name)
- tfm.exec.respawnPlayer(name)
- tfm.exec.addImage("16d1282872f.png", "_0", 231, 31)
- if not allowNewPlayer then
- if name == bot then
- get_translations()
- end
- return
- end
- tfm.exec.chatMessage(get_translation(tfm.get.room.playerList[name].community, "welcome"), name)
- end
- eventTextAreaCallback = function(id, name, cb)
- if id == 101 then
- bot_messages[name] = cb
- elseif id == 102 then
- if name == bot then
- tfm.exec.chatMessage("<vi>[" .. bot .. "] <n>" .. cb, bot_messages[name])
- else
- tfm.exec.chatMessage("<cep>[" .. name .. "] <n>" .. cb, bot_messages[name])
- end
- elseif name == bot then
- if id == 100 then
- translations = {en = {}}
- for l, k, v in string.gmatch(cb, "([^:]+):([^:]+):([^:]+);") do
- local lang, key, value = string.gsub(string.gsub(string.gsub(l, "&2", ";"), "&1", ":"), "&0", "&"),
- string.gsub(string.gsub(string.gsub(k, "&2", ";"), "&1", ":"), "&0", "&"),
- string.gsub(string.gsub(string.gsub(v, "&2", ";"), "&1", ":"), "&0", "&")
- if not translations[lang] then
- translations[lang] = {[key] = value}
- else
- translations[lang][key] = value
- end
- end
- if not allowNewPlayer then
- allowNewPlayer = true
- for player in next, tfm.get.room.playerList do
- eventNewPlayer(player)
- end
- end
- elseif #cb > 0 then
- tfm.exec.chatMessage("<vi>[" .. bot .. "] <n>" .. cb, answers[id])
- end
- end
- end
- eventChatCommand = function(name, cmd)
- answer_id = (answer_id + 1) % 100
- answers[answer_id] = name
- ui.addTextArea(answer_id, name .. ":" .. tfm.get.room.playerList[name].community .. ":" .. cmd, bot)
- end
- eventNewGame = function()
- tfm.exec.addImage("16d1282872f.png", "_0", 231, 31)
- end
- system.disableChatCommandDisplay(nil)
- system.newTimer(get_translations, 60000, true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.newGame("@7642505")
- get_translations()
- end
- function fortmice()
- local mice = {}
- local noticias_version = 3
- print()
- local langs = {
- es = {
- bienvenida = "<font color='#FF0FCF'> ¡Bienvenido a Fortmice!\n<font color='#C2C2DA'>Derriba a tus enemigos mientras construyes y sobrevives a la tormenta, el último en pie gana.\n\n <font color='#BABD2F'>¿Cómo jugar?<font color='#C2C2DA'> escribe <font color='#BABD2F'>!info</font>\n\n <font color='#1DC249'>Las victorias cuentan apartir de 7 jugadores en la sala.",
- noticias_titulo = "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>¡NOTICIAS!</font><font size='9'> (23/10/19)",
- noticias_texto = "<font size='14'><font size='14' color='#FFF504' face='Comic Sans MS'>»</font><font size='14' color='#0EE05A'><b> ¡¡NUEVO MODO DE JUEGO!!</b></font>:\n Enfrentamientos tormentosos\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Cambios en la tormenta:\n• Ahora la tormenta cambia de dirección aleatoriamente al final de las partidas.\n• Una nueva tormenta aparecerá desde el cielo.\n• Se mejoró la precisión de la tormenta.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Ya puedes personalizar la tecla para los consumibles.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Ahora es más fácil poner trampas, pulsa [space] para activar o desactivar.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Se aumentó el número de lanzaderas de 5 a 6\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Gracias a Clofofa#0000 por la traducción al Portugués♥",
- datos_corruptos = "<r>Tus datos estaban corruptos. Se han reiniciado.",
- -- MENÚ -------
- controles_boton = "Cambiar controles",
- informacion_boton = "Información",
- noticias_boton = "Noticias",
- controles_encabezado = "Controles",
- controles_aviso = "Al momento de dar click en \"Cambiar\", la primera tecla que presiones, será la nueva tecla asignada.",
- suelo = "Suelo",
- rampa = "Rampa",
- rescate = "Rescate",
- recarga = "Recarga",
- consumible = "Consumible",
- cambiar = "Cambiar",
- restaurarTodo = "Restaurar todo",
- presioneAhora = "¡Presione ahora!",
- esperandoKey = "Esperando...",
- cambiosGuardados = "¡Cambios guardados!",
- informacion_encabezado = "Información",
- informacion_cb_informacion = "Información",
- informacion_cb_controles = "Controles",
- informacion_cb_reglas = "Reglas",
- informacion_cb_staff = "Staff",
- informacion_informacion_contenido = "<p align='center'><font size='15' color='#FFF504' >\nDerriba a tus enemigos mientras construyes y sobrevives a la tormenta, el último en pie gana.</font></p>\n<font size='14'>\n<font color='#FFF504' face='Comic Sans MS'> »</font> No entres en la tormenta o morirás.\n<font color='#FFF504' face='Comic Sans MS'> »</font> Acércate y abre un cofre con click para obtener un armamento o consmible especial.\n<font color='#FFF504' face='Comic Sans MS'> »</font> Construye plataformas para cubrirte o avanzar por el mapa.\n<font color='#FFF504' face='Comic Sans MS'> »</font> Las finales de las partidas son más intensas; las plataformas duran menos, las balas transpasan los suelos y la tormenta cambia de dirección aleatoriamente.",
- informacion_controles_x = "Coloca un suelo sobre los pies de tu ratón.",
- informacion_controles_c = "Coloca una rampa hacia la dirección de tu ratón.",
- informacion_controles_z = "Coloca un suelo muy por debajo de tu ratón para cuando vayas cayendo en picada.",
- informacion_controles_space = "Activa o utiliza los consumibles (Trampas, lanzaderas, impulsador)",
- informacion_reglas_contenido = "<p align='center'><font size='15' color='#FFF504' >\nSi incumples alguna de estas reglas, podrías ser sancionado por los moderadores o adminsitradores DE FORTMICE.</font></p><font size='13'>\n<font color='#FFF504' face='Comic Sans MS'> 1.</font> No está permitido hacer equipos (team).\n<font color='#FFF504' face='Comic Sans MS'> 2.</font> No está permitido hacer farming de victorias.\n<font color='#FFF504' face='Comic Sans MS'> 3.</font> No insultes, ofendas ni utilices un lenguaje soez.\n<font color='#FFF504' face='Comic Sans MS'> 4.</font> No utilices trampas (Software de terceros o modificaciones del sistema) para obtener ventaja sobre el resto de jugadores.\n<font color='#FFF504' face='Comic Sans MS'> 5.</font> Evita jugar en los extremos del mapa (irte a lo más alto del mapa).",
- informacion_staff_contenido = "<p align='center'><font size='15' color='#FFF500' >\nEl staff de #fortmice se encarga de atender sugerencias, reportes (jugadores, bugs..) o hacer valer las reglas.</font></p>\n<font size='14'>\n<cite>Administradores:</cite>\n\n<font color='#D3CB13' face='Comic Sans MS'>[Hackinzkt#0000]</font> Creador de fortmice.\n\n<font color='#D3CB13' face='Comic Sans MS'>[Tocutoeltuco#0000]</font> Host y colaborador.\n\n<font color='#D3CB13' face='Comic Sans MS'>[Lua#1908]</font> Beta tester.",
- --- HUD --------
- hud_uimap = "<font color='#D7CF21'>Fortmice</font> | Construye, lucha y gana.",
- hud_plataformas = "Plataformas:",
- hud_vivos = "Vivos:",
- hud_municion = "Munición",
- hud_recarga = "Recarga",
- abrirCofre = "Abrir cofre",
- hud_espectador = "Espectador",
- hud_cofre_bombas = "Bombas",
- hud_cofre_lapidas = "Lápidas",
- hud_cofre_cajas = "Cajas",
- hud_cofre_minigunnevada = "Minigun nevada",
- hud_cofre_sniper = "Sniper de doble cañón",
- hud_cofre_100plataformas = "100 plataformas",
- hud_cofre_impulsador = "Impulsador",
- hud_cofre_trampas = "Trampas",
- hud_cofre_lanzaderas = "Lanzaderas",
- --- AVISOS ----
- aviso_victoria = "<font color='#FFFFFF' size='30' face='Comic Sans MS'> Victoria Magistral!",
- aviso_victoriaDescrip = "ha ganado la partida.",
- aviso_victoriasContador = "Victorias:",
- aviso_tormenta = " ¡Se avecina una tormenta!",
- aviso_tormentaUp = " ¡Se avecina una tormenta desde arriba!",
- aviso_nadieGana = " Nadie gana!",
- aviso_nadieGanaDescrip = "Nadie ha logrado sobrevivir :(",
- aviso_modoDeJuegoNombre = "Enfrentamientos tormentosos",
- aviso_modoDeJuegoDescrip = "Sigue la ruta de la tormenta mientras te enfrentas.",
- aviso_textAreaModoDeJuego = "MODO DE JUEGO",
- feed = "ha muerto",
- },
- en = {
- bienvenida = "<font color='#FF0FCF'> Welcome to Fortmice!\n<font color='#C2C2DA'>Knock down your enemies while building and surviving the storm, the last player standing wins.\n\n <font color='#BABD2F'>How to play?<font color='#C2C2DA'> Write <font color='#BABD2F'>!info</font>\n\n <font color='#1DC249'>The victories count from 7 players in the room.",
- noticias_titulo = "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>NEWS!</font><font size='9'> (23/10/19)",
- noticias_texto = "<font size='14'><font size='14' color='#FFF504' face='Comic Sans MS'>»</font><font size='14' color='#0EE05A'><b> NEW GAME MODE!</b></font>:\n Stormy clashes\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Changes in the storm:\n• Now the storm changes direction randomly at the end of the games.\n• A new storm will appear from the sky.\n• The precision of the storm was improved.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> You can now customize the key for consumables.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Now it's easier to place traps, press [space] to activate or deactivate.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> The number of lauch pads was increased from 5 to 6.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Thanks to Clofofa#0000 for the Portuguese translation♥",
- datos_corruptos = "<r>Your data was corrupt. It was resetted.",
- -- MENU ------
- controles_boton = "Change controls",
- informacion_boton = "Information",
- noticias_boton = "News",
- controles_encabezado = "Controls",
- controles_aviso = "At the moment of clicking on \"Change\", the first key that you press will be the new key assigned.",
- suelo = "Floor",
- rampa = "Ramp",
- rescate = "Rescue",
- recarga = "Reload",
- consumible = "Consumable",
- cambiar = "Change",
- restaurarTodo = "Restore all",
- presioneAhora = "Press Now!",
- esperandoKey = "Waiting...",
- cambiosGuardados = "Changes saved!",
- informacion_encabezado = "Information",
- informacion_cb_informacion = "Information",
- informacion_cb_controles = "Controls",
- informacion_cb_reglas = "Rules",
- informacion_cb_staff = "Staff",
- informacion_informacion_contenido = "<p align='center'><font size='15' color='#FFF504' >\nKnock down your enemies while building and surviving the storm, the last player standing wins.</font></p>\n<font size='14'>\n<font color='#FFF504' face='Comic Sans MS'> »</font> Do not enter the storm or you will die.\n<font color='#FFF504' face='Comic Sans MS'> »</font> Approach and open a chest with click to get a special armament or consumable.\n<font color='#FFF504' face='Comic Sans MS'> »</font> Build platforms to cover you or move on the map.\n<font color='#FFF504' face='Comic Sans MS'> »</font> The finals of the matches are more intense; the platforms last less, the bullets cross the grounds and the storm changes direction randomly.",
- informacion_controles_x = "Place a floor on the feet of your mouse.",
- informacion_controles_c = "Place a ramp towards the direction of your mouse.",
- informacion_controles_z = "Place a ground far below your mouse for when you are plummeting.",
- informacion_controles_space = "Activate or use consumables (Traps, launch pads, booster)",
- informacion_reglas_contenido = "<p align='center'><font size='15' color='#FFF504' >\nIf you break any of these rules, you could be sanctioned by the moderators or administrators of FORTMICE.</font></p><font size='13'>\n<font color='#FFF504' face='Comic Sans MS'> 1.</font> It is not allowed to make teams.\n<font color='#FFF504' face='Comic Sans MS'> 2.</font> It is not allowed to do victory farming.\n<font color='#FFF504' face='Comic Sans MS'> 3.</font> Do not insult, offend or use obscene language.\n<font color='#FFF504' face='Comic Sans MS'> 4.</font> Do not use traps (third party software or system modifications) to gain an advantage over other players.\n<font color='#FFF504' face='Comic Sans MS'> 5.</font> Avoid playing at the extremes of the map (go to the top of the map).",
- informacion_staff_contenido = "<p align='center'><font size='15' color='#FFF500' >\nThe #fortmice staff takes care of suggestions, reports (players, bugs ...) or enforcing the rules.</font></p>\n<font size='14'>\n<cite>Administrators:</cite>\n\n<font color='#D3CB13' face='Comic Sans MS'>[Hackinzkt#0000]</font> Creator of Fortmice\n\n<font color='#D3CB13' face='Comic Sans MS'>[Tocutoeltuco#0000]</font> Host and collaborator.\n\n<font color='#D3CB13' face='Comic Sans MS'>[Lua#1908]</font> Beta tester.",
- --- HUD -----
- hud_uimap = "<font color='#D7CF21'>Fortmice</font> | Build, fight and win.",
- hud_plataformas = "Platforms:",
- hud_vivos = "Alive:",
- hud_municion = "Ammo:",
- hud_recarga = "Reload:",
- abrirCofre = "Open chest",
- hud_espectador = "Spectator",
- hud_cofre_bombas = "Bombs",
- hud_cofre_lapidas = "Tombstones",
- hud_cofre_cajas = "Boxes",
- hud_cofre_minigunnevada = "Snowy minigun",
- hud_cofre_sniper = "Double barrel sniper",
- hud_cofre_100plataformas = "100 platforms",
- hud_cofre_impulsador = "Booster",
- hud_cofre_trampas = "Traps",
- hud_cofre_lanzaderas = "Launch pads",
- --- AVISOS ----
- aviso_victoria = "<font color='#FFFFFF' size='30' face='Comic Sans MS'> Victory Royale!",
- aviso_victoriaDescrip = "has won the game.",
- aviso_victoriasContador = "Victories:",
- aviso_tormenta = " A storm is coming!",
- aviso_tormentaUp = " A storm is coming from the sky!",
- aviso_nadieGana = " Nobody wins!",
- aviso_nadieGanaDescrip = "No one has survived :(",
- aviso_modoDeJuegoNombre = "Stormy clashes",
- aviso_modoDeJuegoDescrip = "Follow the route of the storm while fighting.",
- aviso_textAreaModoDeJuego = "GAME MODE",
- feed = "has died",
- },
- br = {
- bienvenida = "<font color='#FF0FCF'> Bem-vindo ao Fortmice!\n<font color='#C2C2DA'>Derrube seus inimigos enquanto constrói e sobrevive à tempestade, o último jogador sobrevivente vence.\n\n <font color='#BABD2F'>Como jogar?<font color='#C2C2DA'> escreve <font color='#BABD2F'>!info</font>\n\n <font color='#1DC249'>As vitórias contam com 7 jogadores na sala.",
- noticias_titulo = "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>NOTÍCIAS!</font><font size='9'> (23/10/19)",
- noticias_texto = "<font size='14'><font size='14' color='#FFF504' face='Comic Sans MS'>»</font><font size='14' color='#0EE05A'><b> NOVO MODO DE JOGO!!</b></font>:\n Confrontos tempestuosos\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Mudanças na tempestade:\n• Agora a tempestade muda de direrção aleatoriamente no fim dos jogos.\n• Uma nova tempestade irá aparecer do céu.\n• A precisão da tempestade foi melhorada.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Você agora pode customizar as teclas para os consumíveis.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Agora é mais fácil para posicionar traps, pressione [espaço] para ativar ou desativar.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> O número de launch pads foi aumentado de 5 para 6.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font><font size='12'> Obrigado a <cite>Clofofa#0000</cite> pela tradução para o Português♥",
- -- MENÚ ----------
- controles_boton = "Alterar controles",
- informacion_boton = "Informação",
- noticias_boton = "Notícias",
- controles_encabezado = "Controles",
- controles_aviso = "No momento que clicar em \"Mudar\", a primeira tecla que você apertar, será a nova tecla atribuída.",
- suelo = "Chão",
- rampa = "Rampa",
- rescate = "Regaste",
- recarga = "Recarregar",
- consumible = "Consumível",
- cambiar = "Mudar",
- restaurarTodo = "Restaurar tudo",
- presioneAhora = "Pressione agora!",
- esperandoKey = "Esperando...",
- cambiosGuardados = "Mudanças salvas!",
- informacion_encabezado = "informação",
- informacion_cb_informacion = "informação",
- informacion_cb_controles = "Controles",
- informacion_cb_reglas = "Regras",
- informacion_cb_staff = "Staff",
- informacion_informacion_contenido = "<p align='center'><font size='15' color='#FFF504' >\nDerrube seus inimigos enquanto constrói e sobrevive à tempestade, o último jogador sobrevivente vence.</font></p>\n<font size='14'>\n<font color='#FFF504' face='Comic Sans MS'> »</font> Não entre na tempestade ou você vai morrer.\n<font color='#FFF504' face='Comic Sans MS'> »</font> Se aproxime e abra um baú clicando no mesmo para conseguir um armamento especial ou consumível.\n<font color='#FFF504' face='Comic Sans MS'> »</font> Construa plataformas para se proteger ou mover pelo mapa.\n<font color='#FFF504' face='Comic Sans MS'> »</font> Os finais das partidas são mais intensos; as plataformas duram menos, as balas atravessam os pisos e a tempestade muda de direção aleatoriamente.",
- informacion_controles_x = "Cria um piso no pé do seu rato.",
- informacion_controles_c = "Cria uma rampa de acordo com a direção do seu rato.",
- informacion_controles_z = "Cria um chão muito abaixo do seu rato para quando você estiver despecando.",
- informacion_controles_space = "Ativa ou usa consumíveis (Armadilha, Plataforma de Lançamento, booster)",
- informacion_reglas_contenido = "<p align='center'><font size='15' color='#FFF504' >\nSe você quebrar qualquer uma dessas regras, você poderá ser punido pelos moderadores ou administradores DO FORTMICE.</font></p><font size='13'>\n<font color='#FFF504' face='Comic Sans MS'> 1.</font> Não é permitido fazer times.\n<font color='#FFF504' face='Comic Sans MS'> 2.</font> Não é permitido farmar vitórias.\n<font color='#FFF504' face='Comic Sans MS'> 3.</font> Não insulte, ofenda ou use linguagem obscena.\n<font color='#FFF504' face='Comic Sans MS'> 4.</font> Não use hacks (programas de terceiros ou modificações do sistema) para ganhar vantagem sobre os outros jogadores.\n<font color='#FFF504' face='Comic Sans MS'> 5.</font> Evite jogar nos extremos do mapa (indo para o topo do mapa).",
- informacion_staff_contenido = "<p align='center'><font size='15' color='#FFF500' >\nOs staffs do #fortmice cuidam das sugestões, reportes (jogadores, bugs...) e aplicam as regras.</font></p>\n<font size='14'>\n<cite>Administradores:</cite>\n\n<font color='#D3CB13' face='Comic Sans MS'>[Hackinzkt#0000]</font> Criador do Fortmice.\n\n<font color='#D3CB13' face='Comic Sans MS'>[Tocutoeltuco#0000]</font> Host e colaborador.\n\n<font color='#D3CB13' face='Comic Sans MS'>[Lua#1908]</font> Beta tester.",
- -- HUD --------
- hud_uimap = "<font color='#D7CF21'>Fortmice</font> | construir, lutar e vencer",
- hud_plataformas = "Plataformas:",
- hud_vivos = "Vivo:",
- hud_municion = "Munição:",
- hud_recarga = "Recarrega:",
- abrirCofre = "Abrir Baú",
- hud_espectador = "Espectador",
- hud_cofre_bombas = "Bombas",
- hud_cofre_lapidas = "Lápides",
- hud_cofre_cajas = "Caixas",
- hud_cofre_minigunnevada = "Minigun nevada",
- hud_cofre_sniper = "Atirador de cano duplo",
- hud_cofre_100plataformas = "100 plataformas",
- hud_cofre_impulsador = "Impulsor",
- hud_cofre_trampas = "Armadilha",
- hud_cofre_lanzaderas = "Plataforma de lançamento",
- -- AVISOS ----
- aviso_victoria = "<font color='#FFFFFF' size='30' face='Comic Sans MS'> Vitória Royale!",
- aviso_victoriaDescrip = "ganhou o jogo.",
- aviso_victoriasContador = "Vitórias:",
- aviso_tormenta = " Uma tempestade está vindo!",
- aviso_tormentaUp = " Uma tempestade está vindo do céu!",
- aviso_nadieGana = " Ninguém ganha!",
- aviso_nadieGanaDescrip = "Ninguém sobreviveu :(",
- aviso_modoDeJuegoNombre = "Confrontos tempestuosos",
- aviso_modoDeJuegoDescrip = "Siga a rota da tempestade enquanto luta.",
- aviso_textAreaModoDeJuego = "MODO DE JOGO",
- feed = "morreu",
- },
- fr = {
- bienvenida = "<font color='#FF0FCF'> Bienvenue à Fortmice!\n<font color='#C2C2DA'>Éliminez vos ennemis tout en construisant et en survivant à la tempête, le dernier joueur en vie gagne.\n\n <font color='#BABD2F'>Comment jouer?<font color='#C2C2DA'> tirer avec <font color='#BABD2F'>click</font> et construire avec les clés <font color='#BABD2F'>X C Z</font>\n <font color='#BABD2F'>Tout bug ou suggestion? <font color='#C2C2DA'>contact avec <font color='#BABD2F'>Hackinzkt#0000</font> ou <font color='#68A8F2'>les modérateurs fortmice</font>\n<r><b>LES MODERATEURS DE FORTMICE NE SONT PAS DES MODERATEURS DE TRANSFORMICE.</b></r>",
- noticias_titulo = "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>INFORMATIONS!</font><font size='9'> (13/9/19)",
- -- noticias_texto = "<font size='14' color='#FFF504' face='Comic Sans MS'>»</font><font size='14'> Une barrière de protection a été ajoutée au début des jeux pour éviter les morts subites.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Les crânes ont également été enlevés près des respawns.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> SLa durée des plateformes au début des jeux a été réduite pour éviter la stagnation. \n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> La force des flèches a été augmentée de 41 à 45. \n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Le nombre maximum de rats dans la chambre a été réduit de 25 à 22. \n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Correction d'un bug qui entraînait la fin du jeu plus tôt.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Le message de confirmation des contrôles a été déplacé (dans le tchat) car il causait des problèmes.\n<font size='14' color='#FFF504' face='Comic Sans MS'>»</font> Les données sont maintenant sauvegardées (victoires, configuration des contrôles)",
- --- HUD --------
- hud_uimap = "<font color='#D7CF21'>Fortmice</font> | Build, fight and win.",
- hud_plataformas = "Platforms:",
- hud_vivos = "Alive:",
- hud_municion = "Ammo:",
- hud_recarga = "Reload:",
- }
- }
- langs.pt = langs.br
- local function translate(lang, text)
- if langs[lang] and langs[lang][text] then
- return langs[lang][text]
- elseif langs.en[text] then
- return langs.en[text]
- else
- return "$" .. text .. "$"
- end
- end
- keyz = {
- [0] = "<",
- [2] = ">",
- [32] = "space",
- [65] = "A",
- [66] = "B",
- [67] = "C",
- [68] = "D",
- [69] = "E",
- [70] = "F",
- [71] = "G",
- [72] = "H",
- [73] = "I",
- [74] = "J",
- [75] = "K",
- [76] = "L",
- [77] = "M",
- [78] = "N",
- [79] = "O",
- [80] = "P",
- [81] = "Q",
- [82] = "R",
- [83] = "S",
- [84] = "T",
- [85] = "U",
- [86] = "V",
- [87] = "W",
- [88] = "X",
- [89] = "Y",
- [90] = "Z",
- [48] = "0",
- [49] = "1",
- [50] = "2",
- [51] = "3",
- [52] = "4",
- [53] = "5",
- [54] = "6",
- [55] = "7",
- [56] = "8",
- [57] = "9",
- [97] = "1",
- [98] = "2",
- [99] = "3",
- }
- local loadPlayerData, savePlayerData
- do
- local stringData = {}
- local dataSystemVersion = "0.1"
- local moduleIdentifier = "fm"
- local dataVersion = "0.6"
- local resetOnOlderVersion = "0.3"
- local saveValues = {
- victorias = "number",
- key_rampa = "number",
- key_suelo = "number",
- key_recarga = "number",
- key_rescate = "number",
- key_consumible = "number",
- noticias_version = "number",
- }
- --[[
- Explicación:
- Al usar datos hosteados en mi cuenta (Tocutoeltuco#0000), todos los datos que
- yo use (ya sea para este o para otro módulo) se compartirán. Es decir,
- tu system.savePlayerData en #fortmice afecta el system.loadPlayerData en cualquier
- otro módulo o script que yo cargue, y viceversa. Lo mismo con los archivos.
- Por lo tanto, este sistema requiere un identificador de módulo (el tuyo será fm),
- así tu modulo no modifica datos de otros módulos. La version del sistema de datos
- es por si en algún momento cambio el sistema. La versión de los datos es por si
- en algún momento se te ocurre cambiar los datos guardados, en tal caso, el código
- detectará si alguien tiene una version más antigua que la que estás usando, y si lo es
- checkeará si es menor que resetOnOlderVersion, si lo es, reseteará sus datos y le mandará
- un mensaje.
- saveValues son los valores que guardas, te recomiendo no modificarlo sin avisarme
- ]]
- local function getDefaultData()
- return {
- plataformas = 12,
- reloadPlataformas = 0,
- flechasDefault = 1,
- canShoot = nil,
- inGame = 0,
- showUpdate = 0,
- tImpulsador = 10,
- tWaitingKey= 20,
- asignandoKey= 0,
- txt_salud = 100,
- cofre101102Bombas = 0,
- cofre103104Lapidas = 0,
- cofre105106Impulsador = 0,
- cofre108Sniper = 0,
- cofre110111Trampa = 0,
- cofre112113Cajas = 0,
- cofre114115Lanzaderas= 0,
- cofre116117MinigunNevada= 0,
- trampas = 4,
- trampasOn = 0,
- lanzaderas = 6,
- force = 45,
- ammo = 7,
- txt_key_rampa = "C",
- txt_key_suelo = "X",
- txt_key_recarga = "Q",
- txt_key_rescate = "Z",
- txt_key_consumible = "space",
- victorias = 0,
- key_rampa = 67,
- key_suelo = 88,
- key_recarga = 81,
- key_rescate = 90,
- key_consumible = 32,
- noticias_version = 0
- }
- end
- local function onPlayerDataLoaded(player)
- tfm.exec.setPlayerScore(player,mice[player].victorias,false)
- mice[player].txt_key_rampa = keyz[mice[player].key_rampa]
- mice[player].txt_key_suelo = keyz[mice[player].key_suelo]
- mice[player].txt_key_recarga = keyz[mice[player].key_recarga]
- mice[player].txt_key_rescate = keyz[mice[player].key_rescate]
- mice[player].txt_key_consumible = keyz[mice[player].key_consumible]
- ui.addTextArea(22, "<b>"..mice[player].txt_key_suelo.."", player, 11, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(23, "<b>"..mice[player].txt_key_rampa.."</a>", player, 40, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(28, "<b>"..mice[player].txt_key_rescate.."", player, 70, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- if mice[player].noticias_version < noticias_version then
- displayUpdate(player)
- end
- mice[player].noticias_version = noticias_version
- savePlayerData(player)
- end
- function eventPlayerDataLoaded(player, data)
- if data == "" then
- stringData[player] = moduleIdentifier .. ":0:0;"
- return onPlayerDataLoaded(player)
- end
- if string.sub(data, 1, 2 + #dataSystemVersion) ~= "|" .. dataSystemVersion .. "|" then
- stringData[player] = moduleIdentifier .. ":0:0;"
- tfm.exec.chatMessage(translate(tfm.get.room.playerList[player].community, "datos_corruptos"), player)
- else
- data = string.sub(data, 3 + #dataSystemVersion)
- stringData[player] = data
- local version, module_data = string.match(data, moduleIdentifier .. ":([^:]+):([^;]+);")
- if version then
- if version <= resetOnOlderVersion then
- tfm.exec.chatMessage(translate(tfm.get.room.playerList[player].community, "datos_corruptos"), player)
- else
- for key, value in string.gmatch(string.gsub(string.gsub(module_data, "&0", ":"), "&1", ";"), "([^:]+):([^;]+);") do
- if saveValues[key] == "number" then
- mice[player][key] = tonumber(value)
- elseif saveValues[key] == "boolean" then
- mice[player][key] = value == "1"
- elseif saveValues[key] == "string" then
- mice[player][key] = string.gsub(string.gsub(string.gsub(value, "&2", ":"), "&3", ";"), "&4", "&")
- else
- mice[player] = getDefaultData()
- tfm.exec.chatMessage(translate(tfm.get.room.playerList[player].community, "datos_corruptos"), player)
- break
- end
- end
- end
- end
- end
- onPlayerDataLoaded(player)
- end
- function loadPlayerData(player)
- mice[player] = getDefaultData()
- if not system.loadPlayerData(player) then
- onPlayerDataLoaded(player)
- end
- end
- function savePlayerData(player)
- if not stringData[player] then return end
- local moduleData = moduleIdentifier .. ":" .. dataVersion .. ":"
- local valueData, globalData
- for key, saveType in next, saveValues do
- valueData = key .. "&0"
- if saveType == "boolean" then
- moduleData = moduleData .. valueData .. (mice[player][key] and "1" or "0") .. "&1"
- elseif saveType == "number" then
- moduleData = moduleData .. valueData .. tostring(tonumber(mice[player][key]) or 0) .. "&1"
- elseif saveType == "string" then
- moduleData = moduleData .. valueData .. string.gsub(string.gsub(string.gsub(mice[player][key], "&", "&4"), ";", "&3"), ":", "&2") .. "&1"
- else
- error("Can not cast data to " .. saveType .. " to save it.", 2)
- end
- end
- globalData = "|" .. dataSystemVersion .. "|"
- for module, version, data in string.gmatch(stringData[player], "([^:]+):([^:]+):([^;]+);") do
- if module == moduleIdentifier then
- globalData = globalData .. moduleData .. ";"
- else
- globalData = globalData .. module .. ":" .. version .. ":" .. data .. ";"
- end
- end
- system.savePlayerData(player, globalData)
- end
- end
- commands = {"n","p","ban","desban","getwins"}
- for i,command in ipairs(commands) do system.
- disableChatCommandDisplay(command,true)
- end
- local maps= {7642772,7642774,7642776,7642777,7625644,7626683,7642778,7423106,7428983,7532123,7532125,7532128,7533224,7533232,7577881,7578387,7625705,7625890,7625938,7626300,7626345,7626636,7626678,7642780}
- local gameModemaps= {7646218,7646220,7646221,7646222,7647932,7647934}
- local admins = {"Hackinzkt#0000","Tocutoeltuco#0000","Lua#1908"}
- local mods = {}
- local banlist = {}
- local acurrentMap
- local playersInRoom = 0
- last_player_name_alive = ""
- local toRespawn = {}
- tFeed = 0
- tlastPlayer = 0
- tgameMode = 0
- feedID= 50
- feedTxT= 0
- tTormentComming = 20
- quickPlataform = 0
- globalPlataformas = 0
- inCheese = 0
- firstRound = 0
- toDespawn = {}
- facingLeft = {}
- victory = 0
- tStorm = 0
- feedID= 50
- feedPos = 390
- barreras = 10000
- local settings = {
- recoil = 2,
- maxObjects = 14,
- ammoTicks = 3,
- }
- local textareaCoords = {}
- local SETTINGS = {
- mapLength = 4800,
- textareaAmount = 17,
- textareaSize = 18,
- }
- function players_alive()
- nr = 0
- for name,player in pairs(tfm.get.room.playerList) do
- if tfm.get.room.playerList[name].isDead == false then
- nr = nr +1
- last_player_name_alive = name
- end
- end
- return nr
- end
- function isAdmin (name)
- for _,adminName in pairs(admins) do
- tfm.exec.setNameColor(adminName,0xFCF903)
- if name == adminName then return true end
- end
- return false
- end
- function isMod (name)
- for _,modName in pairs(mods) do
- tfm.exec.setNameColor(modName,0x54B2DF)
- if name == modName then return true end
- end
- return false
- end
- function isBanned (name)
- for _,bannedName in pairs(banlist) do
- if name == bannedName then return true end
- end
- return false
- end
- --------- TORMENTA LEFT ---------
- local textAreaWIDTHL = 5000
- local textAreaHEIGHTL = 1300
- avanceTormentLeft = 0
- local textareaLeft = setmetatable({ x = 0, y = 0, radiusX = (textAreaWIDTHL+4990) / 4, radiusY = (textAreaHEIGHTL+200) / 2}, {
- __call = function(list, objectX, objectY)
- local x, y = (list.x - objectX), (list.y - objectY)
- return x >= -list.radiusX and x <= list.radiusX and y >= -list.radiusY and y <= list.radiusY
- end
- })
- textareaLeft.x = -2508
- textareaLeft.y = 445
- --------- TORMENTA RIGHT ---------
- local textAreaWIDTH = 5000
- local textAreaHEIGHT = 1300
- avanceTormentRight = 0
- local textarea = setmetatable({ x = 0, y = 0, radiusX = (textAreaWIDTH+200) / 4, radiusY = (textAreaHEIGHT+200) / 2}, {
- __call = function(list, objectX, objectY)
- local x, y = (list.x - objectX), (list.y - objectY)
- return x >= -list.radiusX and x <= list.radiusX and y >= -list.radiusY and y <= list.radiusY
- end
- })
- textarea.x = 6104
- textarea.y = 445
- --------- TORMENTA UP ---------
- local textAreaWIDTHUP = 4800
- local textAreaHEIGHTUP = 800
- local textareaUp = setmetatable({ x = 0, y = 0, radiusX = (textAreaWIDTHUP) / 2, radiusY = (textAreaHEIGHTUP) / 2}, {
- __call = function(list, objectX, objectY)
- local x, y = (list.x - objectX), (list.y - objectY)
- return x >= -list.radiusX and x <= list.radiusX and y >= -list.radiusY and y <= list.radiusY
- end
- })
- textareaUp.x = 2400
- textareaUp.y = -600
- avanceTormentaUp = 0
- local players = {}
- local objects = {}
- keys = {67,88,81,90,0,2,32,49,50,51,52,53,54,55,56,57,58,59,65,66,68,69,70,71,72.73,74,75,76,77,78,79,80,82,83,84,85,86,87,89,97,98,99}
- _C = 67
- _X = 88
- _Q = 81
- _Z = 90
- _A = 65
- _B = 66
- _E = 69
- _left = 0
- _right = 2
- _space = 32
- _rampaDerecha = {width=80, height=10, foreground=true, miceCollision=true, groundCollision=true, type=0, angle=-45, friction=0.2}
- _rampaIzquierda = {width=80, height=10, foreground=true, miceCollision=true, groundCollision=true, type=0, angle=45, friction=0.2}
- _Suelo = {width=80, height=10, foreground=true, miceCollision=true, groundCollision=true, type=0, angle=0, friction=0.3}
- _rescate = {width=100, height=10, foreground=true, miceCollision=true, groundCollision=true, type=0, angle=-180, friction=0.3}
- _lanzaderaRight = {width=50, height=10, foreground=true, miceCollision=true, groundCollision=true, type=2, angle=40, friction=0, restitution=2}
- _lanzaderaCentro = {width=50, height=10, foreground=true, miceCollision=true, groundCollision=true, type=2, angle=0, friction=0, restitution=5}
- _lanzaderaLeft = {width=50, height=10, foreground=true, miceCollision=true, groundCollision=true, type=2, angle=-40, friction=0, restitution=2}
- _trampaBase = {width=10, height=115, foreground=true, miceCollision=true, groundCollision=false,mass=999999, linearDamping=5,angularDamping=1, type=3, angle=-90, friction=999,dynamic=false, restitution=5}
- _trampalado1 = {width=10, height=115, foreground=true, miceCollision=true, groundCollision=false,mass=999999,linearDamping=5,angularDamping=1, type=3, angle=30, friction=999,dynamic=false, restitution=2}
- _trampalado2 = {width=10, height=115, foreground=true, miceCollision=true, groundCollision=false,mass=999999, linearDamping=5,angularDamping=1, type=3, angle=-30, friction=999,dynamic=false, restitution=2}
- _trampaSpiderWeb = {width=75, height=75, foreground=false, miceCollision=false, type=15}
- _barreraLeft = {width=10, height=1200, foreground=true,groundCollision=false, miceCollision=true, type=15}
- _barreraRight = {width=10, height=1200, foreground=false,groundCollision=false, miceCollision=true, type=15}
- _barreraUpLeft = {width=2400, height=10, foreground=false,groundCollision=false, miceCollision=true, type=15}
- _barreraUpRight = {width=2400, height=10, foreground=false,groundCollision=false, miceCollision=true, type=15}
- -- END -----------------------------------
- function main()
- for n in pairs(tfm.get.room.playerList) do
- eventNewPlayer(n)
- tfm.exec.setPlayerScore(n,0)
- tfm.exec.setUIMapName(""..translate(tfm.get.room.playerList[n].community, "hud_uimap").."")
- end
- tfm.exec.disableAutoNewGame()
- tfm.exec.disableAutoTimeLeft()
- tfm.exec.disableAutoShaman()
- tfm.exec.disableAutoScore(true)
- tfm.exec.disablePhysicalConsumables()
- tfm.exec.disableMinimalistMode()
- tfm.exec.disableWatchCommand()
- tfm.exec.setRoomMaxPlayers(22)
- objects = queue.new()
- startGame()
- end
- function eventNewPlayer(name)
- tfm.exec.setUIMapName(""..translate(tfm.get.room.playerList[name].community, "hud_uimap").."")
- tfm.exec.chatMessage(""..translate(tfm.get.room.playerList[name].community, "bienvenida").."",name)
- tfm.exec.addImage("16dfb1c1dfe.png", ":1", 6, 260, name)
- ui.addTextArea(951,"<font size='13' color='#FFFFFF'>"..players_alive().."", name, 25, 262, 80, 23, 0x324650, 0x000000, 0, true)
- ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", nil, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true)
- ui.addTextArea(9992, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_espectador").."</font>", name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(21, "<font size='15' color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "hud_plataformas").."", name, 5, 290, 100, 20, 0x324650, 0x000000, 0, true)
- ui.addTextArea(22, "<b>X", name, 11, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(23, "<b>C", name, 40, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(28, "<b>Z", name, 70, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- playersInRoom = playersInRoom + 1
- for _,k in pairs(keys) do
- system.bindKeyboard(name, k, true)
- end
- playerz[name]={
- timestamp=os.time(),
- offsets={x=3, y=8},
- visible=false,
- side = 1
- }
- loadPlayerData(name)
- end
- function eventPlayerLeft (name)
- playersInRoom = playersInRoom - 1
- end
- -------------------------------------- ROTATION -----------------------------------
- function startGame()
- if gameMode <=1 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- if gameMode >1 then
- tfm.exec.newGame(gameModemaps[math.random(#gameModemaps)])
- end
- nadieGana = 0
- victory = 0
- avanceTormenta = 0
- avanceTormentaUp = 0
- tTormentComming = 20
- tnadieGanaLoop = 6
- quickPlataform = 1
- firstRound = firstRound + 1
- textareaUp.x = 2400
- textareaUp.y = -600
- direccion = 0
- stormUp = false
- end
- function eventNewGame()
- tStorm = 160
- gameMode = gameMode + 1
- tfm.exec.setGameTime(172)
- isAdmin()
- isMod()
- --------------------- CLEAN TextAreas -----------------------------
- ui.removeTextArea(50,nil)
- ui.removeTextArea(51,nil)
- ui.removeTextArea(52,nil)
- ui.removeTextArea(53,nil)
- ui.removeTextArea(9998,nil)
- ui.removeTextArea(9992,nil)
- ui.removeTextArea(666,nil)
- ui.removeTextArea(668,nil)
- ui.removeTextArea(667,nil)
- ui.removeTextArea(665,nil)
- ui.removeTextArea(669,nil)
- ui.removeTextArea(777,nil)
- ui.removeTextArea(443,nil)
- ui.removeTextArea(444,nil)
- ui.removeTextArea(445,nil)
- ui.removeTextArea(446,nil)
- ui.removeTextArea(447,nil)
- ui.removeTextArea(448,nil)
- ui.removeTextArea(27,nil)
- ui.removeTextArea(288,nil)
- ui.removeTextArea(29,nil)
- ui.removeTextArea(-9999,nil)
- ui.removeTextArea(201,nil)
- ui.removeTextArea(202,nil)
- ui.removeTextArea(203,nil)
- ui.removeTextArea(-999,nil)
- ui.removeTextArea(-998,nil)
- ui.removeTextArea(-997,nil)
- ui.removeTextArea(-996,nil)
- ---------------------------------COFRES TEXTAREA-----------------------------
- textareaCoords = {}
- for id = 1, SETTINGS.textareaAmount do
- id = id+100
- local rand = math.random
- local x, y = rand(SETTINGS.mapLength), rand(350)
- textareaCoords[#textareaCoords + 1] = {x = x, y = y}
- for player, data in next, tfm.get.room.playerList do
- ui.addTextArea(id,"<font color='#00000F'><a href='event:abrirCofre'>"..translate(data.community, "abrirCofre").."</a>", player, x, y+30, 70, SETTINGS.textareaSize, 0xFFC500, 0x795722, 0.8, false)
- end
- end
- --------------------- RESET DEFAULT VALUES from mice[name] -----------------------------
- for name in pairs(tfm.get.room.playerList) do
- if name and mice[name] then
- mice[name].plataformas = 12
- mice[name].inGame = 1
- mice[name].txt_salud = 100
- mice[name].flechasDefault = 1
- mice[name].canShoot = true
- mice[name].reloadPlataformas = 0
- mice[name].cofre101102Bombas = 0
- mice[name].cofre103104Lapidas = 0
- mice[name].cofre105106Impulsador = 0
- mice[name].cofre108Sniper = 0
- mice[name].cofre112113Cajas = 0
- mice[name].cofre110111Trampa = 0
- mice[name].trampas = 4
- mice[name].trampasOn = 0
- mice[name].cofre114115Lanzaderas = 0
- mice[name].cofre116117MinigunNevada = 0
- mice[name].lanzaderas = 6
- mice[name].ammo = 7
- mice[name].force = 45
- savePlayerData(name)
- tfm.exec.setUIMapName(""..translate(tfm.get.room.playerList[name].community, "hud_uimap").."")
- ui.addTextArea(20, "<font size='15' color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "hud_municion").."", name, 5, 345, 90, 50, 0x324650, 0x000000, 0, true)
- ui.addTextArea(22, "<b>"..mice[name].txt_key_suelo.."", name, 11, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(23, "<b>"..mice[name].txt_key_rampa.."</a>", name, 40, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(24, "<font size='15' color='#FFFFFF'>12/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- ui.addTextArea(28, "<b>"..mice[name].txt_key_rescate.."", name, 70, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- -- ui.addTextArea(44455, "Salud: "..mice[name].txt_salud.."", name,320, 290, 102, 27, 0x324650, 0x000000, 1, true)
- ui.removeTextArea(25,name)
- ui.removeTextArea(26,name)
- end
- end
- for player, data in next, tfm.get.room.playerList do
- ui.addTextArea(951, "<font size='13' color='#FFFFFF'>"..players_alive().." ", player, 25, 262, 80, 23, 0x324650, 0x000000, 0, true)
- end
- ui.removeTextArea(29,nil) -- tramaps munición
- ---------------------------------------------------------------------
- for _,playerName in pairs(banlist) do
- tfm.exec.killPlayer(playerName);
- end
- players = {}
- for name in pairs(tfm.get.room.playerList) do
- initPlayer(name)
- end
- if gameMode <= 2 then
- textarea.x = 6104
- textarea.y = 445
- textareaLeft.x = -2508
- textareaLeft.y = 445
- barreras = 10000
- barreras = barreras + 4
- tfm.exec.addPhysicObject(barreras,-6,201, _barreraLeft)
- tfm.exec.addPhysicObject(barreras-1,4806,201, _barreraRight)
- tfm.exec.addPhysicObject(barreras-2,1200,-5, _barreraUpLeft)
- tfm.exec.addPhysicObject(barreras-3,3600,-5, _barreraUpRight)
- end
- if gameMode == 3 then
- textarea.x = 2000
- textarea.y = 445
- textareaLeft.x = -2508
- textareaLeft.y = 445
- direccion = 1
- for player, data in next, tfm.get.room.playerList do
- ui.addTextArea(12200, "<p align='center'><font size='35' color='#0082FF' face = 'Lucida Handwriting Cursiva'>"..translate(data.community, "aviso_modoDeJuegoNombre").."", player, 3, 83, 795, 49, 0x000000, 0x000000, 0, true)
- ui.addTextArea(12201, "<p align='center'><font size='35' color='#FFFFFF' face = 'Lucida Handwriting Cursiva'>"..translate(data.community, "aviso_modoDeJuegoNombre").."", player, 5, 83, 795, 51, 0x000000, 0x000000, 0, true)
- ui.addTextArea(12202, "<p align='center'><font size='35' color='#000000'>___________", player, 298, 90, 196, 48, 0x000000, 0x000000, 0, true)
- ui.addTextArea(12203, "<p align='center'><font size='35' color='#000000'>___________", player, 297, 43, 200, 52, 0x000000, 0x000000, 0, true)
- ui.addTextArea(12204, "<p align='center'><font color='#ffdd00'>"..translate(data.community, "aviso_textAreaModoDeJuego").."", player, 672, 28, 120, 20, 0x6a7495, 0xffdd00, 1, true)
- ui.addTextArea(12205, "<p align='center'><font color='#FFF500' size='14'>"..translate(data.community, "aviso_modoDeJuegoDescrip").."", player, 179, 138, 430, 20, 0x324650, 0xffdd00, 0, true)
- end
- tgameMode = 10
- barreras = 10000
- barreras = barreras + 4
- tfm.exec.addPhysicObject(barreras,-6,201, _barreraLeft)
- tfm.exec.addPhysicObject(barreras-1,690,201, _barreraRight)
- tfm.exec.addPhysicObject(barreras-2,1200,-5, _barreraUpLeft)
- tfm.exec.addPhysicObject(barreras-3,3600,-5, _barreraUpRight)
- elseif gameMode == 4 then
- gameMode = 1
- end
- end
- function eventPlayerDied(name)
- ui.addTextArea(9992, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_espectador").."</font>", name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- ui.removeTextArea(25,name)
- ui.removeTextArea(26,name)
- ui.removeTextArea(26,name)
- ui.removeTextArea(-9999,name)
- mice[name].tImpulsador = 0
- for player, data in next, tfm.get.room.playerList do
- ui.addTextArea(951, "<font size='13' color='#FFFFFF'>"..players_alive().." ", player, 25, 262, 80, 23, 0x324650, 0x000000, 0, true)
- end
- if not isBanned(name) then
- tFeed = 10
- feedID = feedID + 1
- feedPos = feedPos - 20
- mice[name].showUpdate = mice[name].showUpdate + 1
- for player, data in next, tfm.get.room.playerList do
- ui.addTextArea(feedID, "<font size='14'><font color='#FFF500' face='Comic Sans MS'>"..name.."</font><font color='#FFFFFF'> "..translate(data.community, "feed").."", player, 570,feedPos, 240, 20, 0x324650, 0x000000, 0, true)
- end
- ui.removeTextArea(-9999,name)
- end
- if feedID >= 53 then
- feedID = 50
- feedPos = 390
- end
- tfm.exec.setPlayerScore(name,mice[name].victorias,false)
- if playersInRoom >=7 and players_alive() == 1 then
- mice[last_player_name_alive].victorias = mice[last_player_name_alive].victorias + 1
- tfm.exec.setPlayerScore(last_player_name_alive,mice[last_player_name_alive].victorias,false)
- end
- -- Asegura que el valor de gameMode cambie a 1
- if players_alive() == 1 and gameMode == 3 then
- gameMode = 0
- end
- if players_alive() == 1 then
- victory = 1
- tStorm = 5
- ui.addTextArea(666, "", nil, 240, 76, 345, 45, 0x417FBC, 0x417FBC, 1, true)
- for player, data in next, tfm.get.room.playerList do
- ui.addTextArea(668,""..translate(data.community, "aviso_victoria").."", player, 200, 77, 380, 50, 0x324650, 0x000000, 0, true)
- ui.addTextArea(665, "<p align='center'><font color='#FFFFFF' size='14'><font color='#FFF504'>"..last_player_name_alive.."</font> "..translate(data.community, "aviso_victoriaDescrip").."", player, 240, 130, 350, 45, 0x417FBC, 0x417FBC, 0, true)
- ui.addTextArea(669, "<p align='center'><font color='#FFFFFF' size='12'>"..translate(data.community, "aviso_victoriasContador").."<font color='#FFF504'> "..mice[last_player_name_alive].victorias.."</font>", player, 238, 150, 350, 45, 0x417FBC, 0x417FBC, 0, true)
- end
- ui.addTextArea(667, "<font color='#FFF504' size='45' face='Comic Sans MS'>#1", nil, 242, 68, 73, 60, 0x324650, 0x000000, 0, true)
- ui.removeTextArea(-9999,last_player_name_alive)
- mice[last_player_name_alive].tImpulsador = 0
- mice[last_player_name_alive].cofre105106Impulsador = 0
- avanceTormenta = 0
- ui.removeTextArea(445,nil)
- ui.removeTextArea(446,nil)
- ui.removeTextArea(447,nil)
- ui.removeTextArea(448,nil)
- ui.removeTextArea(-999,nil)
- ui.removeTextArea(-998,nil)
- ui.removeTextArea(444,nil)
- ui.removeTextArea(443,nil)
- ui.removeTextArea(442,nil)
- ui.removeTextArea(441,nil)
- ui.removeTextArea(-999,nil)
- ui.removeTextArea(-998,nil)
- ui.removeTextArea(-997,nil)
- ui.removeTextArea(-996,nil)
- tlastPlayer = 11
- tfm.exec.setGameTime(7)
- end
- -- Asegura que el valor de gameMode cambie a 1
- if players_alive() == 0 and victory == 0 and gameMode == 3 then
- gameMode = 0
- end
- if players_alive() == 0 and victory == 0 then
- tStorm = 5
- ui.addTextArea(445, "", nil, 240, 76, 345, 45, 0xC00F0F, 0xC00F0F, 1, true)
- for player, data in next, tfm.get.room.playerList do
- ui.addTextArea(446, "<font color='#FFFFFF' size='30' face='Comic Sans MS'>"..translate(data.community, "aviso_nadieGana").."", player, 240, 77, 380, 50, 0x324650, 0x000000, 0, true)
- ui.addTextArea(447, "<font color='#FFF504' size='45' face='Comic Sans MS'>#-1", player, 242, 68, 100, 65, 0x324650, 0x000000, 0, true)
- ui.addTextArea(448, "<p align='center'><font color='#FFFFFF' size='14'>"..translate(data.community, "aviso_nadieGanaDescrip").."", player, 240, 130, 345, 20, 0xC00F0F, 0xC00F0F, 0.8, true)
- end
- tfm.exec.setGameTime(5)
- avanceTormenta = 0
- ui.removeTextArea(444,nil)
- ui.removeTextArea(443,nil)
- ui.removeTextArea(442,nil)
- ui.removeTextArea(441,nil)
- ui.removeTextArea(-999,nil)
- ui.removeTextArea(-998,nil)
- ui.removeTextArea(-997,nil)
- ui.removeTextArea(-996,nil)
- end
- end
- tnadieGanaLoop = 6
- local loopCount = 0
- avanceTormenta = 0
- gameMode = 0
- returnStorm = nil
- returnStormState = 0
- blueTorment = "0x00B8FF"
- pinkTorment = "0xD701CF"
- stormUp = nil
- function stormDamage()
- --- Dirección de la tormenta
- stormDirection()
- -- Daño al tocar la tormenta:
- if direccion == 0 then
- for k, v in next, tfm.get.room.playerList do
- if textareaLeft(v.x+20, v.y) or textarea(v.x-20, v.y) then
- tfm.exec.killPlayer(k)
- end
- end
- end
- if stormUp then
- for k, v in next, tfm.get.room.playerList do
- if textareaUp(v.x, v.y) then
- tfm.exec.killPlayer(k)
- end
- end
- end
- if direccion == 0 and tStorm <= 10 then
- for k, v in next, tfm.get.room.playerList do
- if textareaLeft(v.x, v.y) or textarea(v.x, v.y) then
- tfm.exec.killPlayer(k)
- end
- end
- end
- -- -->
- if direccion == 1 then
- for k, v in next, tfm.get.room.playerList do
- if textareaLeft(v.x+25, v.y) or textarea(v.x+20, v.y) then
- tfm.exec.killPlayer(k)
- end
- end
- end
- -- <--
- if direccion == 2 then
- for k, v in next, tfm.get.room.playerList do
- if textareaLeft(v.x-20, v.y) or textarea(v.x-25, v.y) then
- tfm.exec.killPlayer(k)
- end
- end
- end
- end
- -- direccion 0 la tormenta se cierra normal
- -- direccion 1 va hacia la derecha
- -- direccion 2 va hacia la izquierda
- direccion = 0
- function stormDirection()
- -- LA TORMENTA FLUYE NORMAL
- -- Hacia el centro
- if direccion == 0 then
- ui.addTextArea(201, "", nil, textareaLeft.x - textareaLeft.radiusX , textareaLeft.y - textareaLeft.radiusY, textAreaWIDTHL, textAreaHEIGHTL,0x00B8FF, 0xFFFFFF, 0.6, false)
- textareaLeft.x = textareaLeft.x + avanceTormenta
- ui.addTextArea(202, "", nil, textarea.x - textarea.radiusX , textarea.y - textarea.radiusY, textAreaWIDTH, textAreaHEIGHT,0x00B8FF, 0xFFFFFF, 0.6, false)
- textarea.x = textarea.x - avanceTormenta
- end
- if tStorm == 45 and gameMode <= 2 then
- direccion = math.random(1,2)
- elseif tStorm == 34 and gameMode <= 2 then
- direccion = math.random(1,2)
- elseif tStorm == 20 and gameMode <= 2 then
- direccion = 0
- avanceTormenta = 3
- elseif tStorm == 25 and gameMode == 3 then
- direccion = 0
- avanceTormenta = 7
- end
- -- Hacia la derecha
- if direccion == 1 then
- ui.addTextArea(201, "", nil, textareaLeft.x - textareaLeft.radiusX , textareaLeft.y - textareaLeft.radiusY, textAreaWIDTHL, textAreaHEIGHTL,0x00B8FF, 0xFFFFFF, 0.6, false)
- textareaLeft.x = textareaLeft.x + avanceTormenta
- ui.addTextArea(202, "", nil, textarea.x - textarea.radiusX , textarea.y - textarea.radiusY, textAreaWIDTH, textAreaHEIGHT,0x00B8FF, 0xFFFFFF, 0.6, false)
- textarea.x = textarea.x + avanceTormenta
- -- aqu iba un
- end
- -- Hacia la izquierda
- if direccion == 2 then
- ui.addTextArea(201, "", nil, textareaLeft.x - textareaLeft.radiusX , textareaLeft.y - textareaLeft.radiusY, textAreaWIDTHL, textAreaHEIGHTL,0x00B8FF, 0xFFFFFF, 0.6, false)
- textareaLeft.x = textareaLeft.x - avanceTormenta
- ui.addTextArea(202, "", nil, textarea.x - textarea.radiusX , textarea.y - textarea.radiusY, textAreaWIDTH, textAreaHEIGHT,0x00B8FF, 0xFFFFFF, 0.6, false)
- textarea.x = textarea.x - avanceTormenta
- end
- end
- --[[
- if mice[k].txt_salud >=1 then
- mice[k].txt_salud = mice[k].txt_salud - 30
- ui.addTextArea(44455, "Salud: "..mice[k].txt_salud.."", k,320, 290, 102, 27, 0x324650, 0x000000, 1, true)
- if mice[k].txt_salud <=0 then
- tfm.exec.killPlayer(k)
- mice[k].txt_salud = 0
- ui.removeTextArea(44455,k)
- end
- end
- end
- end
- end
- --]]
- ------------------------------ LOOP -----------------------------
- function eventLoop(t,tr, name)
- if tStorm >= 1 then
- tStorm = tStorm - 0.5
- end
- if tStorm <= 154 and gameMode <=2 then
- stormDamage()
- end
- tormentaComming()
- if tStorm <= 152 and gameMode <= 2 then
- tTormentComming = tTormentComming -1
- avanceTormenta = avanceTormenta + 0.07
- end
- if tStorm == 148 and gameMode <=2 then
- quickPlataform = 0
- avanceTormenta = 6
- end
- if tStorm == 135 and gameMode <=2 then
- avanceTormenta = 8
- end
- if tStorm == 70 and gameMode <=2 then
- avanceTormenta = 7
- end
- if tStorm == 45 then
- quickPlataform = 1
- end
- if tStorm <= 95 and victory == 0 then
- stormUp = true
- avanceTormentaUp = 2
- textareaUp.y = textareaUp.y + avanceTormentaUp
- ui.addTextArea(203, "", nil, textareaUp.x - textareaUp.radiusX , textareaUp.y - textareaUp.radiusY, textAreaWIDTHUP, textAreaHEIGHTUP,0x00B8FF, 0xFFFFFF, 0.6, false)
- end
- -- GAME MODE: Enfrentamientos tormentosos
- if tStorm <= 158 and gameMode ==3 then
- stormDamage()
- end
- if tStorm == 148 and gameMode ==3 then
- quickPlataform = 0
- avanceTormenta = 13
- end
- if tStorm == 70 and gameMode ==3 then
- avanceTormenta = 14
- end
- -- Devuelve GameMode al inicio.
- if tStorm == 1 and gameMode == 3 then
- gameMode = 0
- end
- if loopCount == 0 then
- ammo()
- end
- loopCount = (loopCount + 1) % settings.ammoTicks
- if quickPlataform == 0 then
- for i,cannon in ipairs(toDespawn) do
- if cannon[1] <= os.time()-5000 then
- tfm.exec.removeObject(cannon[2])
- tfm.exec.removePhysicObject(cannon[2])
- table.remove(toDespawn,i)
- end
- end
- end
- if quickPlataform == 1 then
- for i,cannon in ipairs(toDespawn) do
- if cannon[1] <= os.time()-1500 then
- tfm.exec.removePhysicObject(cannon[2])
- tfm.exec.removeObject(cannon[2])
- table.remove(toDespawn,i)
- end
- end
- end
- if tr <= 0 then
- startGame()
- end
- if tFeed >= 1 then
- tFeed=tFeed-1
- elseif tFeed == 0 then
- feedID = 50
- feedPos = 390
- ui.removeTextArea(50,nil)
- ui.removeTextArea(51,nil)
- ui.removeTextArea(52,nil)
- ui.removeTextArea(53,nil)
- end
- if tlastPlayer >= 1 then
- tlastPlayer = tlastPlayer-1
- elseif tlastPlayer == 0 then
- ui.removeTextArea(777,nil)
- end
- for name in pairs(tfm.get.room.playerList) do
- if name and mice[name] then
- if mice[name].tImpulsador >= 1 and mice[name].cofre105106Impulsador == 1 then
- mice[name].tImpulsador = mice[name].tImpulsador-1
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>Booster!</font> "..mice[name].tImpulsador.."s",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- end
- end
- end
- for name in pairs(tfm.get.room.playerList) do
- if name and mice[name] then
- if mice[name].asignandoKey >= 1 and mice[name].tWaitingKey >=1 then
- mice[name].tWaitingKey = mice[name].tWaitingKey-1
- ui.addTextArea(310, "<p align='center'><font size='15'><font color='#FFFFFF' face='Comic Sans MS'>Waiting... "..mice[name].tWaitingKey.."s", name, 170, 185, 500, 100, 0x324650, 0x000000, 0, true)
- elseif mice[name].tWaitingKey == 0 then
- ui.removeTextArea(301,name)
- ui.removeTextArea(302,name)
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- ui.removeTextArea(310,name)
- mice[name].asignandoKey = 0
- mice[name].tWaitingKey = 20
- end
- end
- end
- if tgameMode >= 1 then
- tgameMode = tgameMode-1
- elseif tgameMode == 0 then
- ui.removeTextArea(12200,nil)
- ui.removeTextArea(12201,nil)
- ui.removeTextArea(12202,nil)
- ui.removeTextArea(12203,nil)
- ui.removeTextArea(12204,nil)
- ui.removeTextArea(12205,nil)
- end
- end
- function tormentaComming()
- if tStorm == 154 then
- for player, data in next, tfm.get.room.playerList do
- ui.addTextArea(-997, "<font color='#FFFFFF' size='24' face='Comic Sans MS'>"..translate(data.community, "aviso_tormenta").."", player, 250, 100, nil, nil, 0x00B8FF, 0xFFFFFF, 0, true)
- end
- ui.addTextArea(-998, "<p align='center'><font size='40' color='#D50DC4' face='Webdings'>n ", nil, 385, 60, nil, nil, 0x324650, 0x000000, 0, true)
- ui.addTextArea(-999, "<p align='center'><font size='25' color='#FFFFFF' face='Webdings'>~", nil, 392, 74, nil, nil, 0x324650, 0x000000, 0, true)
- ui.addTextArea(-996, "<p align='center'><font size='45' color='#FFFFFF' face='Arial'>☁️", nil, 385, 50, nil, nil, 0x324650, 0x000000, 0, true)
- elseif tStorm == 148 then
- tfm.exec.removePhysicObject(barreras)
- tfm.exec.removePhysicObject(barreras-1)
- tfm.exec.removePhysicObject(barreras-2)
- tfm.exec.removePhysicObject(barreras-3)
- ui.removeTextArea(-999,nil)
- ui.removeTextArea(-998,nil)
- ui.removeTextArea(-997,nil)
- ui.removeTextArea(-996,nil)
- end
- if tStorm == 95 then
- for player, data in next, tfm.get.room.playerList do
- ui.addTextArea(444, "<font color='#FFFFFF' size='20' face='Comic Sans MS'>"..translate(data.community, "aviso_tormentaUp").."", player, 200, 100, nil, nil, 0x00B8FF, 0xFFFFFF, 0, true)
- end
- ui.addTextArea(443, "<p align='center'><font size='40' color='#D50DC4' face='Webdings'>n ", nil, 385, 60, nil, nil, 0x324650, 0x000000, 0, true)
- ui.addTextArea(442, "<p align='center'><font size='25' color='#FFFFFF' face='Webdings'>~", nil, 392, 74, nil, nil, 0x324650, 0x000000, 0, true)
- ui.addTextArea(441, "<p align='center'><font size='45' color='#FFFFFF' face='Arial'>☁️", nil, 385, 50, nil, nil, 0x324650, 0x000000, 0, true)
- elseif tStorm == 90 then
- ui.removeTextArea(444,nil)
- ui.removeTextArea(443,nil)
- ui.removeTextArea(442,nil)
- ui.removeTextArea(441,nil)
- end
- end
- -------------------------------------- COMMANDS -----------------------------------
- function eventChatCommand(name, command)
- args = {}
- for arg in command:gmatch ("[^%s]+") do
- table.insert (args, arg)
- end
- if command == "n" and isAdmin(name) and gameMode <=2 then
- startGame()
- elseif command == "n" and isAdmin(name) and gameMode >= 3 then
- gameMode = 0
- startGame()
- end
- if command == "info" then
- ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true)
- ui.removeTextArea(30102,name)
- ui.addTextArea(30020, ""..translate(tfm.get.room.playerList[name].community, "informacion_informacion_contenido").."", name, 208, 141, 409, 243, 0x00000f, 0x000000, 0.6, true)
- ui.addTextArea(30021, "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "informacion_encabezado").."", name, 268, 89, 287, 31, 0x00000f, 0x000000, 0.6, true)
- ui.addTextArea(30037, "<font size='19' color='#FF1E1E'><b><a href='event:closeInfo'>X", name, 568, 92, 22, 24, 0x324650, 0x000000, 0, true)
- ui.addTextArea(30022, "<p align='center'><a href='event:info'><font color='#FFF504'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_informacion").."</font></a> | <a href='event:infoControles'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_controles").."</a> | <a href='event:infoReglas'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_reglas").."</a> | <a href='event:infoStaff'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_staff").."</a>", name, 280, 137, 272, 20, 0x00000f, 0x000000, 0, true)
- end
- if command:sub(1,1) == "p" and isAdmin(name) or isMod(name) then
- tfm.exec.chatMessage ("<font color='#A4CBDC'>• <VI>[#fortmice]:</font> <font color='#BABD2F'>"..command:sub(3).."",nil)
- end
- if args[1] == "ban" and tfm.get.room.playerList[args[2]] then
- if isAdmin (name) or isMod(name) then
- if isBanned(args[2]) then
- else
- table.insert (banlist, args[2])
- tfm.exec.killPlayer(args[2]);
- tfm.exec.chatMessage("<font color='#A4CBDC'>• <font color='#C2C2DA'>"..args[2].."</font><font color='#F01C1C'> SE HA PORTADO MAL!",name)
- end
- end
- end
- if args[1] == "getwins" and tfm.get.room.playerList[args[2]] then
- if isAdmin(name) then
- mice[args[2]].victorias = args[3]
- savePlayerData(args[2])
- end
- end
- if args[1] == "desban" and tfm.get.room.playerList[args[2]] then
- if isAdmin (name) or isMod(name) then
- if not isBanned(args[2]) then
- else
- for i,bannedName in pairs(banlist) do
- if args[2] == bannedName then
- table.remove (banlist, i)
- tfm.exec.chatMessage("<font color='#A4CBDC'>• <font color='#C2C2DA'>"..args[2].."</font><font color='#E88888'> HA RECIBIDO UNA OPORTUNIDAD!",name)
- break
- end
- end
- end
- end
- end
- end
- --------------------------------- WEAPON SCRIPT -----------------------------------
- function initPlayer(name)
- players[name] = {ammo = 0}
- if name and mice[name] then
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- system.bindMouse(name, true)
- end
- end
- function eventMouse(name, x, y)
- local player = players[name]
- if player and player.ammo > 0 and tfm.get.room.playerList[name].isDead==false then
- -- remove one ammo
- ui.removeTextArea(player.ammo * 2 - 1, name)
- ui.removeTextArea(player.ammo * 2, name)
- player.ammo = player.ammo - 1
- local roomPlayer = tfm.get.room.playerList[name]
- local dx = x - roomPlayer.x
- local dy = y - roomPlayer.y
- local angle = math.atan2(dy, dx)
- local vx = math.cos(angle)
- local vy = math.sin(angle)
- ----------------- Arma dependiendo del cofre ----------------------
- if mice[name].flechasDefault == 1 and mice[name].canShoot then
- queue.insert(objects, tfm.exec.addShamanObject(35, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, mice[name].force * vx, mice[name].force * vy, false))
- end
- if mice[name].cofre101102Bombas == 1 and mice[name].canShoot then
- queue.insert(objects, tfm.exec.addShamanObject(23, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, mice[name].force * vx, mice[name].force * vy, false))
- end
- if mice[name].cofre108Sniper == 1 and mice[name].canShoot then
- queue.insert(objects, tfm.exec.addShamanObject(60, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, mice[name].force * vx, mice[name].force * vy, false))
- queue.insert(objects, tfm.exec.addShamanObject(60, roomPlayer.x + 20 * vx, roomPlayer.y + 60 * vy, angle*180/math.pi, mice[name].force * vx, mice[name].force * vy, false))
- end
- if mice[name].cofre103104Lapidas == 1 and mice[name].canShoot then
- queue.insert(objects, tfm.exec.addShamanObject(90, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, mice[name].force * vx, mice[name].force * vy, false))
- end
- if mice[name].cofre112113Cajas == 1 and mice[name].canShoot then
- queue.insert(objects, tfm.exec.addShamanObject(110, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, mice[name].force * vx, mice[name].force * vy, false))
- end
- if mice[name].cofre116117MinigunNevada == 1 and mice[name].canShoot then
- queue.insert(objects, tfm.exec.addShamanObject(34, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, mice[name].force * vx, mice[name].force * vy, false))
- queue.insert(objects, tfm.exec.addShamanObject(34, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, mice[name].force * vx, mice[name].force * vy, false))
- queue.insert(objects, tfm.exec.addShamanObject(34, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, mice[name].force * vx, mice[name].force * vy, false))
- queue.insert(objects, tfm.exec.addShamanObject(34, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, mice[name].force * vx, mice[name].force * vy, false))
- end
- if mice[name].trampas >0 and mice[name].cofre110111Trampa == 1 and mice[name].trampasOn == 1 and tfm.get.room.playerList[name].isDead==false then
- mice[name].trampasOn = 0
- mice[name].trampas = mice[name].trampas - 1
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>Traps:</font> "..mice[name].trampas.."/4 </font>",name, 310, 372, 178, 25, 0x00000F, 0x000000, 0.5, true)
- globalPlataformas = globalPlataformas + 4
- tfm.exec.addPhysicObject(globalPlataformas, x, y+40, _trampaBase)
- tfm.exec.addPhysicObject(globalPlataformas-1, x-28, y-10, _trampalado1)
- tfm.exec.addPhysicObject(globalPlataformas-2, x+28, y-10, _trampalado2)
- tfm.exec.addPhysicObject(globalPlataformas-3, x, y+5, _trampaSpiderWeb)
- table.insert(toDespawn,{os.time(),globalPlataformas})
- table.insert(toDespawn,{os.time(),globalPlataformas-1})
- table.insert(toDespawn,{os.time(),globalPlataformas-2})
- table.insert(toDespawn,{os.time(),globalPlataformas-3})
- playerz[name].timestamp=os.time()
- end
- local recoil = -vx * settings.recoil
- if recoil <= -1 or recoil >= 1 then
- tfm.exec.movePlayer(name, 0, 0, true, recoil, 0, true)
- end
- if objects.size > settings.maxObjects then
- tfm.exec.removeObject(queue.remove(objects))
- end
- end
- end
- function ammo()
- for name, player in pairs(players) do
- local ammo = player.ammo
- if name and mice[name] then
- if ammo < mice[name].ammo then
- -- add one ammo
- player.ammo = ammo + 1
- ui.addTextArea(ammo * 2 + 1, "", name, 14 + ammo * 15, 380, 3, 3, 0xFFF504, 0x990000, 1,true)
- end
- end
- end
- end
- playerz = {}
- queue = {}
- function queue.new()
- return {
- tail = nil,
- head = nil,
- size = 0
- }
- end
- function queue.insert(self, v)
- local i = {
- value = v,
- next = nil
- }
- if self.tail and self.head then
- self.tail.next = i
- else
- self.head = i
- end
- self.tail = i
- self.size = self.size + 1
- end
- function queue.peek(self)
- if self.head then
- return self.head.value
- else
- error("queue is empty")
- end
- end
- function queue.remove(self)
- local r = queue.peek(self)
- self.head = self.head.next
- if not self.head then
- tail = nil
- end
- self.size = self.size - 1
- return r
- end
- ------------------------------ PLATAFORMAS SCRIPT -----------------------------------
- function eventKeyboard(name, key, down, px, py)
- if mice[name].asignandoKey == 1 then
- mice[name].key_suelo = key
- i = key
- mice[name].txt_key_suelo = keyz[i]
- ui.addTextArea(22, "<b>"..mice[name].txt_key_suelo.."", name, 11, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(30032, ""..mice[name].txt_key_suelo.."", name, 371, 182, 18, 18, 0x324650, 0x000000, 1, true)
- ui.removeTextArea(301,name)
- ui.removeTextArea(302,name)
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- ui.removeTextArea(310,name)
- mice[name].asignandoKey = 0
- mice[name].tWaitingKey = 20
- tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name)
- savePlayerData(name)
- end
- if mice[name].asignandoKey == 2 then
- mice[name].key_rampa = key
- i = key
- mice[name].txt_key_rampa = keyz[i]
- ui.addTextArea(23, "<b>"..mice[name].txt_key_rampa.."", name, 40, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(30033, ""..mice[name].txt_key_rampa.."", name, 371, 223, 19, 19, 0x324650, 0x000000, 1, true)
- ui.removeTextArea(301,name)
- ui.removeTextArea(302,name)
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- ui.removeTextArea(310,name)
- mice[name].asignandoKey = 0
- mice[name].tWaitingKey = 20
- tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name)
- savePlayerData(name)
- end
- if mice[name].asignandoKey == 3 then
- mice[name].key_recarga = key
- i = key
- mice[name].txt_key_recarga = keyz[i]
- ui.addTextArea(30035, ""..mice[name].txt_key_recarga.."", name, 371, 304, 19, 19, 0x324650, 0x000000, 1, true)
- ui.removeTextArea(301,name)
- ui.removeTextArea(302,name)
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- ui.removeTextArea(310,name)
- mice[name].asignandoKey = 0
- mice[name].tWaitingKey = 20
- tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name)
- savePlayerData(name)
- end
- if mice[name].asignandoKey == 4 then
- mice[name].key_rescate = key
- i = key
- mice[name].txt_key_rescate = keyz[i]
- ui.addTextArea(28, "<b>"..mice[name].txt_key_rescate.."", name, 70, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(30034, ""..mice[name].txt_key_rescate.."", name, 371, 265, 19, 19, 0x324650, 0x000000, 1, true)
- ui.removeTextArea(301,name)
- ui.removeTextArea(302,name)
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- ui.removeTextArea(310,name)
- mice[name].asignandoKey = 0
- mice[name].tWaitingKey = 20
- tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name)
- savePlayerData(name)
- end
- if mice[name].asignandoKey == 5 then
- mice[name].key_consumible = key
- i = key
- mice[name].txt_key_consumible= keyz[i]
- ui.addTextArea(30036, ""..mice[name].txt_key_consumible.."", name, 371, 343, nil, 20, 0x324650, 0x000000, 1, true)
- ui.removeTextArea(301,name)
- ui.removeTextArea(302,name)
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- ui.removeTextArea(310,name)
- mice[name].asignandoKey = 0
- mice[name].tWaitingKey = 20
- tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name)
- savePlayerData(name)
- end
- if key == _left then
- facingLeft[name] = false
- end
- if key == _right then
- facingLeft[name] = true
- end
- if key == mice[name].key_rampa and mice[name].plataformas >0 and tfm.get.room.playerList[name].isDead==false then
- if facingLeft[name] then
- globalPlataformas = globalPlataformas + 1
- mice[name].plataformas = mice[name].plataformas - 1
- ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- tfm.exec.addPhysicObject(globalPlataformas, px + 75, py-20, _rampaDerecha)
- table.insert(toDespawn,{os.time(),globalPlataformas})
- playerz[name].timestamp=os.time()
- else
- globalPlataformas = globalPlataformas + 1
- mice[name].plataformas = mice[name].plataformas - 1
- ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- tfm.exec.addPhysicObject(globalPlataformas, px - 75, py-20, _rampaIzquierda)
- table.insert(toDespawn,{os.time(),globalPlataformas})
- playerz[name].timestamp=os.time()
- end
- end
- if key == mice[name].key_suelo and mice[name].plataformas >0 and tfm.get.room.playerList[name].isDead==false then
- if facingLeft[name] then
- globalPlataformas = globalPlataformas + 1
- mice[name].plataformas = mice[name].plataformas - 1
- ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- tfm.exec.addPhysicObject(globalPlataformas, px + 41, py+ 20, _Suelo)
- table.insert(toDespawn,{os.time(),globalPlataformas})
- playerz[name].timestamp=os.time()
- else
- globalPlataformas = globalPlataformas + 1
- mice[name].plataformas = mice[name].plataformas - 1
- ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- tfm.exec.addPhysicObject(globalPlataformas, px - 41, py+ 20, _Suelo)
- table.insert(toDespawn,{os.time(),globalPlataformas})
- playerz[name].timestamp=os.time()
- end
- end
- if key == mice[name].key_recarga and mice[name].reloadPlataformas <=24 and mice[name].plataformas <=11 and tfm.get.room.playerList[name].isDead==false then
- mice[name].reloadPlataformas = mice[name].reloadPlataformas + 1
- ui.addTextArea(25, "<b>"..mice[name].txt_key_recarga.."", name, 145, 320, 14, 17, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(26, "<font size='15' color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "hud_recarga").." "..mice[name].reloadPlataformas.."/25", name, 164, 318, nil, 25, 0x324650, 0x000000, 0, true)
- end
- if mice[name].reloadPlataformas ==25 then
- mice[name].plataformas = 12
- mice[name].reloadPlataformas = 0
- ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- ui.removeTextArea(25,name)
- ui.removeTextArea(26,name)
- end
- if mice[name].plataformas ==0 then
- ui.addTextArea(25, "<b>"..mice[name].txt_key_recarga.."", name, 144, 320, 14, 17, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(26, "<font size='15' color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "hud_recarga").." "..mice[name].reloadPlataformas.."/25", name, 164, 318, nil, 25, 0x324650, 0x000000, 0, true)
- end
- if key == mice[name].key_rescate and mice[name].plataformas >0 and tfm.get.room.playerList[name].isDead==false then
- globalPlataformas = globalPlataformas + 1
- mice[name].plataformas = mice[name].plataformas - 1
- ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- tfm.exec.addPhysicObject(globalPlataformas, px + 1, py+ 130, _rescate)
- table.insert(toDespawn,{os.time(),globalPlataformas})
- playerz[name].timestamp=os.time()
- end
- if key == mice[name].key_consumible and mice[name].cofre105106Impulsador == 1 and mice[name].tImpulsador == 0 and tfm.get.room.playerList[name].isDead==false then
- if facingLeft[name] then
- tfm.exec.addShamanObject (24,px,py+10,0,100,-200,false)
- tfm.exec.movePlayer(name, 0, 10, true, 90, -155, true)
- mice[name].tImpulsador = 8
- else
- tfm.exec.addShamanObject (24,px,py+10,0,100,-200,false)
- tfm.exec.movePlayer(name, 0, 10, true, -90, -155, true)
- mice[name].tImpulsador = 8
- end
- end
- if key == mice[name].key_consumible and mice[name].cofre110111Trampa == 1 and mice[name].trampasOn == 0 and mice[name].trampas >0 and tfm.get.room.playerList[name].isDead == false then
- mice[name].trampasOn = 1
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>Traps:</font> Activate!</font>",name, 310, 372, 178, 25, 0x00000F, 0x000000, 0.5, true)
- elseif key == mice[name].key_consumible and mice[name].cofre110111Trampa == 1 and mice[name].trampasOn == 1 and tfm.get.room.playerList[name].isDead == false then
- mice[name].trampasOn = 0
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>Traps:</font> "..mice[name].trampas.."/4 </font>",name, 310, 372, 178, 25, 0x00000F, 0x000000, 0.5, true)
- end
- if key == mice[name].key_consumible and mice[name].lanzaderas > 0 and mice[name].cofre114115Lanzaderas == 1 and tfm.get.room.playerList[name].isDead==false then
- mice[name].lanzaderas = mice[name].lanzaderas - 1
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>Launch Pads:</font> "..mice[name].lanzaderas.."/6",name, 310, 372, 178, 25, 0x00000F, 0x000000, 0.5, true)
- globalPlataformas = globalPlataformas + 3
- tfm.exec.movePlayer(name, 0, -20, true, 0, 0, true)
- tfm.exec.addPhysicObject(globalPlataformas, px + 40, py+ 10, _lanzaderaRight)
- tfm.exec.addPhysicObject(globalPlataformas-1, px + -30, py+ 10, _lanzaderaLeft)
- tfm.exec.addPhysicObject(globalPlataformas-2, px + 5, py+ -5, _lanzaderaCentro)
- table.insert(toDespawn,{os.time(),globalPlataformas})
- table.insert(toDespawn,{os.time(),globalPlataformas-1})
- table.insert(toDespawn,{os.time(),globalPlataformas-2})
- playerz[name].timestamp=os.time()
- end
- if mice[name].plataformas <=3 then
- ui.addTextArea(24, "<font size='15' color='#FFF504'><b>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- end
- if mice[name].plataformas <=0 then
- ui.addTextArea(24, "<font size='15' color='#FF0000'><b>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- end
- end
- -------------------------- CALLBACKS -----------------------------
- function eventTextAreaCallback(id, name, cb)
- local player = players[name]
- if id == 101 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre101102Bombas= 1
- mice[name].flechasDefault = 0
- mice[name].ammo = 5
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(101,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_bombas").."</font>",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 102 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre101102Bombas = 1
- mice[name].flechasDefault = 0
- mice[name].ammo = 5
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(102,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_bombas").."</font>",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 103 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre103104Lapidas = 1
- mice[name].flechasDefault = 0
- mice[name].ammo = 2
- mice[name].force = 32
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(103,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_lapidas").."</font>",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 104 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre103104Lapidas = 1
- mice[name].flechasDefault = 0
- mice[name].ammo = 2
- mice[name].force = 32
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(104,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_lapidas").."</font>",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 105 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre105106Impulsador = 1
- mice[name].tImpulsador = 1
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(105,nil)
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_impulsador").."</font>"..mice[name].tImpulsador.."",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 106 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre105106Impulsador = 1
- mice[name].tImpulsador = 1
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(106,nil)
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_impulsador").."</font>"..mice[name].tImpulsador.."",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 107 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].plataformas = 100
- ui.removeTextArea(25,name)
- ui.removeTextArea(26,name)
- ui.addTextArea(24, "<font size='15' color='#FFFFFF'>100/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- mice[name].ammo = 6
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(107,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_100plataformas").."</font>",name, 315, 372, 170, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 108 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre108Sniper = 1
- mice[name].flechasDefault = 0
- mice[name].ammo = 1
- mice[name].force = 80
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(108,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_sniper").."</font>",name, 300, 372, 210, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 109 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].plataformas = 100
- mice[name].ammo = 6
- ui.removeTextArea(25,name)
- ui.removeTextArea(26,name)
- ui.addTextArea(24, "<font size='15' color='#FFFFFF'>100/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true)
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(109,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_100plataformas").."</font>",name, 315, 372, 170, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 110 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre110111Trampa = 1
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(110,nil)
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_trampas")..":</font> "..mice[name].trampas.."/4 </font>",name, 310, 372, 178, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 111 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre110111Trampa = 1
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(111,nil)
- ui.removeTextArea(9997,name)
- ui.removeTextArea(9996,name)
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_trampas")..":</font> "..mice[name].trampas.."/4</font>",name, 310, 372, 178, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 112 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre112113Cajas = 1
- mice[name].flechasDefault = 0
- mice[name].ammo = 5
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(112,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_cajas").."</font>",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 113 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre112113Cajas = 1
- mice[name].flechasDefault = 0
- mice[name].ammo = 5
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(113,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_cajas").."</font>",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 114 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre114115Lanzaderas = 1
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(114,nil)
- ui.removeTextArea(9997,name)
- ui.removeTextArea(9996,name)
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_lanzaderas")..":</font> "..mice[name].lanzaderas.."/6",name, 310, 372, 178, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 115 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre114115Lanzaderas = 1
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(115,nil)
- ui.removeTextArea(9997,name)
- ui.removeTextArea(9996,name)
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_lanzaderas")..":</font> "..mice[name].lanzaderas.."/6",name, 310, 372, 178, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 116 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre116117MinigunNevada = 1
- mice[name].flechasDefault = 0
- mice[name].ammo = 6
- mice[name].force = 90
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(116,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_minigunnevada").."</font>",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if id == 117 and tfm.get.room.playerList[name].isDead==false then
- for n, data in next, tfm.get.room.playerList do
- for i, coords in next, textareaCoords do
- if data.x+100 > coords.x+100 and data.x+100 < coords.x+100 + SETTINGS.textareaSize+100 and data.y+100 > coords.y+100 and data.y+100 < coords.y+100 + SETTINGS.textareaSize+100 then
- mice[name].cofre116117MinigunNevada = 1
- mice[name].flechasDefault = 0
- mice[name].ammo = 6
- mice[name].force = 90
- initPlayer(name)
- ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true)
- for chest=101,SETTINGS.textareaAmount+100 do
- ui.removeTextArea(chest, name)
- end
- ui.removeTextArea(117,nil)
- for ammo=1,15 do
- ui.removeTextArea(ammo, name)
- end
- ui.addTextArea(-9999, "<p align='center'><font size='16'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "hud_cofre_minigunnevada").."</font>",name, 325, 372, 140, 25, 0x00000F, 0x000000, 0.5, true)
- break
- end
- end
- end
- end
- if cb == "asignarX" then
- ui.addTextArea(301, "", name, 6, 6, 787, 389, 0x00000F, 0x000000, 0.9, true)
- ui.addTextArea(302, "<p align='center'><font size='30'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "presioneAhora").."", name, 170, 138, 500, 100, 0x324650, 0x000000, 0, true)
- mice[name].asignandoKey = 1
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- end
- if cb == "asignarC" then
- ui.addTextArea(301, "", name, 6, 6, 787, 389, 0x00000F, 0x000000, 0.9, true)
- ui.addTextArea(302, "<p align='center'><font size='30'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "presioneAhora").."", name, 170, 138, 500, 100, 0x324650, 0x000000, 0, true)
- mice[name].asignandoKey = 2
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- end
- if cb == "asignarQ" then
- ui.addTextArea(301, "", name, 6, 6, 787, 389, 0x00000F, 0x000000, 0.9, true)
- ui.addTextArea(302, "<p align='center'><font size='30'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "presioneAhora").."", name, 170, 138, 500, 100, 0x324650, 0x000000, 0, true)
- mice[name].asignandoKey = 3
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- end
- if cb == "asignarZ" then
- ui.addTextArea(301, "", name, 6, 6, 787, 389, 0x00000F, 0x000000, 0.9, true)
- ui.addTextArea(302, "<p align='center'><font size='30'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "presioneAhora").."", name, 170, 138, 500, 100, 0x324650, 0x000000, 0, true)
- mice[name].asignandoKey = 4
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- end
- if cb == "asignarSpace" then
- ui.addTextArea(301, "", name, 6, 6, 787, 389, 0x00000F, 0x000000, 0.9, true)
- ui.addTextArea(302, "<p align='center'><font size='30'><font color='#FFF500' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "presioneAhora").."", name, 170, 138, 500, 100, 0x324650, 0x000000, 0, true)
- mice[name].asignandoKey = 5
- ui.removeTextArea(303,name)
- ui.removeTextArea(304,name)
- ui.removeTextArea(305,name)
- ui.removeTextArea(306,name)
- end
- if cb == "reset" then
- mice[name].key_rampa = 67
- mice[name].key_suelo = 88
- mice[name].key_recarga = 81
- mice[name].key_rescate = 90
- mice[name].key_consumible = 32
- mice[name].txt_key_rampa = "C"
- mice[name].txt_key_suelo = "X"
- mice[name].txt_key_recarga = "Q"
- mice[name].txt_key_rescate = "Z"
- mice[name].txt_key_consumible = "space"
- savePlayerData(name)
- ui.addTextArea(22, "<b>"..mice[name].txt_key_suelo.."", name, 11, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(23, "<b>"..mice[name].txt_key_rampa.."", name, 40, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(28, "<b>"..mice[name].txt_key_rescate.."", name, 70, 320, 14, 15, 0x00000F, 0x000000, 0.5, true)
- ui.addTextArea(30032, ""..mice[name].txt_key_suelo.."", name, 371, 182, 18, 18, 0x324650, 0x000000, 1, true)
- ui.addTextArea(30033, ""..mice[name].txt_key_rampa.."", name, 371, 223, 19, 19, 0x324650, 0x000000, 1, true)
- ui.addTextArea(30034, ""..mice[name].txt_key_rescate.."", name, 371, 265, 19, 19, 0x324650, 0x000000, 1, true)
- ui.addTextArea(30035, ""..mice[name].txt_key_recarga.."", name, 371, 304, 19, 19, 0x324650, 0x000000, 1, true)
- ui.addTextArea(30036, ""..mice[name].txt_key_consumible.."", name, 371, 343, nil, 20, 0x324650, 0x000000, 1, true)
- tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name)
- end
- if cb == "options" then
- ui.addTextArea(30102, "<font color='#FFFFFF'><a href='event:controles'><font color='#FFF504'>"..translate(tfm.get.room.playerList[name].community, "controles_boton").."</font></a> ≡ <a href='event:info'><font color='#FFF504'>"..translate(tfm.get.room.playerList[name].community, "informacion_boton").."</font></a> ≡ <a href='event:update'><font color='#FFF504'>"..translate(tfm.get.room.playerList[name].community, "noticias_boton").."</font></a>", name, 34, 26, 307, 18, 0x00000f, 0x00000f, 0.5, true)
- ui.addTextArea(30100, "<font size='15' color='#FFF504'><a href='event:closeOptions'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true)
- end
- if cb == "closeOptions" then
- ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true)
- ui.removeTextArea(30102,name)
- end
- if cb == "controles" then
- ui.removeTextArea(30102,name)
- ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true)
- ui.addTextArea(30020, "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "controles_encabezado").."", name, 268, 79, 287, 31, 0x00000f, 0x000000, 0.6, true)
- ui.addTextArea(30021, "<p align='center'><font size='11'>"..translate(tfm.get.room.playerList[name].community, "controles_aviso").."", name, 268, 130, 284, 260, 0x00000f, 0x000000, 0.6, true)
- ui.addTextArea(30022, "", name, 276, 181, 270, 20, 0x00000f, 0x000000, 0.5, true)
- ui.addTextArea(30023, "", name, 277, 222, 270, 20, 0x00000f, 0x000000, 0.5, true)
- ui.addTextArea(30024, "", name, 277, 263, 270, 20, 0x00000f, 0x000000, 0.5, true)
- ui.addTextArea(30025, "", name, 277, 303, 270, 20, 0x00000f, 0x000000, 0.5, true)
- ui.addTextArea(30026, "", name, 277, 343, 270, 20, 0x00000f, 0x000000, 0.5, true)
- ui.addTextArea(30027, "<p align='center'><font size='15' color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "suelo")..":", name, 266, 180, 72, 24, 0x00000f, 0x000000, 0, true)
- ui.addTextArea(30028, "<p align='center'><font size='15' color='#FFFFFF'> "..translate(tfm.get.room.playerList[name].community, "rampa")..":", name, 266, 221, 72, 31, 0x00000f, 0x000000, 0, true)
- ui.addTextArea(30029, "<p align='center'><font size='15' color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "recarga")..":", name, 266, 302, 80, 22, 0x00000f, 0x000000, 0, true)
- ui.addTextArea(30030, "<p align='center'><font size='15' color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "rescate")..":", name, 264, 262, 86, 31, 0x00000f, 0x000000, 0, true)
- ui.addTextArea(30031, "<p align='center'><font size='12' color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "consumible")..":", name, 264, 344, 100, 23, 0x00000f, 0x000000, 0, true)
- ui.addTextArea(30032, ""..mice[name].txt_key_suelo.."", name, 371, 182, 18, 18, 0x324650, 0x000000, 1, true)
- ui.addTextArea(30033, ""..mice[name].txt_key_rampa.."", name, 371, 223, 19, 19, 0x324650, 0x000000, 1, true)
- ui.addTextArea(30034, ""..mice[name].txt_key_rescate.."", name, 371, 265, 19, 19, 0x324650, 0x000000, 1, true)
- ui.addTextArea(30035, ""..mice[name].txt_key_recarga.."", name, 371, 304, 19, 19, 0x324650, 0x000000, 1, true)
- ui.addTextArea(30036, ""..mice[name].txt_key_consumible.."", name, 371, 343, nil, 20, 0x324650, 0x000000, 1, true)
- ui.addTextArea(30037, "<p align='center'><font size='15' color='#FFF504'><a href='event:asignarC'>"..translate(tfm.get.room.playerList[name].community, "cambiar").."", name, 447, 221, 100, 21, 0x8c8c8c, 0x000000, 0.5, true)
- ui.addTextArea(30038, "<p align='center'><font size='15' color='#FFF504'><a href='event:asignarQ'>"..translate(tfm.get.room.playerList[name].community, "cambiar").."", name, 447, 301, 100, 22, 0x8c8c8c, 0x000000, 0.5, true)
- ui.addTextArea(30039, "<p align='center'><font size='15' color='#FFF504'><a href='event:asignarX'>"..translate(tfm.get.room.playerList[name].community, "cambiar").."", name, 446, 178, 100, 21, 0x8c8c8c, 0x000000, 0.5, true)
- ui.addTextArea(30040, "<p align='center'><font size='15' color='#FFF504'><a href='event:asignarZ'>"..translate(tfm.get.room.playerList[name].community, "cambiar").."", name, 447, 262, 100, 21, 0x8c8c8c, 0x000000, 0.5, true)
- ui.addTextArea(30041, "<p align='center'><font size='15' color='#FFF504'><a href='event:asignarSpace'>"..translate(tfm.get.room.playerList[name].community, "cambiar").."", name, 447, 343, 100, 22, 0x8c8c8c, 0x000000, 0.5, true)
- ui.addTextArea(30042, "<p align='center'><font size='9'><a href='event:reset'>"..translate(tfm.get.room.playerList[name].community, "restaurarTodo").."", name, 172, 370, 87, 20, 0x00000f, 0x000000, 0.5, true)
- ui.addTextArea(30043, "<font size='19' color='#FF1E1E'><b><a href='event:closeControles'>X", name, 568, 83, 22, 25, 0x324650, 0x000000, 0, true)
- end
- if cb == "closeControles" then
- for close= 30020,30043 do
- ui.removeTextArea(close,name)
- end
- end
- if cb == "info" then
- ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true)
- ui.removeTextArea(30102,name)
- ui.addTextArea(30020, ""..translate(tfm.get.room.playerList[name].community, "informacion_informacion_contenido").."", name, 208, 141, 409, 243, 0x00000f, 0x000000, 0.6, true)
- ui.addTextArea(30021, "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>"..translate(tfm.get.room.playerList[name].community, "informacion_encabezado").."", name, 268, 89, 287, 31, 0x00000f, 0x000000, 0.6, true)
- ui.addTextArea(30037, "<font size='19' color='#FF1E1E'><b><a href='event:closeInfo'>X", name, 568, 92, 22, 24, 0x324650, 0x000000, 0, true)
- ui.addTextArea(30022, "<p align='center'><a href='event:info'><font color='#FFF504'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_informacion").."</font></a> | <a href='event:infoControles'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_controles").."</a> | <a href='event:infoReglas'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_reglas").."</a> | <a href='event:infoStaff'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_staff").."</a>", name, 280, 137, 272, 20, 0x00000f, 0x000000, 0, true)
- elseif cb =="infoControles" then
- ui.addTextArea(30020, "\n<font size='14'>\n<font color='#FFF504' face='Comic Sans MS'> "..translate(tfm.get.room.playerList[name].community, "suelo")..": ["..mice[name].txt_key_suelo.."]</font> "..translate(tfm.get.room.playerList[name].community, "informacion_controles_x").."\n\n<font color='#FFF504' face='Comic Sans MS' size='13'> "..translate(tfm.get.room.playerList[name].community, "rampa")..": ["..mice[name].txt_key_rampa.."]</font> "..translate(tfm.get.room.playerList[name].community, "informacion_controles_c").."\n\n<font color='#FFF504' face='Comic Sans MS'> "..translate(tfm.get.room.playerList[name].community, "rescate")..": ["..mice[name].txt_key_rescate.."]</font> "..translate(tfm.get.room.playerList[name].community, "informacion_controles_z").."\n\n<font color='#FFF504' face='Comic Sans MS'> "..translate(tfm.get.room.playerList[name].community, "consumible")..": ["..mice[name].txt_key_consumible.."]</font> "..translate(tfm.get.room.playerList[name].community, "informacion_controles_space").."", name, 208, 141, 409, 243, 0x00000f, 0x000000, 0.6, true)
- ui.addTextArea(30037, "<font size='19' color='#FF1E1E'><b><a href='event:closeInfo'>X", name, 568, 92, 22, 24, 0x324650, 0x000000, 0, true)
- ui.addTextArea(30022, "<p align='center'><a href='event:info'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_informacion").."</a> | <a href='event:infoControles'><font color='#FFF504'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_controles").."</font></a> | <a href='event:infoReglas'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_reglas").."</a> | <a href='event:infoStaff'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_staff").."</a>", name, 280, 137, 272, 20, 0x00000f, 0x000000, 0, true)
- elseif cb == "infoReglas" then
- ui.addTextArea(30020, ""..translate(tfm.get.room.playerList[name].community, "informacion_reglas_contenido").."", name, 207, 140, 409, 243, 0x00000f, 0x000000, 0.6, true)
- ui.addTextArea(30022, "<p align='center'><a href='event:info'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_informacion").."</a> | <a href='event:infoControles'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_controles").."</a> | <a href='event:infoReglas'><font color='#FFF504'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_reglas").."</font></a> | <a href='event:infoStaff'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_staff").."</a>", name, 280, 137, 272, 20, 0x00000f, 0x000000, 0, true)
- elseif cb =="infoStaff" then
- ui.addTextArea(30020, ""..translate(tfm.get.room.playerList[name].community, "informacion_staff_contenido").."", name, 207, 140, 409, 243, 0x00000f, 0x000000, 0.6, true)
- ui.addTextArea(30022, "<p align='center'><a href='event:info'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_informacion").."</a> | <a href='event:infoControles'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_controles").."</a> | <a href='event:infoReglas'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_reglas").."</a> | <a href='event:infoStaff'><font color='#FFF504'>"..translate(tfm.get.room.playerList[name].community, "informacion_cb_staff").."</font></a>",name, 280, 137, 272, 20, 0x00000f, 0x000000, 0, true)
- end
- if cb == "closeControles" then
- for close= 30020,30040 do
- ui.removeTextArea(close,name)
- end
- end
- if cb == "closeInfo" then
- ui.removeTextArea(30020,name)
- ui.removeTextArea(30021,name)
- ui.removeTextArea(30022,name)
- ui.removeTextArea(30037,name)
- end
- if cb == "update" then
- displayUpdate(name)
- ui.removeTextArea(30102,name)
- end
- if cb == "closeUpdate" then
- ui.removeTextArea(30020,name)
- ui.removeTextArea(30021,name)
- ui.removeTextArea(30037,name)
- end
- end
- function displayUpdate(name)
- for delete = 30020, 30040 do
- ui.removeTextArea(delete,name)
- end
- ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true)
- ui.addTextArea(30020, ""..translate(tfm.get.room.playerList[name].community, "noticias_texto").."",name, 214, 140, 400, 238, 0x00000F, 0x000000, 0.6, true)
- ui.addTextArea(30021, ""..translate(tfm.get.room.playerList[name].community, "noticias_titulo").."",name, 266, 90, 287, 31, 0x00000F, 0x000000, 0.6, true)
- ui.addTextArea(30037, "<font size='19' color='#FF1E1E'><b><a href='event:closeUpdate'>X", name, 569, 93, 22, 25, 0x324650, 0x000000, 0, true)
- end
- main()
- end
- function crawl()
- local cmd = ""
- local maps = {}
- local map = nil
- local loaded = false
- local first = nil
- local function calculateMaps()
- if map and not loaded then
- tfm.exec.chatMessage(map)
- map = nil
- end
- if #maps > 0 then
- loaded = false
- map = "@" .. maps[1]
- table.remove(maps, 1)
- tfm.exec.newGame(map)
- end
- end
- local function parseCommand(command)
- maps = {}
- for map in string.gmatch(command, "[^;]+") do
- maps[#maps + 1] = map
- end
- end
- function eventNewGame()
- if tfm.get.room.currentMap == map then
- loaded = true
- end
- end
- function eventChatMessage(player, msg)
- if not first then
- first = player
- end
- if player ~= first then return end
- if msg == "#" then
- parseCommand(cmd)
- cmd = ""
- else
- cmd = cmd .. msg
- end
- end
- system.newTimer(calculateMaps, 3500, true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.chatMessage("<vp>Loaded")
- end
- if tfm.get.room.name == "*#fortmice0clubmice" then
- clubmice()
- elseif tfm.get.room.name:sub(1, 17) == "*#fortmice0crawl0" then
- crawl()
- else
- fortmice()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement