Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Script contendo o module #anvilwar, com #mestre sendo seus submodos. Compilado às 13h01 (UTC) 24/08/2018. ]]--
- local modulo = {
- _NOME = "anvilwar",
- _VERSION = "1.4",
- _AUTHOR = "Jessiewind26#2546"
- }
- system.disableChatCommandDisplay("pw")
- active = ""
- admin = ""
- local modo = {}
- resetAll = function()
- for i=0,10000 do
- ui.removeTextArea(i,nil)
- end
- for i=1,50 do
- ui.addPopup(i,0,"",nil,-9999,9999)
- end
- for i=901,910 do
- ui.addPopup(i,0,"",nil,-9999,9999)
- end
- for i=1201,1210 do
- ui.addPopup(i,0,"",nil,-9999,9999)
- end
- for _,f in next,{"AutoShaman","AutoScore","AutoNewGame","AutoTimeLeft","MinimalistMode","PhysicalConsumables","AfkDeath","MortCommand","DebugCommand"} do
- tfm.exec["disable"..f](false)
- end
- end
- roomAdmin = function()
- for name,player in pairs(tfm.get.room.playerList) do
- if string.find(tfm.get.room.name,name) then
- admin=name
- else
- admin="Jessiewind26#2546"
- end
- end
- end
- initAnvilwar = function()
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoScore(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableDebugCommand(true)
- tfm.exec.disablePhysicalConsumables(true)
- powerups={double=false,chuva=false,count=0,choosed="",bomba=false,objeto=false,explosion=false,fly=false,triple=false,invisible=false,selective=false,r_azul=false,r_vermelho=false} -- powerups
- play_azul={} -- jogadores do time azul
- players_table={} -- variável que define os jogadores novos, não alterar
- objetos={1,2,3,4,6,7,10,23,32,34,35,39,45,46,54,60,61,62,65,67,68,69,89,90,95} -- objetos que podem ser atirados
- caps={azul="",vermelho=""} -- capitães dos times azul e vermelho
- play_vermelho={} -- jogadores do time azul
- avs_list={"Azirdeathray#0000"} -- avaliadores de mapas do module
- mods_list={} -- moderadores do module
- managers_list={"Varusofeyzan#0000","Jhinsword350#0000","Nasus_assassin#1534"} -- gerenciadores do module
- admins_list={"Jessiewind26#2546","Jarvanfender#0000"} -- administradores e criadores do module
- scoreloop=0 -- não alterar
- sudden_death=false -- modo morte súbita, não pode ser alterado
- local temp_name="" -- não alterar
- local temp_name2="" -- não alterar
- local temp_name3="" -- não alterar
- local skips=0 -- funcionalidade do comando !skip
- actual_player="" -- jogador atual a atirar
- tempo=0 -- tempo da partida
- players=0 -- não alterar
- time_limit=10 -- não alterar
- team=1 -- não alterar
- kills=0 -- não alterar
- data={} -- dados dos jogadores, não mexer
- ratos=0 -- não alterar
- loop=8 -- não alterar
- power=5 -- potência do tiro
- valendo=false -- variável que define quando o jogo está valendo
- anvil_launched=false -- variável que passa a vez pro próximo jogador
- set=false -- comando de admin, não alterar
- object=10 -- variável de objeto usada no powerup F10
- set_name="" -- comando de admin, não alterar
- reset=false -- variável que reinicia o mapa quando acabar a partida
- count=0 -- não alterar
- count_azul=0 -- quantidade de jogadores do time azul
- count_vermelho=0 -- quantidade de jogadores do time vermelho
- for _,f in next,{"help","powerups","set","tc","p","rank","data_score","score","kill","tt","rv","cap","cmd","acmd","ban","unban","skip"} do
- system.disableChatCommandDisplay(f)
- end
- anvils={10,1002,1003,1004,1005} -- as bigornas
- mapas={"@7467262","@7463118","@7436867","@7412348","@7467977","@7470456","@7480017","@7433435","@7483583","@7485139","@7485233","@7486518","@7486596","@7486946","@7487828","@7488212","@7487008","@7493478","@7494251","@7493568","@7375714","@7495501","@7495286","@7495744","@7497388","@7499355","@7501996"}
- lang = {}
- lang.br = {
- win_vermelho = "<R><b>GG Time Vermelho!</b><br>A próxima partida será iniciada em 15 segundos.",
- win_azul = "<BL><b>GG Time Azul!</b><br>A próxima partida será iniciada em 15 segundos.",
- sudden_death = "<VP><b>Morte Súbita!</b><br>A equipe que conseguir eliminar qualquer um adversário será declarada a vencedora.",
- empate_text = "<J><b>Houve um empate!</b><br>A próxima partida será iniciada em 15 segundos.",
- instructions = "Use as teclas de 1 a 9 para alterar a potência da bigorna e barra de espaço para atirar. Para ajuda digite !help. Para ver poderes especiais digite !powerups.",
- turn = "<VP>É a vez de",
- timeout = "<J>Tempo esgotado! O atirador será alterado.",
- enter_vermelho = "Entrar no time vermelho",
- enter_azul = "Entrar no time azul",
- exit = "Sair do time",
- double = "acionou o powerup Bigorna Dupla!",
- double2 = "<br>Neste powerup, você atira 2 bigornas de uma vez.",
- triple = "acionou o powerup Bigorna Tripla!",
- triple2 = "<br>Neste powerup, você atira 3 bigornas de uma vez.",
- bomba1 = "acionou o powerup Bomba Relógio!",
- bomba2 = "<br>Neste powerup, uma explosão em um lugar aleatório do time adversário ocorrerá.",
- objeto1 = "acionou o powerup Tiro Aleatório!",
- objeto2 = "<br>Neste powerup, ao pressionar a barra de espaço, você vai atirar um objeto aleatório de shaman. Caso você tenha usado a habilidade Bigorna Dupla, você irá atirar 2 objetos ao invés de um.",
- exp1 = "acionou o powerup Olha a Explosão!",
- exp2 = "<br>Neste powerup, você pode gerar uma explosão clicando em um local do time inimigo.<br>Você possui 5 segundos para explodir!",
- chuva1 = "acionou o powerup Chuva de Objetos!",
- chuva2 = "<br>Neste powerup, ao atirar uma bigorna, irão aparecer diversos objetos continuamente até a troca de jogador.",
- fly1 = "acionou o powerup Modo Teleport!",
- fly2 = "<br>Neste powerup, enquanto você não atira uma bigorna, você poderá se teleportar clicando com o mouse.",
- inv1 = "acionou o powerup Modo Imortal!",
- inv2 = "<br>Neste powerup, você ficará imortal durante 4 turnos do seu time. Esta habilidade só pode ser utilizada uma vez por partida.",
- inv3 = "Sua habilidade Modo Imortal expirou.",
- invi1 = "acionou o powerup Bigorna Invisível!",
- invi2 = "<br>Neste powerup, você vai atirar uma bigorna invisível.<br>Este powerup não pode ser usado com as bigornas duplas e triplas.",
- selec1 = "acionou o powerup Objeto Seletivo!",
- selec2 = "<br>Neste powerup, você pode escolher um objeto para atirar ao invés de uma bigorna. Os preços variam de acordo com o objeto selecionado.",
- bar = "#anvilwar - Compilação RTM 6230.065",
- intensity = "Intensidade",
- your_turn = "<J>É a sua vez de jogar. Pressione ESPAÇO para atirar e use as teclas de 1 a 9 para alterar a potência da bigorna. Use as teclas F1 a F10 para usar poderes especiais.",
- help = "Pressione ESPAÇO para atirar e use as teclas de 1 a 9 para alterar a potência da bigorna. Use as teclas de F1 a F10 para usar poderes especiais (para saber quais são, digite !powerups). A equipe que conseguir eliminar todos do time adversário vencerá a partida.<br><br>Digite !cmd para ver todos os comandos do jogo.<br><br><b>Créditos:</b><br>Desenvolvimento: Jessiewind26#2546 e Jarvanfender#0000<br>Powerups: Jhinsword350#0000 e Vidaloka9999#0000<br>Tradução: Nasus_assassin#1534 (EN) e Alexsaky#7307 (AR)",
- enter = "<br><J>Confiram os novos submodos da sala #anvilwar:<br><br><VP>./sala #anvilwar0mestre - <N>Mestre Mandou<br><VP>./sala #anvilwar0ocean - <N>Oceano de Pedra (feito por Ahrizrdbrand#0000<br><VP>./sala #anvilwar0longjump - <N>Salto em Distância (feito por Camilledrain#0000)",
- teamkill1 = "Oh não! ",
- teamKill2 = "matou um companheiro de equipe",
- ajuda = "Ajuda",
- credits = "Créditos",
- mostrar = "Mostrar",
- seconds = "<ROSE>Faltam 60 segundos!",
- seconds30 = "<ROSE>Faltam 30 segundos!",
- seconds10 = "<ROSE>Faltam 10 segundos!",
- powerups1 = "F1 = Bigorna Dupla<br>F2 = Bigorna Tripla<br>F3 = Bomba Relógio<br>F4 = Tiro Aleatório<br>F5 = Olha a Explosão<br>F6 = Chuva de Objetos<br>F7 = Modo Teleport<br>F8 = Modo Imortal<br>F9 = Bigorna Invisível<br>F10 = Objeto Seletivo",
- powerups2 = "6pts<br>12pts<br>7pts<br>6pts<br>25pts<br>20pts<br>4pts<br>20pts<br>14pts<br>5pts",
- powerups3 = "<a href='event:power1'>Mostrar</a><br><a href='event:power2'>Mostrar</a><br><a href='event:power3'>Mostrar</a><br><a href='event:power4'>Mostrar</a><br><a href='event:power5'>Mostrar</a><br><a href='event:power6'>Mostrar</a><br><a href='event:power7'>Mostrar</a><br><a href='event:power8'>Mostrar</a><br><a href='event:power9'>Mostrar</a><br><a href='event:power10'>Mostrar</a>",
- powerups4 = "1<br>2<br>2<br>2<br>5<br>6<br>2<br>5<br>4<br>3",
- teamchat = "<J>Você pode usar o comando !tc [mensagem] para falar apenas com o seu time.<br><br>Você pode ver seu perfil no jogo digitando !p e o ranking temporário digitando !rank.",
- menu_bar = "<p align='center'><a href='event:help'>Ajuda</a> | <a href='event:powerups'>Powerups</a> | <a href='event:profile'>Perfil</a> | <a href='event:ranking'>Ranking</a> | <a href='event:cap'>Capitão</a> | <a href='event:cmd'>Comandos</a>",
- powerupslist = "Lista de Poderes",
- profile = "Use o comando !p para ver o seu perfil. Use !p [nome] para ver o perfil de outra pessoa.",
- starting = "<VP>A partida está prestes a começar. Preparem-se!",
- suicide = "O seguinte jogador cometeu suicídio: ",
- ban = " foi banido da sala #anvilwar por ",
- unban = " teve seu banimento removido da sala.",
- caps = " foi escolhido para ser o capitão da equipe. Para saber mais informações, utilize o comando !cap ou a opção Capitão no Menu do module.",
- cap = "Este tipo de jogador (escolhido aleatoriamente) receberá 50% a mais de pontuação que os outros e poderá transferir seus pontos para outro jogador de sua equipe usando o comando !tt [nome].<br>Você também poderá utilizar o comando !rv [nome] para reviver UM membro morto de sua equipe.",
- cap_text = "<br><VP>Você é o capitão da sua equipe.<br><br>Você irá receber 50% mais pontos por tempo vivo e poderá transferir pontos para outros jogadores usando o comando !tt [nome].<br>Você também poderá utilizar o comando !rv [nome] para reviver UM membro morto de sua equipe.",
- score30 = "<R>Você precisa de 30 pontos para usar isto.",
- advanced = "<VP>Você acaba de avançar para o nível ",
- tag_text = "<J>Não se esqueça de colocar a #tag no final do nome desejado! Caso contrário, o comando não irá funcionar!",
- revivetext = "<J>O seguinte jogador reviveu: ",
- yturn = "É a vez de: ",
- level_error = "<R>Você não possível nível suficiente para usar isto.",
- funct = "Função não permitida. Você colocou a #tag no nome?",
- cmds = "Comandos do Jogo",
- commands = "• !help = Exibe as instruções de como jogar.<br>• !p [jogador] = Exibe o perfil do jogador escolhido. Digite !p sem argumentos para ver o seu perfil.<br>• !rank = Exibe o ranking temporário de quem está na sala.<br>• !tc [mensagem] = Fala apenas com os jogadores do seu time.<br>• !skip = Envia um voto para pular o mapa atual. Este comando só pode ser usado quando a partida ainda não tiver começado.<br><ROSE>* <N>!rv [jogador] = Revive um jogador morto de sua equipe.<br><ROSE>* <N>!tt [jogador] = Transfere seus pontos para outro jogador<br><br>Os comandos marcados com <ROSE>* <N>são de uso exclusivo do capitão da equipe. Para saber mais sobre isso, digite !cap.",
- admin_commands = "<BL>• <N>!skip = Pula o mapa atual.<br><BL>• <N>!pw [texto] = Adiciona uma senha na sala.<br><BL>• <N>!set_map [mapa] = Executa o mapa especificado.<br><J>• <N>!kill [nome] = Mata o jogador especificado.<br><R>• <N>!limit [número] = Limita a quantidade de ratos na sala.<br><br>Você só pode usar os comandos correspondentes a cor do seu nome.<br><br>Por motivos de segurança e estabilidade, nem todos os comandos especiais foram adicionados aqui."
- }
- lang.en = {
- win_vermelho = "<R><b>The RED team wins!</b><br>The next match will start in 15 seconds.",
- win_azul = "<BL><b>The BLUE team wins!</b><br>The next match will start in 15 seconds.",
- sudden_death = "<VP><b>SUDDEN DEATH!</b><br>The team that kill anyone of other team will won the match.",
- empate_text = "<J><b>There was a draw!</b><br>The next match will start in 15 seconds.",
- instructions = "Use the 1 to 9 keys to change the intensity of anvil and SPACEBAR to throw a anvil.",
- turn = "<VP>It's turn of",
- timeout = "<J>Time is over! The shooter will be changed.",
- enter_vermelho = "Enter on RED team",
- enter_azul = "Enter on BLUE team",
- exit = "Leave this team",
- double = "used the powerup Double Anvil!",
- triple = "used the powerup Triple Anvil!",
- bomba1 = "used the powerup Time Bomb!",
- bomba2 = "<br>On this powerup, a explosion will occur on a random place of enemy area.",
- objeto1 = "used the powerup Random Shoot!",
- objeto2 = "<br>On this powerup, you will shoot a random shaman object instead of a anvil. If you have used the Double Anvil powerup, you can shoot 2 objects instead of one.",
- exp1 = "used the powerup Explosion!",
- exp2 = "<br>On this powerup, you can cause a explosion clicking on enemy area with your mouse.<br>You have 5 seconds to cause your explosion.",
- chuva1 = "used the powerup Anvil Rain!",
- chuva2 = "<br>On this powerup, you will shoot several anvils",
- fly1 = "used the powerup Teleport Mode!",
- fly2 = "<br>On this powerup, you can teleport your mice using the mouse click.",
- inv1 = "used the powerup Immortal Mode!",
- inv2 = "<br>On this powerup, you be immortal during the next 4 turns. This powerup only can be used 1 time per game.",
- inv3 = "Your immortality has ended.",
- invi1 = "used the powerup Invisible Anvil!",
- invi2 = "<br>On this powerup, you will shoot a invisible anvil. This ability can't be used with double and triple anvils.",
- selec1 = "used the powerup Selective Object!",
- selec2 = "<br>On this powerup, you can select a shaman object to shoot instead of a anvil. This ability can't be used with double and triple anvils.",
- bar = "#anvilwar - Compilation RTM 6230.065",
- intensity = "Intensity",
- your_turn = "<J>It's your turn to shoot. Press SPACEBAR to throw a anvil and use the 1 to 9 keys to change the intensity of anvil. Use the F1 to F10 keys to use powerups.",
- help = "Press SPACEBAR to throw a anvil and use the 1 to 9 keys to change the intensity of anvil. Use the F1 to F10 keys to use powerups (type !powerups). The team that eliminates the enemy team wons the game.<br><br>Type !cmd to show all the game commands.<br><br><b>Credits:</b><br>Development: Jessiewind26#2546 and Jarvanfender#0000<br>Powerups: Jhinsword350#0000 and Vidaloka9999#0000<br>Translations: Nasus_assassin#1534 (EN) and Alexsaky#7307 (AR)",
- enter = "<J>Welcome to #anvilwar room! Type !help for more information.",
- teamkill1 = "Oh no! ",
- teamKill2 = "has killed a player of her team",
- ajuda = "Help",
- credits = "Credits",
- mostrar = "Show",
- seconds = "<ROSE>60 seconds remaining!",
- seconds30 = "<ROSE>30 seconds remaining!",
- seconds10 = "<ROSE>10 seconds remaining!",
- powerups1 = "F1 = Double Anvil<br>F2 = Triple Anvil<br>F3 = Time Bomb<br>F4 = Random Shoot<br>F5 = Explosion<br>F6 = Anvil Rain<br>F7 = Teleport Mode<br>F8 = Immortal Mode<br>F9 = Invisible Anvil<BR>F10 = Selective Object",
- powerups2 = "6pt<br>12pt<br>7pt<br>6pt<br>25pt<br>20pt<br>4pt<br>20pt<br>14pt<br>5pt",
- powerups3 = "<a href='event:power1'>Show</a><br><a href='event:power2'>Show</a><br><a href='event:power3'>Show</a><br><a href='event:power4'>Show</a><br><a href='event:power5'>Show</a><br><a href='event:power6'>Show</a><br><a href='event:power7'>Show</a><br><a href='event:power8'>Show</a><br><a href='event:power9'>Show</a><br><a href='event:power10'>Show</a>",
- powerups4 = "1<br>2<br>2<br>2<br>5<br>6<br>2<br>5<br>4<br>3",
- teamchat = "<J>You can use the command !tc [message] to speak with your team.<br><br>You can see your profile typing !p and the temporary tanking typing !rank.",
- menu_bar = "<p align='center'><a href='event:help'>Help</a> | <a href='event:powerups'>Powerups</a> | <a href='event:profile'>Profile</a> | <a href='event:ranking'>Ranking</a> | <a href='event:cap'>Capitain</a> | <a href='event:cmd'>Commands</a>",
- powerupslist = "Powerups List",
- profile = "Use the !p command to view your profile and use !p [username] to view the profile of another user.",
- starting = "<VP>The match will start on a few seconds. Get ready!",
- suicide = "The following player committed suicide: ",
- ban = " was banned of room by ",
- unban = " was unbanned of room.",
- caps = " was choosed to be the team capitain. To see more info about this, type !cap command or use the Capitain section on menu of the module.",
- cap = "On this compilation was included the functionality of a capitain player. This type of player (that is choosed randomly) will receive 50% more points and will get the ability of transfer your points to other players alive on the match using the !tt [name] command. You can use the !rv [name] command to revive ONE team player dead.",
- cap_text = "<br><VP>You are the team capitain.<br><br>You will receive 50% more points than other team players and can transfer your points to other team players using the !tt [name] command. You can use the !rv [name] command to revive ONE team player dead.",
- score30 = "<R>You need 30 points to use this.",
- advanced = "<VP>You reached the level ",
- tag_text = "<J>Don't forget to insert the #tag on the target nickname, else this command don't will work!",
- revivetext = "<J>The following player has been revived: ",
- yturn = "Actual player: ",
- level_error = "<R>You don't have level to use this. To view your level use the !p command.",
- funct = "Function not allowed",
- cmds = "Game commands",
- commands = "• !help = Show the game help.<br>• !p [player] = Show the profile of selected player. Type !p without arguments to show your profile.<br>• !rank = Show the temporary room ranking.<br>• !tc [message] = Chat with other members of your team.<br>• !skip = Send a vote to skip the actual map. This command cannot be used during the match.<br><ROSE>* <N>!rv [player] = Revive a dead player of your team.<br><ROSE>* <N>!tt [player] = Transfer your points to another team member.<br><br>The commands marked with <ROSE>* <N>are of exclusive use of the team capitains. To see more info about this, use the !cap command.",
- admin_commands = "<BL>• <N>!skip = Skip the actual map.<br><BL>• <N>!pw [texto] = Add a password on the room. Type only !pw to remove the password.<br><BL>• <N>!set_map [mapa] = Run the specified map.<br><J>• <N>!kill [nome] = Kill the specified player.<br><R>• <N>!limit [número] = Set a limit of mices on this room.<br><br>You only can use the commands that match with your name color."
- }
- lang.ar = {
- win_vermelho = "<R><b>لقد ربح الفريق الاحمر !</b><br> سيتم بدء الجولة بعد 15 ثنية .",
- win_azul = "<BL><b> لقد ربح الفريق الازرق!</b><br> ستيم بدء الجولة بعد 15 ثنية.",
- sudden_death = "<VP><b>SUDDEN DEATH!</b><br>The team that kill anyone of other team will won the match.",
- empate_text = "<J><b>There was a draw!</b><br>The next match will start in 15 seconds.",
- instructions = "Use the 1 to 9 keys to change the intensity of anvil and SPACEBAR to throw a anvil.",
- turn = "<VP>It's turn of",
- timeout = "<J>Time is over! The shooter will be changed.",
- enter_vermelho = "الدخول الى الفريق الاحمر",
- enter_azul = "الدخول الى الفريق الازرق",
- exit = "الخروج من الفريق",
- double = "used the powerup Double Anvil!",
- triple = "used the powerup Triple Anvil!",
- bomba1 = "used the powerup Time Bomb!",
- bomba2 = "<ar>في هذا powerup ، سوف يحدث انفجار في مكان عشوائي لمنطقة العدو.",
- objeto1 = "استخدم powerup عشوائية تبادل لاطلاق النار!",
- objeto2 = "<ar>على هذا powerup ، سوف تقوم بتصوير كائن شامان عشوائي بدلا من السندان. إذا كنت قد استخدمت Powerup مزدوج السندان ، يمكنك تبادل اثنين من الأشياء بدلا من واحدة.",
- exp1 = "used the powerup Explosion!",
- exp2 = "<ar>على هذا powerup ،عندك 5 ثوان لتسبب انفجارك.",
- chuva1 = "استخدم powerup Anvil المطر!",
- chuva2 = "<ar> في هذا powerup ، سوف تقوم بتصوير عدة سندان",
- fly1 = "استخدم powere وضع النقل الفضائي!",
- fly2 = "<br>في هذا powerup ، يمكنك نقل الفئران الخاصة بك باستخدام النقر بالماوس.",
- inv1 = "تستخدم powerup وضع الخالد!",
- inv2 = "<br> على هذا powerup ، تكون خالدة خلال ال 4 المقبلة. يمكن استخدام هذه الطاقة فقط مرة واحدة لكل لعبة.",
- inv3 = " خلودك انتهى.",
- invi1 = "استخدم powerup سندان غير مرئية!",
- invi2 = "<br>على هذا powerup ، سوف تقوم باطلاق سندان غير مرئية. هذه القدرة لا يمكن استخدامها مع سندان مضاعف وثلاثي.",
- selec1 = "used the powerup Selective Object!",
- selec2 = "<br>On this powerup, you can select a shaman object to shoot instead of a anvil. This ability can't be used with double and triple anvils.",
- bar = "#anvilwar - Compilation RTM 2",
- intensity = "Intensity",
- your_turn = "<J>حان دورك لاطلاق النار. اضغط على مفتاح المسافة لرمي سندان واستخدام مفاتيح 1 إلى 9 لتغيير شدة السندان. استخدم مفاتيح F1 إلى F10 لاستخدام بووروبس.",
- help = "اضغط على مفتاح المسافة لرمي سندان واستخدام مفاتيح 1 إلى 9 لتغيير شدة السندان. استخدم مفاتيح F1 إلى F10 لاستخدام بووروبس (اكتب! بووروبس). الفريق الذي يزيل فريق العدو يربح اللعبة.<br><br> اضعط !cmd لأظهار اوامر العبة.<br><br><b>العبة صنعت من طرف:</b><br>Development: Jessiewind26#2546 and Jarvanfender#0000<br>Powerups: Jhinsword350#0000 and Vidaloka9999#0000<br>Translations: Nasus_assassin#1534 (EN) and Alexsaky#7307 (AR)",
- enter = "<J>Welcome to #anvilwar room! Type !help for more information.",
- teamkill1 = "أوه لا! ",
- teamKill2 = "قتل لاعب من فريقها",
- ajuda = "المساعدة",
- credits = "Credits ",
- mostrar = "اظهار",
- seconds = "<ROSE>60 ثواني متبقية",
- seconds30 = "<ROSE>30 ثواني متبقية!",
- seconds10 = "<ROSE>10 ثواني متبقية!",
- powerups1 = "F1 = Double Anvil<br>F2 = Triple Anvil<br>F3 = Time Bomb<br>F4 = Random Shoot<br>F5 = Explosion<br>F6 = Anvil Rain<br>F7 = Teleport Mode<br>F8 = Immortal Mode<br>F9 = Invisible Anvil<BR>F10 = Selective Object",
- powerups2 = "6pt<br>12pt<br>7pt<br>6pt<br>25pt<br>20pt<br>4pt<br>20pt<br>14pt<br>5pt",
- powerups3 = "<a href='event:power1'>Show</a><br><a href='event:power2'>Show</a><br><a href='event:power3'>Show</a><br><a href='event:power4'>Show</a><br><a href='event:power5'>Show</a><br><a href='event:power6'>Show</a><br><a href='event:power7'>Show</a><br><a href='event:power8'>Show</a><br><a href='event:power9'>Show</a><br><a href='event:power10'>Show</a>",
- powerups4 = "1<br>2<br>2<br>2<br>5<br>6<br>2<br>5<br>4<br>3",
- teamchat = "<J>You can use the command !tc [message] to speak with your team.<br><br>You can see your profile typing !p and the temporary tanking typing !rank.",
- menu_bar = "<p align='center'><a href='event:help'>المساعدة</a> | <a href='event:powerups'>زادت الطاقة</a> | <a href='event:profile'>الملف الشخصي</a> | <a href='event:ranking'>تصنيف</a> | <a href='event:cap'>كابيتان</a> | <a href='event:cmd'>الاوامر</a>",
- powerupslist = " قائمة زادت الطاقة",
- profile = "Use the !p command to view your profile and use !p [username] to view the profile of another user.",
- starting = "<VP>The match will start on a few seconds. Get ready!",
- suicide = "The following player committed suicide: ",
- ban = " was banned of room by ",
- unban = " was unbanned of room.",
- caps = " was choosed to be the team capitain. To see more info about this, type !cap command or use the Capitain section on menu of the module.",
- cap = "على هذا التجميع أدرجت وظيفة لاعب capitain. هذا النوع من المشغل (الذي يتم اختياره عشوائيًا) سيحصل على 50٪ من النقاط الإضافية وسيحصل على القدرة على نقل النقاط الخاصة بك إلى لاعبين آخرين على قيد الحياة باستخدام الأمر! tt [name]. يمكنك استخدام الأمر! rv [name] لإحياء لاعب فريق واحد.",
- cap_text = "<br><VP>You are the team capitain.<br><br>You will receive 50% more points than other team players and can transfer your points to other team players using the !tt [name] command. You can use the !rv [name] command to revive ONE team player dead.",
- score30 = "<R>You need 30 points to use this.",
- advanced = "<VP>You reached the level ",
- tag_text = "<J>Don't forget to insert the #tag on the target nickname, else this command don't will work!",
- revivetext = "<J>The following player has been revived: ",
- yturn = "Actual player: ",
- level_error = "<R>You don't have level to use this. To view your level use the !p command.",
- funct = "Function not allowed",
- cmds = " اوامر العبة",
- commands = "• !help = Show the game help.<br>• !p [player] = Show the profile of selected player. Type !p without arguments to show your profile.<br>• !rank = Show the temporary room ranking.<br>• !tc [message] = Chat with other members of your team.<br><ROSE>* <N>!rv [player] = Revive a dead player of your team.<br><ROSE>* <N>!tt [player] = Transfer your points to another team member.<br><br>The commands marked with <ROSE>* <N>are of exclusive use of the team capitains. To see more info about this, use the !cap command."
- }
- if tfm.get.room.community == "br" then
- text = lang.br
- elseif tfm.get.room.community == "ar" then
- text = lang.ar
- else
- text = lang.en
- end
- function changeMap()
- tfm.exec.newGame(mapas[math.random(#mapas)])
- end
- function resetPowers()
- ui.removeTextArea(701,nil)
- powerups.double=false
- powerups.objeto=false
- powerups.count=2
- kills=0
- powerups.bomba=false
- powerups.explosion=false
- powerups.chuva=false
- powerups.fly=false
- anvil_launched=false
- powerups.triple=false
- powerups.invisible=false
- powerups.selective=false
- powerups.r_vermelho=false
- powerups.r_azul=false
- set=false
- advanceLevel()
- skips=0
- end
- changeMap()
- function split(t,s)
- local a={}
- for i,v in string.gmatch(t,string.format("[^%s]+",s or "%s")) do
- table.insert(a,i)
- end
- return a
- end
- function eventRanking(name)
- local sc = {}
- for id, name in pairs(players_table) do
- sc[#sc+1] = {n=name,s=data[name].score,f=data[name].kills,d=data[name].kd,l=data[name].nivel}
- end
- table.sort(sc,function(a,b) return a.s>b.s end)
- str1 = ''
- str2 = ''
- str3 = ''
- str4 = ''
- str5 = ''
- for k,v in pairs(sc) do
- if k < 11 then
- if str ~= '' then
- str1=str1.."<br><N>"..k.."° | <VP>"..v.n..""
- str2=str2.."<br><b><N>"..v.s.."</b>"
- str3=str3.."<br><N>"..v.f..""
- str4=str4.."<br><N>"..v.d..""
- str5=str5.."<br><N>"..v.l..""
- else
- str1="<J>"..k.."° | <VP>"..v.n..""
- str2="<J><b>"..v.s.."</b>"
- str3="<J>"..v.f..""
- str4="<J>"..v.d..""
- str5="<J>"..v.l..""
- end
- end
- end
- ui.addTextArea(8000,'<B><J><font size="13"><p align="center">Temporary Ranking',name,100,100,600,30,nil,0x2e424d,nil,true)
- ui.addTextArea(8001,"<B><font size='13'><font face='Consolas'># Name Score Kills Ratio% Level",name,110,110,580,20,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(8002,"<B><font size='16'><font face='Consolas'>"..str1,name,110,130,580,220,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(8003,"<p align='right'><font size='16'><font face='Consolas'>"..str2,name,400,130,60,220,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(8004,"<p align='right'><font size='16'><font face='Consolas'>"..str3,name,485,130,60,220,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(8005,"<p align='right'><font size='16'><font face='Consolas'>"..str4,name,575,130,45,220,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(8007,"<p align='right'><font size='16'><font face='Consolas'>"..str5,name,635,130,45,220,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(8006,"<p align='center'><font size='16'><R><a href='event:close'>Close</a>",name,300,350,210,20,0x3c5063,0x3c5063,nil,true)
- end
- function loadPowerups(name)
- ui.addTextArea(9000,"<B><J><font size='13'><p align='center'>"..text.powerupslist.."",name,100,80,600,30,nil,0x2e424d,nil,true)
- ui.addTextArea(9001,"<font size='14'><font face='Consolas'>Powerup Name Score Funct. Min Level",name,110,110,580,20,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(9002,"<font size='14'><font face='Consolas'>"..text.powerups1.."",name,110,135,580,175,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(9003,"<font size='14'><font face='Consolas'>"..text.powerups2.."",name,420,135,60,175,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(9004,"<font size='14'><font face='Consolas'>"..text.powerups3.."",name,500,135,60,175,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(9005,"<font size='14'><font face='Consolas'>"..text.powerups4.."",name,570,135,60,175,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(9006,"<font size='14'><R><a href='event:closep'>Close</a>",name,300,320,190,20,0x3c5063,0x3c5063,nil,true)
- end
- function eventChatCommand(name,message)
- local arg = split(message, " ")
- if arg[1] == "p" then
- if arg[2] then
- nome = arg[2]:lower():gsub('%a', string.upper, 1)
- else
- nome = name
- end
- if tfm.get.room.playerList[nome] then
- ui.addTextArea(8003,'<B><J><font size="17"><p align="center">'..nome,name,245,95,315,30,nil,0x2e424d,nil,true)
- ui.addTextArea(8004,"<font size='12'><b>Level: "..data[nome].nivel.."</b><br><br>Experience: "..data[nome].exp.."/"..data[nome].maxp.."<br><br><br>Score: "..data[nome].score.."<br>Matchs played: "..data[nome].matchs.."<br><br>Kills: "..data[nome].kills.."<br>Wins: "..data[nome].wins.."<br>Max Killing Spree: "..data[nome].max.."<br>Multi Kills: "..data[nome].mks.."<br>Kills/Match: "..data[nome].kd.."%",name,255,125,290,200,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(8006,"",name,260,178,((data[nome].exp/data[nome].maxp)*270)+3,6,0xffffff,0x000001,nil,true)
- ui.addTextArea(8005,"<R><p align='center'><B><a href='event:fechar'>Close</a>",name,255,320,290,20,0x3c5063,0x3c5063,nil,true)
- else
- tfm.exec.chatMessage("<R>"..nome.." isn't found in this room.</R>",name)
- end
- end
- if message == "rank" then
- eventRanking(name)
- end
- if message == "r2" then
- if data[name].level >= 5 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" then
- avs_list={}
- tfm.exec.chatMessage("The map avaliators list has been deleted.")
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].level == 2 then
- data[name].level=0
- end
- end
- end
- end
- if message == "r3" then
- if data[name].level >= 5 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" then
- mods_list={}
- tfm.exec.chatMessage("The moderators list has been deleted.")
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].level == 3 then
- data[name].level=0
- end
- end
- end
- end
- if message == "r4" then
- if data[name].level >= 5 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" then
- managers_list={}
- tfm.exec.chatMessage("The managers list has been deleted.")
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].level == 4 then
- data[name].level=0
- end
- end
- end
- end
- if(message:sub(0,4) == "kill") then
- if data[name].level >= 3 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" or name == admin then
- tfm.exec.killPlayer(message:sub(6))
- end
- end
- if(message:sub(0,7) == "ranking") then
- if data[name].level >= 5 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" then
- temp_name=message:sub(9)
- ui.addPopup(1207,2,"Ranking:",name,350,225,200,true)
- tfm.exec.chatMessage(text.tag_text,name)
- end
- end
- if(message:sub(0,7) == "set_map") then
- if data[name].level >= 2 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" or name == admin then
- tfm.exec.newGame(message:sub(9))
- end
- end
- if(message:sub(0,5) == "limit") then
- if data[name].level >= 4 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" or name == admin then
- local limite=tonumber(message:sub(7))
- tfm.exec.chatMessage("Room mice limit: "..limite.."")
- tfm.exec.setRoomMaxPlayers(limite)
- end
- end
- if(message:sub(0,3) == "ban") then
- if data[name].level >= 3 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" then
- if data[message:sub(5)] then
- tfm.exec.killPlayer(message:sub(5))
- data[message:sub(5)].level=-1
- tfm.exec.chatMessage(""..message:sub(5)..""..text.ban..""..name..".")
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- end
- end
- if(message:sub(0,5) == "unban") then
- if data[name].level >= 3 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" then
- if data[message:sub(7)] then
- data[message:sub(7)].level=0
- tfm.exec.chatMessage(""..message:sub(7)..""..text.unban.."")
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- end
- end
- if(message:sub(0,2) == "tc") then
- local typer=name
- if data[typer].team == "azul" then
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].team == "azul" then
- tfm.exec.chatMessage("<font color='#0080ff'>• ["..typer.."] "..message:sub(4).."",name)
- end
- end
- elseif data[typer].team == "vermelho" then
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].team == "vermelho" then
- tfm.exec.chatMessage("<font color='#ff8000'>• ["..typer.."] "..message:sub(4).."",name)
- end
- end
- end
- end
- if message == "reset" then
- if data[name].level >= 2 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" or name == admin then
- changeMap()
- end
- end
- if message == "skip" then
- if ratos >= 10 then
- local rato=ratos/2
- if data[name].skip == 0 and valendo == false then
- skips=skips+1
- tfm.exec.chatMessage("Your skip vote has been added. ("..skips.."/"..rato..") ["..name.."]",name)
- tfm.exec.chatMessage("Your skip vote has been added. ("..skips.."/"..rato..") ["..name.."]","Jessiewind26#2546")
- data[name].skip=1
- if skips >= rato then
- changeMap()
- end
- end
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- end
- if(message:sub(0,2) == "pw") then
- if data[name].level >= 2 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" or name == admin then
- if message:sub(4) == "" then
- tfm.exec.setRoomPassword("")
- tfm.exec.chatMessage("Password cleared.",name)
- else
- tfm.exec.setRoomPassword(message:sub(4))
- tfm.exec.chatMessage("Password: "..message:sub(4).."",name)
- end
- end
- end
- if(message:sub(0,3) == "set") then
- if data[name].level >= 4 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" then
- if data[message:sub(5)] then
- set_name=message:sub(5)
- set=true
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- end
- end
- if(message:sub(0,2) == "tt") then
- if name == caps.azul or name == caps.vermelho and valendo == true and reset == false then
- temp_name2=message:sub(4)
- if data[temp_name2] then
- ui.addPopup(1201,2,"1 = 5pts<br>2 = 10pts<br>3 = 15pts<br>4 = 20pts",name,350,225,200,true)
- tfm.exec.chatMessage(text.tag_text,name)
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- end
- end
- if(message:sub(0,2) == "rv") then
- if name == caps.azul or name == caps.vermelho and valendo == true and reset == false then
- temp_name3=message:sub(4)
- if data[temp_name3] then
- ui.addPopup(1204,1,"Revive "..temp_name3.."?",name,350,225,200,true)
- tfm.exec.chatMessage(text.tag_text,name)
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- end
- end
- if(message:sub(0,5) == "score") then
- if data[name].level >= 3 or name == "Jessiewind26#2546" or name == "Jarvanfender#0000" then
- temp_name=message:sub(7)
- ui.addPopup(906,2,"Score",name,350,175,200,true)
- end
- end
- if message == "help" then
- ui.addTextArea(9000,"<B><J><font size='13'><p align='center'>"..text.ajuda.."",name,100,90,600,30,nil,0x2e424d,nil,true)
- ui.addTextArea(9005,"<font size='13'><font face='Consolas'>"..text.help.."",name,150,125,500,170,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(9006,"<font size='13'><R><a href='event:closep'>Close</a>",name,300,304,190,20,0x3c5063,0x3c5063,nil,true)
- end
- if message == "cmd" then
- ui.addTextArea(9000,"<B><J><font size='13'><p align='center'>"..text.cmds.."",name,100,90,600,30,nil,0x2e424d,nil,true)
- ui.addTextArea(9005,"<font size='13'><font face='Consolas'>"..text.commands.."",name,150,125,500,200,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(9006,"<font size='13'><R><a href='event:closep'>Close</a>",name,300,334,190,20,0x3c5063,0x3c5063,nil,true)
- end
- if message == "acmd" then
- ui.addTextArea(9000,"<B><J><font size='13'><p align='center'>"..text.cmds.."",name,100,90,600,30,nil,0x2e424d,nil,true)
- ui.addTextArea(9005,"<font size='13'><font face='Consolas'>"..text.admin_commands.."",name,150,125,500,190,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(9006,"<font size='13'><R><a href='event:closep'>Close</a>",name,300,324,190,20,0x3c5063,0x3c5063,nil,true)
- end
- if message == "cap" then
- ui.addTextArea(9000,"<B><J><font size='13'><p align='center'>"..text.cmds.."",name,100,110,600,30,nil,0x2e424d,nil,true)
- ui.addTextArea(9005,"<font size='13'><font face='Consolas'>"..text.cap.."",name,150,145,500,100,0x0e232b,0x0e232b,nil,true)
- ui.addTextArea(9006,"<font size='13'><R><a href='event:closep'>Close</a>",name,300,254,160,20,0x3c5063,0x3c5063,nil,true)
- end
- if message == "powerups" then
- loadPowerups(name)
- end
- end
- function eventPopupAnswer(id,name,message)
- if id == 901 then
- data[temp_name].score=tonumber(message)
- return name
- elseif id == 902 then
- data[temp_name].kills=tonumber(message)
- return name
- elseif id == 903 then
- data[temp_name].wins=tonumber(message)
- return name
- elseif id == 904 then
- data[temp_name].matchs=tonumber(message)
- return name
- elseif id == 905 then
- data[temp_name].kd=tonumber(message)
- return name
- elseif id == 906 then
- tfm.exec.setPlayerScore(temp_name,tonumber(message),true)
- return name
- elseif id == 1201 then
- if data[temp_name2] then
- if message == "1" then
- if tfm.get.room.playerList[name].score < 5 then
- tfm.exec.chatMessage(text.funct,name)
- else
- tfm.exec.setPlayerScore(temp_name2,5,true)
- tfm.exec.setPlayerScore(name,-5,true)
- return name
- end
- elseif message == "2" then
- if tfm.get.room.playerList[name].score < 10 then
- tfm.exec.chatMessage(text.funct,name)
- else
- tfm.exec.setPlayerScore(temp_name2,10,true)
- tfm.exec.setPlayerScore(name,-10,true)
- return name
- end
- elseif message == "3" then
- if tfm.get.room.playerList[name].score < 15 then
- tfm.exec.chatMessage(text.funct,name)
- else
- tfm.exec.setPlayerScore(temp_name2,15,true)
- tfm.exec.setPlayerScore(name,-15,true)
- return name
- end
- elseif message == "4" then
- if tfm.get.room.playerList[name].score < 20 then
- tfm.exec.chatMessage(text.funct,name)
- else
- tfm.exec.setPlayerScore(temp_name2,20,true)
- tfm.exec.setPlayerScore(name,-20,true)
- return name
- end
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- elseif id == 1204 then
- if message == "yes" then
- if data[temp_name3] then
- if tfm.get.room.playerList[name].score >= 30 then
- tfm.exec.respawnPlayer(temp_name3)
- if data[temp_name3].team == "azul" and powerups.r_azul == false then
- powerups.r_azul=true
- tfm.exec.movePlayer(temp_name3,math.random(850,1200),160,false,0,0,false)
- data[temp_name3].killed=0
- elseif data[temp_name3].team == "vermelho" and powerups.r_vermelho == false then
- powerups.r_vermelho=true
- tfm.exec.movePlayer(temp_name3,math.random(400,750),160,false,0,0,false)
- data[temp_name3].killed=0
- end
- tfm.exec.setPlayerScore(name,-30,true)
- tfm.exec.chatMessage(""..text.revivetext..""..temp_name3.."")
- else
- tfm.exec.chatMessage(text.score30,name)
- end
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- end
- elseif id == 1207 then
- if data[temp_name] then
- if tonumber(message) == 2 then
- table.insert(avs_list,temp_name)
- giveCargos(temp_name,2)
- tfm.exec.chatMessage("<J>"..temp_name.." has been turned Map User.")
- elseif tonumber(message) == 3 then
- table.insert(mods_list,temp_name)
- giveCargos(temp_name,3)
- tfm.exec.chatMessage("<J>"..temp_name.." has been turned Moderator.")
- elseif tonumber(message) == 4 then
- table.insert(managers_list,temp_name)
- giveCargos(temp_name,4)
- tfm.exec.chatMessage("<J>"..temp_name.." has been turned Manager.")
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- else
- tfm.exec.chatMessage(text.funct,name)
- end
- end
- end
- function showTeams(name)
- if valendo == false then
- if name:sub(1,1) == "*" then
- tfm.exec.killPlayer(name)
- tfm.exec.chatMessage("<R>You must be connected to a Transformice account to play #anvilwar.",name)
- elseif data[name].level <= -1 then
- tfm.exec.killPlayer(name)
- tfm.exec.chatMessage("<R>This account was banned of #anvilwar room.",name)
- else
- ui.addTextArea(41, "<p align='center'><a href='event:enter_vermelho'>"..text.enter_vermelho.."</a></p>",name, 300, 165, 200, 20, 0x800000, 0x600000,1.0,true)
- ui.addTextArea(42, "<p align='center'><a href='event:enter_azul'>"..text.enter_azul.."</a></p>",name, 300, 195, 200, 20, 0x80, 0x60,1.0,true)
- end
- end
- end
- function eventLoop(passado,faltando)
- if passado > 1200 and passado < 1700 then
- tfm.exec.chatMessage("Playing map <J>"..tfm.get.room.currentMap.."<BL> created by <J>"..tfm.get.room.xmlMapInfo.author)
- end
- local minutos=math.floor(tempo/60)
- local segundos=math.floor((minutos*60)-tempo) * -1
- if valendo == true and tempo < 60 and tempo > 59 and sudden_death == false then
- tfm.exec.chatMessage(text.seconds,nil)
- end
- if valendo == true and tempo < 30 and tempo > 29 and sudden_death == false then
- tfm.exec.chatMessage(text.seconds30,nil)
- end
- if valendo == true and tempo < 10 and tempo > 9 then
- tfm.exec.chatMessage(text.seconds10,nil)
- end
- if valendo == true and reset == false then
- tempo=tempo-0.5
- if tempo < 0 then
- tempo=0
- end
- scoreloop=scoreloop+1
- if scoreloop >= 40 then
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].killed == 0 then
- tfm.exec.setPlayerScore(name,2,true)
- data[name].score=data[name].score+1
- data[name].exp=data[name].exp+1
- if name == caps.vermelho or name == caps.azul then
- tfm.exec.setPlayerScore(name,2,true)
- data[name].score=data[name].score+1
- end
- end
- end
- scoreloop=0
- end
- end
- if anvil_launched == false and valendo == true then
- ui.addTextArea(501,"<font size='40'><p align='center'>"..math.floor(faltando/1000).."",actual_player,360,310,80,55,0x000001,0x000001,1.0,true)
- else
- ui.removeTextArea(501,actual_player)
- end
- if valendo == true and reset == false and tempo <= 0 and sudden_death == true then
- if count_vermelho > count_azul then
- tfm.exec.chatMessage(text.win_vermelho)
- elseif count_vermelho < count_azul then
- tfm.exec.chatMessage(text.win_azul)
- else
- tfm.exec.chatMessage(text.empate_text)
- end
- count_azul=0
- count_vermelho=0
- valendo=false
- reset=true
- tfm.exec.setGameTime(15)
- end
- if reset == true then
- if faltando < 1 then
- changeMap()
- end
- end
- if valendo == true and reset == false and anvil_launched == false then
- time_limit=time_limit-0.5
- if time_limit == 0 then
- anvil_launched=true
- time_limit=15
- tfm.exec.chatMessage(text.timeout)
- end
- end
- if valendo == false and reset == false and faltando < 1888 and count_azul > 0 and count_vermelho > 0 then
- for i=11,297 do
- ui.removeTextArea(i,nil)
- end
- end
- if valendo == false and reset == false and faltando <= 1 then
- if count_azul > 0 and count_vermelho > 0 then
- if count == 0 then
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.chatMessage(text.starting,name)
- if data[name].team == "azul" then
- data[name].matchs=data[name].matchs+1
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,1000,160,false,0,0,false)
- table.insert(play_azul,name)
- tfm.exec.setPlayerScore(name,0,false)
- elseif data[name].team == "vermelho" then
- data[name].matchs=data[name].matchs+1
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,600,160,false,0,0,false)
- table.insert(play_vermelho,name)
- tfm.exec.setPlayerScore(name,0,false)
- else
- tfm.exec.movePlayer(name,800,-2000,false,0,0,false)
- tfm.exec.setPlayerScore(name,-1,false)
- kills=0
- end
- end
- end
- kills=0
- count=count+0.5
- if count >= 10 then
- caps.azul=play_azul[math.random(#play_azul)]
- caps.vermelho=play_vermelho[math.random(#play_vermelho)]
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].team == "azul" then
- tfm.exec.chatMessage(""..caps.azul..""..text.caps.."",name)
- elseif data[name].team == "vermelho" then
- tfm.exec.chatMessage(""..caps.vermelho..""..text.caps.."",name)
- end
- if name == caps.azul or name == caps.vermelho then
- tfm.exec.chatMessage(text.cap_text,name)
- tfm.exec.setNameColor(name,0x8000ff)
- end
- end
- valendo=true
- players=count_azul+count_vermelho
- tempo=120+(players*6)
- for i=11,297 do
- ui.removeTextArea(i,nil)
- end
- if team == 2 then
- team=1
- if set == false then
- actual_player=play_vermelho[math.random(#play_vermelho)]
- else
- actual_player=set_name
- end
- else
- team=2
- if set == false then
- actual_player=play_azul[math.random(#play_azul)]
- else
- actual_player=set_name
- end
- end
- loop=10
- anvil_launched=false
- tfm.exec.setGameTime(15)
- time_limit=15
- if valendo == true and reset == false then
- tfm.exec.chatMessage(text.your_turn,actual_player)
- end
- end
- else
- tfm.exec.setGameTime(15)
- end
- end
- if valendo == true and anvil_launched == true then
- loop=loop-1
- if loop == 0 then
- if kills >= 3 then
- data[actual_player].mks=data[actual_player].mks+1
- end
- if not tfm.get.room.community == "br" then
- if kills == 2 then
- tfm.exec.chatMessage("<ROSE>Double Kill of "..actual_player.."!")
- elseif kills >= 3 then
- tfm.exec.chatMessage("<ROSE>Multi Kill: "..kills.." kills of "..actual_player.."!")
- end
- else
- if kills == 2 then
- tfm.exec.chatMessage("<ROSE>Double Kill of "..actual_player.."!")
- elseif kills >= 3 then
- tfm.exec.chatMessage("<ROSE>Multi Kill: "..kills.." kills of "..actual_player.."!")
- end
- end
- kills=0
- play_azul={}
- play_vermelho={}
- count_azul=0
- count_vermelho=0
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].team == "azul" then
- if data[name].killed == 0 then
- table.insert(play_azul,name)
- count_azul=count_azul+1
- end
- end
- if data[name].team == "vermelho" then
- if data[name].killed == 0 then
- table.insert(play_vermelho,name)
- count_vermelho=count_vermelho+1
- end
- end
- if data[name].immortal == true then
- data[name].imatchs=data[name].imatchs+1
- if data[name].imatchs >= 9 then
- data[name].immortal=false
- tfm.exec.chatMessage(text.inv3,name)
- tfm.exec.setNameColor(name,0xd7d7e6)
- end
- end
- end
- if team == 2 then
- team=1
- if set == false then
- actual_player=play_vermelho[math.random(#play_vermelho)]
- else
- actual_player=set_name
- end
- else
- team=2
- if set == false then
- actual_player=play_azul[math.random(#play_azul)]
- else
- actual_player=set_name
- end
- end
- loop=8
- resetPowers()
- if valendo == true and reset == false then
- if count_azul == 0 then
- winRed()
- tfm.exec.chatMessage(text.win_vermelho)
- valendo=false
- reset=true
- tfm.exec.setGameTime(15)
- elseif count_vermelho == 0 then
- winAzul()
- tfm.exec.chatMessage(text.win_azul)
- valendo=false
- reset=true
- tfm.exec.setGameTime(15)
- elseif count_azul == 0 and count_vermelho == 0 then
- tfm.exec.chatMessage(text.empate_text)
- valendo=false
- reset=true
- tfm.exec.setGameTime(15)
- end
- end
- tfm.exec.setGameTime(15)
- time_limit=15
- if valendo == true and reset == false then
- tfm.exec.chatMessage(text.your_turn,actual_player)
- end
- end
- end
- if valendo == true and reset == false and tempo <= 0 and sudden_death == false and anvil_launched == false then
- if count_vermelho > count_azul then
- tfm.exec.chatMessage(text.win_vermelho)
- winRed()
- valendo=false
- reset=true
- tfm.exec.setGameTime(15)
- count_azul=0
- count_vermelho=0
- elseif count_vermelho < count_azul then
- tfm.exec.chatMessage(text.win_azul)
- winAzul()
- valendo=false
- reset=true
- tfm.exec.setGameTime(15)
- count_azul=0
- count_vermelho=0
- elseif count_vermelho == count_azul and count_vermelho >= 2 and count_azul >= 2 then
- tempo=60
- tfm.exec.setGameTime(90)
- tfm.exec.chatMessage(text.sudden_death)
- sudden_death=true
- elseif count_vermelho == count_azul and count_vermelho <= 1 and count_azul <= 1 then
- valendo=false
- reset=true
- tfm.exec.setGameTime(15)
- count_azul=0
- count_vermelho=0
- tfm.exec.chatMessage(text.empate_text)
- end
- end
- if powerups.bomba == true then
- powerups.count=powerups.count+1
- if powerups.count == 3 then
- local x_position=0
- if data[actual_player].team == "azul" then
- x_position=math.random(100,750)
- tfm.exec.explosion(x_position,200,30,120,true)
- tfm.exec.displayParticle(12,x_position,200,0,0,0,0,nil)
- elseif data[actual_player].team == "vermelho" then
- x_position=math.random(850,1500)
- tfm.exec.explosion(x_position,200,30,120,true)
- tfm.exec.displayParticle(12,x_position,200,0,0,0,0,nil)
- end
- powerups.count=2
- powerups.bomba=false
- end
- end
- if powerups.chuva == true and anvil_launched == true then
- if data[actual_player].team == "azul" then
- tfm.exec.addShamanObject(anvils[math.random(#anvils)],tfm.get.room.playerList[actual_player].x,tfm.get.room.playerList[actual_player].y-60,0,(4+power*2)*-1,-8)
- elseif data[actual_player].team == "vermelho" then
- tfm.exec.addShamanObject(anvils[math.random(#anvils)],tfm.get.room.playerList[actual_player].x,tfm.get.room.playerList[actual_player].y-60,0,4+power*2,-8)
- end
- end
- if valendo == true and reset == false and faltando > 10000 then
- if data[actual_player].team == "azul" then
- ui.addTextArea(2204,"<p align='center'><font size='14'>"..text.yturn.."<b><font color='#0197f3'>"..actual_player.."",nil,200,82,400,27,0x000001,0x000001,1.0,true)
- else
- ui.addTextArea(2204,"<p align='center'><font size='14'>"..text.yturn.."<b><font color='#f32202'>"..actual_player.."",nil,200,82,400,27,0x000001,0x000001,1.0,true)
- end
- else
- ui.removeTextArea(2204,nil)
- end
- if valendo == true and reset == false then
- ui.addTextArea(2201,"<p align='center'><font color='#000001'><font size='35'><font face='Trebuchet MS'>"..count_vermelho.."",nil,200,24,64,48,0x990000,0xff0000,1.0,true)
- ui.addTextArea(2202,"<p align='center'><font color='#aaaaaa'><font size='35'><font face='Trebuchet MS'>"..count_azul.."",nil,536,24,64,48,0x000099,0x0000ff,1.0,true)
- if sudden_death == false then
- if segundos < 10 and tempo > 29.5 then
- ui.addTextArea(14,"<p align='center'><font size='24'><font face='Segoe UI Symbol'>⏱<font face='Arial'> <b>"..minutos..":0"..segundos.."</b>",nil,350,24,100,34,0x000001,0x000001,1.0,true)
- elseif segundos >= 10 and tempo > 29.5 then
- ui.addTextArea(14,"<p align='center'><font size='24'><font face='Segoe UI Symbol'>⏱<font face='Arial'> <b>"..minutos..":"..segundos.."</b>",nil,350,24,100,34,0x000001,0x000001,1.0,true)
- elseif segundos < 10 and tempo <= 29.5 then
- ui.addTextArea(14,"<p align='center'><font size='24'><font face='Segoe UI Symbol'>⏱<font face='Arial'> <font color='#ff0000'><b>"..minutos..":0"..segundos.."</b>",nil,350,24,100,34,0x000001,0x000001,1.0,true)
- elseif segundos >= 10 and tempo <= 29.5 then
- ui.addTextArea(14,"<p align='center'><font size='24'><font face='Segoe UI Symbol'>⏱<font face='Arial'> <font color='#ff0000'><b>"..minutos..":"..segundos.."</b>",nil,350,24,100,34,0x000001,0x000001,1.0,true)
- end
- else
- if segundos < 10 then
- ui.addTextArea(14,"<p align='center'><font size='24'><font face='Segoe UI Symbol'>⏱<font face='Arial'> <b>"..minutos..":0"..segundos.."</b>",nil,350,24,100,34,0x400000,0x300000,1.0,true)
- elseif segundos >= 10 then
- ui.addTextArea(14,"<p align='center'><font size='24'><font face='Segoe UI Symbol'>⏱<font face='Arial'> <b>"..minutos..":"..segundos.."</b>",nil,350,24,100,34,0x400000,0x300000,1.0,true)
- end
- end
- else
- ui.removeTextArea(14,nil)
- ui.removeTextArea(2201,nil)
- ui.removeTextArea(2202,nil)
- end
- end
- function eventPlayerDied(name)
- if count < 10 then
- if data[name].team == "azul" then
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,900,180,false,0,0,false)
- elseif data[name].team == "vermelho" then
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,700,180,false,0,0,false)
- end
- end
- if data[name].immortal == false then
- if valendo == true and reset == false then
- tfm.exec.setPlayerScore(name,-1,false)
- tfm.exec.setPlayerScore(actual_player,2,true)
- if actual_player == caps.vermelho or name == actual_player then
- tfm.exec.setPlayerScore(actual_player,1,true)
- data[actual_player].score=data[actual_player].score+1
- data[actual_player].exp=data[actual_player].exp+1
- end
- data[actual_player].kills=data[actual_player].kills+1
- data[actual_player].score=data[actual_player].score+5
- loop=loop+1
- data[name].killed=1
- kills=kills+1
- data[actual_player].exp=data[actual_player].exp+3*kills
- if kills > data[actual_player].max then
- data[actual_player].max=kills
- data[actual_player].exp=data[actual_player].exp+6
- end
- if data[name].team == data[actual_player].team and anvil_launched == true then
- tfm.exec.chatMessage("<J>"..text.teamkill1..""..actual_player.." "..text.teamKill2..": <b>"..name.."</b>.")
- tfm.exec.setPlayerScore(actual_player,-4,true)
- kills=kills-1
- data[actual_player].kills=data[actual_player].kills-1
- data[actual_player].score=data[actual_player].score-15
- data[actual_player].exp=data[actual_player].exp-8
- end
- end
- if name == actual_player and valendo == true and reset == false then
- tfm.exec.chatMessage(""..text.suicide..""..actual_player.."")
- end
- else
- tfm.exec.respawnPlayer(name)
- tfm.exec.setNameColor(name,0x00ff00)
- if data[name].team == "azul" then
- tfm.exec.movePlayer(name,1000,160,false,0,0,false)
- elseif data[name].team == "vermelho" then
- tfm.exec.movePlayer(name,600,160,false,0,0,false)
- end
- end
- if sudden_death == true then
- if data[name].team == "azul" and data[name].immortal == false then
- winRed()
- tfm.exec.chatMessage(text.win_vermelho)
- count_azul=0
- elseif data[name].team == "vermelho" and data[name].immortal == false then
- winAzul()
- tfm.exec.chatMessage(text.win_azul)
- count_vermelho=0
- end
- valendo=false
- reset=true
- tfm.exec.setGameTime(15)
- sudden_death=false
- end
- if actual_player == name then
- anvil_launched=true
- actual_palayer=""
- end
- end
- function eventPlayerLeft(name)
- ratos=ratos-1
- data[name].killed=-1
- data[name].team=""
- end
- function eventNewPlayer(name)
- ratos=ratos+1
- tfm.exec.chatMessage(text.enter,name)
- if not data[name] then
- table.insert(players_table,name)
- data[name]={wins=0,matchs=0,kills=0,max=0,score=0,mks=0,kd=0,killed=-1,team="",immortal=false,imatchs=0,immortal2=false,level=0,nivel=1,exp=0,maxp=50}
- end
- showTeams(name)
- for name,player in pairs(tfm.get.room.playerList) do
- ui.addTextArea(299,"<p align='center'><a href='event:show_menu'><font size='18'>Menu",name,365,376,70,24,0x000001,0x000001,0.75,true)
- for i=32,123 do
- tfm.exec.bindKeyboard(name,i,true,true)
- system.bindMouse(name,true)
- end
- end
- if name:sub(1,1) == "*" then
- data[name].level=-1
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- tfm.exec.setPlayerScore(name,0,false)
- end
- function eventKeyboard(name,key,down,x,y)
- if anvil_launched == false then
- if actual_player == name then
- if key == 32 then
- if valendo == true then
- powerups.fly=false
- set=false
- set_name=""
- ui.removeTextArea(4003,nil)
- if powerups.selective == true then
- if data[name].team == "azul" then
- tfm.exec.addShamanObject(object,x,y-60,0,(4+power*2)*-1,-8)
- elseif data[name].team == "vermelho" then
- tfm.exec.addShamanObject(object,x,y-60,0,4+power*2,-8)
- end
- end
- if powerups.objeto == true and powerups.selective == false then
- if data[name].team == "azul" then
- tfm.exec.addShamanObject(objetos[math.random(#objetos)],x,y-60,0,(4+power*2)*-1,-8)
- elseif data[name].team == "vermelho" then
- tfm.exec.addShamanObject(objetos[math.random(#objetos)],x,y-60,0,4+power*2,-8)
- end
- if powerups.double == true and powerups.selective == false then
- if data[name].team == "azul" then
- tfm.exec.addShamanObject(objetos[math.random(#objetos)],x+40,y-60,0,(4+power*2)*-1,-8)
- elseif data[name].team == "vermelho" then
- tfm.exec.addShamanObject(objetos[math.random(#objetos)],x-40,y-60,0,4+power*2,-8)
- end
- end
- if powerups.triple == true and powerups.selective == false then
- if data[name].team == "azul" then
- tfm.exec.addShamanObject(objetos[math.random(#objetos)],x+80,y-60,0,(4+power*2)*-1,-8)
- elseif data[name].team == "vermelho" then
- tfm.exec.addShamanObject(objetos[math.random(#objetos)],x-80,y-60,0,4+power*2,-8)
- end
- end
- anvil_launched=true
- else
- if powerups.invisible == false and powerups.selective == false then
- if data[name].team == "azul" then
- tfm.exec.addShamanObject(anvils[math.random(#anvils)],x,y-60,0,(4+power*2)*-1,-8)
- elseif data[name].team == "vermelho" then
- tfm.exec.addShamanObject(anvils[math.random(#anvils)],x,y-60,0,4+power*2,-8)
- end
- if powerups.double == true then
- if data[name].team == "azul" then
- tfm.exec.addShamanObject(anvils[math.random(#anvils)],x+40,y-60,0,(4+power*2)*-1,-8)
- elseif data[name].team == "vermelho" then
- tfm.exec.addShamanObject(anvils[math.random(#anvils)],x-40,y-60,0,4+power*2,-8)
- end
- end
- if powerups.triple == true then
- if data[name].team == "azul" then
- tfm.exec.addShamanObject(anvils[math.random(#anvils)],x+80,y-60,0,(4+power*2)*-1,-8)
- elseif data[name].team == "vermelho" then
- tfm.exec.addShamanObject(anvils[math.random(#anvils)],x-80,y-60,0,4+power*2,-8)
- end
- end
- else
- if data[name].team == "azul" then
- tfm.exec.addShamanObject(1010,x,y-60,0,(4+power*2)*-1,-8)
- elseif data[name].team == "vermelho" then
- tfm.exec.addShamanObject(1010,x,y-60,0,4+power*2,-8)
- end
- end
- anvil_launched=true
- end
- end
- end
- if key >= 49 and key <= 57 then
- power=key-48
- ui.addTextArea(4003,"<font size='13'><p align='center'>"..text.intensity..": "..power.."",name,320,376,160,24,0x000001,0x000001,1.0,true)
- end
- if key == 48 then
- power=10
- ui.addTextArea(4003,"<font size='13'><p align='center'>"..text.intensity..": "..power.."",name,320,376,160,24,0x000001,0x000001,1.0,true)
- end
- if powerups.selective == false then
- if valendo == true and reset == false then
- if key == 112 then
- if tfm.get.room.playerList[name].score >= 6 and powerups.double == false and powerups.triple == false then
- if data[name].nivel >= 1 then
- powerups.double=true
- tfm.exec.setPlayerScore(name,-6,true)
- tfm.exec.chatMessage("<VP>"..actual_player.." "..text.double.."")
- else
- tfm.exec.chatMessage(text.level_error,name)
- end
- end
- end
- if key == 113 then
- if tfm.get.room.playerList[name].score >= 12 and powerups.double == false and powerups.triple == false then
- if data[name].nivel >= 2 then
- powerups.double=true
- powerups.triple=true
- tfm.exec.setPlayerScore(name,-12,true)
- tfm.exec.chatMessage("<VP>"..actual_player.." "..text.triple.."")
- else
- tfm.exec.chatMessage(text.level_error,name)
- end
- end
- end
- if key == 114 then
- if tfm.get.room.playerList[name].score >= 7 and powerups.bomba == false and powerups.double == false and powerups.objeto == false then
- if data[name].nivel >= 2 then
- powerups.bomba=true
- tfm.exec.setPlayerScore(name,-7,true)
- tfm.exec.chatMessage("<VP>"..actual_player.." "..text.bomba1.."")
- tfm.exec.chatMessage(text.bomba2,name)
- anvil_launched=true
- loop=12
- else
- tfm.exec.chatMessage(text.level_error,name)
- end
- end
- end
- if key == 115 then
- if tfm.get.room.playerList[name].score >= 6 and powerups.objeto == false then
- if data[name].nivel >= 2 then
- powerups.objeto=true
- tfm.exec.setPlayerScore(name,-6,true)
- tfm.exec.chatMessage("<VP>"..actual_player.." "..text.objeto1.."")
- tfm.exec.chatMessage(text.objeto2,name)
- else
- tfm.exec.chatMessage(text.level_error,name)
- end
- end
- end
- if key == 116 then
- if tfm.get.room.playerList[name].score >= 25 and powerups.explosion == false and powerups.bomba == false and powerups.double == false and powerups.objeto == false then
- if data[name].nivel >= 5 then
- powerups.explosion=true
- tfm.exec.setPlayerScore(name,-25,true)
- tfm.exec.chatMessage("<VP>"..actual_player.." "..text.exp1.."")
- tfm.exec.chatMessage(text.exp2,name)
- anvil_launched=true
- loop=12
- else
- tfm.exec.chatMessage(text.level_error,name)
- end
- end
- end
- if key == 117 then
- if tfm.get.room.playerList[name].score >= 20 and powerups.explosion == false and powerups.bomba == false and powerups.double == false and powerups.objeto == false then
- if data[name].nivel >= 6 then
- powerups.chuva=true
- tfm.exec.setPlayerScore(name,-20,true)
- tfm.exec.chatMessage("<VP>"..actual_player.." "..text.chuva1.."")
- tfm.exec.chatMessage(text.chuva2,name)
- else
- tfm.exec.chatMessage(text.level_error,name)
- end
- end
- end
- if key == 118 then
- if tfm.get.room.playerList[name].score >= 4 and powerups.fly == false then
- if data[name].nivel >= 2 then
- powerups.fly=true
- tfm.exec.setPlayerScore(name,-4,true)
- tfm.exec.chatMessage("<VP>"..actual_player.." "..text.fly1.."")
- tfm.exec.chatMessage(text.fly2,name)
- else
- tfm.exec.chatMessage(text.level_error,name)
- end
- end
- end
- if key == 119 then
- if tfm.get.room.playerList[name].score >= 20 and data[name].immortal2 == false then
- if data[name].nivel >= 5 then
- data[name].immortal=true
- data[name].immortal2=true
- tfm.exec.setNameColor(name, 0x00ff00)
- tfm.exec.setPlayerScore(name,-20,true)
- tfm.exec.chatMessage("<VP>"..actual_player.." "..text.inv1.."")
- tfm.exec.chatMessage(text.inv2,name)
- else
- tfm.exec.chatMessage(text.level_error,name)
- end
- end
- end
- if key == 120 then
- if tfm.get.room.playerList[name].score >= 14 and powerups.double == false and powerups.triple == false and powerups.objeto == false and powerups.invisible == false then
- if data[name].nivel >= 4 then
- powerups.invisible=true
- tfm.exec.setPlayerScore(name,-14,true)
- tfm.exec.chatMessage("<VP>"..actual_player.." "..text.invi1.."")
- tfm.exec.chatMessage(text.invi2,name)
- else
- tfm.exec.chatMessage(text.level_error,name)
- end
- end
- end
- if key == 121 then
- if tfm.get.room.playerList[name].score >= 5 and powerups.double == false and powerups.triple == false and powerups.objeto == false and powerups.invisible == false then
- if data[name].nivel >= 3 then
- powerups.selective=true
- ui.addTextArea(701,"<font size='12'>Select your object:<br>F1 = Anvil (0pt)<br>F2 = Small Box (1pt)<br>F3 = Green Apple (2pt)<br>F4 = Triangle (4pt)<br>F5 = Large Box (6pt)<br>F6 = Large Board (12pt)<br>F7 = Follow-up Box (8pt)<br>F8 = Giant Board (25pt)",actual_player,320,72,160,160,0x424242,0x424242,0.88,true)
- tfm.exec.setGameTime(15)
- time_limit=15
- tfm.exec.setPlayerScore(name,-5,true)
- tfm.exec.chatMessage("<VP>"..actual_player.." "..text.selec1.."")
- tfm.exec.chatMessage(text.selec2,name)
- object=10
- else
- tfm.exec.chatMessage(text.level_error,name)
- end
- end
- end
- end
- else
- if key >= 112 and key <= 119 and object == 10 then
- if key == 112 then
- object=10
- elseif key == 113 then
- if tfm.get.room.playerList[name].score > 1 then
- object=1
- tfm.exec.setPlayerScore(name,-1,true)
- ui.removeTextArea(701,nil)
- end
- elseif key == 114 then
- if tfm.get.room.playerList[name].score > 2 then
- object=39
- tfm.exec.setPlayerScore(name,-2,true)
- ui.removeTextArea(701,nil)
- end
- elseif key == 115 then
- if tfm.get.room.playerList[name].score > 4 then
- object=68
- tfm.exec.setPlayerScore(name,-4,true)
- ui.removeTextArea(701,nil)
- end
- elseif key == 116 then
- if tfm.get.room.playerList[name].score > 6 then
- object=2
- tfm.exec.setPlayerScore(name,-6,true)
- ui.removeTextArea(701,nil)
- end
- elseif key == 117 then
- if tfm.get.room.playerList[name].score > 12 then
- object=4
- tfm.exec.setPlayerScore(name,-12,true)
- ui.removeTextArea(701,nil)
- end
- elseif key == 118 then
- if tfm.get.room.playerList[name].score > 8 then
- object=61
- tfm.exec.setPlayerScore(name,-8,true)
- ui.removeTextArea(701,nil)
- end
- elseif key == 119 then
- if tfm.get.room.playerList[name].score > 25 then
- object=67
- tfm.exec.setPlayerScore(name,-25,true)
- ui.removeTextArea(701,nil)
- end
- end
- end
- end
- end
- end
- end
- function eventMouse(name,x,y)
- if powerups.explosion == true and actual_player == name then
- tfm.exec.explosion(x,y,30,120,true)
- tfm.exec.displayParticle(12,x,y,0,0,0,0,nil)
- powerups.explosion=false
- end
- if powerups.fly == true and actual_player == name and anvil_launched == false then
- if data[name].team == "vermelho" then
- if x < 790 and x > 200 then
- tfm.exec.movePlayer(name,x,190,false,0,0,false)
- end
- end
- if data[name].team == "azul" then
- if x > 810 and x < 1400 then
- tfm.exec.movePlayer(name,x,190,false,0,0,false)
- end
- end
- end
- end
- function eventNewGame()
- advanceLevel()
- for i=11,297 do
- ui.removeTextArea(i,nil)
- end
- sudden_death=false
- time_limit=15
- reset=false
- count_azul=0
- count_vermelho=0
- tempo=0
- power=5
- count=0
- kills=0
- play_azul={}
- play_vermelho={}
- valendo=false
- loop=8
- resetPowers()
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].kd=math.floor((data[name].kills/data[name].matchs)*100)
- data[name].killed=-1
- data[name].team=""
- data[name].immortal=false
- data[name].immortal2=false
- data[name].imatchs=0
- data[name].skip=0
- tfm.exec.setNameColor(name,0xd7d7e6)
- giveCargos(name,data[name].level)
- for i=32,123 do
- tfm.exec.bindKeyboard(name,i,true,true)
- end
- showTeams(name)
- for id,name in pairs(avs_list) do
- if data[name] then
- giveCargos(name,2)
- end
- end
- for id,name in pairs(mods_list) do
- if data[name] then
- giveCargos(name,3)
- end
- end
- for id,name in pairs(managers_list) do
- if data[name] then
- giveCargos(name,4)
- end
- end
- for id,name in pairs(admins_list) do
- if data[name] then
- giveCargos(name,5)
- end
- end
- end
- tfm.exec.setGameTime(30)
- tfm.exec.chatMessage(text.enter)
- end
- function eventTextAreaCallback(id,name,callback)
- if callback == "show_menu" then
- ui.addTextArea(299,"<p align='center'><a href='event:hide_menu'><font size='18'>Menu",name,365,376,70,24,0x000001,0x000001,0.75,true)
- ui.addTextArea(298,text.menu_bar,name,200,345,400,20,0x000001,0x000001,0.80,true)
- end
- if callback == "hide_menu" then
- ui.addTextArea(299,"<p align='center'><a href='event:show_menu'><font size='18'>Menu",name,365,376,70,24,0x000001,0x000001,0.75,true)
- ui.removeTextArea(298,name)
- end
- if callback == "ranking" then
- eventChatCommand(name,"rank")
- end
- if callback == "cap" then
- eventChatCommand(name,"cap")
- end
- if callback == "cmd" then
- eventChatCommand(name,"cmd")
- end
- if callback == "powerups" then
- loadPowerups(name)
- end
- if callback == "power1" then
- tfm.exec.chatMessage(text.double2,name)
- end
- if callback == "help" then
- eventChatCommand(name,"help")
- end
- if callback == "power2" then
- tfm.exec.chatMessage(text.triple2,name)
- end
- if callback == "power3" then
- tfm.exec.chatMessage(text.bomba2,name)
- end
- if callback == "power4" then
- tfm.exec.chatMessage(text.objeto2,name)
- end
- if callback == "power5" then
- tfm.exec.chatMessage(text.exp2,name)
- end
- if callback == "power6" then
- tfm.exec.chatMessage(text.chuva2,name)
- end
- if callback == "power7" then
- tfm.exec.chatMessage(text.fly2,name)
- end
- if callback == "power8" then
- tfm.exec.chatMessage(text.inv2,name)
- end
- if callback == "power9" then
- tfm.exec.chatMessage(text.invi2,name)
- end
- if callback == "power10" then
- tfm.exec.chatMessage(text.selec2,name)
- end
- if callback == "profile" then
- tfm.exec.chatMessage(text.profile,name)
- end
- if callback == "fechar" then
- for id=8000,8010 do
- ui.removeTextArea(id,name)
- end
- end
- if callback == "close" then
- for id=8000,8010 do
- ui.removeTextArea(id,name)
- ui.removeTextArea(6969+id,name)
- ui.removeTextArea(7979+id,name)
- end
- end
- if callback == "closep" then
- for id=9000,9010 do
- ui.removeTextArea(id,name)
- end
- end
- if callback == "enter_vermelho" then
- if data[name].killed == -1 and data[name].team == "" then
- data[name].team="vermelho"
- data[name].killed=0
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,700,180,false,0,0,false)
- count_vermelho=count_vermelho+1
- ui.removeTextArea(41,name)
- ui.removeTextArea(42,name)
- ui.addTextArea(51,"<p align='center'><a href='event:sair_vermelho'>"..text.exit.."",name,300,180,200,20,0x505050,0x323232,1.0,true)
- end
- end
- if callback == "enter_azul" then
- if data[name].killed == -1 and data[name].team == "" then
- data[name].team="azul"
- data[name].killed=0
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,900,180,false,0,0,false)
- count_azul=count_azul+1
- ui.removeTextArea(41,name)
- ui.removeTextArea(42,name)
- ui.addTextArea(52,"<p align='center'><a href='event:sair_azul'>"..text.exit.."",name,300,180,200,20,0x505050,0x323232,1.0,true)
- end
- end
- if callback == "sair_azul" then
- data[name].team=""
- data[name].killed=-1
- tfm.exec.killPlayer(name)
- count_azul=count_azul-1
- ui.removeTextArea(52,name)
- ui.addTextArea(41, "<p align='center'><a href='event:enter_vermelho'>"..text.enter_vermelho.."</a></p>", name, 300, 165, 200, 20, 0x800000, 0x600000,1.0,true)
- ui.addTextArea(42, "<p align='center'><a href='event:enter_azul'>"..text.enter_azul.."</a></p>", name, 300, 195, 200, 20, 0x80, 0x60,1.0,true)
- end
- if callback == "sair_vermelho" then
- data[name].team=""
- data[name].killed=-1
- tfm.exec.killPlayer(name)
- count_vermelho=count_vermelho-1
- ui.removeTextArea(51,name)
- ui.addTextArea(41, "<p align='center'><a href='event:enter_vermelho'>"..text.enter_vermelho.."</a></p>", name, 300, 165, 200, 20, 0x800000, 0x600000,1.0,true)
- ui.addTextArea(42, "<p align='center'><a href='event:enter_azul'>"..text.enter_azul.."</a></p>", name, 300, 195, 200, 20, 0x80, 0x60,1.0,true)
- end
- end
- function winRed()
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].team == "vermelho" then
- data[name].exp=data[name].exp+20
- data[name].wins=data[name].wins+1
- data[name].score=data[name].score+15
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,math.random(225,775),170,false,0,0,false)
- tfm.exec.playEmote(name,0)
- end
- end
- advanceLevel()
- end
- function winAzul()
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].team == "azul" then
- data[name].exp=data[name].exp+20
- data[name].wins=data[name].wins+1
- data[name].score=data[name].score+15
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,math.random(825,1375),170,false,0,0,false)
- tfm.exec.playEmote(name,0)
- end
- end
- advanceLevel()
- end
- function advanceLevel()
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].exp >= data[name].maxp then
- data[name].exp=data[name].exp-data[name].maxp
- data[name].maxp=data[name].maxp+50
- data[name].nivel=data[name].nivel+1
- tfm.exec.chatMessage(""..text.advanced..""..data[name].nivel.."!",name)
- end
- end
- end
- function giveCargos(name,type)
- if type == 1 and data[name] then
- data[name].level=1
- tfm.exec.setNameColor(name,0x00E8FF)
- elseif type == 2 and data[name] then
- data[name].level=2
- tfm.exec.setNameColor(name,0x0076FF)
- elseif type == 3 and data[name] then
- data[name].level=3
- tfm.exec.setNameColor(name,0xFFFB00)
- elseif type == 4 and data[name] then
- data[name].level=4
- tfm.exec.setNameColor(name,0xFF7100)
- elseif type == 5 and data[name] then
- data[name].level=5
- tfm.exec.setNameColor(name,0xFF0000)
- end
- end
- end
- initMestre = function()
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAutoScore(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.setRoomMaxPlayers(35)
- mapas={6788085,6788183,6789853,6791944,6792470,6808957,6810292,6821950,6830799,6866406,6866549,6788693,6788728,6859175,6834529,6866437,6812488,6876638,6876563,6885971,6888512,6893463,6900149,6907177,6892608,6982387,5328362,5957905,7055459,7290270,7290275,7404106,7404327,7382263,7394517,7405103,7400694,7400678,7412412,7412422,7431981}
- active=0 -- códigos active: -2 = número de ratos insuficiente, -1 = partida encerrada, 0 = partida não iniciada ou intervalo e 1 ou mais = comandos operando
- vivo=0 -- número de ratos vivos
- rato=0 -- número de ratos na sala
- dificuldade=1 -- dificuldade da partida (alterada automaticamente)
- rodadas=0 -- o limite de rodadas das partidas é calculado automaticamente
- string="" -- variável usada no comando 36
- rodada=0 -- número da rodada atual, não altere
- number=0 -- variável usada no comando 12
- xpos=0 -- variável usada nos comandos 22, 23 e 24
- ypos=0 -- variável usada nos comandos 25 e 26
- data={} -- variável que define os dados dos jogadores
- lang={} -- não alterar, variável que define a linguagem dos textos
- pergunta="" -- variável usada no comando 35
- resposta="" -- variável usada no comando 35
- tempo=10 -- variável usada no comando 35
- unlocked=true -- bloqueia ou desbloqueia a execução do script
- for _,f in next,{"help","rodar","command","limite","q","r","time"} do
- system.disableChatCommandDisplay(f)
- end
- --[[ Aqui vão as mensagens e suas devidas traduções, não se esqueça de por a vírgula após cada comando. ]]--
- lang.br = {
- welcome = "<N>Bem-vindo a sala Mestre Mandou! Nesta sala seu objetivo é fazer tudo o que o script mandar.<ROSE><br>Deseja ver mais ajuda? Digite !help.<br><VP>Script criado por Jessiewind26#2546 - Versão RTM Compilação 15",
- dancar = "Dance!",
- sentar = "Sente!",
- confetar = "Atire 5 confetes!",
- mouse = "Clique na tela 10 vezes!",
- beijos = "Dê 10 beijos!",
- palmas = "Bata palmas 5 vezes!",
- dormir = "Vocês estão com sono. Durmam para descansar.",
- raiva = "Tigrounette é do mal! Fiquem com raiva dele!",
- chorem = "Vocês não ganharam queijo :( Chorem!",
- esquerda = "Não vá para a esquerda!",
- direita = "Não vá para a direita!",
- numero = "Digite o seguinte número: ",
- digitar = "Digite qualquer coisa e mande para mim.",
- falar = "Não falem nada!",
- pular = "Não pulem!",
- mexer = "Não se mexam!",
- bandeira = "Balance a bandeira de qualquer país!",
- ano = "Em que ano estamos?",
- vesquerda = "Fique virado para a esquerda!",
- vdireita = "Fique virado para a direita!",
- quadrado = "Fique no quadrado branco!",
- retangulo = "Fique dentro do retângulo branco!",
- nretangulo = "Não fique dentro do retângulo branco!",
- preesquerda30 = "Pressione 30 vezes a tecla para ESQUERDA!",
- predireita30 = "Pressione 30 vezes a tecla para DIREITA!",
- preesquerda60 = "Pressione 60 vezes a tecla para ESQUERDA!",
- predireita60 = "Pressione 60 vezes a tecla para DIREITA!",
- espaco = "Pressione a barra de espaço 20 vezes!",
- nome = "Digite o seu nome no jogo (com #número).",
- ndance = "Não dance!",
- mestre = "Mestre Mandou",
- map = "Mapa",
- time = "Tempo",
- mice = "Ratos",
- round = "Rodada",
- mices = "Esta sala requer pelo menos 4 ratos.",
- difficulty = "Dificuldade",
- creator = "Module criado por Jessiewind26#2546",
- segundos = "segundos.",
- fim = "Partida encerrada! Próxima partida iniciando em "
- }
- lang.en = {
- welcome = "<N>Welcome to script Master Says! On this module you have to do everything that the master says.<ROSE><br>If you want help, type !help.<br><VP>Module created by Jessiewind26#2546 - Version RTM Compilation 15",
- dancar = "Dance!",
- sentar = "Sit!",
- confetar = "Throw 5 confetti!",
- mouse = "Click on screen 10 times!",
- beijos = "Give 10 kisses!",
- palmas = "Clap 5 times!",
- dormir = "They are sleepy. Sleep to rest.",
- raiva = "Tigrounette is evil! Get angry with him!",
- chorem = "No cheese for you. Cry!",
- esquerda = "Don't go to the LEFT!",
- direita = "Don't go to the RIGHT!",
- numero = "Type this number: ",
- digitar = "Type anything and send to me.",
- falar = "Don't speak nothing!",
- pular = "Don't jump!",
- mexer = "Don't move!",
- bandeira = "Balance the flag of anything country!",
- ano = "What year are we?",
- vesquerda = "Stay facing LEFT!",
- vdireita = "Stay facing RIGHT!",
- quadrado = "Stay on the white square!",
- retangulo = "Stay on the white rectangle!",
- nretangulo = "Don't stay on the white rectangle!",
- preesquerda30 = "Press 30 times the LEFT key!",
- predireita30 = "Press 30 times the RIGHT key!",
- preesquerda60 = "Press 60 times the LEFT key!",
- predireita60 = "Press 60 times the RIGHT key!",
- espaco = "Press 20 times the SPACEBAR!",
- nome = "Type your nickname (with #number)!",
- ndance = "Don't dance!",
- mestre = "Master Says",
- map = "Map",
- time = "Time",
- mice = "Mice",
- round = "Round",
- mices = "This room requires at least 4 players.",
- difficulty = "Difficulty",
- creator = "Module created by Jessiewind26#2546",
- segundos = "seconds.",
- fim = "End of match! The next match will start on "
- }
- --[[ Fim das traduções. ]]--
- if tfm.get.room.community == "br" then
- text = lang.br
- else
- text = lang.en
- end
- function eventNewPlayer(name)
- rato=rato+1
- for k=32, 87 do
- tfm.exec.bindKeyboard(name,k,false,true)
- end
- system.bindMouse(name,true)
- newData={
- ["c"]=0;
- ["s"]=0;
- };
- data[name] = newData;
- tfm.exec.chatMessage(""..text.welcome.."",name)
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function eventPlayerDied(name)
- if active >= 0 then
- vivo=vivo-1
- local i=0
- local name
- for pname,player in pairs(tfm.get.room.playerList) do
- if not player.isDead then
- i=i+1
- name=pname
- end
- end
- if i==0 then
- active=-1
- elseif i==1 then
- active=-1
- tfm.exec.giveCheese(name)
- tfm.exec.playerVictory(name)
- tfm.exec.setGameTime(10)
- end
- end
- end
- function eventNewGame()
- ui.removeTextArea(0,nil)
- rodada=0
- active=0
- vivo=0
- rato=0
- dificuldade=1
- if unlocked == true then
- tfm.exec.setGameTime(24)
- else
- tfm.exec.setGameTime(36000)
- end
- for name,player in pairs(tfm.get.room.playerList) do
- vivo=vivo+1
- rato=rato+1
- data[name].c=0
- end
- rodadas=math.floor(10+(rato/2))
- end
- function eventPlayerLeft()
- rato=rato-1
- end
- function sortearComandos()
- active=math.random(1,34) -- Importante: Altere o segundo número conforme a quantidade de comandos presentes no script.
- getCommand()
- end
- function eventChatCommand(name,message)
- if message == "help" then
- tfm.exec.chatMessage(""..text.welcome.."",name)
- end
- --[[ Comando usado para testar mapas das pessoas. ]]--
- if name == "Jessiewind26#2546" or name == "Varusofeyzan#0000" or name == admin then
- if(message:sub(0,5) == "rodar") then
- tfm.exec.newGame(message:sub(7))
- end
- end
- --[[ Comando usado para rodar algum comando manualmente. ]]--
- if name == "Jessiewind26#2546" or name == "Varusofeyzan#0000" then
- if(message:sub(0,7) == "command") then
- active=tonumber(message:sub(9))
- getCommand()
- end
- end
- --[[ Comando usado para alterar o limite de ratos na sala. ]]--
- if name == "Jessiewind26#2546" or name == "Varusofeyzan#0000" or name == admin then
- if(message:sub(0,6) == "limite") then
- tfm.exec.setRoomMaxPlayers(message:sub(8))
- end
- end
- --[[ Comando usado para definir uma senha na sala. ]]--
- if name == "Jessiewind26#2546" or name == "Varusofeyzan#0000" or name == admin then
- if(message:sub(0,2) == "pw") then
- if message:sub(4) == "" then
- tfm.exec.setRoomPassword("")
- tfm.exec.chatMessage("Password cleared.",name)
- else
- tfm.exec.setRoomPassword(message:sub(4))
- tfm.exec.chatMessage("Password: "..message:sub(4).."",name)
- end
- end
- end
- --[[ Comando usado para alterar a pergunta utilizada no comando 37. ]]--
- if name == "Jessiewind26#2546" or name == "Varusofeyzan#0000" then
- if(message:sub(0,1) == "q") then
- pergunta=message:sub(3)
- end
- end
- --[[ Comando usado para alterar a resposta da pergunta utilizada no comando 37. ]]--
- if name == "Jessiewind26#2546" or name == "Varusofeyzan#0000" then
- if(message:sub(0,1) == "r") then
- resposta=message:sub(3)
- end
- end
- --[[ Comando usado para alterar o tempo da pergunta utilizada no comando 37. ]]--
- if name == "Jessiewind26#2546" or name == "Varusofeyzan#0000" then
- if(message:sub(0,4) == "time") then
- tempo=message:sub(6)
- end
- end
- end
- function getCommand()
- rodada=rodada+1
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=0
- data[name].s=0
- end
- --[[ Aqui vai os números dos comandos, o tempo para executá-los e a variável com o texto a ser exibido. ]]--
- if active == 1 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.dancar.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- end
- if active == 2 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.sentar.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- end
- if active == 3 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.confetar.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(6)
- end
- if active == 4 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.mouse.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(6)
- end
- if active == 5 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.beijos.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(15)
- end
- if active == 6 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.palmas.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(8)
- end
- if active == 7 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.dormir.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- end
- if active == 8 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.raiva.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- end
- if active == 9 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.chorem.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- end
- if active == 10 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.esquerda.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(8)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos
- end
- end
- if active == 11 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.direita.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(8)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- end
- if active == 12 then
- number=math.random(1000000,9999999)
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.numero..""..number.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(10)
- end
- if active == 13 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.digitar.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(7)
- end
- if active == 14 then
- number=math.random(100000000,999999999)
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.numero..""..number.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(11)
- end
- if active == 15 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.falar.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- end
- if active == 16 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.pular.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- end
- if active == 17 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.mexer.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- end
- if active == 18 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.bandeira.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(8)
- end
- if active == 19 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.ano.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- end
- if active == 20 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.vesquerda.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- end
- if active == 21 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.vdireita.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- end
- if active == 22 then
- xpos=math.random(60,650) -- calcula aleatoriamente a posição do quadrado branco
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.quadrado.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- ui.addTextArea(1,"",nil,xpos,320,80,65,0xffffff,0xffffff,0.68,false)
- end
- if active == 23 then
- xpos=math.random(60,650) -- calcula aleatoriamente a posição do retângulo branco
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.retangulo.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- ui.addTextArea(1,"",nil,xpos,0,80,400,0xffffff,0xffffff,0.68,false)
- end
- if active == 24 then
- xpos=math.random(60,650) -- calcula aleatoriamente a posição do retângulo branco
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.nretangulo.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- ui.addTextArea(1,"",nil,xpos,0,80,400,0xffffff,0xffffff,0.68,false)
- end
- if active == 25 then
- ypos=math.random(40,300) -- calcula aleatoriamente a posição do retângulo branco
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.retangulo.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- ui.addTextArea(1,"",nil,0,ypos,1600,60,0xffffff,0xffffff,0.68,false)
- end
- if active == 26 then
- ypos=math.random(40,300) -- calcula aleatoriamente a posição do retângulo branco
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.nretangulo.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- ui.addTextArea(1,"",nil,0,ypos,1600,60,0xffffff,0xffffff,0.68,false)
- end
- if active == 27 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.preesquerda30.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(9)
- end
- if active == 28 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.predireita30.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(9)
- end
- if active == 29 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.preesquerda60.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(15)
- end
- if active == 30 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.predireita60.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(15)
- end
- if active == 31 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.espaco.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(7)
- end
- if active == 32 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.nome.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(12)
- end
- if active == 33 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.ndance.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(6)
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].c=1 -- isto indica que todos permanecerão vivos, a menos que descumpram o comando
- end
- end
- if active == 34 then
- local number1=math.random(1000000,9999999)
- local number2=math.random(1000000,9999999)
- string=tostring(number1..number2)
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.numero..""..string.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(15)
- end
- if active == 35 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..pergunta.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(tempo)
- end
- --[[ Fim da descrição dos comandos. ]]--
- end
- --[[ Operações com ações (dança, sentar...)
- Utilize data[name].c=1 para informar ao código que o comando foi executado.
- Caso haja necessidade de fazer a mesma ação por mais de uma vez, utilize a variável data[name].s conforme mostrado no código. ]]--
- function eventChatMessage(name,message)
- if active == 12 or active == 14 or active == 34 then
- if message == tostring(number) or message == string then
- data[name].c=1
- end
- end
- if active == 13 then
- data[name].c=1
- end
- if active == 15 then
- tfm.exec.killPlayer(name)
- end
- if active == 19 then
- if message == "2018" then
- data[name].c=1
- end
- end
- if active == 32 then
- if string.upper(message) == string.upper(name) then
- data[name].c=1
- end
- end
- if active == 35 then
- if string.upper(message) == string.upper(resposta) then
- data[name].c=1
- end
- end
- end
- function eventEmotePlayed(name,id)
- if active == 1 then
- if id == 0 or id == 10 then
- data[name].c=1
- end
- end
- if active == 2 then
- if id == 8 then
- data[name].c=1
- end
- end
- if active == 3 then
- if id == 9 then
- data[name].s=data[name].s+1
- if data[name].s >= 5 then
- data[name].c=1
- end
- end
- end
- if active == 5 then
- if id == 3 then
- data[name].s=data[name].s+1
- if data[name].s >= 10 then
- data[name].c=1
- end
- end
- end
- if active == 6 then
- if id == 5 then
- data[name].s=data[name].s+1
- if data[name].s >= 5 then
- data[name].c=1
- end
- end
- end
- if active == 7 then
- if id == 6 then
- data[name].c=1
- end
- end
- if active == 8 then
- if id == 4 then
- data[name].c=1
- end
- end
- if active == 9 then
- if id == 2 then
- data[name].c=1
- end
- end
- if active == 17 then
- tfm.exec.killPlayer(name)
- end
- if active == 18 then
- if id == 10 then
- data[name].c=1
- end
- end
- if active == 33 then
- if id == 0 or id == 10 then
- tfm.exec.killPlayer(name)
- end
- end
- end
- function eventMouse(name,x,y)
- if active == 4 then
- data[name].s=data[name].s+1
- if data[name].s >= 10 then
- data[name].c=1
- end
- end
- end
- function eventKeyboard(name,id,down,x,y)
- if active == 10 then
- if id == 37 or id == 65 then
- tfm.exec.killPlayer(name)
- end
- end
- if active == 11 then
- if id == 39 or id == 68 then
- tfm.exec.killPlayer(name)
- end
- end
- if active == 16 then
- if id == 38 or id == 87 then
- tfm.exec.killPlayer(name)
- end
- end
- if active == 17 then
- if id == 38 or id == 87 or id == 37 or id == 65 or id == 39 or id == 68 or id == 40 or id == 83 then
- tfm.exec.killPlayer(name)
- end
- end
- if active == 27 then
- if id == 37 or id == 65 then
- data[name].s=data[name].s+1
- if data[name].s >= 30 then
- data[name].c=1
- end
- end
- end
- if active == 28 then
- if id == 39 or id == 68 then
- data[name].s=data[name].s+1
- if data[name].s >= 30 then
- data[name].c=1
- end
- end
- end
- if active == 29 then
- if id == 37 or id == 65 then
- data[name].s=data[name].s+1
- if data[name].s >= 60 then
- data[name].c=1
- end
- end
- end
- if active == 30 then
- if id == 39 or id == 68 then
- data[name].s=data[name].s+1
- if data[name].s >= 60 then
- data[name].c=1
- end
- end
- end
- if active == 31 then
- if id == 32 then
- data[name].s=data[name].s+1
- if data[name].s >= 15 then
- data[name].c=1
- end
- end
- end
- end
- --[[ Fim das operações com ações. ]]--
- function eventLoop(passado,faltando)
- local tempo=math.floor(faltando/1000)
- if active == -2 then
- ui.setMapName("<N>"..text.mices.."<")
- elseif active == -1 then
- ui.setMapName("<VP>"..text.fim.."<b>"..tempo.."</b> "..text.segundos.."<")
- else
- ui.setMapName("<J>"..tfm.get.room.currentMap.." <G>| <N>"..text.time.." : <V>"..tempo.."s <G>| <N>"..text.mice.." : <VP>"..vivo.." <N>/ <V>"..rato.." <G>| <N>"..text.round.." : <V>"..rodada.."/"..rodadas.." <G>| <N>"..text.difficulty.." : <V>"..dificuldade.."<")
- end
- if active >= 0 then
- if passado > 1200 and passado < 1700 and unlocked == true then
- tfm.exec.chatMessage("Playing map <J>"..tfm.get.room.currentMap.."<BL> created by <J>"..tfm.get.room.xmlMapInfo.author)
- end
- end
- --[[ Código que verifica se há pelo menos 4 ratos na sala. ]]--
- if rato < 4 then
- if tfm.get.room.currentMap == "@7277839" and unlocked == true then
- active=-2
- tfm.exec.setGameTime(8000)
- else
- if passado > 3000 and unlocked == true then
- tfm.exec.newGame("@7277839")
- tfm.exec.setGameTime(8000)
- tfm.exec.chatMessage("<R>"..text.mices.."",nil)
- end
- end
- end
- if rato >= 4 then
- if tfm.get.room.currentMap == "@7277839" and unlocked == true then
- tfm.exec.newGame(mapas[math.random(#mapas)])
- active=0
- end
- end
- if active < 0 and faltando < 1 and unlocked == true then
- tfm.exec.newGame(mapas[math.random(#mapas)])
- end
- if active == 0 and faltando < 1000 then
- if rodada < rodadas then
- sortearComandos()
- else
- active=-1
- tfm.exec.setGameTime(10)
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.giveCheese(true)
- tfm.exec.playerVictory(true)
- end
- end
- end
- if active > 0 and faltando < 1 and rato > 1 then
- --[[ Código necessário para a execução dos comandos 20 e 21. ]]--
- if active == 20 then
- for name,player in pairs(tfm.get.room.playerList) do
- if tfm.get.room.playerList[name].isFacingRight == true then
- tfm.exec.killPlayer(name)
- end
- end
- end
- if active == 21 then
- for name,player in pairs(tfm.get.room.playerList) do
- if tfm.get.room.playerList[name].isFacingRight == false then
- tfm.exec.killPlayer(name)
- end
- end
- end
- --[[ Código necessário para a execução do comando 22. Margens de erro incluídas. ]]--
- if active == 22 then
- for name,player in pairs(tfm.get.room.playerList) do
- if player.y < 300 then
- tfm.exec.killPlayer(name)
- else
- if player.x < xpos-20 or player.x > xpos+100 then
- tfm.exec.killPlayer(name)
- end
- end
- end
- end
- --[[ Código necessário para a execução do comando 23. ]]--
- if active == 23 then
- for name,player in pairs(tfm.get.room.playerList) do
- if player.x < xpos or player.x > xpos+80 then
- tfm.exec.killPlayer(name)
- end
- end
- end
- --[[ Código necessário para a execução do comando 24. ]]--
- if active == 24 then
- for name,player in pairs(tfm.get.room.playerList) do
- if player.x > xpos and player.x < xpos+80 then
- tfm.exec.killPlayer(name)
- end
- end
- end
- --[[ Código necessário para a execução do comando 25. Margens de erro incluídas. ]]--
- if active == 25 then
- for name,player in pairs(tfm.get.room.playerList) do
- if player.y < ypos-10 or player.y > ypos+70 then
- tfm.exec.killPlayer(name)
- end
- end
- end
- --[[ Código necessário para a execução do comando 26. Margens de erro incluídas. ]]--
- if active == 26 then
- for name,player in pairs(tfm.get.room.playerList) do
- if player.y > ypos-10 and player.y < ypos+70 then
- tfm.exec.killPlayer(name)
- end
- end
- end
- ui.removeTextArea(0,nil)
- ui.removeTextArea(1,nil)
- active=0
- if rodada == 8 or rodada == 10 or rodada == 12 or rodada == 14 then
- dificuldade=dificuldade+1
- end
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].c == 0 then
- tfm.exec.killPlayer(name)
- end
- end
- if vivo > 2 then
- tfm.exec.setGameTime(7-dificuldade)
- else
- tfm.exec.setGameTime(10-dificuldade)
- end
- end
- --[[ Isto faz com que aqueles que cumpram o comando tenham o nome pintado de verde. ]]--
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].c == 1 then
- tfm.exec.setNameColor(name,0x00ff00)
- else
- tfm.exec.setNameColor(name,0xc2c2da)
- end
- end
- end
- tfm.exec.newGame("@7277839")
- end
- initWater = function()
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.newGame('<C><P DS="m;10,100,1000,100,2000,100,3000,100" L="7000" G="0,7" H="6500" /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="324650" H="10" Y="-500" T="12" X="1500" /><S L="3000" o="324650" H="10" X="4500" Y="-500" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="3000" L="3000" o="11411" X="0" c="4" Y="3000" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="11411" X="3000" c="4" Y="0" T="12" H="3000" /><S H="3000" L="3000" o="11411" X="0" c="4" Y="0" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="11411" X="3000" c="4" Y="3000" T="12" H="3000" /><S H="3000" L="3000" o="11411" X="6000" c="4" Y="0" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,,,,0,0,0" L="3000" H="3000" v="1" Y="1792" T="9" X="700" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="11411" X="6000" c="4" Y="3000" T="12" H="3000" /><S P="0,0,,,,0,0,0" L="3000" X="3700" v="1" Y="1792" T="9" H="3000" /><S L="3000" X="6700" H="3000" v="1" Y="1792" T="9" P="0,0,,,,0,0,0" /><S L="800" H="800" X="62" Y="609" T="10" P="0,0,0.3,0,20,0,0,0" /><S L="800" H="800" X="-554" Y="773" T="10" P="0,0,0.3,0,20,0,0,0" /><S L="800" X="1099" H="800" Y="806" T="10" P="0,0,0.3,0,20,0,0,0" /><S L="800" H="300" X="1938" Y="475" T="10" P="0,0,0.3,0,20,0,0,0" /><S L="800" X="2298" H="800" Y="804" T="10" P="0,0,0.3,0,20,0,0,0" /><S L="800" H="800" X="3458" Y="616" T="10" P="0,0,0.3,0,-10,0,0,0" /><S L="800" X="3527" H="800" Y="1150" T="10" P="0,0,0.3,0,10,0,0,0" /><S L="1680" H="800" X="3579" Y="2066" T="10" P="0,0,0.3,0,10,0,0,0" /><S L="800" H="800" X="4911" Y="1638" T="10" P="0,0,0.3,0,10,0,0,0" /><S L="800" X="4886" H="800" Y="1082" T="10" P="0,0,0.3,0,-10,0,0,0" /><S L="800" H="800" X="4969" Y="611" T="10" P="0,0,0.3,0,30,0,0,0" /><S L="800" X="5332" H="800" Y="683" T="10" P="0,0,0.3,0,10,0,0,0" /><S L="800" X="4826" H="600" Y="2416" T="10" P="0,0,0.3,0,10,0,0,0" /><S L="880" H="500" X="4746" Y="3033" T="10" P="0,0,0.3,0,5,0,0,0" /><S L="800" X="4038" H="600" Y="2931" T="10" P="0,0,0.3,0,10,0,0,0" /><S L="800" H="600" X="3210" Y="2710" T="10" P="0,0,0.3,0,10,0,0,0" /><S L="800" X="2285" H="800" Y="2778" T="10" P="0,0,0.3,0,-10,0,0,0" /><S L="2000" H="500" X="1967" Y="3260" T="10" P="0,0,0.3,0,14,0,0,0" /><S L="1600" X="436" H="1800" Y="3742" T="10" P="0,0,0.3,0,-1,0,0,0" /><S L="1600" H="800" X="-284" Y="2800" T="10" P="0,0,0.3,0,30,0,0,0" /><S L="1600" X="879" H="800" Y="2004" T="10" P="0,0,0.3,0,-10,0,0,0" /><S L="1600" H="800" X="-752" Y="1848" T="10" P="0,0,0.3,0,-264,0,0,0" /><S L="1000" H="880" X="6232" Y="760" T="10" P="0,0,0.3,0,10,0,0,0" /><S L="800" X="7125" H="800" Y="743" T="10" P="0,0,0.3,0,10,0,0,0" /><S L="800" H="800" X="6326" Y="1727" T="10" P="0,0,0.3,0,-10,0,0,0" /><S L="1200" X="6445" H="1200" Y="2198" T="10" P="0,0,0.3,0,20,0,0,0" /><S H="3000" L="3000" o="11411" X="5780" c="4" Y="6000" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S L="1600" H="3000" X="8074" Y="1757" T="10" P="0,0,0.3,0,10,0,0,0" /><S L="1600" X="3674" H="1000" Y="3794" T="10" P="0,0,0.3,0,4,0,0,0" /><S L="640" H="1000" X="2183" Y="1915" T="10" P="0,0,0.3,0,-5,0,0,0" /><S L="1400" H="1200" X="2003" Y="4083" T="10" P="0,0,0.3,0,12,0,0,0" /><S L="3000" X="5640" H="3000" v="1" Y="4792" T="9" P="0,0,,,,0,0,0" /><S L="1200" X="7385" H="3000" Y="4661" T="10" P="0,0,0.3,0,9,0,0,0" /><S L="3000" H="800" X="3404" Y="4777" T="10" P="0,0,0.3,0,8,0,0,0" /><S L="1600" H="2200" X="5675" Y="3854" T="10" P="0,0,0.3,0,99,0,0,0" /><S P="0,0,,,,0,0,0" L="3000" H="3000" v="1" Y="4792" T="9" X="2640" /><S L="3000" H="1800" X="6646" Y="6114" T="10" P="0,0,0.3,0,-21,0,0,0" /><S L="3000" X="4027" H="1800" Y="6240" T="10" P="0,0,0.3,0,37,0,0,0" /></S><D><P P="0,0" Y="3300" T="84" X="1440" /></D><O /><L><VL n="Layer1" l="-1" /><JD c="04969a,250,0.70,1" P1="-1000,422" P2="8000,422" /><JD c="04969a,250,0.70,1" P1="-1000,672" P2="8000,672" /><JD c="04969a,250,0.70,1" P1="-1000,922" P2="8000,922" /><JD c="04969a,250,0.70,1" P1="-1000,1172" P2="8000,1172" /><JD c="04908f,250,0.71,1" P1="-1000,1422" P2="8000,1422" /><JD c="038481,250,0.72,1" P1="-1000,1672" P2="8000,1672" /><JD c="037875,250,0.73,1" P1="-1000,1922" P2="8000,1922" /><JD c="03726d,250,0.74,1" P1="-1000,2172" P2="8000,2172" /><JD c="036666,250,0.75,1" P1="-1000,2422" P2="8000,2422" /><JD c="036060,250,0.76,1" P1="-1000,2672" P2="8000,2672" /><JD c="02545a,250,0.77,1" P1="-1000,2922" P2="8000,2922" /><JD c="024852,250,0.78,1" P1="-1000,3172" P2="8000,3172" /><JD c="02424d,250,0.79,1" P1="-1000,3422" P2="8000,3422" /><JD c="023645,250,0.80,1" P1="-1000,3672" P2="8000,3672" /><JD c="01303f,250,0.81,1" P1="-1000,3922" P2="8000,3922" /><JD c="012437,250,0.82,1" P1="-1000,4172" P2="8000,4172" /><JD c="011828,250,0.84,1" P1="-1000,4422" P2="8000,4422" /><JD c="001220,250,0.86,1" P1="-1000,4672" P2="8000,4672" /><JD c="000816,250,0.88,1" P1="-1000,4922" P2="8000,4922" /><JD c="000612,250,0.90,1" P1="-1000,5172" P2="8000,5172" /><JD c="000310,250,0.92,1" P1="-1000,5422" P2="8000,5422" /><JD c="000108,250,0.94,1" P1="-1000,5672" P2="8000,5672" /><JD c="000006,250,0.96,1" P1="-1000,5922" P2="8000,5922" /><JD c="000005,250,0.98,1" P1="-1000,6172" P2="8000,6172" /><JD c="000004,250,1.00,1" P1="-1000,6422" P2="8000,6422" /><L /></L></Z></C>')
- ui.setMapName("The Darkness Waters - Simple Ocean LUA Map by Ahrizrdbrand#0000<")
- data={}
- function eventNewPlayer(n)
- newData={
- ["d"]=0;
- ["o"]=100;
- }
- data[n]=newData;
- tfm.exec.respawnPlayer(n)
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function eventLoop()
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].o > 27.5 then
- ui.addTextArea(0,"O₂: "..math.floor(data[name].o).."%",name,20,30,70,30,0,0,1.0,true)
- else
- ui.addTextArea(0,"<R>O₂: "..math.floor(data[name].o).."%",name,20,30,70,30,0,0,1.0,true)
- end
- if tfm.get.room.playerList[name].y < 295 then
- data[name].d=0
- if math.floor(data[name].o) <= 99 then
- data[name].o=data[name].o+1
- end
- else
- data[name].d=(tfm.get.room.playerList[name].y-295)/20
- data[name].o=data[name].o-(data[name].d/500)
- end
- ui.addTextArea(1,"Deepness: "..data[name].d.."m",name,680,30,130,30,0,0,1.0,true)
- if data[name].o < 0 then
- tfm.exec.killPlayer(name)
- data[name].o=-9999999
- end
- end
- end
- end
- initSalto = function()
- tfm.exec.disableAutoNewGame(true)
- data={}
- loop=0
- recorde=1
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.newGame('<C><P F="0" L="27000" H="2900" /><Z><S><S L="10" o="6a7495" X="10995" H="3000" Y="2906" T="5" P="0,0,9999,0,90,0,0,0" /><S L="400" H="184" X="245" Y="680" T="2" P="0,0,0,2,30,0,0,0" /><S L="120" H="2600" X="60" Y="1800" T="6" P="0,0,0.3,0.9,0,0,0,0" /><S L="3000" o="324650" X="1995" H="10" Y="2905" T="5" P="0,0,9999,0.2,0,0,0,0" /><S P="0,0,9999,0.2,0,0,0,0" L="3000" o="324650" H="10" Y="2905" T="5" X="4995" /><S L="3000" o="324650" H="10" X="7995" Y="2906" T="5" P="0,0,9999,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="6a7495" H="3000" Y="7" T="12" X="-3" /><S L="3000" X="1500" H="3000" Y="2100" T="9" P="0,0,,,,0,0,0" /><S L="3000" H="3000" X="4500" Y="2100" T="9" P="0,0,,,,0,0,0" /><S L="3000" X="7500" H="3000" Y="2100" T="9" P="0,0,,,,0,0,0" /><S L="3000" H="3000" X="10500" Y="2100" T="9" P="0,0,,,,0,0,0" /><S L="3000" X="13500" H="3000" Y="2100" T="9" P="0,0,,,,0,0,0" /><S L="3000" H="3000" X="16500" Y="2100" T="9" P="0,0,,,,0,0,0" /><S L="3000" X="19500" H="3000" Y="2100" T="9" P="0,0,,,,0,0,0" /><S L="3000" H="3000" X="22500" Y="2100" T="9" P="0,0,,,,0,0,0" /><S L="3000" X="25500" H="3000" Y="2100" T="9" P="0,0,,,,0,0,0" /><S L="3000" X="13995" H="10" Y="2906" T="5" P="0,0,9999,0.2,0,0,0,0" /><S L="3000" H="10" X="16995" Y="2906" T="5" P="0,0,9999,0.2,0,0,0,0" /><S L="3000" X="19995" H="10" Y="2906" T="5" P="0,0,9999,0.2,0,0,0,0" /><S L="3000" H="10" X="22995" Y="2906" T="5" P="0,0,9999,0.2,0,0,0,0" /><S L="3000" o="324650" H="10" X="1500" Y="-600" T="12" P="0,0,0,0.2,0,0,0,0" /></S><D><F Y="498" X="58" /><F Y="499" X="29" /><F Y="476" X="60" /><F Y="498" X="85" /><F Y="491" X="48" /><F Y="488" X="72" /><DS Y="488" X="61" /></D><O /></Z></C>')
- system.disableChatCommandDisplay("dddda")
- tfm.exec.addPhysicObject(75,13700,2905,dados2)
- tfm.exec.addPhysicObject(76,16100,2905,dados2)
- tfm.exec.addPhysicObject(77,19100,2905,dados2)
- tfm.exec.addPhysicObject(78,22100,2905,dados2)
- function eventChatCommand(n,m)
- if m == "dddda" then
- tfm.exec.chatMessage("Ok",nil)
- recorde=1
- end
- end
- function eventPlayerDied(n)
- tfm.exec.respawnPlayer(n)
- end
- tfm.exec.setUIMapName("Long Jump version v1.8.1 - Script made by Camilledrain#0000 and Rivenbagassa#0000<")
- function eventNewPlayer(n)
- newData={
- ["x"]=0;
- ["x1"]=0;
- ["x2"]=0;
- ["y"]=0;
- ["position"]=0;
- }
- data[n]=newData;
- tfm.exec.respawnPlayer(n)
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function eventPlayerDied(n)
- tfm.exec.respawnPlayer(n)
- data[n].x1=0
- end
- function eventLoop()
- loop=loop+1
- for name,player in pairs(tfm.get.room.playerList) do
- data[name].y=tfm.get.room.playerList[name].y/-1+550
- ui.addTextArea(157979,"<font size='15'><font color='#0000ff'>| Altitude: "..data[name].y.." px",name,200,30,800,50,0,0,1.0,true)
- if tfm.get.room.playerList[name].x < 0 then
- data[name].x=tfm.get.room.playerList[name].x+19660
- ui.addTextArea(157978,"<font size='15'><font color='#0000ff'>| Distance: "..data[name].x.." px",name,1,30,800,50,0,0,1.0,true)
- elseif tfm.get.room.playerList[name].x > 0 and data[name].x2 > 9830 then
- data[name].x=tfm.get.room.playerList[name].x+19660
- ui.addTextArea(157978,"<font size='15'><font color='#0000ff'>| Distance: "..data[name].x.." px",name,1,30,800,50,0,0,1.0,true)
- else
- data[name].x=tfm.get.room.playerList[name].x
- ui.addTextArea(157978,"<font size='15'><font color='#0000ff'>| Distance: "..tfm.get.room.playerList[name].x.." px",name,1,30,800,50,0,0,1.0,true)
- end
- ui.addTextArea(157977,"<font size='15'><font color='#0000ff'>| Speed: "..tfm.get.room.playerList[name].vx.." px",name,385,30,800,50,0,0,1.0,true)
- if data[name].y <= -2334 then
- tfm.exec.setPlayerScore(name,data[name].x,false)
- tfm.exec.chatMessage("<J>Your distance: <b>"..data[name].x.."</b> pixels.",name)
- if data[name].x > recorde then
- recorde=data[name].x
- tfm.exec.chatMessage("<ROSE>New record: <b>"..data[name].x.." pixels</b>, by "..name.."!",nil)
- end
- tfm.exec.movePlayer(name,50,200,false,0,0,false)
- data[name].y=-200
- end
- end
- end
- end
- if string.find(tfm.get.room.name,"mestre") then
- active = "mestre"
- resetAll()
- roomAdmin()
- initMestre()
- elseif string.find(tfm.get.room.name,"ocean") then
- active = "ocean"
- resetAll()
- roomAdmin()
- initWater()
- elseif string.find(tfm.get.room.name,"longjump") then
- active = "longjump"
- resetAll()
- roomAdmin()
- initSalto()
- else
- active = "anvilwar"
- resetAll()
- roomAdmin()
- initAnvilwar()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement