SHOW:
|
|
- or go back to the newest paste.
1 | function clubmice() | |
2 | local bot = "Clubmicebot#0000" | |
3 | local answer_id = -1 | |
4 | ||
5 | local answers = {} | |
6 | local bot_messages = {} | |
7 | ||
8 | local translations = {en = {}} | |
9 | local function get_translation(lang, text) | |
10 | if translations[lang] and translations[lang][text] then | |
11 | return translations[lang][text] | |
12 | elseif translations.en[text] then | |
13 | return translations.en[text] | |
14 | else | |
15 | return "%" .. text .. "%" | |
16 | end | |
17 | end | |
18 | ||
19 | get_translations = function() | |
20 | ui.addTextArea(100, "", bot) | |
21 | end | |
22 | ||
23 | local allowNewPlayer = false | |
24 | eventPlayerDied = tfm.exec.respawnPlayer | |
25 | ||
26 | eventNewPlayer = function(name) | |
27 | tfm.exec.respawnPlayer(name) | |
28 | tfm.exec.addImage("16d1282872f.png", "_0", 231, 31) | |
29 | ||
30 | if not allowNewPlayer then | |
31 | if name == bot then | |
32 | get_translations() | |
33 | end | |
34 | return | |
35 | end | |
36 | ||
37 | tfm.exec.chatMessage(get_translation(tfm.get.room.playerList[name].community, "welcome"), name) | |
38 | end | |
39 | ||
40 | eventTextAreaCallback = function(id, name, cb) | |
41 | if id == 101 then | |
42 | bot_messages[name] = cb | |
43 | elseif id == 102 then | |
44 | if name == bot then | |
45 | tfm.exec.chatMessage("<vi>[" .. bot .. "] <n>" .. cb, bot_messages[name]) | |
46 | else | |
47 | tfm.exec.chatMessage("<cep>[" .. name .. "] <n>" .. cb, bot_messages[name]) | |
48 | end | |
49 | elseif name == bot then | |
50 | if id == 100 then | |
51 | translations = {en = {}} | |
52 | for l, k, v in string.gmatch(cb, "([^:]+):([^:]+):([^:]+);") do | |
53 | local lang, key, value = string.gsub(string.gsub(string.gsub(l, "&2", ";"), "&1", ":"), "&0", "&"), | |
54 | string.gsub(string.gsub(string.gsub(k, "&2", ";"), "&1", ":"), "&0", "&"), | |
55 | string.gsub(string.gsub(string.gsub(v, "&2", ";"), "&1", ":"), "&0", "&") | |
56 | ||
57 | if not translations[lang] then | |
58 | translations[lang] = {[key] = value} | |
59 | else | |
60 | translations[lang][key] = value | |
61 | end | |
62 | end | |
63 | ||
64 | if not allowNewPlayer then | |
65 | allowNewPlayer = true | |
66 | for player in next, tfm.get.room.playerList do | |
67 | eventNewPlayer(player) | |
68 | end | |
69 | ||
70 | end | |
71 | elseif #cb > 0 then | |
72 | tfm.exec.chatMessage("<vi>[" .. bot .. "] <n>" .. cb, answers[id]) | |
73 | end | |
74 | end | |
75 | end | |
76 | ||
77 | eventChatCommand = function(name, cmd) | |
78 | answer_id = (answer_id + 1) % 100 | |
79 | answers[answer_id] = name | |
80 | ui.addTextArea(answer_id, name .. ":" .. tfm.get.room.playerList[name].community .. ":" .. cmd, bot) | |
81 | end | |
82 | ||
83 | eventNewGame = function() | |
84 | tfm.exec.addImage("16d1282872f.png", "_0", 231, 31) | |
85 | end | |
86 | ||
87 | system.disableChatCommandDisplay(nil) | |
88 | system.newTimer(get_translations, 60000, true) | |
89 | tfm.exec.disableAutoShaman(true) | |
90 | tfm.exec.disableAfkDeath(true) | |
91 | tfm.exec.disableAutoTimeLeft(true) | |
92 | tfm.exec.disableAutoNewGame(true) | |
93 | tfm.exec.newGame("@7642505") | |
94 | get_translations() | |
95 | end | |
96 | ||
97 | function fortmice() | |
98 | local mice = {} | |
99 | local noticias_version = 3 | |
100 | ||
101 | print() | |
102 | local langs = { | |
103 | ||
104 | ||
105 | ||
106 | es = { | |
107 | 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.", | |
108 | noticias_titulo = "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>¡NOTICIAS!</font><font size='9'> (23/10/19)", | |
109 | 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♥", | |
110 | ||
111 | datos_corruptos = "<r>Tus datos estaban corruptos. Se han reiniciado.", | |
112 | ||
113 | -- MENÚ ------- | |
114 | controles_boton = "Cambiar controles", | |
115 | informacion_boton = "Información", | |
116 | noticias_boton = "Noticias", | |
117 | controles_encabezado = "Controles", | |
118 | controles_aviso = "Al momento de dar click en \"Cambiar\", la primera tecla que presiones, será la nueva tecla asignada.", | |
119 | suelo = "Suelo", | |
120 | rampa = "Rampa", | |
121 | rescate = "Rescate", | |
122 | recarga = "Recarga", | |
123 | consumible = "Consumible", | |
124 | cambiar = "Cambiar", | |
125 | restaurarTodo = "Restaurar todo", | |
126 | presioneAhora = "¡Presione ahora!", | |
127 | esperandoKey = "Esperando...", | |
128 | cambiosGuardados = "¡Cambios guardados!", | |
129 | informacion_encabezado = "Información", | |
130 | informacion_cb_informacion = "Información", | |
131 | informacion_cb_controles = "Controles", | |
132 | informacion_cb_reglas = "Reglas", | |
133 | informacion_cb_staff = "Staff", | |
134 | 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.", | |
135 | informacion_controles_x = "Coloca un suelo sobre los pies de tu ratón.", | |
136 | informacion_controles_c = "Coloca una rampa hacia la dirección de tu ratón.", | |
137 | informacion_controles_z = "Coloca un suelo muy por debajo de tu ratón para cuando vayas cayendo en picada.", | |
138 | informacion_controles_space = "Activa o utiliza los consumibles (Trampas, lanzaderas, impulsador)", | |
139 | 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).", | |
140 | 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.", | |
141 | --- HUD -------- | |
142 | hud_uimap = "<font color='#D7CF21'>Fortmice</font> | Construye, lucha y gana.", | |
143 | hud_plataformas = "Plataformas:", | |
144 | hud_vivos = "Vivos:", | |
145 | hud_municion = "Munición", | |
146 | hud_recarga = "Recarga", | |
147 | abrirCofre = "Abrir cofre", | |
148 | hud_espectador = "Espectador", | |
149 | hud_cofre_bombas = "Bombas", | |
150 | hud_cofre_lapidas = "Lápidas", | |
151 | hud_cofre_cajas = "Cajas", | |
152 | hud_cofre_minigunnevada = "Minigun nevada", | |
153 | hud_cofre_sniper = "Sniper de doble cañón", | |
154 | hud_cofre_100plataformas = "100 plataformas", | |
155 | hud_cofre_impulsador = "Impulsador", | |
156 | hud_cofre_trampas = "Trampas", | |
157 | hud_cofre_lanzaderas = "Lanzaderas", | |
158 | --- AVISOS ---- | |
159 | aviso_victoria = "<font color='#FFFFFF' size='30' face='Comic Sans MS'> Victoria Magistral!", | |
160 | aviso_victoriaDescrip = "ha ganado la partida.", | |
161 | aviso_victoriasContador = "Victorias:", | |
162 | aviso_tormenta = " ¡Se avecina una tormenta!", | |
163 | aviso_tormentaUp = " ¡Se avecina una tormenta desde arriba!", | |
164 | aviso_nadieGana = " Nadie gana!", | |
165 | aviso_nadieGanaDescrip = "Nadie ha logrado sobrevivir :(", | |
166 | aviso_modoDeJuegoNombre = "Enfrentamientos tormentosos", | |
167 | aviso_modoDeJuegoDescrip = "Sigue la ruta de la tormenta mientras te enfrentas.", | |
168 | aviso_textAreaModoDeJuego = "MODO DE JUEGO", | |
169 | feed = "ha muerto", | |
170 | ||
171 | ||
172 | ||
173 | }, | |
174 | en = { | |
175 | 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.", | |
176 | ||
177 | ||
178 | noticias_titulo = "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>NEWS!</font><font size='9'> (23/10/19)", | |
179 | ||
180 | 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♥", | |
181 | ||
182 | ||
183 | ||
184 | datos_corruptos = "<r>Your data was corrupt. It was resetted.", | |
185 | ||
186 | -- MENU ------ | |
187 | controles_boton = "Change controls", | |
188 | informacion_boton = "Information", | |
189 | noticias_boton = "News", | |
190 | controles_encabezado = "Controls", | |
191 | controles_aviso = "At the moment of clicking on \"Change\", the first key that you press will be the new key assigned.", | |
192 | suelo = "Floor", | |
193 | rampa = "Ramp", | |
194 | rescate = "Rescue", | |
195 | recarga = "Reload", | |
196 | consumible = "Consumable", | |
197 | cambiar = "Change", | |
198 | restaurarTodo = "Restore all", | |
199 | presioneAhora = "Press Now!", | |
200 | esperandoKey = "Waiting...", | |
201 | cambiosGuardados = "Changes saved!", | |
202 | informacion_encabezado = "Information", | |
203 | informacion_cb_informacion = "Information", | |
204 | informacion_cb_controles = "Controls", | |
205 | informacion_cb_reglas = "Rules", | |
206 | informacion_cb_staff = "Staff", | |
207 | 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.", | |
208 | informacion_controles_x = "Place a floor on the feet of your mouse.", | |
209 | informacion_controles_c = "Place a ramp towards the direction of your mouse.", | |
210 | informacion_controles_z = "Place a ground far below your mouse for when you are plummeting.", | |
211 | informacion_controles_space = "Activate or use consumables (Traps, launch pads, booster)", | |
212 | 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).", | |
213 | 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.", | |
214 | ||
215 | --- HUD ----- | |
216 | hud_uimap = "<font color='#D7CF21'>Fortmice</font> | Build, fight and win.", | |
217 | hud_plataformas = "Platforms:", | |
218 | hud_vivos = "Alive:", | |
219 | hud_municion = "Ammo:", | |
220 | hud_recarga = "Reload:", | |
221 | abrirCofre = "Open chest", | |
222 | hud_espectador = "Spectator", | |
223 | hud_cofre_bombas = "Bombs", | |
224 | hud_cofre_lapidas = "Tombstones", | |
225 | hud_cofre_cajas = "Boxes", | |
226 | hud_cofre_minigunnevada = "Snowy minigun", | |
227 | hud_cofre_sniper = "Double barrel sniper", | |
228 | hud_cofre_100plataformas = "100 platforms", | |
229 | hud_cofre_impulsador = "Booster", | |
230 | hud_cofre_trampas = "Traps", | |
231 | hud_cofre_lanzaderas = "Launch pads", | |
232 | --- AVISOS ---- | |
233 | aviso_victoria = "<font color='#FFFFFF' size='30' face='Comic Sans MS'> Victory Royale!", | |
234 | aviso_victoriaDescrip = "has won the game.", | |
235 | aviso_victoriasContador = "Victories:", | |
236 | aviso_tormenta = " A storm is coming!", | |
237 | aviso_tormentaUp = " A storm is coming from the sky!", | |
238 | aviso_nadieGana = " Nobody wins!", | |
239 | aviso_nadieGanaDescrip = "No one has survived :(", | |
240 | aviso_modoDeJuegoNombre = "Stormy clashes", | |
241 | aviso_modoDeJuegoDescrip = "Follow the route of the storm while fighting.", | |
242 | aviso_textAreaModoDeJuego = "GAME MODE", | |
243 | feed = "has died", | |
244 | }, | |
245 | ||
246 | ||
247 | br = { | |
248 | 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.", | |
249 | noticias_titulo = "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>NOTÍCIAS!</font><font size='9'> (23/10/19)", | |
250 | 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♥", | |
251 | ||
252 | -- MENÚ ---------- | |
253 | controles_boton = "Alterar controles", | |
254 | informacion_boton = "Informação", | |
255 | noticias_boton = "Notícias", | |
256 | controles_encabezado = "Controles", | |
257 | controles_aviso = "No momento que clicar em \"Mudar\", a primeira tecla que você apertar, será a nova tecla atribuída.", | |
258 | suelo = "Chão", | |
259 | rampa = "Rampa", | |
260 | rescate = "Regaste", | |
261 | recarga = "Recarregar", | |
262 | consumible = "Consumível", | |
263 | cambiar = "Mudar", | |
264 | restaurarTodo = "Restaurar tudo", | |
265 | presioneAhora = "Pressione agora!", | |
266 | esperandoKey = "Esperando...", | |
267 | cambiosGuardados = "Mudanças salvas!", | |
268 | informacion_encabezado = "informação", | |
269 | informacion_cb_informacion = "informação", | |
270 | informacion_cb_controles = "Controles", | |
271 | informacion_cb_reglas = "Regras", | |
272 | informacion_cb_staff = "Staff", | |
273 | 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.", | |
274 | informacion_controles_x = "Cria um piso no pé do seu rato.", | |
275 | informacion_controles_c = "Cria uma rampa de acordo com a direção do seu rato.", | |
276 | informacion_controles_z = "Cria um chão muito abaixo do seu rato para quando você estiver despecando.", | |
277 | informacion_controles_space = "Ativa ou usa consumíveis (Armadilha, Plataforma de Lançamento, booster)", | |
278 | 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).", | |
279 | 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.", | |
280 | ||
281 | ||
282 | -- HUD -------- | |
283 | hud_uimap = "<font color='#D7CF21'>Fortmice</font> | construir, lutar e vencer", | |
284 | hud_plataformas = "Plataformas:", | |
285 | hud_vivos = "Vivo:", | |
286 | hud_municion = "Munição:", | |
287 | hud_recarga = "Recarrega:", | |
288 | abrirCofre = "Abrir Baú", | |
289 | hud_espectador = "Espectador", | |
290 | hud_cofre_bombas = "Bombas", | |
291 | hud_cofre_lapidas = "Lápides", | |
292 | hud_cofre_cajas = "Caixas", | |
293 | hud_cofre_minigunnevada = "Minigun nevada", | |
294 | hud_cofre_sniper = "Atirador de cano duplo", | |
295 | hud_cofre_100plataformas = "100 plataformas", | |
296 | hud_cofre_impulsador = "Impulsor", | |
297 | hud_cofre_trampas = "Armadilha", | |
298 | hud_cofre_lanzaderas = "Plataforma de lançamento", | |
299 | -- AVISOS ---- | |
300 | aviso_victoria = "<font color='#FFFFFF' size='30' face='Comic Sans MS'> Vitória Royale!", | |
301 | aviso_victoriaDescrip = "ganhou o jogo.", | |
302 | aviso_victoriasContador = "Vitórias:", | |
303 | aviso_tormenta = " Uma tempestade está vindo!", | |
304 | aviso_tormentaUp = " Uma tempestade está vindo do céu!", | |
305 | aviso_nadieGana = " Ninguém ganha!", | |
306 | aviso_nadieGanaDescrip = "Ninguém sobreviveu :(", | |
307 | aviso_modoDeJuegoNombre = "Confrontos tempestuosos", | |
308 | aviso_modoDeJuegoDescrip = "Siga a rota da tempestade enquanto luta.", | |
309 | aviso_textAreaModoDeJuego = "MODO DE JOGO", | |
310 | feed = "morreu", | |
311 | }, | |
312 | fr = { | |
313 | 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>", | |
314 | noticias_titulo = "<p align='center'><font size='22'><font color='#FFF504' face='Comic Sans MS'>INFORMATIONS!</font><font size='9'> (13/9/19)", | |
315 | -- 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)", | |
316 | --- HUD -------- | |
317 | hud_uimap = "<font color='#D7CF21'>Fortmice</font> | Build, fight and win.", | |
318 | hud_plataformas = "Platforms:", | |
319 | hud_vivos = "Alive:", | |
320 | hud_municion = "Ammo:", | |
321 | hud_recarga = "Reload:", | |
322 | } | |
323 | } | |
324 | langs.pt = langs.br | |
325 | ||
326 | local function translate(lang, text) | |
327 | if langs[lang] and langs[lang][text] then | |
328 | return langs[lang][text] | |
329 | elseif langs.en[text] then | |
330 | return langs.en[text] | |
331 | else | |
332 | return "$" .. text .. "$" | |
333 | end | |
334 | end | |
335 | ||
336 | keyz = { | |
337 | [0] = "<", | |
338 | [2] = ">", | |
339 | [32] = "space", | |
340 | [65] = "A", | |
341 | [66] = "B", | |
342 | [67] = "C", | |
343 | [68] = "D", | |
344 | [69] = "E", | |
345 | [70] = "F", | |
346 | [71] = "G", | |
347 | [72] = "H", | |
348 | [73] = "I", | |
349 | [74] = "J", | |
350 | [75] = "K", | |
351 | [76] = "L", | |
352 | [77] = "M", | |
353 | [78] = "N", | |
354 | [79] = "O", | |
355 | [80] = "P", | |
356 | [81] = "Q", | |
357 | [82] = "R", | |
358 | [83] = "S", | |
359 | [84] = "T", | |
360 | [85] = "U", | |
361 | [86] = "V", | |
362 | [87] = "W", | |
363 | [88] = "X", | |
364 | [89] = "Y", | |
365 | [90] = "Z", | |
366 | [48] = "0", | |
367 | [49] = "1", | |
368 | [50] = "2", | |
369 | [51] = "3", | |
370 | [52] = "4", | |
371 | [53] = "5", | |
372 | [54] = "6", | |
373 | [55] = "7", | |
374 | [56] = "8", | |
375 | [57] = "9", | |
376 | [97] = "1", | |
377 | [98] = "2", | |
378 | [99] = "3", | |
379 | } | |
380 | ||
381 | local loadPlayerData, savePlayerData | |
382 | do | |
383 | local stringData = {} | |
384 | local dataSystemVersion = "0.1" | |
385 | local moduleIdentifier = "fm" | |
386 | local dataVersion = "0.6" | |
387 | local resetOnOlderVersion = "0.3" | |
388 | local saveValues = { | |
389 | victorias = "number", | |
390 | key_rampa = "number", | |
391 | key_suelo = "number", | |
392 | key_recarga = "number", | |
393 | key_rescate = "number", | |
394 | key_consumible = "number", | |
395 | noticias_version = "number", | |
396 | } | |
397 | --[[ | |
398 | Explicación: | |
399 | Al usar datos hosteados en mi cuenta (Tocutoeltuco#0000), todos los datos que | |
400 | yo use (ya sea para este o para otro módulo) se compartirán. Es decir, | |
401 | tu system.savePlayerData en #fortmice afecta el system.loadPlayerData en cualquier | |
402 | otro módulo o script que yo cargue, y viceversa. Lo mismo con los archivos. | |
403 | Por lo tanto, este sistema requiere un identificador de módulo (el tuyo será fm), | |
404 | así tu modulo no modifica datos de otros módulos. La version del sistema de datos | |
405 | es por si en algún momento cambio el sistema. La versión de los datos es por si | |
406 | en algún momento se te ocurre cambiar los datos guardados, en tal caso, el código | |
407 | detectará si alguien tiene una version más antigua que la que estás usando, y si lo es | |
408 | checkeará si es menor que resetOnOlderVersion, si lo es, reseteará sus datos y le mandará | |
409 | un mensaje. | |
410 | saveValues son los valores que guardas, te recomiendo no modificarlo sin avisarme | |
411 | ]] | |
412 | ||
413 | local function getDefaultData() | |
414 | return { | |
415 | plataformas = 12, | |
416 | reloadPlataformas = 0, | |
417 | flechasDefault = 1, | |
418 | canShoot = nil, | |
419 | inGame = 0, | |
420 | showUpdate = 0, | |
421 | tImpulsador = 10, | |
422 | tWaitingKey= 20, | |
423 | asignandoKey= 0, | |
424 | txt_salud = 100, | |
425 | cofre101102Bombas = 0, | |
426 | cofre103104Lapidas = 0, | |
427 | cofre105106Impulsador = 0, | |
428 | cofre108Sniper = 0, | |
429 | cofre110111Trampa = 0, | |
430 | cofre112113Cajas = 0, | |
431 | cofre114115Lanzaderas= 0, | |
432 | cofre116117MinigunNevada= 0, | |
433 | trampas = 4, | |
434 | trampasOn = 0, | |
435 | lanzaderas = 6, | |
436 | force = 45, | |
437 | ammo = 7, | |
438 | txt_key_rampa = "C", | |
439 | txt_key_suelo = "X", | |
440 | txt_key_recarga = "Q", | |
441 | txt_key_rescate = "Z", | |
442 | txt_key_consumible = "space", | |
443 | victorias = 0, | |
444 | key_rampa = 67, | |
445 | key_suelo = 88, | |
446 | key_recarga = 81, | |
447 | key_rescate = 90, | |
448 | key_consumible = 32, | |
449 | noticias_version = 0 | |
450 | } | |
451 | end | |
452 | ||
453 | local function onPlayerDataLoaded(player) | |
454 | tfm.exec.setPlayerScore(player,mice[player].victorias,false) | |
455 | mice[player].txt_key_rampa = keyz[mice[player].key_rampa] | |
456 | mice[player].txt_key_suelo = keyz[mice[player].key_suelo] | |
457 | mice[player].txt_key_recarga = keyz[mice[player].key_recarga] | |
458 | mice[player].txt_key_rescate = keyz[mice[player].key_rescate] | |
459 | mice[player].txt_key_consumible = keyz[mice[player].key_consumible] | |
460 | ui.addTextArea(22, "<b>"..mice[player].txt_key_suelo.."", player, 11, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
461 | ui.addTextArea(23, "<b>"..mice[player].txt_key_rampa.."</a>", player, 40, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
462 | ui.addTextArea(28, "<b>"..mice[player].txt_key_rescate.."", player, 70, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
463 | if mice[player].noticias_version < noticias_version then | |
464 | displayUpdate(player) | |
465 | end | |
466 | mice[player].noticias_version = noticias_version | |
467 | savePlayerData(player) | |
468 | end | |
469 | ||
470 | function eventPlayerDataLoaded(player, data) | |
471 | if data == "" then | |
472 | stringData[player] = moduleIdentifier .. ":0:0;" | |
473 | return onPlayerDataLoaded(player) | |
474 | end | |
475 | ||
476 | if string.sub(data, 1, 2 + #dataSystemVersion) ~= "|" .. dataSystemVersion .. "|" then | |
477 | stringData[player] = moduleIdentifier .. ":0:0;" | |
478 | tfm.exec.chatMessage(translate(tfm.get.room.playerList[player].community, "datos_corruptos"), player) | |
479 | else | |
480 | data = string.sub(data, 3 + #dataSystemVersion) | |
481 | stringData[player] = data | |
482 | local version, module_data = string.match(data, moduleIdentifier .. ":([^:]+):([^;]+);") | |
483 | ||
484 | if version then | |
485 | if version <= resetOnOlderVersion then | |
486 | tfm.exec.chatMessage(translate(tfm.get.room.playerList[player].community, "datos_corruptos"), player) | |
487 | else | |
488 | for key, value in string.gmatch(string.gsub(string.gsub(module_data, "&0", ":"), "&1", ";"), "([^:]+):([^;]+);") do | |
489 | if saveValues[key] == "number" then | |
490 | mice[player][key] = tonumber(value) | |
491 | elseif saveValues[key] == "boolean" then | |
492 | mice[player][key] = value == "1" | |
493 | elseif saveValues[key] == "string" then | |
494 | mice[player][key] = string.gsub(string.gsub(string.gsub(value, "&2", ":"), "&3", ";"), "&4", "&") | |
495 | else | |
496 | mice[player] = getDefaultData() | |
497 | tfm.exec.chatMessage(translate(tfm.get.room.playerList[player].community, "datos_corruptos"), player) | |
498 | break | |
499 | end | |
500 | end | |
501 | end | |
502 | end | |
503 | end | |
504 | onPlayerDataLoaded(player) | |
505 | end | |
506 | ||
507 | function loadPlayerData(player) | |
508 | mice[player] = getDefaultData() | |
509 | ||
510 | if not system.loadPlayerData(player) then | |
511 | onPlayerDataLoaded(player) | |
512 | end | |
513 | end | |
514 | ||
515 | function savePlayerData(player) | |
516 | if not stringData[player] then return end | |
517 | ||
518 | local moduleData = moduleIdentifier .. ":" .. dataVersion .. ":" | |
519 | local valueData, globalData | |
520 | for key, saveType in next, saveValues do | |
521 | valueData = key .. "&0" | |
522 | if saveType == "boolean" then | |
523 | moduleData = moduleData .. valueData .. (mice[player][key] and "1" or "0") .. "&1" | |
524 | elseif saveType == "number" then | |
525 | moduleData = moduleData .. valueData .. tostring(tonumber(mice[player][key]) or 0) .. "&1" | |
526 | elseif saveType == "string" then | |
527 | moduleData = moduleData .. valueData .. string.gsub(string.gsub(string.gsub(mice[player][key], "&", "&4"), ";", "&3"), ":", "&2") .. "&1" | |
528 | else | |
529 | error("Can not cast data to " .. saveType .. " to save it.", 2) | |
530 | end | |
531 | end | |
532 | ||
533 | globalData = "|" .. dataSystemVersion .. "|" | |
534 | for module, version, data in string.gmatch(stringData[player], "([^:]+):([^:]+):([^;]+);") do | |
535 | if module == moduleIdentifier then | |
536 | globalData = globalData .. moduleData .. ";" | |
537 | else | |
538 | globalData = globalData .. module .. ":" .. version .. ":" .. data .. ";" | |
539 | end | |
540 | end | |
541 | ||
542 | system.savePlayerData(player, globalData) | |
543 | end | |
544 | end | |
545 | ||
546 | commands = {"n","p","ban","desban","getwins"} | |
547 | for i,command in ipairs(commands) do system. | |
548 | disableChatCommandDisplay(command,true) | |
549 | end | |
550 | ||
551 | 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} | |
552 | local gameModemaps= {7646218,7646220,7646221,7646222,7647932,7647934} | |
553 | ||
554 | ||
555 | local admins = {"Hackinzkt#0000","Tocutoeltuco#0000","Lua#1908"} | |
556 | local mods = {} | |
557 | local banlist = {} | |
558 | local acurrentMap | |
559 | local playersInRoom = 0 | |
560 | last_player_name_alive = "" | |
561 | local toRespawn = {} | |
562 | tFeed = 0 | |
563 | tlastPlayer = 0 | |
564 | tgameMode = 0 | |
565 | feedID= 50 | |
566 | feedTxT= 0 | |
567 | tTormentComming = 20 | |
568 | quickPlataform = 0 | |
569 | globalPlataformas = 0 | |
570 | inCheese = 0 | |
571 | firstRound = 0 | |
572 | toDespawn = {} | |
573 | facingLeft = {} | |
574 | victory = 0 | |
575 | tStorm = 0 | |
576 | feedID= 50 | |
577 | feedPos = 390 | |
578 | barreras = 10000 | |
579 | ||
580 | local settings = { | |
581 | recoil = 2, | |
582 | maxObjects = 14, | |
583 | ammoTicks = 3, | |
584 | } | |
585 | ||
586 | local textareaCoords = {} | |
587 | local SETTINGS = { | |
588 | mapLength = 4800, | |
589 | textareaAmount = 17, | |
590 | textareaSize = 18, | |
591 | } | |
592 | ||
593 | function players_alive() | |
594 | nr = 0 | |
595 | for name,player in pairs(tfm.get.room.playerList) do | |
596 | if tfm.get.room.playerList[name].isDead == false then | |
597 | nr = nr +1 | |
598 | last_player_name_alive = name | |
599 | end | |
600 | end | |
601 | return nr | |
602 | end | |
603 | ||
604 | ||
605 | ||
606 | function isAdmin (name) | |
607 | for _,adminName in pairs(admins) do | |
608 | tfm.exec.setNameColor(adminName,0xFCF903) | |
609 | if name == adminName then return true end | |
610 | end | |
611 | return false | |
612 | end | |
613 | ||
614 | function isMod (name) | |
615 | for _,modName in pairs(mods) do | |
616 | tfm.exec.setNameColor(modName,0x54B2DF) | |
617 | if name == modName then return true end | |
618 | end | |
619 | return false | |
620 | end | |
621 | ||
622 | function isBanned (name) | |
623 | for _,bannedName in pairs(banlist) do | |
624 | if name == bannedName then return true end | |
625 | end | |
626 | return false | |
627 | end | |
628 | ||
629 | ||
630 | --------- TORMENTA LEFT --------- | |
631 | ||
632 | local textAreaWIDTHL = 5000 | |
633 | local textAreaHEIGHTL = 1300 | |
634 | avanceTormentLeft = 0 | |
635 | local textareaLeft = setmetatable({ x = 0, y = 0, radiusX = (textAreaWIDTHL+4990) / 4, radiusY = (textAreaHEIGHTL+200) / 2}, { | |
636 | __call = function(list, objectX, objectY) | |
637 | local x, y = (list.x - objectX), (list.y - objectY) | |
638 | return x >= -list.radiusX and x <= list.radiusX and y >= -list.radiusY and y <= list.radiusY | |
639 | end | |
640 | }) | |
641 | textareaLeft.x = -2508 | |
642 | textareaLeft.y = 445 | |
643 | ||
644 | --------- TORMENTA RIGHT --------- | |
645 | ||
646 | local textAreaWIDTH = 5000 | |
647 | local textAreaHEIGHT = 1300 | |
648 | avanceTormentRight = 0 | |
649 | local textarea = setmetatable({ x = 0, y = 0, radiusX = (textAreaWIDTH+200) / 4, radiusY = (textAreaHEIGHT+200) / 2}, { | |
650 | __call = function(list, objectX, objectY) | |
651 | local x, y = (list.x - objectX), (list.y - objectY) | |
652 | return x >= -list.radiusX and x <= list.radiusX and y >= -list.radiusY and y <= list.radiusY | |
653 | end | |
654 | }) | |
655 | textarea.x = 6104 | |
656 | textarea.y = 445 | |
657 | ||
658 | ||
659 | ||
660 | --------- TORMENTA UP --------- | |
661 | ||
662 | local textAreaWIDTHUP = 4800 | |
663 | local textAreaHEIGHTUP = 800 | |
664 | ||
665 | local textareaUp = setmetatable({ x = 0, y = 0, radiusX = (textAreaWIDTHUP) / 2, radiusY = (textAreaHEIGHTUP) / 2}, { | |
666 | ||
667 | - | __call = function(list, objectX, objectY) |
667 | + | __call = function(list, objectX, objectY) |
668 | - | local x, y = (list.x - objectX), (list.y - objectY) |
668 | + | local x, y = (list.x - objectX), (list.y - objectY) |
669 | ||
670 | ||
671 | - | return x >= -list.radiusX and x <= list.radiusX and y >= -list.radiusY and y <= list.radiusY |
671 | + | return x >= -list.radiusX and x <= list.radiusX and y >= -list.radiusY and y <= list.radiusY |
672 | - | end |
672 | + | |
673 | }) | |
674 | ||
675 | textareaUp.x = 2400 | |
676 | textareaUp.y = -600 | |
677 | avanceTormentaUp = 0 | |
678 | ||
679 | ||
680 | ||
681 | ||
682 | ||
683 | ||
684 | ||
685 | ||
686 | local players = {} | |
687 | local objects = {} | |
688 | ||
689 | 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} | |
690 | _C = 67 | |
691 | _X = 88 | |
692 | _Q = 81 | |
693 | _Z = 90 | |
694 | _A = 65 | |
695 | _B = 66 | |
696 | _E = 69 | |
697 | _left = 0 | |
698 | _right = 2 | |
699 | _space = 32 | |
700 | _rampaDerecha = {width=80, height=10, foreground=true, miceCollision=true, groundCollision=true, type=0, angle=-45, friction=0.2} | |
701 | _rampaIzquierda = {width=80, height=10, foreground=true, miceCollision=true, groundCollision=true, type=0, angle=45, friction=0.2} | |
702 | _Suelo = {width=80, height=10, foreground=true, miceCollision=true, groundCollision=true, type=0, angle=0, friction=0.3} | |
703 | _rescate = {width=100, height=10, foreground=true, miceCollision=true, groundCollision=true, type=0, angle=-180, friction=0.3} | |
704 | _lanzaderaRight = {width=50, height=10, foreground=true, miceCollision=true, groundCollision=true, type=2, angle=40, friction=0, restitution=2} | |
705 | _lanzaderaCentro = {width=50, height=10, foreground=true, miceCollision=true, groundCollision=true, type=2, angle=0, friction=0, restitution=5} | |
706 | _lanzaderaLeft = {width=50, height=10, foreground=true, miceCollision=true, groundCollision=true, type=2, angle=-40, friction=0, restitution=2} | |
707 | ||
708 | _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} | |
709 | _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} | |
710 | _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} | |
711 | _trampaSpiderWeb = {width=75, height=75, foreground=false, miceCollision=false, type=15} | |
712 | ||
713 | _barreraLeft = {width=10, height=1200, foreground=true,groundCollision=false, miceCollision=true, type=15} | |
714 | _barreraRight = {width=10, height=1200, foreground=false,groundCollision=false, miceCollision=true, type=15} | |
715 | _barreraUpLeft = {width=2400, height=10, foreground=false,groundCollision=false, miceCollision=true, type=15} | |
716 | _barreraUpRight = {width=2400, height=10, foreground=false,groundCollision=false, miceCollision=true, type=15} | |
717 | ||
718 | ||
719 | -- END ----------------------------------- | |
720 | ||
721 | ||
722 | function main() | |
723 | ||
724 | for n in pairs(tfm.get.room.playerList) do | |
725 | eventNewPlayer(n) | |
726 | tfm.exec.setPlayerScore(n,0) | |
727 | tfm.exec.setUIMapName(""..translate(tfm.get.room.playerList[n].community, "hud_uimap").."") | |
728 | end | |
729 | ||
730 | tfm.exec.disableAutoNewGame() | |
731 | tfm.exec.disableAutoTimeLeft() | |
732 | tfm.exec.disableAutoShaman() | |
733 | tfm.exec.disableAutoScore(true) | |
734 | tfm.exec.disablePhysicalConsumables() | |
735 | tfm.exec.disableMinimalistMode() | |
736 | tfm.exec.disableWatchCommand() | |
737 | tfm.exec.setRoomMaxPlayers(22) | |
738 | objects = queue.new() | |
739 | startGame() | |
740 | end | |
741 | ||
742 | ||
743 | ||
744 | ||
745 | ||
746 | ||
747 | ||
748 | function eventNewPlayer(name) | |
749 | tfm.exec.setUIMapName(""..translate(tfm.get.room.playerList[name].community, "hud_uimap").."") | |
750 | tfm.exec.chatMessage(""..translate(tfm.get.room.playerList[name].community, "bienvenida").."",name) | |
751 | - | ui.addTextArea(951,"<font size='13' color='#FFFFFF'> "..players_alive().."", name, 13, 260, 80, 23, 0x324650, 0x000000, 0, true) |
751 | + | tfm.exec.addImage("16dfb1c1dfe.png", ":1", 6, 260, name) |
752 | ui.addTextArea(951,"<font size='13' color='#FFFFFF'>"..players_alive().."", name, 25, 262, 80, 23, 0x324650, 0x000000, 0, true) | |
753 | ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", nil, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true) | |
754 | 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) | |
755 | 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) | |
756 | ui.addTextArea(22, "<b>X", name, 11, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
757 | ui.addTextArea(23, "<b>C", name, 40, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
758 | ui.addTextArea(28, "<b>Z", name, 70, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
759 | playersInRoom = playersInRoom + 1 | |
760 | for _,k in pairs(keys) do | |
761 | system.bindKeyboard(name, k, true) | |
762 | end | |
763 | ||
764 | playerz[name]={ | |
765 | timestamp=os.time(), | |
766 | offsets={x=3, y=8}, | |
767 | visible=false, | |
768 | side = 1 | |
769 | } | |
770 | ||
771 | ||
772 | loadPlayerData(name) | |
773 | end | |
774 | ||
775 | ||
776 | function eventPlayerLeft (name) | |
777 | playersInRoom = playersInRoom - 1 | |
778 | end | |
779 | ||
780 | -------------------------------------- ROTATION ----------------------------------- | |
781 | ||
782 | ||
783 | ||
784 | ||
785 | ||
786 | function startGame() | |
787 | if gameMode <=1 then | |
788 | tfm.exec.newGame(maps[math.random(#maps)]) | |
789 | end | |
790 | if gameMode >1 then | |
791 | tfm.exec.newGame(gameModemaps[math.random(#gameModemaps)]) | |
792 | end | |
793 | ||
794 | nadieGana = 0 | |
795 | victory = 0 | |
796 | avanceTormenta = 0 | |
797 | avanceTormentaUp = 0 | |
798 | tTormentComming = 20 | |
799 | tnadieGanaLoop = 6 | |
800 | quickPlataform = 1 | |
801 | firstRound = firstRound + 1 | |
802 | ||
803 | ||
804 | textareaUp.x = 2400 | |
805 | textareaUp.y = -600 | |
806 | ||
807 | ||
808 | direccion = 0 | |
809 | stormUp = false | |
810 | ||
811 | end | |
812 | ||
813 | ||
814 | function eventNewGame() | |
815 | tStorm = 160 | |
816 | gameMode = gameMode + 1 | |
817 | tfm.exec.setGameTime(172) | |
818 | isAdmin() | |
819 | isMod() | |
820 | ||
821 | ||
822 | ||
823 | ||
824 | --------------------- CLEAN TextAreas ----------------------------- | |
825 | ||
826 | ui.removeTextArea(50,nil) | |
827 | ui.removeTextArea(51,nil) | |
828 | ui.removeTextArea(52,nil) | |
829 | ui.removeTextArea(53,nil) | |
830 | ui.removeTextArea(9998,nil) | |
831 | ui.removeTextArea(9992,nil) | |
832 | ui.removeTextArea(666,nil) | |
833 | ui.removeTextArea(668,nil) | |
834 | ui.removeTextArea(667,nil) | |
835 | ui.removeTextArea(665,nil) | |
836 | ui.removeTextArea(669,nil) | |
837 | ui.removeTextArea(777,nil) | |
838 | ui.removeTextArea(443,nil) | |
839 | ui.removeTextArea(444,nil) | |
840 | ui.removeTextArea(445,nil) | |
841 | ui.removeTextArea(446,nil) | |
842 | ui.removeTextArea(447,nil) | |
843 | ui.removeTextArea(448,nil) | |
844 | ui.removeTextArea(27,nil) | |
845 | ui.removeTextArea(288,nil) | |
846 | ui.removeTextArea(29,nil) | |
847 | ui.removeTextArea(-9999,nil) | |
848 | ui.removeTextArea(201,nil) | |
849 | ui.removeTextArea(202,nil) | |
850 | ui.removeTextArea(203,nil) | |
851 | ui.removeTextArea(-999,nil) | |
852 | ui.removeTextArea(-998,nil) | |
853 | ui.removeTextArea(-997,nil) | |
854 | ui.removeTextArea(-996,nil) | |
855 | ||
856 | ---------------------------------COFRES TEXTAREA----------------------------- | |
857 | ||
858 | textareaCoords = {} | |
859 | ||
860 | for id = 1, SETTINGS.textareaAmount do | |
861 | id = id+100 | |
862 | local rand = math.random | |
863 | local x, y = rand(SETTINGS.mapLength), rand(350) | |
864 | ||
865 | textareaCoords[#textareaCoords + 1] = {x = x, y = y} | |
866 | ||
867 | for player, data in next, tfm.get.room.playerList do | |
868 | 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) | |
869 | end | |
870 | ||
871 | end | |
872 | ||
873 | --------------------- RESET DEFAULT VALUES from mice[name] ----------------------------- | |
874 | ||
875 | for name in pairs(tfm.get.room.playerList) do | |
876 | if name and mice[name] then | |
877 | mice[name].plataformas = 12 | |
878 | mice[name].inGame = 1 | |
879 | mice[name].txt_salud = 100 | |
880 | mice[name].flechasDefault = 1 | |
881 | mice[name].canShoot = true | |
882 | mice[name].reloadPlataformas = 0 | |
883 | mice[name].cofre101102Bombas = 0 | |
884 | mice[name].cofre103104Lapidas = 0 | |
885 | mice[name].cofre105106Impulsador = 0 | |
886 | mice[name].cofre108Sniper = 0 | |
887 | mice[name].cofre112113Cajas = 0 | |
888 | mice[name].cofre110111Trampa = 0 | |
889 | mice[name].trampas = 4 | |
890 | mice[name].trampasOn = 0 | |
891 | mice[name].cofre114115Lanzaderas = 0 | |
892 | mice[name].cofre116117MinigunNevada = 0 | |
893 | mice[name].lanzaderas = 6 | |
894 | mice[name].ammo = 7 | |
895 | mice[name].force = 45 | |
896 | savePlayerData(name) | |
897 | tfm.exec.setUIMapName(""..translate(tfm.get.room.playerList[name].community, "hud_uimap").."") | |
898 | 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) | |
899 | ui.addTextArea(22, "<b>"..mice[name].txt_key_suelo.."", name, 11, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
900 | ui.addTextArea(23, "<b>"..mice[name].txt_key_rampa.."</a>", name, 40, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
901 | ui.addTextArea(24, "<font size='15' color='#FFFFFF'>12/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
902 | ui.addTextArea(28, "<b>"..mice[name].txt_key_rescate.."", name, 70, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
903 | -- ui.addTextArea(44455, "Salud: "..mice[name].txt_salud.."", name,320, 290, 102, 27, 0x324650, 0x000000, 1, true) | |
904 | ui.removeTextArea(25,name) | |
905 | ui.removeTextArea(26,name) | |
906 | end | |
907 | end | |
908 | ||
909 | - | ui.addTextArea(951, "<font size='13' color='#FFFFFF'> "..players_alive().." ", player, 13, 260, 80, 23, 0x324650, 0x000000, 0, true) |
909 | + | |
910 | ui.addTextArea(951, "<font size='13' color='#FFFFFF'>"..players_alive().." ", player, 25, 262, 80, 23, 0x324650, 0x000000, 0, true) | |
911 | end | |
912 | ||
913 | ui.removeTextArea(29,nil) -- tramaps munición | |
914 | ||
915 | --------------------------------------------------------------------- | |
916 | for _,playerName in pairs(banlist) do | |
917 | tfm.exec.killPlayer(playerName); | |
918 | end | |
919 | ||
920 | players = {} | |
921 | for name in pairs(tfm.get.room.playerList) do | |
922 | initPlayer(name) | |
923 | end | |
924 | ||
925 | ||
926 | ||
927 | if gameMode <= 2 then | |
928 | ||
929 | textarea.x = 6104 | |
930 | textarea.y = 445 | |
931 | textareaLeft.x = -2508 | |
932 | textareaLeft.y = 445 | |
933 | ||
934 | barreras = 10000 | |
935 | barreras = barreras + 4 | |
936 | tfm.exec.addPhysicObject(barreras,-6,201, _barreraLeft) | |
937 | tfm.exec.addPhysicObject(barreras-1,4806,201, _barreraRight) | |
938 | tfm.exec.addPhysicObject(barreras-2,1200,-5, _barreraUpLeft) | |
939 | tfm.exec.addPhysicObject(barreras-3,3600,-5, _barreraUpRight) | |
940 | end | |
941 | ||
942 | ||
943 | ||
944 | ||
945 | if gameMode == 3 then | |
946 | textarea.x = 2000 | |
947 | textarea.y = 445 | |
948 | textareaLeft.x = -2508 | |
949 | textareaLeft.y = 445 | |
950 | direccion = 1 | |
951 | for player, data in next, tfm.get.room.playerList do | |
952 | 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) | |
953 | 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) | |
954 | ui.addTextArea(12202, "<p align='center'><font size='35' color='#000000'>___________", player, 298, 90, 196, 48, 0x000000, 0x000000, 0, true) | |
955 | ui.addTextArea(12203, "<p align='center'><font size='35' color='#000000'>___________", player, 297, 43, 200, 52, 0x000000, 0x000000, 0, true) | |
956 | ui.addTextArea(12204, "<p align='center'><font color='#ffdd00'>"..translate(data.community, "aviso_textAreaModoDeJuego").."", player, 672, 28, 120, 20, 0x6a7495, 0xffdd00, 1, true) | |
957 | 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) | |
958 | end | |
959 | ||
960 | tgameMode = 10 | |
961 | ||
962 | barreras = 10000 | |
963 | barreras = barreras + 4 | |
964 | tfm.exec.addPhysicObject(barreras,-6,201, _barreraLeft) | |
965 | tfm.exec.addPhysicObject(barreras-1,690,201, _barreraRight) | |
966 | tfm.exec.addPhysicObject(barreras-2,1200,-5, _barreraUpLeft) | |
967 | tfm.exec.addPhysicObject(barreras-3,3600,-5, _barreraUpRight) | |
968 | elseif gameMode == 4 then | |
969 | gameMode = 1 | |
970 | end | |
971 | ||
972 | ||
973 | end | |
974 | ||
975 | ||
976 | ||
977 | ||
978 | ||
979 | function eventPlayerDied(name) | |
980 | 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) | |
981 | ui.removeTextArea(25,name) | |
982 | ui.removeTextArea(26,name) | |
983 | ui.removeTextArea(26,name) | |
984 | ui.removeTextArea(-9999,name) | |
985 | mice[name].tImpulsador = 0 | |
986 | - | ui.addTextArea(951, "<font size='13' color='#FFFFFF'> "..players_alive().." ", player, 13, 260, 80, 23, 0x324650, 0x000000, 0, true) |
986 | + | |
987 | ui.addTextArea(951, "<font size='13' color='#FFFFFF'>"..players_alive().." ", player, 25, 262, 80, 23, 0x324650, 0x000000, 0, true) | |
988 | end | |
989 | ||
990 | if not isBanned(name) then | |
991 | tFeed = 10 | |
992 | feedID = feedID + 1 | |
993 | feedPos = feedPos - 20 | |
994 | mice[name].showUpdate = mice[name].showUpdate + 1 | |
995 | for player, data in next, tfm.get.room.playerList do | |
996 | 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) | |
997 | end | |
998 | ||
999 | ui.removeTextArea(-9999,name) | |
1000 | end | |
1001 | if feedID >= 53 then | |
1002 | feedID = 50 | |
1003 | feedPos = 390 | |
1004 | end | |
1005 | tfm.exec.setPlayerScore(name,mice[name].victorias,false) | |
1006 | ||
1007 | if playersInRoom >=7 and players_alive() == 1 then | |
1008 | mice[last_player_name_alive].victorias = mice[last_player_name_alive].victorias + 1 | |
1009 | tfm.exec.setPlayerScore(last_player_name_alive,mice[last_player_name_alive].victorias,false) | |
1010 | end | |
1011 | ||
1012 | -- Asegura que el valor de gameMode cambie a 1 | |
1013 | if players_alive() == 1 and gameMode == 3 then | |
1014 | gameMode = 0 | |
1015 | end | |
1016 | ||
1017 | if players_alive() == 1 then | |
1018 | victory = 1 | |
1019 | tStorm = 5 | |
1020 | ui.addTextArea(666, "", nil, 240, 76, 345, 45, 0x417FBC, 0x417FBC, 1, true) | |
1021 | for player, data in next, tfm.get.room.playerList do | |
1022 | ui.addTextArea(668,""..translate(data.community, "aviso_victoria").."", player, 200, 77, 380, 50, 0x324650, 0x000000, 0, true) | |
1023 | 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) | |
1024 | 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) | |
1025 | ||
1026 | end | |
1027 | ||
1028 | ui.addTextArea(667, "<font color='#FFF504' size='45' face='Comic Sans MS'>#1", nil, 242, 68, 73, 60, 0x324650, 0x000000, 0, true) | |
1029 | ui.removeTextArea(-9999,last_player_name_alive) | |
1030 | mice[last_player_name_alive].tImpulsador = 0 | |
1031 | mice[last_player_name_alive].cofre105106Impulsador = 0 | |
1032 | avanceTormenta = 0 | |
1033 | ui.removeTextArea(445,nil) | |
1034 | ui.removeTextArea(446,nil) | |
1035 | ui.removeTextArea(447,nil) | |
1036 | ui.removeTextArea(448,nil) | |
1037 | ui.removeTextArea(-999,nil) | |
1038 | ui.removeTextArea(-998,nil) | |
1039 | ui.removeTextArea(444,nil) | |
1040 | ui.removeTextArea(443,nil) | |
1041 | ui.removeTextArea(442,nil) | |
1042 | ui.removeTextArea(441,nil) | |
1043 | ui.removeTextArea(-999,nil) | |
1044 | ui.removeTextArea(-998,nil) | |
1045 | ui.removeTextArea(-997,nil) | |
1046 | ui.removeTextArea(-996,nil) | |
1047 | ||
1048 | tlastPlayer = 11 | |
1049 | tfm.exec.setGameTime(7) | |
1050 | ||
1051 | end | |
1052 | -- Asegura que el valor de gameMode cambie a 1 | |
1053 | if players_alive() == 0 and victory == 0 and gameMode == 3 then | |
1054 | gameMode = 0 | |
1055 | end | |
1056 | ||
1057 | if players_alive() == 0 and victory == 0 then | |
1058 | tStorm = 5 | |
1059 | ui.addTextArea(445, "", nil, 240, 76, 345, 45, 0xC00F0F, 0xC00F0F, 1, true) | |
1060 | for player, data in next, tfm.get.room.playerList do | |
1061 | 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) | |
1062 | ui.addTextArea(447, "<font color='#FFF504' size='45' face='Comic Sans MS'>#-1", player, 242, 68, 100, 65, 0x324650, 0x000000, 0, true) | |
1063 | 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) | |
1064 | end | |
1065 | tfm.exec.setGameTime(5) | |
1066 | avanceTormenta = 0 | |
1067 | ui.removeTextArea(444,nil) | |
1068 | ui.removeTextArea(443,nil) | |
1069 | ui.removeTextArea(442,nil) | |
1070 | ui.removeTextArea(441,nil) | |
1071 | ui.removeTextArea(-999,nil) | |
1072 | ui.removeTextArea(-998,nil) | |
1073 | ui.removeTextArea(-997,nil) | |
1074 | ui.removeTextArea(-996,nil) | |
1075 | end | |
1076 | end | |
1077 | ||
1078 | ||
1079 | tnadieGanaLoop = 6 | |
1080 | local loopCount = 0 | |
1081 | avanceTormenta = 0 | |
1082 | gameMode = 0 | |
1083 | returnStorm = nil | |
1084 | returnStormState = 0 | |
1085 | blueTorment = "0x00B8FF" | |
1086 | pinkTorment = "0xD701CF" | |
1087 | stormUp = nil | |
1088 | ||
1089 | ||
1090 | function stormDamage() | |
1091 | --- Dirección de la tormenta | |
1092 | stormDirection() | |
1093 | ||
1094 | ||
1095 | -- Daño al tocar la tormenta: | |
1096 | if direccion == 0 then | |
1097 | for k, v in next, tfm.get.room.playerList do | |
1098 | if textareaLeft(v.x+20, v.y) or textarea(v.x-20, v.y) then | |
1099 | tfm.exec.killPlayer(k) | |
1100 | end | |
1101 | end | |
1102 | end | |
1103 | ||
1104 | if stormUp then | |
1105 | for k, v in next, tfm.get.room.playerList do | |
1106 | if textareaUp(v.x, v.y) then | |
1107 | tfm.exec.killPlayer(k) | |
1108 | ||
1109 | end | |
1110 | end | |
1111 | end | |
1112 | ||
1113 | ||
1114 | if direccion == 0 and tStorm <= 10 then | |
1115 | for k, v in next, tfm.get.room.playerList do | |
1116 | if textareaLeft(v.x, v.y) or textarea(v.x, v.y) then | |
1117 | tfm.exec.killPlayer(k) | |
1118 | ||
1119 | end | |
1120 | end | |
1121 | end | |
1122 | -- --> | |
1123 | if direccion == 1 then | |
1124 | for k, v in next, tfm.get.room.playerList do | |
1125 | if textareaLeft(v.x+25, v.y) or textarea(v.x+20, v.y) then | |
1126 | tfm.exec.killPlayer(k) | |
1127 | end | |
1128 | end | |
1129 | end | |
1130 | -- <-- | |
1131 | if direccion == 2 then | |
1132 | for k, v in next, tfm.get.room.playerList do | |
1133 | if textareaLeft(v.x-20, v.y) or textarea(v.x-25, v.y) then | |
1134 | tfm.exec.killPlayer(k) | |
1135 | ||
1136 | ||
1137 | end | |
1138 | end | |
1139 | end | |
1140 | ||
1141 | ||
1142 | end | |
1143 | ||
1144 | ||
1145 | -- direccion 0 la tormenta se cierra normal | |
1146 | -- direccion 1 va hacia la derecha | |
1147 | -- direccion 2 va hacia la izquierda | |
1148 | direccion = 0 | |
1149 | ||
1150 | ||
1151 | function stormDirection() | |
1152 | ||
1153 | -- LA TORMENTA FLUYE NORMAL | |
1154 | ||
1155 | -- Hacia el centro | |
1156 | if direccion == 0 then | |
1157 | ui.addTextArea(201, "", nil, textareaLeft.x - textareaLeft.radiusX , textareaLeft.y - textareaLeft.radiusY, textAreaWIDTHL, textAreaHEIGHTL,0x00B8FF, 0xFFFFFF, 0.6, false) | |
1158 | textareaLeft.x = textareaLeft.x + avanceTormenta | |
1159 | ui.addTextArea(202, "", nil, textarea.x - textarea.radiusX , textarea.y - textarea.radiusY, textAreaWIDTH, textAreaHEIGHT,0x00B8FF, 0xFFFFFF, 0.6, false) | |
1160 | textarea.x = textarea.x - avanceTormenta | |
1161 | end | |
1162 | ||
1163 | if tStorm == 45 and gameMode <= 2 then | |
1164 | direccion = math.random(1,2) | |
1165 | elseif tStorm == 34 and gameMode <= 2 then | |
1166 | direccion = math.random(1,2) | |
1167 | elseif tStorm == 20 and gameMode <= 2 then | |
1168 | direccion = 0 | |
1169 | avanceTormenta = 3 | |
1170 | elseif tStorm == 25 and gameMode == 3 then | |
1171 | direccion = 0 | |
1172 | avanceTormenta = 7 | |
1173 | end | |
1174 | ||
1175 | -- Hacia la derecha | |
1176 | if direccion == 1 then | |
1177 | ||
1178 | ui.addTextArea(201, "", nil, textareaLeft.x - textareaLeft.radiusX , textareaLeft.y - textareaLeft.radiusY, textAreaWIDTHL, textAreaHEIGHTL,0x00B8FF, 0xFFFFFF, 0.6, false) | |
1179 | textareaLeft.x = textareaLeft.x + avanceTormenta | |
1180 | ui.addTextArea(202, "", nil, textarea.x - textarea.radiusX , textarea.y - textarea.radiusY, textAreaWIDTH, textAreaHEIGHT,0x00B8FF, 0xFFFFFF, 0.6, false) | |
1181 | textarea.x = textarea.x + avanceTormenta | |
1182 | -- aqu iba un | |
1183 | end | |
1184 | -- Hacia la izquierda | |
1185 | if direccion == 2 then | |
1186 | ui.addTextArea(201, "", nil, textareaLeft.x - textareaLeft.radiusX , textareaLeft.y - textareaLeft.radiusY, textAreaWIDTHL, textAreaHEIGHTL,0x00B8FF, 0xFFFFFF, 0.6, false) | |
1187 | textareaLeft.x = textareaLeft.x - avanceTormenta | |
1188 | ui.addTextArea(202, "", nil, textarea.x - textarea.radiusX , textarea.y - textarea.radiusY, textAreaWIDTH, textAreaHEIGHT,0x00B8FF, 0xFFFFFF, 0.6, false) | |
1189 | textarea.x = textarea.x - avanceTormenta | |
1190 | end | |
1191 | ||
1192 | end | |
1193 | ||
1194 | --[[ | |
1195 | if mice[k].txt_salud >=1 then | |
1196 | mice[k].txt_salud = mice[k].txt_salud - 30 | |
1197 | ui.addTextArea(44455, "Salud: "..mice[k].txt_salud.."", k,320, 290, 102, 27, 0x324650, 0x000000, 1, true) | |
1198 | if mice[k].txt_salud <=0 then | |
1199 | tfm.exec.killPlayer(k) | |
1200 | mice[k].txt_salud = 0 | |
1201 | ui.removeTextArea(44455,k) | |
1202 | end | |
1203 | end | |
1204 | ||
1205 | end | |
1206 | end | |
1207 | ||
1208 | end | |
1209 | --]] | |
1210 | ------------------------------ LOOP ----------------------------- | |
1211 | ||
1212 | function eventLoop(t,tr, name) | |
1213 | if tStorm >= 1 then | |
1214 | tStorm = tStorm - 0.5 | |
1215 | end | |
1216 | ||
1217 | if tStorm <= 154 and gameMode <=2 then | |
1218 | stormDamage() | |
1219 | end | |
1220 | tormentaComming() | |
1221 | ||
1222 | ||
1223 | if tStorm <= 152 and gameMode <= 2 then | |
1224 | tTormentComming = tTormentComming -1 | |
1225 | avanceTormenta = avanceTormenta + 0.07 | |
1226 | end | |
1227 | ||
1228 | if tStorm == 148 and gameMode <=2 then | |
1229 | quickPlataform = 0 | |
1230 | avanceTormenta = 6 | |
1231 | end | |
1232 | ||
1233 | if tStorm == 135 and gameMode <=2 then | |
1234 | avanceTormenta = 8 | |
1235 | end | |
1236 | ||
1237 | if tStorm == 70 and gameMode <=2 then | |
1238 | avanceTormenta = 7 | |
1239 | end | |
1240 | if tStorm == 45 then | |
1241 | quickPlataform = 1 | |
1242 | end | |
1243 | ||
1244 | if tStorm <= 95 and victory == 0 then | |
1245 | stormUp = true | |
1246 | avanceTormentaUp = 2 | |
1247 | textareaUp.y = textareaUp.y + avanceTormentaUp | |
1248 | ui.addTextArea(203, "", nil, textareaUp.x - textareaUp.radiusX , textareaUp.y - textareaUp.radiusY, textAreaWIDTHUP, textAreaHEIGHTUP,0x00B8FF, 0xFFFFFF, 0.6, false) | |
1249 | ||
1250 | end | |
1251 | ||
1252 | ||
1253 | -- GAME MODE: Enfrentamientos tormentosos | |
1254 | ||
1255 | if tStorm <= 158 and gameMode ==3 then | |
1256 | stormDamage() | |
1257 | end | |
1258 | ||
1259 | if tStorm == 148 and gameMode ==3 then | |
1260 | quickPlataform = 0 | |
1261 | avanceTormenta = 13 | |
1262 | end | |
1263 | ||
1264 | if tStorm == 70 and gameMode ==3 then | |
1265 | avanceTormenta = 14 | |
1266 | end | |
1267 | ||
1268 | ||
1269 | -- Devuelve GameMode al inicio. | |
1270 | if tStorm == 1 and gameMode == 3 then | |
1271 | gameMode = 0 | |
1272 | end | |
1273 | ||
1274 | ||
1275 | ||
1276 | if loopCount == 0 then | |
1277 | ammo() | |
1278 | end | |
1279 | loopCount = (loopCount + 1) % settings.ammoTicks | |
1280 | ||
1281 | if quickPlataform == 0 then | |
1282 | for i,cannon in ipairs(toDespawn) do | |
1283 | if cannon[1] <= os.time()-5000 then | |
1284 | tfm.exec.removeObject(cannon[2]) | |
1285 | tfm.exec.removePhysicObject(cannon[2]) | |
1286 | table.remove(toDespawn,i) | |
1287 | end | |
1288 | end | |
1289 | end | |
1290 | ||
1291 | if quickPlataform == 1 then | |
1292 | for i,cannon in ipairs(toDespawn) do | |
1293 | if cannon[1] <= os.time()-1500 then | |
1294 | tfm.exec.removePhysicObject(cannon[2]) | |
1295 | tfm.exec.removeObject(cannon[2]) | |
1296 | ||
1297 | table.remove(toDespawn,i) | |
1298 | end | |
1299 | end | |
1300 | end | |
1301 | ||
1302 | ||
1303 | if tr <= 0 then | |
1304 | startGame() | |
1305 | end | |
1306 | ||
1307 | ||
1308 | if tFeed >= 1 then | |
1309 | tFeed=tFeed-1 | |
1310 | elseif tFeed == 0 then | |
1311 | feedID = 50 | |
1312 | feedPos = 390 | |
1313 | ui.removeTextArea(50,nil) | |
1314 | ui.removeTextArea(51,nil) | |
1315 | ui.removeTextArea(52,nil) | |
1316 | ui.removeTextArea(53,nil) | |
1317 | end | |
1318 | ||
1319 | ||
1320 | if tlastPlayer >= 1 then | |
1321 | tlastPlayer = tlastPlayer-1 | |
1322 | elseif tlastPlayer == 0 then | |
1323 | ui.removeTextArea(777,nil) | |
1324 | end | |
1325 | ||
1326 | ||
1327 | for name in pairs(tfm.get.room.playerList) do | |
1328 | if name and mice[name] then | |
1329 | if mice[name].tImpulsador >= 1 and mice[name].cofre105106Impulsador == 1 then | |
1330 | mice[name].tImpulsador = mice[name].tImpulsador-1 | |
1331 | 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) | |
1332 | end | |
1333 | end | |
1334 | end | |
1335 | ||
1336 | for name in pairs(tfm.get.room.playerList) do | |
1337 | if name and mice[name] then | |
1338 | if mice[name].asignandoKey >= 1 and mice[name].tWaitingKey >=1 then | |
1339 | mice[name].tWaitingKey = mice[name].tWaitingKey-1 | |
1340 | 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) | |
1341 | ||
1342 | elseif mice[name].tWaitingKey == 0 then | |
1343 | ui.removeTextArea(301,name) | |
1344 | ui.removeTextArea(302,name) | |
1345 | ui.removeTextArea(303,name) | |
1346 | ui.removeTextArea(304,name) | |
1347 | ui.removeTextArea(305,name) | |
1348 | ui.removeTextArea(306,name) | |
1349 | ui.removeTextArea(310,name) | |
1350 | mice[name].asignandoKey = 0 | |
1351 | mice[name].tWaitingKey = 20 | |
1352 | end | |
1353 | end | |
1354 | end | |
1355 | ||
1356 | ||
1357 | if tgameMode >= 1 then | |
1358 | tgameMode = tgameMode-1 | |
1359 | elseif tgameMode == 0 then | |
1360 | ui.removeTextArea(12200,nil) | |
1361 | ui.removeTextArea(12201,nil) | |
1362 | ui.removeTextArea(12202,nil) | |
1363 | ui.removeTextArea(12203,nil) | |
1364 | ui.removeTextArea(12204,nil) | |
1365 | ui.removeTextArea(12205,nil) | |
1366 | end | |
1367 | end | |
1368 | ||
1369 | ||
1370 | function tormentaComming() | |
1371 | ||
1372 | if tStorm == 154 then | |
1373 | for player, data in next, tfm.get.room.playerList do | |
1374 | 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) | |
1375 | end | |
1376 | ||
1377 | ui.addTextArea(-998, "<p align='center'><font size='40' color='#D50DC4' face='Webdings'>n ", nil, 385, 60, nil, nil, 0x324650, 0x000000, 0, true) | |
1378 | ui.addTextArea(-999, "<p align='center'><font size='25' color='#FFFFFF' face='Webdings'>~", nil, 392, 74, nil, nil, 0x324650, 0x000000, 0, true) | |
1379 | ui.addTextArea(-996, "<p align='center'><font size='45' color='#FFFFFF' face='Arial'>☁️", nil, 385, 50, nil, nil, 0x324650, 0x000000, 0, true) | |
1380 | ||
1381 | elseif tStorm == 148 then | |
1382 | tfm.exec.removePhysicObject(barreras) | |
1383 | tfm.exec.removePhysicObject(barreras-1) | |
1384 | tfm.exec.removePhysicObject(barreras-2) | |
1385 | tfm.exec.removePhysicObject(barreras-3) | |
1386 | ui.removeTextArea(-999,nil) | |
1387 | ui.removeTextArea(-998,nil) | |
1388 | ui.removeTextArea(-997,nil) | |
1389 | ui.removeTextArea(-996,nil) | |
1390 | end | |
1391 | if tStorm == 95 then | |
1392 | for player, data in next, tfm.get.room.playerList do | |
1393 | 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) | |
1394 | end | |
1395 | ||
1396 | ui.addTextArea(443, "<p align='center'><font size='40' color='#D50DC4' face='Webdings'>n ", nil, 385, 60, nil, nil, 0x324650, 0x000000, 0, true) | |
1397 | ui.addTextArea(442, "<p align='center'><font size='25' color='#FFFFFF' face='Webdings'>~", nil, 392, 74, nil, nil, 0x324650, 0x000000, 0, true) | |
1398 | ui.addTextArea(441, "<p align='center'><font size='45' color='#FFFFFF' face='Arial'>☁️", nil, 385, 50, nil, nil, 0x324650, 0x000000, 0, true) | |
1399 | elseif tStorm == 90 then | |
1400 | ui.removeTextArea(444,nil) | |
1401 | ui.removeTextArea(443,nil) | |
1402 | ui.removeTextArea(442,nil) | |
1403 | ui.removeTextArea(441,nil) | |
1404 | end | |
1405 | end | |
1406 | ||
1407 | -------------------------------------- COMMANDS ----------------------------------- | |
1408 | ||
1409 | function eventChatCommand(name, command) | |
1410 | args = {} | |
1411 | for arg in command:gmatch ("[^%s]+") do | |
1412 | table.insert (args, arg) | |
1413 | end | |
1414 | ||
1415 | if command == "n" and isAdmin(name) and gameMode <=2 then | |
1416 | startGame() | |
1417 | elseif command == "n" and isAdmin(name) and gameMode >= 3 then | |
1418 | gameMode = 0 | |
1419 | startGame() | |
1420 | end | |
1421 | ||
1422 | if command == "info" then | |
1423 | ||
1424 | ||
1425 | ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true) | |
1426 | ui.removeTextArea(30102,name) | |
1427 | ui.addTextArea(30020, ""..translate(tfm.get.room.playerList[name].community, "informacion_informacion_contenido").."", name, 208, 141, 409, 243, 0x00000f, 0x000000, 0.6, true) | |
1428 | 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) | |
1429 | ui.addTextArea(30037, "<font size='19' color='#FF1E1E'><b><a href='event:closeInfo'>X", name, 568, 92, 22, 24, 0x324650, 0x000000, 0, true) | |
1430 | 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) | |
1431 | end | |
1432 | ||
1433 | ||
1434 | if command:sub(1,1) == "p" and isAdmin(name) or isMod(name) then | |
1435 | tfm.exec.chatMessage ("<font color='#A4CBDC'>• <VI>[#fortmice]:</font> <font color='#BABD2F'>"..command:sub(3).."",nil) | |
1436 | end | |
1437 | ||
1438 | ||
1439 | ||
1440 | if args[1] == "ban" and tfm.get.room.playerList[args[2]] then | |
1441 | if isAdmin (name) or isMod(name) then | |
1442 | if isBanned(args[2]) then | |
1443 | else | |
1444 | ||
1445 | table.insert (banlist, args[2]) | |
1446 | tfm.exec.killPlayer(args[2]); | |
1447 | tfm.exec.chatMessage("<font color='#A4CBDC'>• <font color='#C2C2DA'>"..args[2].."</font><font color='#F01C1C'> SE HA PORTADO MAL!",name) | |
1448 | ||
1449 | ||
1450 | end | |
1451 | end | |
1452 | end | |
1453 | ||
1454 | if args[1] == "getwins" and tfm.get.room.playerList[args[2]] then | |
1455 | if isAdmin(name) then | |
1456 | ||
1457 | mice[args[2]].victorias = args[3] | |
1458 | savePlayerData(args[2]) | |
1459 | end | |
1460 | end | |
1461 | ||
1462 | if args[1] == "desban" and tfm.get.room.playerList[args[2]] then | |
1463 | if isAdmin (name) or isMod(name) then | |
1464 | if not isBanned(args[2]) then | |
1465 | else | |
1466 | for i,bannedName in pairs(banlist) do | |
1467 | if args[2] == bannedName then | |
1468 | table.remove (banlist, i) | |
1469 | tfm.exec.chatMessage("<font color='#A4CBDC'>• <font color='#C2C2DA'>"..args[2].."</font><font color='#E88888'> HA RECIBIDO UNA OPORTUNIDAD!",name) | |
1470 | break | |
1471 | end | |
1472 | end | |
1473 | end | |
1474 | end | |
1475 | end | |
1476 | ||
1477 | ||
1478 | end | |
1479 | ||
1480 | --------------------------------- WEAPON SCRIPT ----------------------------------- | |
1481 | ||
1482 | ||
1483 | function initPlayer(name) | |
1484 | players[name] = {ammo = 0} | |
1485 | if name and mice[name] then | |
1486 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
1487 | system.bindMouse(name, true) | |
1488 | end | |
1489 | end | |
1490 | ||
1491 | ||
1492 | ||
1493 | ||
1494 | function eventMouse(name, x, y) | |
1495 | local player = players[name] | |
1496 | if player and player.ammo > 0 and tfm.get.room.playerList[name].isDead==false then | |
1497 | -- remove one ammo | |
1498 | ui.removeTextArea(player.ammo * 2 - 1, name) | |
1499 | ui.removeTextArea(player.ammo * 2, name) | |
1500 | player.ammo = player.ammo - 1 | |
1501 | ||
1502 | local roomPlayer = tfm.get.room.playerList[name] | |
1503 | ||
1504 | ||
1505 | local dx = x - roomPlayer.x | |
1506 | local dy = y - roomPlayer.y | |
1507 | local angle = math.atan2(dy, dx) | |
1508 | ||
1509 | local vx = math.cos(angle) | |
1510 | local vy = math.sin(angle) | |
1511 | ||
1512 | ||
1513 | ||
1514 | ----------------- Arma dependiendo del cofre ---------------------- | |
1515 | ||
1516 | ||
1517 | ||
1518 | ||
1519 | if mice[name].flechasDefault == 1 and mice[name].canShoot then | |
1520 | 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)) | |
1521 | end | |
1522 | if mice[name].cofre101102Bombas == 1 and mice[name].canShoot then | |
1523 | 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)) | |
1524 | end | |
1525 | ||
1526 | if mice[name].cofre108Sniper == 1 and mice[name].canShoot then | |
1527 | 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)) | |
1528 | ||
1529 | 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)) | |
1530 | ||
1531 | ||
1532 | end | |
1533 | ||
1534 | if mice[name].cofre103104Lapidas == 1 and mice[name].canShoot then | |
1535 | 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)) | |
1536 | end | |
1537 | ||
1538 | if mice[name].cofre112113Cajas == 1 and mice[name].canShoot then | |
1539 | 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)) | |
1540 | end | |
1541 | ||
1542 | if mice[name].cofre116117MinigunNevada == 1 and mice[name].canShoot then | |
1543 | 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)) | |
1544 | 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)) | |
1545 | 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)) | |
1546 | 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)) | |
1547 | end | |
1548 | ||
1549 | ||
1550 | ||
1551 | if mice[name].trampas >0 and mice[name].cofre110111Trampa == 1 and mice[name].trampasOn == 1 and tfm.get.room.playerList[name].isDead==false then | |
1552 | ||
1553 | mice[name].trampasOn = 0 | |
1554 | mice[name].trampas = mice[name].trampas - 1 | |
1555 | 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) | |
1556 | ||
1557 | ||
1558 | globalPlataformas = globalPlataformas + 4 | |
1559 | ||
1560 | tfm.exec.addPhysicObject(globalPlataformas, x, y+40, _trampaBase) | |
1561 | tfm.exec.addPhysicObject(globalPlataformas-1, x-28, y-10, _trampalado1) | |
1562 | tfm.exec.addPhysicObject(globalPlataformas-2, x+28, y-10, _trampalado2) | |
1563 | tfm.exec.addPhysicObject(globalPlataformas-3, x, y+5, _trampaSpiderWeb) | |
1564 | ||
1565 | ||
1566 | ||
1567 | table.insert(toDespawn,{os.time(),globalPlataformas}) | |
1568 | table.insert(toDespawn,{os.time(),globalPlataformas-1}) | |
1569 | table.insert(toDespawn,{os.time(),globalPlataformas-2}) | |
1570 | table.insert(toDespawn,{os.time(),globalPlataformas-3}) | |
1571 | playerz[name].timestamp=os.time() | |
1572 | ||
1573 | end | |
1574 | local recoil = -vx * settings.recoil | |
1575 | ||
1576 | if recoil <= -1 or recoil >= 1 then | |
1577 | tfm.exec.movePlayer(name, 0, 0, true, recoil, 0, true) | |
1578 | end | |
1579 | ||
1580 | ||
1581 | if objects.size > settings.maxObjects then | |
1582 | tfm.exec.removeObject(queue.remove(objects)) | |
1583 | end | |
1584 | end | |
1585 | end | |
1586 | ||
1587 | ||
1588 | function ammo() | |
1589 | for name, player in pairs(players) do | |
1590 | local ammo = player.ammo | |
1591 | if name and mice[name] then | |
1592 | if ammo < mice[name].ammo then | |
1593 | -- add one ammo | |
1594 | player.ammo = ammo + 1 | |
1595 | ui.addTextArea(ammo * 2 + 1, "", name, 14 + ammo * 15, 380, 3, 3, 0xFFF504, 0x990000, 1,true) | |
1596 | end | |
1597 | end | |
1598 | end | |
1599 | end | |
1600 | ||
1601 | playerz = {} | |
1602 | ||
1603 | ||
1604 | queue = {} | |
1605 | function queue.new() | |
1606 | return { | |
1607 | tail = nil, | |
1608 | head = nil, | |
1609 | size = 0 | |
1610 | } | |
1611 | end | |
1612 | function queue.insert(self, v) | |
1613 | local i = { | |
1614 | value = v, | |
1615 | next = nil | |
1616 | } | |
1617 | if self.tail and self.head then | |
1618 | self.tail.next = i | |
1619 | else | |
1620 | self.head = i | |
1621 | end | |
1622 | self.tail = i | |
1623 | self.size = self.size + 1 | |
1624 | end | |
1625 | function queue.peek(self) | |
1626 | if self.head then | |
1627 | return self.head.value | |
1628 | else | |
1629 | error("queue is empty") | |
1630 | end | |
1631 | end | |
1632 | function queue.remove(self) | |
1633 | local r = queue.peek(self) | |
1634 | self.head = self.head.next | |
1635 | if not self.head then | |
1636 | tail = nil | |
1637 | end | |
1638 | self.size = self.size - 1 | |
1639 | return r | |
1640 | end | |
1641 | ||
1642 | ||
1643 | ||
1644 | ------------------------------ PLATAFORMAS SCRIPT ----------------------------------- | |
1645 | ||
1646 | function eventKeyboard(name, key, down, px, py) | |
1647 | ||
1648 | if mice[name].asignandoKey == 1 then | |
1649 | mice[name].key_suelo = key | |
1650 | i = key | |
1651 | mice[name].txt_key_suelo = keyz[i] | |
1652 | ui.addTextArea(22, "<b>"..mice[name].txt_key_suelo.."", name, 11, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
1653 | ui.addTextArea(30032, ""..mice[name].txt_key_suelo.."", name, 371, 182, 18, 18, 0x324650, 0x000000, 1, true) | |
1654 | ui.removeTextArea(301,name) | |
1655 | ui.removeTextArea(302,name) | |
1656 | ui.removeTextArea(303,name) | |
1657 | ui.removeTextArea(304,name) | |
1658 | ui.removeTextArea(305,name) | |
1659 | ui.removeTextArea(306,name) | |
1660 | ui.removeTextArea(310,name) | |
1661 | mice[name].asignandoKey = 0 | |
1662 | mice[name].tWaitingKey = 20 | |
1663 | tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name) | |
1664 | savePlayerData(name) | |
1665 | end | |
1666 | ||
1667 | if mice[name].asignandoKey == 2 then | |
1668 | mice[name].key_rampa = key | |
1669 | i = key | |
1670 | mice[name].txt_key_rampa = keyz[i] | |
1671 | ui.addTextArea(23, "<b>"..mice[name].txt_key_rampa.."", name, 40, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
1672 | ui.addTextArea(30033, ""..mice[name].txt_key_rampa.."", name, 371, 223, 19, 19, 0x324650, 0x000000, 1, true) | |
1673 | ui.removeTextArea(301,name) | |
1674 | ui.removeTextArea(302,name) | |
1675 | ui.removeTextArea(303,name) | |
1676 | ui.removeTextArea(304,name) | |
1677 | ui.removeTextArea(305,name) | |
1678 | ui.removeTextArea(306,name) | |
1679 | ui.removeTextArea(310,name) | |
1680 | mice[name].asignandoKey = 0 | |
1681 | mice[name].tWaitingKey = 20 | |
1682 | tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name) | |
1683 | savePlayerData(name) | |
1684 | end | |
1685 | ||
1686 | if mice[name].asignandoKey == 3 then | |
1687 | mice[name].key_recarga = key | |
1688 | i = key | |
1689 | mice[name].txt_key_recarga = keyz[i] | |
1690 | ui.addTextArea(30035, ""..mice[name].txt_key_recarga.."", name, 371, 304, 19, 19, 0x324650, 0x000000, 1, true) | |
1691 | ui.removeTextArea(301,name) | |
1692 | ui.removeTextArea(302,name) | |
1693 | ui.removeTextArea(303,name) | |
1694 | ui.removeTextArea(304,name) | |
1695 | ui.removeTextArea(305,name) | |
1696 | ui.removeTextArea(306,name) | |
1697 | ui.removeTextArea(310,name) | |
1698 | mice[name].asignandoKey = 0 | |
1699 | mice[name].tWaitingKey = 20 | |
1700 | tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name) | |
1701 | savePlayerData(name) | |
1702 | end | |
1703 | ||
1704 | ||
1705 | if mice[name].asignandoKey == 4 then | |
1706 | ||
1707 | mice[name].key_rescate = key | |
1708 | i = key | |
1709 | mice[name].txt_key_rescate = keyz[i] | |
1710 | ui.addTextArea(28, "<b>"..mice[name].txt_key_rescate.."", name, 70, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
1711 | ui.addTextArea(30034, ""..mice[name].txt_key_rescate.."", name, 371, 265, 19, 19, 0x324650, 0x000000, 1, true) | |
1712 | ui.removeTextArea(301,name) | |
1713 | ui.removeTextArea(302,name) | |
1714 | ui.removeTextArea(303,name) | |
1715 | ui.removeTextArea(304,name) | |
1716 | ui.removeTextArea(305,name) | |
1717 | ui.removeTextArea(306,name) | |
1718 | ui.removeTextArea(310,name) | |
1719 | mice[name].asignandoKey = 0 | |
1720 | mice[name].tWaitingKey = 20 | |
1721 | tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name) | |
1722 | savePlayerData(name) | |
1723 | end | |
1724 | ||
1725 | if mice[name].asignandoKey == 5 then | |
1726 | ||
1727 | mice[name].key_consumible = key | |
1728 | i = key | |
1729 | mice[name].txt_key_consumible= keyz[i] | |
1730 | ui.addTextArea(30036, ""..mice[name].txt_key_consumible.."", name, 371, 343, nil, 20, 0x324650, 0x000000, 1, true) | |
1731 | ui.removeTextArea(301,name) | |
1732 | ui.removeTextArea(302,name) | |
1733 | ui.removeTextArea(303,name) | |
1734 | ui.removeTextArea(304,name) | |
1735 | ui.removeTextArea(305,name) | |
1736 | ui.removeTextArea(306,name) | |
1737 | ui.removeTextArea(310,name) | |
1738 | mice[name].asignandoKey = 0 | |
1739 | mice[name].tWaitingKey = 20 | |
1740 | tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name) | |
1741 | savePlayerData(name) | |
1742 | end | |
1743 | ||
1744 | ||
1745 | if key == _left then | |
1746 | facingLeft[name] = false | |
1747 | end | |
1748 | if key == _right then | |
1749 | facingLeft[name] = true | |
1750 | end | |
1751 | ||
1752 | if key == mice[name].key_rampa and mice[name].plataformas >0 and tfm.get.room.playerList[name].isDead==false then | |
1753 | if facingLeft[name] then | |
1754 | globalPlataformas = globalPlataformas + 1 | |
1755 | mice[name].plataformas = mice[name].plataformas - 1 | |
1756 | ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
1757 | ||
1758 | tfm.exec.addPhysicObject(globalPlataformas, px + 75, py-20, _rampaDerecha) | |
1759 | table.insert(toDespawn,{os.time(),globalPlataformas}) | |
1760 | playerz[name].timestamp=os.time() | |
1761 | else | |
1762 | globalPlataformas = globalPlataformas + 1 | |
1763 | mice[name].plataformas = mice[name].plataformas - 1 | |
1764 | ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
1765 | ||
1766 | tfm.exec.addPhysicObject(globalPlataformas, px - 75, py-20, _rampaIzquierda) | |
1767 | ||
1768 | table.insert(toDespawn,{os.time(),globalPlataformas}) | |
1769 | playerz[name].timestamp=os.time() | |
1770 | end | |
1771 | end | |
1772 | ||
1773 | ||
1774 | if key == mice[name].key_suelo and mice[name].plataformas >0 and tfm.get.room.playerList[name].isDead==false then | |
1775 | if facingLeft[name] then | |
1776 | globalPlataformas = globalPlataformas + 1 | |
1777 | mice[name].plataformas = mice[name].plataformas - 1 | |
1778 | ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
1779 | ||
1780 | tfm.exec.addPhysicObject(globalPlataformas, px + 41, py+ 20, _Suelo) | |
1781 | table.insert(toDespawn,{os.time(),globalPlataformas}) | |
1782 | playerz[name].timestamp=os.time() | |
1783 | ||
1784 | else | |
1785 | globalPlataformas = globalPlataformas + 1 | |
1786 | mice[name].plataformas = mice[name].plataformas - 1 | |
1787 | ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
1788 | ||
1789 | tfm.exec.addPhysicObject(globalPlataformas, px - 41, py+ 20, _Suelo) | |
1790 | table.insert(toDespawn,{os.time(),globalPlataformas}) | |
1791 | playerz[name].timestamp=os.time() | |
1792 | end | |
1793 | end | |
1794 | ||
1795 | ||
1796 | 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 | |
1797 | mice[name].reloadPlataformas = mice[name].reloadPlataformas + 1 | |
1798 | ui.addTextArea(25, "<b>"..mice[name].txt_key_recarga.."", name, 145, 320, 14, 17, 0x00000F, 0x000000, 0.5, true) | |
1799 | 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) | |
1800 | ||
1801 | end | |
1802 | if mice[name].reloadPlataformas ==25 then | |
1803 | mice[name].plataformas = 12 | |
1804 | mice[name].reloadPlataformas = 0 | |
1805 | ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
1806 | ui.removeTextArea(25,name) | |
1807 | ui.removeTextArea(26,name) | |
1808 | end | |
1809 | if mice[name].plataformas ==0 then | |
1810 | ui.addTextArea(25, "<b>"..mice[name].txt_key_recarga.."", name, 144, 320, 14, 17, 0x00000F, 0x000000, 0.5, true) | |
1811 | ||
1812 | 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) | |
1813 | end | |
1814 | ||
1815 | if key == mice[name].key_rescate and mice[name].plataformas >0 and tfm.get.room.playerList[name].isDead==false then | |
1816 | ||
1817 | globalPlataformas = globalPlataformas + 1 | |
1818 | mice[name].plataformas = mice[name].plataformas - 1 | |
1819 | ui.addTextArea(24, "<font size='15' color='#FFFFFF'>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
1820 | ||
1821 | tfm.exec.addPhysicObject(globalPlataformas, px + 1, py+ 130, _rescate) | |
1822 | table.insert(toDespawn,{os.time(),globalPlataformas}) | |
1823 | playerz[name].timestamp=os.time() | |
1824 | end | |
1825 | ||
1826 | ||
1827 | 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 | |
1828 | if facingLeft[name] then | |
1829 | tfm.exec.addShamanObject (24,px,py+10,0,100,-200,false) | |
1830 | tfm.exec.movePlayer(name, 0, 10, true, 90, -155, true) | |
1831 | mice[name].tImpulsador = 8 | |
1832 | else | |
1833 | tfm.exec.addShamanObject (24,px,py+10,0,100,-200,false) | |
1834 | tfm.exec.movePlayer(name, 0, 10, true, -90, -155, true) | |
1835 | mice[name].tImpulsador = 8 | |
1836 | end | |
1837 | end | |
1838 | ||
1839 | 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 | |
1840 | mice[name].trampasOn = 1 | |
1841 | 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) | |
1842 | 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 | |
1843 | mice[name].trampasOn = 0 | |
1844 | 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) | |
1845 | ||
1846 | end | |
1847 | ||
1848 | 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 | |
1849 | mice[name].lanzaderas = mice[name].lanzaderas - 1 | |
1850 | ||
1851 | 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) | |
1852 | globalPlataformas = globalPlataformas + 3 | |
1853 | ||
1854 | tfm.exec.movePlayer(name, 0, -20, true, 0, 0, true) | |
1855 | tfm.exec.addPhysicObject(globalPlataformas, px + 40, py+ 10, _lanzaderaRight) | |
1856 | tfm.exec.addPhysicObject(globalPlataformas-1, px + -30, py+ 10, _lanzaderaLeft) | |
1857 | tfm.exec.addPhysicObject(globalPlataformas-2, px + 5, py+ -5, _lanzaderaCentro) | |
1858 | ||
1859 | table.insert(toDespawn,{os.time(),globalPlataformas}) | |
1860 | table.insert(toDespawn,{os.time(),globalPlataformas-1}) | |
1861 | table.insert(toDespawn,{os.time(),globalPlataformas-2}) | |
1862 | ||
1863 | playerz[name].timestamp=os.time() | |
1864 | ||
1865 | end | |
1866 | ||
1867 | ||
1868 | if mice[name].plataformas <=3 then | |
1869 | ui.addTextArea(24, "<font size='15' color='#FFF504'><b>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
1870 | ||
1871 | end | |
1872 | if mice[name].plataformas <=0 then | |
1873 | ui.addTextArea(24, "<font size='15' color='#FF0000'><b>"..mice[name].plataformas.."/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
1874 | end | |
1875 | ||
1876 | end | |
1877 | -------------------------- CALLBACKS ----------------------------- | |
1878 | ||
1879 | function eventTextAreaCallback(id, name, cb) | |
1880 | local player = players[name] | |
1881 | ||
1882 | if id == 101 and tfm.get.room.playerList[name].isDead==false then | |
1883 | for n, data in next, tfm.get.room.playerList do | |
1884 | for i, coords in next, textareaCoords do | |
1885 | ||
1886 | 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 | |
1887 | mice[name].cofre101102Bombas= 1 | |
1888 | mice[name].flechasDefault = 0 | |
1889 | mice[name].ammo = 5 | |
1890 | initPlayer(name) | |
1891 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
1892 | ||
1893 | for chest=101,SETTINGS.textareaAmount+100 do | |
1894 | ui.removeTextArea(chest, name) | |
1895 | end | |
1896 | ||
1897 | ui.removeTextArea(101,nil) | |
1898 | ||
1899 | for ammo=1,15 do | |
1900 | ui.removeTextArea(ammo, name) | |
1901 | end | |
1902 | ||
1903 | ||
1904 | ||
1905 | 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) | |
1906 | break | |
1907 | end | |
1908 | end | |
1909 | end | |
1910 | end | |
1911 | ||
1912 | if id == 102 and tfm.get.room.playerList[name].isDead==false then | |
1913 | for n, data in next, tfm.get.room.playerList do | |
1914 | for i, coords in next, textareaCoords do | |
1915 | ||
1916 | 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 | |
1917 | mice[name].cofre101102Bombas = 1 | |
1918 | mice[name].flechasDefault = 0 | |
1919 | mice[name].ammo = 5 | |
1920 | initPlayer(name) | |
1921 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
1922 | ||
1923 | for chest=101,SETTINGS.textareaAmount+100 do | |
1924 | ui.removeTextArea(chest, name) | |
1925 | end | |
1926 | ui.removeTextArea(102,nil) | |
1927 | for ammo=1,15 do | |
1928 | ui.removeTextArea(ammo, name) | |
1929 | end | |
1930 | 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) | |
1931 | ||
1932 | break | |
1933 | end | |
1934 | end | |
1935 | end | |
1936 | end | |
1937 | ||
1938 | if id == 103 and tfm.get.room.playerList[name].isDead==false then | |
1939 | for n, data in next, tfm.get.room.playerList do | |
1940 | for i, coords in next, textareaCoords do | |
1941 | ||
1942 | 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 | |
1943 | mice[name].cofre103104Lapidas = 1 | |
1944 | mice[name].flechasDefault = 0 | |
1945 | ||
1946 | mice[name].ammo = 2 | |
1947 | mice[name].force = 32 | |
1948 | initPlayer(name) | |
1949 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
1950 | ||
1951 | for chest=101,SETTINGS.textareaAmount+100 do | |
1952 | ui.removeTextArea(chest, name) | |
1953 | end | |
1954 | ui.removeTextArea(103,nil) | |
1955 | for ammo=1,15 do | |
1956 | ui.removeTextArea(ammo, name) | |
1957 | end | |
1958 | ||
1959 | 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) | |
1960 | ||
1961 | break | |
1962 | end | |
1963 | end | |
1964 | end | |
1965 | end | |
1966 | ||
1967 | if id == 104 and tfm.get.room.playerList[name].isDead==false then | |
1968 | for n, data in next, tfm.get.room.playerList do | |
1969 | for i, coords in next, textareaCoords do | |
1970 | ||
1971 | 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 | |
1972 | mice[name].cofre103104Lapidas = 1 | |
1973 | mice[name].flechasDefault = 0 | |
1974 | ||
1975 | mice[name].ammo = 2 | |
1976 | mice[name].force = 32 | |
1977 | initPlayer(name) | |
1978 | ||
1979 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
1980 | ||
1981 | for chest=101,SETTINGS.textareaAmount+100 do | |
1982 | ui.removeTextArea(chest, name) | |
1983 | end | |
1984 | ui.removeTextArea(104,nil) | |
1985 | for ammo=1,15 do | |
1986 | ui.removeTextArea(ammo, name) | |
1987 | end | |
1988 | 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) | |
1989 | ||
1990 | break | |
1991 | end | |
1992 | end | |
1993 | end | |
1994 | end | |
1995 | ||
1996 | ||
1997 | if id == 105 and tfm.get.room.playerList[name].isDead==false then | |
1998 | for n, data in next, tfm.get.room.playerList do | |
1999 | for i, coords in next, textareaCoords do | |
2000 | ||
2001 | 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 | |
2002 | ||
2003 | mice[name].cofre105106Impulsador = 1 | |
2004 | mice[name].tImpulsador = 1 | |
2005 | ||
2006 | for chest=101,SETTINGS.textareaAmount+100 do | |
2007 | ui.removeTextArea(chest, name) | |
2008 | end | |
2009 | ui.removeTextArea(105,nil) | |
2010 | 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) | |
2011 | ||
2012 | break | |
2013 | end | |
2014 | end | |
2015 | end | |
2016 | end | |
2017 | ||
2018 | if id == 106 and tfm.get.room.playerList[name].isDead==false then | |
2019 | for n, data in next, tfm.get.room.playerList do | |
2020 | for i, coords in next, textareaCoords do | |
2021 | ||
2022 | 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 | |
2023 | ||
2024 | mice[name].cofre105106Impulsador = 1 | |
2025 | mice[name].tImpulsador = 1 | |
2026 | for chest=101,SETTINGS.textareaAmount+100 do | |
2027 | ui.removeTextArea(chest, name) | |
2028 | end | |
2029 | ui.removeTextArea(106,nil) | |
2030 | 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) | |
2031 | ||
2032 | break | |
2033 | end | |
2034 | end | |
2035 | end | |
2036 | end | |
2037 | ||
2038 | ||
2039 | if id == 107 and tfm.get.room.playerList[name].isDead==false then | |
2040 | for n, data in next, tfm.get.room.playerList do | |
2041 | for i, coords in next, textareaCoords do | |
2042 | ||
2043 | 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 | |
2044 | ||
2045 | mice[name].plataformas = 100 | |
2046 | ui.removeTextArea(25,name) | |
2047 | ui.removeTextArea(26,name) | |
2048 | ui.addTextArea(24, "<font size='15' color='#FFFFFF'>100/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
2049 | mice[name].ammo = 6 | |
2050 | ||
2051 | initPlayer(name) | |
2052 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
2053 | ||
2054 | for chest=101,SETTINGS.textareaAmount+100 do | |
2055 | ui.removeTextArea(chest, name) | |
2056 | end | |
2057 | ui.removeTextArea(107,nil) | |
2058 | for ammo=1,15 do | |
2059 | ui.removeTextArea(ammo, name) | |
2060 | end | |
2061 | 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) | |
2062 | ||
2063 | break | |
2064 | end | |
2065 | end | |
2066 | end | |
2067 | end | |
2068 | ||
2069 | ||
2070 | if id == 108 and tfm.get.room.playerList[name].isDead==false then | |
2071 | for n, data in next, tfm.get.room.playerList do | |
2072 | for i, coords in next, textareaCoords do | |
2073 | ||
2074 | 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 | |
2075 | mice[name].cofre108Sniper = 1 | |
2076 | mice[name].flechasDefault = 0 | |
2077 | mice[name].ammo = 1 | |
2078 | mice[name].force = 80 | |
2079 | ||
2080 | initPlayer(name) | |
2081 | ||
2082 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
2083 | for chest=101,SETTINGS.textareaAmount+100 do | |
2084 | ui.removeTextArea(chest, name) | |
2085 | end | |
2086 | ui.removeTextArea(108,nil) | |
2087 | for ammo=1,15 do | |
2088 | ui.removeTextArea(ammo, name) | |
2089 | end | |
2090 | 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) | |
2091 | ||
2092 | break | |
2093 | end | |
2094 | end | |
2095 | end | |
2096 | end | |
2097 | ||
2098 | ||
2099 | ||
2100 | if id == 109 and tfm.get.room.playerList[name].isDead==false then | |
2101 | for n, data in next, tfm.get.room.playerList do | |
2102 | for i, coords in next, textareaCoords do | |
2103 | ||
2104 | 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 | |
2105 | mice[name].plataformas = 100 | |
2106 | mice[name].ammo = 6 | |
2107 | ui.removeTextArea(25,name) | |
2108 | ui.removeTextArea(26,name) | |
2109 | ui.addTextArea(24, "<font size='15' color='#FFFFFF'>100/12", name, 90, 318, nil, 20, 0x324650, 0x000000, 0, true) | |
2110 | ||
2111 | ||
2112 | initPlayer(name) | |
2113 | ||
2114 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
2115 | ||
2116 | ||
2117 | for chest=101,SETTINGS.textareaAmount+100 do | |
2118 | ui.removeTextArea(chest, name) | |
2119 | end | |
2120 | ui.removeTextArea(109,nil) | |
2121 | for ammo=1,15 do | |
2122 | ui.removeTextArea(ammo, name) | |
2123 | end | |
2124 | 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) | |
2125 | ||
2126 | break | |
2127 | end | |
2128 | end | |
2129 | end | |
2130 | end | |
2131 | ||
2132 | if id == 110 and tfm.get.room.playerList[name].isDead==false then | |
2133 | for n, data in next, tfm.get.room.playerList do | |
2134 | for i, coords in next, textareaCoords do | |
2135 | ||
2136 | 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 | |
2137 | ||
2138 | ||
2139 | ||
2140 | mice[name].cofre110111Trampa = 1 | |
2141 | ||
2142 | for chest=101,SETTINGS.textareaAmount+100 do | |
2143 | ui.removeTextArea(chest, name) | |
2144 | end | |
2145 | ui.removeTextArea(110,nil) | |
2146 | ||
2147 | 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) | |
2148 | break | |
2149 | end | |
2150 | end | |
2151 | end | |
2152 | end | |
2153 | ||
2154 | if id == 111 and tfm.get.room.playerList[name].isDead==false then | |
2155 | for n, data in next, tfm.get.room.playerList do | |
2156 | for i, coords in next, textareaCoords do | |
2157 | ||
2158 | 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 | |
2159 | ||
2160 | mice[name].cofre110111Trampa = 1 | |
2161 | for chest=101,SETTINGS.textareaAmount+100 do | |
2162 | ui.removeTextArea(chest, name) | |
2163 | end | |
2164 | ui.removeTextArea(111,nil) | |
2165 | ui.removeTextArea(9997,name) | |
2166 | ui.removeTextArea(9996,name) | |
2167 | ||
2168 | 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) | |
2169 | break | |
2170 | end | |
2171 | end | |
2172 | end | |
2173 | end | |
2174 | ||
2175 | if id == 112 and tfm.get.room.playerList[name].isDead==false then | |
2176 | for n, data in next, tfm.get.room.playerList do | |
2177 | for i, coords in next, textareaCoords do | |
2178 | ||
2179 | 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 | |
2180 | mice[name].cofre112113Cajas = 1 | |
2181 | mice[name].flechasDefault = 0 | |
2182 | ||
2183 | mice[name].ammo = 5 | |
2184 | ||
2185 | initPlayer(name) | |
2186 | ||
2187 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
2188 | ||
2189 | for chest=101,SETTINGS.textareaAmount+100 do | |
2190 | ui.removeTextArea(chest, name) | |
2191 | end | |
2192 | ui.removeTextArea(112,nil) | |
2193 | for ammo=1,15 do | |
2194 | ui.removeTextArea(ammo, name) | |
2195 | end | |
2196 | 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) | |
2197 | ||
2198 | break | |
2199 | end | |
2200 | end | |
2201 | end | |
2202 | end | |
2203 | ||
2204 | ||
2205 | if id == 113 and tfm.get.room.playerList[name].isDead==false then | |
2206 | for n, data in next, tfm.get.room.playerList do | |
2207 | for i, coords in next, textareaCoords do | |
2208 | ||
2209 | 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 | |
2210 | mice[name].cofre112113Cajas = 1 | |
2211 | mice[name].flechasDefault = 0 | |
2212 | mice[name].ammo = 5 | |
2213 | ||
2214 | initPlayer(name) | |
2215 | ||
2216 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
2217 | ||
2218 | for chest=101,SETTINGS.textareaAmount+100 do | |
2219 | ui.removeTextArea(chest, name) | |
2220 | end | |
2221 | ui.removeTextArea(113,nil) | |
2222 | for ammo=1,15 do | |
2223 | ui.removeTextArea(ammo, name) | |
2224 | end | |
2225 | 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) | |
2226 | ||
2227 | break | |
2228 | end | |
2229 | end | |
2230 | end | |
2231 | end | |
2232 | ||
2233 | ||
2234 | if id == 114 and tfm.get.room.playerList[name].isDead==false then | |
2235 | for n, data in next, tfm.get.room.playerList do | |
2236 | for i, coords in next, textareaCoords do | |
2237 | ||
2238 | 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 | |
2239 | mice[name].cofre114115Lanzaderas = 1 | |
2240 | ||
2241 | for chest=101,SETTINGS.textareaAmount+100 do | |
2242 | ui.removeTextArea(chest, name) | |
2243 | end | |
2244 | ui.removeTextArea(114,nil) | |
2245 | ||
2246 | ui.removeTextArea(9997,name) | |
2247 | ui.removeTextArea(9996,name) | |
2248 | ||
2249 | 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) | |
2250 | break | |
2251 | end | |
2252 | end | |
2253 | end | |
2254 | end | |
2255 | ||
2256 | ||
2257 | if id == 115 and tfm.get.room.playerList[name].isDead==false then | |
2258 | for n, data in next, tfm.get.room.playerList do | |
2259 | for i, coords in next, textareaCoords do | |
2260 | ||
2261 | 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 | |
2262 | ||
2263 | mice[name].cofre114115Lanzaderas = 1 | |
2264 | ||
2265 | ||
2266 | for chest=101,SETTINGS.textareaAmount+100 do | |
2267 | ui.removeTextArea(chest, name) | |
2268 | end | |
2269 | ui.removeTextArea(115,nil) | |
2270 | ui.removeTextArea(9997,name) | |
2271 | ui.removeTextArea(9996,name) | |
2272 | 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) | |
2273 | break | |
2274 | end | |
2275 | end | |
2276 | end | |
2277 | end | |
2278 | ||
2279 | if id == 116 and tfm.get.room.playerList[name].isDead==false then | |
2280 | for n, data in next, tfm.get.room.playerList do | |
2281 | for i, coords in next, textareaCoords do | |
2282 | ||
2283 | 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 | |
2284 | mice[name].cofre116117MinigunNevada = 1 | |
2285 | mice[name].flechasDefault = 0 | |
2286 | mice[name].ammo = 6 | |
2287 | mice[name].force = 90 | |
2288 | initPlayer(name) | |
2289 | ||
2290 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
2291 | ||
2292 | for chest=101,SETTINGS.textareaAmount+100 do | |
2293 | ui.removeTextArea(chest, name) | |
2294 | end | |
2295 | ui.removeTextArea(116,nil) | |
2296 | for ammo=1,15 do | |
2297 | ui.removeTextArea(ammo, name) | |
2298 | end | |
2299 | 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) | |
2300 | break | |
2301 | end | |
2302 | end | |
2303 | end | |
2304 | end | |
2305 | ||
2306 | ||
2307 | if id == 117 and tfm.get.room.playerList[name].isDead==false then | |
2308 | for n, data in next, tfm.get.room.playerList do | |
2309 | for i, coords in next, textareaCoords do | |
2310 | 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 | |
2311 | mice[name].cofre116117MinigunNevada = 1 | |
2312 | mice[name].flechasDefault = 0 | |
2313 | mice[name].ammo = 6 | |
2314 | mice[name].force = 90 | |
2315 | initPlayer(name) | |
2316 | ||
2317 | ui.addTextArea(0, "", name, 10, 372, mice[name].ammo * 15, 20, 0x00000F, 0x000000, 0.6,true) | |
2318 | ||
2319 | for chest=101,SETTINGS.textareaAmount+100 do | |
2320 | ui.removeTextArea(chest, name) | |
2321 | end | |
2322 | ui.removeTextArea(117,nil) | |
2323 | for ammo=1,15 do | |
2324 | ui.removeTextArea(ammo, name) | |
2325 | end | |
2326 | 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) | |
2327 | ||
2328 | break | |
2329 | end | |
2330 | end | |
2331 | end | |
2332 | end | |
2333 | ||
2334 | if cb == "asignarX" then | |
2335 | ||
2336 | ui.addTextArea(301, "", name, 6, 6, 787, 389, 0x00000F, 0x000000, 0.9, true) | |
2337 | 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) | |
2338 | mice[name].asignandoKey = 1 | |
2339 | ||
2340 | ui.removeTextArea(303,name) | |
2341 | ui.removeTextArea(304,name) | |
2342 | ui.removeTextArea(305,name) | |
2343 | ui.removeTextArea(306,name) | |
2344 | end | |
2345 | ||
2346 | if cb == "asignarC" then | |
2347 | ||
2348 | ui.addTextArea(301, "", name, 6, 6, 787, 389, 0x00000F, 0x000000, 0.9, true) | |
2349 | 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) | |
2350 | mice[name].asignandoKey = 2 | |
2351 | ||
2352 | ||
2353 | ui.removeTextArea(303,name) | |
2354 | ui.removeTextArea(304,name) | |
2355 | ui.removeTextArea(305,name) | |
2356 | ui.removeTextArea(306,name) | |
2357 | ||
2358 | end | |
2359 | ||
2360 | if cb == "asignarQ" then | |
2361 | ||
2362 | ui.addTextArea(301, "", name, 6, 6, 787, 389, 0x00000F, 0x000000, 0.9, true) | |
2363 | 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) | |
2364 | mice[name].asignandoKey = 3 | |
2365 | ui.removeTextArea(303,name) | |
2366 | ui.removeTextArea(304,name) | |
2367 | ui.removeTextArea(305,name) | |
2368 | ui.removeTextArea(306,name) | |
2369 | end | |
2370 | ||
2371 | ||
2372 | ||
2373 | if cb == "asignarZ" then | |
2374 | ui.addTextArea(301, "", name, 6, 6, 787, 389, 0x00000F, 0x000000, 0.9, true) | |
2375 | 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) | |
2376 | mice[name].asignandoKey = 4 | |
2377 | ui.removeTextArea(303,name) | |
2378 | ui.removeTextArea(304,name) | |
2379 | ui.removeTextArea(305,name) | |
2380 | ui.removeTextArea(306,name) | |
2381 | end | |
2382 | ||
2383 | if cb == "asignarSpace" then | |
2384 | ui.addTextArea(301, "", name, 6, 6, 787, 389, 0x00000F, 0x000000, 0.9, true) | |
2385 | 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) | |
2386 | mice[name].asignandoKey = 5 | |
2387 | ui.removeTextArea(303,name) | |
2388 | ui.removeTextArea(304,name) | |
2389 | ui.removeTextArea(305,name) | |
2390 | ui.removeTextArea(306,name) | |
2391 | end | |
2392 | ||
2393 | ||
2394 | if cb == "reset" then | |
2395 | mice[name].key_rampa = 67 | |
2396 | mice[name].key_suelo = 88 | |
2397 | mice[name].key_recarga = 81 | |
2398 | mice[name].key_rescate = 90 | |
2399 | mice[name].key_consumible = 32 | |
2400 | mice[name].txt_key_rampa = "C" | |
2401 | mice[name].txt_key_suelo = "X" | |
2402 | mice[name].txt_key_recarga = "Q" | |
2403 | mice[name].txt_key_rescate = "Z" | |
2404 | mice[name].txt_key_consumible = "space" | |
2405 | savePlayerData(name) | |
2406 | ui.addTextArea(22, "<b>"..mice[name].txt_key_suelo.."", name, 11, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
2407 | ui.addTextArea(23, "<b>"..mice[name].txt_key_rampa.."", name, 40, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
2408 | ui.addTextArea(28, "<b>"..mice[name].txt_key_rescate.."", name, 70, 320, 14, 15, 0x00000F, 0x000000, 0.5, true) | |
2409 | ||
2410 | ui.addTextArea(30032, ""..mice[name].txt_key_suelo.."", name, 371, 182, 18, 18, 0x324650, 0x000000, 1, true) | |
2411 | ui.addTextArea(30033, ""..mice[name].txt_key_rampa.."", name, 371, 223, 19, 19, 0x324650, 0x000000, 1, true) | |
2412 | ui.addTextArea(30034, ""..mice[name].txt_key_rescate.."", name, 371, 265, 19, 19, 0x324650, 0x000000, 1, true) | |
2413 | ui.addTextArea(30035, ""..mice[name].txt_key_recarga.."", name, 371, 304, 19, 19, 0x324650, 0x000000, 1, true) | |
2414 | ui.addTextArea(30036, ""..mice[name].txt_key_consumible.."", name, 371, 343, nil, 20, 0x324650, 0x000000, 1, true) | |
2415 | ||
2416 | tfm.exec.chatMessage("<font color='#FFFFFF'>"..translate(tfm.get.room.playerList[name].community, "cambiosGuardados").."</font>",name) | |
2417 | end | |
2418 | ||
2419 | if cb == "options" then | |
2420 | 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) | |
2421 | ui.addTextArea(30100, "<font size='15' color='#FFF504'><a href='event:closeOptions'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true) | |
2422 | ||
2423 | end | |
2424 | ||
2425 | if cb == "closeOptions" then | |
2426 | ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true) | |
2427 | ui.removeTextArea(30102,name) | |
2428 | end | |
2429 | ||
2430 | if cb == "controles" then | |
2431 | ui.removeTextArea(30102,name) | |
2432 | ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true) | |
2433 | 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) | |
2434 | 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) | |
2435 | ui.addTextArea(30022, "", name, 276, 181, 270, 20, 0x00000f, 0x000000, 0.5, true) | |
2436 | ui.addTextArea(30023, "", name, 277, 222, 270, 20, 0x00000f, 0x000000, 0.5, true) | |
2437 | ui.addTextArea(30024, "", name, 277, 263, 270, 20, 0x00000f, 0x000000, 0.5, true) | |
2438 | ui.addTextArea(30025, "", name, 277, 303, 270, 20, 0x00000f, 0x000000, 0.5, true) | |
2439 | ui.addTextArea(30026, "", name, 277, 343, 270, 20, 0x00000f, 0x000000, 0.5, true) | |
2440 | 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) | |
2441 | 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) | |
2442 | 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) | |
2443 | 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) | |
2444 | 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) | |
2445 | ui.addTextArea(30032, ""..mice[name].txt_key_suelo.."", name, 371, 182, 18, 18, 0x324650, 0x000000, 1, true) | |
2446 | ui.addTextArea(30033, ""..mice[name].txt_key_rampa.."", name, 371, 223, 19, 19, 0x324650, 0x000000, 1, true) | |
2447 | ui.addTextArea(30034, ""..mice[name].txt_key_rescate.."", name, 371, 265, 19, 19, 0x324650, 0x000000, 1, true) | |
2448 | ui.addTextArea(30035, ""..mice[name].txt_key_recarga.."", name, 371, 304, 19, 19, 0x324650, 0x000000, 1, true) | |
2449 | ui.addTextArea(30036, ""..mice[name].txt_key_consumible.."", name, 371, 343, nil, 20, 0x324650, 0x000000, 1, true) | |
2450 | 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) | |
2451 | 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) | |
2452 | 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) | |
2453 | 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) | |
2454 | 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) | |
2455 | 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) | |
2456 | ui.addTextArea(30043, "<font size='19' color='#FF1E1E'><b><a href='event:closeControles'>X", name, 568, 83, 22, 25, 0x324650, 0x000000, 0, true) | |
2457 | ||
2458 | end | |
2459 | ||
2460 | if cb == "closeControles" then | |
2461 | for close= 30020,30043 do | |
2462 | ui.removeTextArea(close,name) | |
2463 | end | |
2464 | end | |
2465 | ||
2466 | if cb == "info" then | |
2467 | ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true) | |
2468 | ui.removeTextArea(30102,name) | |
2469 | ui.addTextArea(30020, ""..translate(tfm.get.room.playerList[name].community, "informacion_informacion_contenido").."", name, 208, 141, 409, 243, 0x00000f, 0x000000, 0.6, true) | |
2470 | 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) | |
2471 | ui.addTextArea(30037, "<font size='19' color='#FF1E1E'><b><a href='event:closeInfo'>X", name, 568, 92, 22, 24, 0x324650, 0x000000, 0, true) | |
2472 | 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) | |
2473 | elseif cb =="infoControles" then | |
2474 | ||
2475 | 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) | |
2476 | ui.addTextArea(30037, "<font size='19' color='#FF1E1E'><b><a href='event:closeInfo'>X", name, 568, 92, 22, 24, 0x324650, 0x000000, 0, true) | |
2477 | 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) | |
2478 | ||
2479 | elseif cb == "infoReglas" then | |
2480 | ||
2481 | ui.addTextArea(30020, ""..translate(tfm.get.room.playerList[name].community, "informacion_reglas_contenido").."", name, 207, 140, 409, 243, 0x00000f, 0x000000, 0.6, true) | |
2482 | 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) | |
2483 | ||
2484 | ||
2485 | elseif cb =="infoStaff" then | |
2486 | ui.addTextArea(30020, ""..translate(tfm.get.room.playerList[name].community, "informacion_staff_contenido").."", name, 207, 140, 409, 243, 0x00000f, 0x000000, 0.6, true) | |
2487 | 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) | |
2488 | end | |
2489 | ||
2490 | ||
2491 | ||
2492 | if cb == "closeControles" then | |
2493 | for close= 30020,30040 do | |
2494 | ui.removeTextArea(close,name) | |
2495 | end | |
2496 | end | |
2497 | ||
2498 | ||
2499 | ||
2500 | if cb == "closeInfo" then | |
2501 | ui.removeTextArea(30020,name) | |
2502 | ui.removeTextArea(30021,name) | |
2503 | ui.removeTextArea(30022,name) | |
2504 | ui.removeTextArea(30037,name) | |
2505 | end | |
2506 | ||
2507 | if cb == "update" then | |
2508 | displayUpdate(name) | |
2509 | ui.removeTextArea(30102,name) | |
2510 | end | |
2511 | ||
2512 | if cb == "closeUpdate" then | |
2513 | ui.removeTextArea(30020,name) | |
2514 | ui.removeTextArea(30021,name) | |
2515 | ui.removeTextArea(30037,name) | |
2516 | end | |
2517 | end | |
2518 | ||
2519 | function displayUpdate(name) | |
2520 | for delete = 30020, 30040 do | |
2521 | ui.removeTextArea(delete,name) | |
2522 | end | |
2523 | ui.addTextArea(30100, "<font size='15' color='#FFFFFF'><a href='event:options'>≡", name, 6, 23, 16, 22, 0x00000f, 0x00000f, 0.3, true) | |
2524 | ui.addTextArea(30020, ""..translate(tfm.get.room.playerList[name].community, "noticias_texto").."",name, 214, 140, 400, 238, 0x00000F, 0x000000, 0.6, true) | |
2525 | ui.addTextArea(30021, ""..translate(tfm.get.room.playerList[name].community, "noticias_titulo").."",name, 266, 90, 287, 31, 0x00000F, 0x000000, 0.6, true) | |
2526 | ui.addTextArea(30037, "<font size='19' color='#FF1E1E'><b><a href='event:closeUpdate'>X", name, 569, 93, 22, 25, 0x324650, 0x000000, 0, true) | |
2527 | end | |
2528 | ||
2529 | main() | |
2530 | end | |
2531 | ||
2532 | function crawl() | |
2533 | local cmd = "" | |
2534 | local maps = {} | |
2535 | local map = nil | |
2536 | local loaded = false | |
2537 | local first = nil | |
2538 | ||
2539 | local function calculateMaps() | |
2540 | if map and not loaded then | |
2541 | tfm.exec.chatMessage(map) | |
2542 | map = nil | |
2543 | end | |
2544 | ||
2545 | if #maps > 0 then | |
2546 | loaded = false | |
2547 | map = "@" .. maps[1] | |
2548 | table.remove(maps, 1) | |
2549 | ||
2550 | tfm.exec.newGame(map) | |
2551 | end | |
2552 | end | |
2553 | ||
2554 | local function parseCommand(command) | |
2555 | maps = {} | |
2556 | for map in string.gmatch(command, "[^;]+") do | |
2557 | maps[#maps + 1] = map | |
2558 | end | |
2559 | end | |
2560 | ||
2561 | function eventNewGame() | |
2562 | if tfm.get.room.currentMap == map then | |
2563 | loaded = true | |
2564 | end | |
2565 | end | |
2566 | ||
2567 | function eventChatMessage(player, msg) | |
2568 | if not first then | |
2569 | first = player | |
2570 | end | |
2571 | if player ~= first then return end | |
2572 | ||
2573 | if msg == "#" then | |
2574 | parseCommand(cmd) | |
2575 | cmd = "" | |
2576 | else | |
2577 | cmd = cmd .. msg | |
2578 | end | |
2579 | end | |
2580 | ||
2581 | system.newTimer(calculateMaps, 3500, true) | |
2582 | tfm.exec.disableAutoNewGame(true) | |
2583 | tfm.exec.chatMessage("<vp>Loaded") | |
2584 | end | |
2585 | ||
2586 | if tfm.get.room.name == "*#fortmice0clubmice" then | |
2587 | clubmice() | |
2588 | elseif tfm.get.room.name:sub(1, 17) == "*#fortmice0crawl0" then | |
2589 | crawl() | |
2590 | else | |
2591 | fortmice() | |
2592 | end |