Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Texto em PT-BR / Brazilian-Portuguese Text: Script original do module Mestre Mandou (compilação 9). É PROIBIDA REUTILIZAÇÃO EM CAFOFOS DE TRIBO OU EDIÇÕES NO CÓDIGO NÃO AUTORIZADAS. Versão para cafofo da tribo: https://pastebin.com/raw/dC3f5njJ ]]--
- --[[ Script Mestre Mandou versão RTM Compilação 9 Criado por Jessiewind26#2546.
- Todas as partes do script (ou quase todas) estão explicadas no código.
- Esta versão possui 35 comandos. ]]--
- 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
- 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
- unlocked=true -- bloqueia ou desbloqueia a execução do script
- system.disableChatCommandDisplay("help")
- system.disableChatCommandDisplay("rodar")
- system.disableChatCommandDisplay("command")
- system.disableChatCommandDisplay("msg")
- --[[ 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>Mande seus mapas: https://atelier801.com/topic?f=796133&t=915772&p=1#m1<br><VP>Script criado por Jessiewind26#2546 - Versão RTM Compilação 9",
- 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.",
- abaixar = "Abaixem!",
- 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).",
- abracar = "Abrace alguém!",
- beijar = "Beije alguém!",
- 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>Send your maps: https://atelier801.com/topic?f=796133&t=915772&p=1#m1<br><VP>Module created by Jessiewind26#2546 - Version RTM Compilation 9",
- 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.",
- abaixar = "Turn down!",
- 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)!",
- abracar = "Hug someone!",
- beijar = "Kiss someone!",
- 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,true,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,35) -- 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" 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" then
- if(message:sub(0,7) == "command") then
- active=tonumber(message:sub(9))
- getCommand()
- end
- end
- --[[ Comandos para fins particulares e que podem ser removidos. ]]--
- if name == "Jessiewind26#2546" then
- if(message:sub(0,3) == "msg") then
- if active >= 0 then
- tfm.exec.chatMessage("<VP>• <b>[Jesse Glenn] </b> "..message:sub(5).."",nil)
- end
- 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(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(12)
- 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
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.abaixar.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(5)
- 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(7)
- 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(7)
- 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.abracar.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(12)
- end
- if active == 34 then
- ui.addTextArea(0,"<font face='Segoe UI'><font color='#29CC06'><font size='25'><p align='center'>"..text.beijar.."",nil,25,20,750,40,0x0C2301,0x5DD872,0.96,true)
- tfm.exec.setGameTime(12)
- end
- if active == 35 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
- --[[ 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 then
- if message == tostring(number) 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
- end
- function eventEmotePlayed(name,id)
- if active == 1 then
- if id == 0 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 == 17 or id == 18 then
- data[name].c=1
- end
- end
- if active == 34 then
- if id == 21 or id == 22 then
- data[name].c=1
- end
- end
- if active == 35 then
- if id == 0 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 == 14 then
- if id == 40 or id == 83 then
- data[name].c=1
- 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(""..text.mestre.." <G>| <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 == 10 or rodada == 15 or rodada == 20 or rodada == 25 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement