Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoScore(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAllShamanSkills(true)
- tfm.exec.disablePhysicalConsumables(true)
- tfm.exec.setRoomMaxPlayers(35)
- t=false;
- f=false;
- tempa=20
- ratos=0
- loop=0
- temp2=3
- resposta="0"
- players={}
- data={}
- af=false;
- votos=0
- vivo=0;
- min1=0
- seg1=0
- seg2=0
- lt=0
- rcount=0
- segundos=0
- lock=false;
- pergunta=""
- shaman=""
- lock=false
- minutos=10;
- modo="desativado"
- system.disableChatCommandDisplay("admin77")
- system.disableChatCommandDisplay("change")
- system.disableChatCommandDisplay("kill")
- system.disableChatCommandDisplay("admin78")
- system.disableChatCommandDisplay("admin79")
- system.disableChatCommandDisplay("limite")
- system.disableChatCommandDisplay("msg")
- system.disableChatCommandDisplay("return")
- mapa="@7417328"
- lang = {}
- lang.br = {
- textFalse = "A resposta era FALSO!",
- textTrue = "A resposta era VERDADEIRO!",
- textRandom = "Um shaman aleatório foi escolhido.",
- textSkip = "O shaman passou a vez.",
- textPergunta = "Insira a sua pergunta:<br><br>NÃO USE SÍMBOLOS ESPECIAIS NA PERGUNTA!",
- textTime = "Tempo esgotado!",
- textShaman = "Não é permitido o uso de objetos de shaman.",
- textNothingWins = "Ninguém venceu esta partida. :(",
- textWinner = " venceu a partida!",
- textNothing = "Não tivemos vencedor nessa partida.",
- textTimeOut = "O tempo da partida acabou! Outro shaman será escolhido.",
- textTimeLeave = "Tempo esgotado! Outro shaman será escolhido.",
- textTrueFalse = "Envie SIM se a resposta for verdadeira ou NÃO se a resposta for falsa.",
- textEnter = "<b>Bem-vindo ao module True or False! Criado por Reksai_void2600#6638.</b><br><BL>Para maiores informações sobre o jogo, digite !help.<br><br><VP>Atualização RTM 1.121:<br>- Correção de bugs na troca de shamans<br>- Melhorias no sistema de integração<br>- Correção no comando !help",
- textHelp = "<J>Quando o shaman fizer uma pergunta, você deverá ir no campo TRUE se a resposta for verdadeira ou no campo FALSE se a resposta for falsa. Aqueles que errarem serão eliminados da partida. O processo continua até que sobre um vencedor, que será o novo shaman.<br>Se você for o shaman, digite !per para fazer uma pergunta.<br><br>PERGUNTAS QUE NÃO DEVEM SER FEITAS:<br>- Perguntas envolvendo questões pessoais<br>- Perguntas que envolvam opinião<br>- Perguntas que envolvam racismo, sexo, pornografia e afins<br>- Pegadinhas, mesmo que não sejam intencionais<br>- Perguntas que possam causar tumulto na sala<br>entre outros...<br><br>Caso você veja alguém infringindo as regras, use o comando /ban [usuário] para votar para tirá-lo da sala.<br><br>- Script criado por Reksai_void2600#6638<br>- Recursos adicionais criados por Darakdarkus7#0000",
- textGotShaman = "<J>Você é o shaman. Digite <b>!per</b> para fazer uma pergunta.<br>Você tem 1 minuto para fazer sua pergunta, ou outro shaman entrará em seu lugar.<br><br>Digite <b>!skip</b> para pular sua vez de shaman.",
- textLowTime = "O tempo da partida está acabando.",
- mices = "São necessários pelo menos 6 jogadores para jogar True or False",
- textArea1 = "Tempo da partida:",
- textArea2 = "Ratos vivos:",
- textArea3 = "Limite de tempo:",
- textLongQuestion = "Sua pergunta é muito longa. Tente usar uma pergunta menor.",
- textShortQuestion = "Sua pergunta é muito curta ou não é permitida.",
- textCmd = "<VP>Comandos do jogo:<br><br>!per = faz uma pergunta (quando você é shaman)<br>!skip = pula a sua vez (quando você é shaman)",
- textVote = "Seu voto foi registrado com sucesso.",
- textBetWin = "<VP>Você acertou a aposta! +2 pontos adicionados.",
- textBetLose = "<R>Você perdeu a aposta. :(",
- textLt = "<J>Use o comando /ban [nome] para reportar alguém que esteja infrigindo as regras da sala.",
- textVoting = "<J>Votação disponível! Digite <b>!NomeDoRato</b> para votar em quem você acha que vai ganhar. (não se esqueça de por o #número no final)",
- textCancel = "<R>Esta pergunta foi cancelada por ",
- textNoVote = "A votação ainda não está disponível.",
- textReturn = "O shaman teve 2 cancelamentos de perguntas. O próximo cancelamento implicará na perda da vez de shaman."
- }
- lang.en = {
- textFalse = "The answer was FALSE!",
- textTrue = "The answer was TRUE!",
- textRandom = "A random shaman has been choosed.",
- textSkip = "The shaman skipped your turn.",
- textPergunta = "Type your question here:",
- textTime = "Time is up!",
- textShaman = "Don't are allowed shaman objects.",
- textNothingWins = "Nothing wins the game. :(",
- textWinner = " wons the game!",
- textNothing = "Aren't winners on this game.",
- textTimeOut = "The game time is gone! Other shaman has been choosed.",
- textTimeLeave = "Time is up! Other shaman has been choosed.",
- textTrueFalse = "Send YES if the answer is TRUE or send NO if the answer is FALSE.",
- textEnter = "<b>Welcome to module True or False! Created by Reksai_void2600#6638.</b><br><V>For more information of the game, type !help.<br><br><VP>Update RTM 1.121:<br>- Correction of bugs on shaman change<br>- Updates on integration system<br>- Corrections on !help command",
- textHelp = "<J>When the shaman make the question, You must go to the TRUE side if the answer is true or go to the FALSE side if the answer is false. If you err the answer, you will be eliminated of the game. The process continue until someone win the game, which will be the new shaman.<br>If you are the shaman, type !per to make a question.<br>QUESTIONS DON'T ALLOWED ON GAME:<br>- Questions involving pessoal things<br>- Questions involving opinions<br>- Questions involving racism, pornography, sexual things...<br>- 'Troll' questions, included questions that aren't intencional<br>and many more...<br><br>If you see someone breaking the rules, use the /ban [user] command to vote to get him out of the room.<br><br>Suggestions and problems report to Reksai_void2600#6638.",
- textGotShaman = "<J>You are the shaman. Type <b>!per</b> to make a question.<br>You have 1 minute to make the question, or other shaman will enter in your place.<br><br>Type <b>!skip</b> to skip your shaman turn.",
- textLowTime = "The match time is ending.",
- mices = "Are needed at least 6 players to play True or False.",
- textArea1 = "Match time:",
- textArea2 = "Mices alive:",
- textArea3 = "Time limit:",
- textLongQuestion = "Your question is very long. Try to use a short question.",
- textShortQuestion = "Your question is very short or isn't allowed.",
- textCmd = "<VP>Game commands:<br><br>!per = make a question (only for shaman)<br>!skip = skip your shaman turn (only for shaman)",
- textVote = "Your vote has been registered.",
- textBetWin = "<VP>You win the bet! +2 points added to your score.",
- textBetLose = "<R>You lose the bet :(",
- textVoting = "<J>Voting avaiable! Type <b>!Username</b> to vote on user who you think that will win the match. (remember to put #number)",
- textCancel = "<R>The question has been cancelled by ",
- textNoVote = "The vote system is locked at moment.",
- textTempMod = "",
- textReturn = "The shaman have 2 question skips. The next cancel will cause the loss of turn."
- }
- if tfm.get.room.community == "br" then
- text = lang.br
- else
- text = lang.en
- end
- function obterJogadores()
- players={}
- for name,player in pairs(tfm.get.room.playerList) do
- if not tfm.get.room.playerList[name].isDead then
- table.insert(players,name)
- end
- end
- end
- function eventNewPlayer(name)
- newData={
- ["vote"]=""
- }
- data[name]=newData;
- ratos=ratos+1;
- tfm.exec.chatMessage("<J>"..text.textEnter.."",name)
- obterJogadores()
- end
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.setPlayerScore(name,0,false)
- eventNewPlayer(name)
- end
- function eventPlayerLeft(name)
- ratos=ratos-1;
- obterJogadores()
- end
- function eventChatCommand(name,message)
- if tfm.get.room.currentMap == "@7417328" then
- if message == "f5" then
- if name == "Reksai_void2600#6638" then
- t=true;
- tfm.exec.chatMessage("<R>"..text.textFalse.."",nil)
- modo="desativado" end
- elseif message == "skip" then
- if tfm.get.room.playerList[name].isShaman then
- obterJogadores()
- tfm.exec.chatMessage("<R>"..text.textSkip.."",nil)
- eventChatCommand("Reksai_void2600#6638","admin77") end
- elseif message == "v5" then
- if name == "Reksai_void2600#6638" then
- f=true;
- tfm.exec.chatMessage("<VP>"..text.textTrue.."",nil)
- modo="desativado" end
- elseif message == "lock" then
- if modo == "desativado" then
- if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
- if lock == true then
- tfm.exec.chatMessage("Time lock disabled",nil)
- lock=false;
- else
- lock=true;
- tfm.exec.chatMessage("Time lock enabled",nil)
- end
- end
- end
- elseif message == "change" then
- if modo == "desativado" then
- if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
- if af == true then
- tfm.exec.chatMessage("Modo anti-sopro desativado.",nil)
- af=false;
- else
- af=true;
- tfm.exec.chatMessage("Modo anti-sopro habilitado.",nil)
- end
- end
- end
- elseif message == "per" then
- if tfm.get.room.playerList[name].isShaman then
- if modo == "desativado" then
- ui.removeTextArea(27,nil)
- ui.addPopup(1,2,""..text.textPergunta.."",name,250,125,350,true)
- end
- end
- elseif message == "return" then
- if modo == "pergunta" then
- if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
- tempa=20
- temp2=3
- modo="desativado"
- tfm.exec.setGameTime(63)
- ui.removeTextArea(27,nil)
- pergunta=""
- resposta="0"
- rcount=rcount+1
- if name == "Ashearcher#0000" then
- tfm.exec.chatMessage(""..text.textCancel.."Kazarina",nil)
- else
- tfm.exec.chatMessage(""..text.textCancel..""..name.."",nil)
- end
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.movePlayer(name,400,1,false,1,1,false)
- end
- if rcount == 2 then
- tfm.exec.chatMessage("<VP><br>"..text.textReturn.."",nil)
- end
- if rcount == 3 then
- eventChatCommand("Reksai_void2600#6638","admin77")
- rcount=0
- end
- end end
- elseif(message:sub(0,6) == "limite") then
- if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
- minutos=tonumber(message:sub(8))
- if minutos == 0 then
- tfm.exec.chatMessage("Time limit disabled",nil)
- minutos=999
- elseif minutos > 30 then
- tfm.exec.chatMessage("Time limit: 20 minutes.",nil)
- minutos=30
- else
- tfm.exec.chatMessage("Time limit: "..minutos.." minutes.",nil)
- end
- end
- elseif(message:sub(1,7) == "admin77") then
- if modo == "desativado" then
- if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
- changeMap()
- tfm.exec.setShaman(message:sub(50))
- end end
- elseif(message:sub(1,7) == "admin78") then
- if modo == "desativado" then
- if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
- tfm.exec.setPlayerScore(message:sub(9),8001,false)
- changeMap()
- end end
- elseif(message:sub(1,7) == "admin79") then
- if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
- tfm.exec.setPlayerScore(message:sub(9),0,false)
- end
- elseif(message:sub(1,4) == "mode") then
- if modo == "desativado" then
- if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
- tfm.exec.chatMessage("Command disabled",name)
- end
- end
- elseif(message:sub(0,4) == "kill") then
- if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
- tfm.exec.killPlayer(message:sub(6))
- end
- elseif(message:sub(0,6) == "rlimit") then
- if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
- tfm.exec.setRoomMaxPlayers(message:sub(8))
- tfm.exec.chatMessage("Mice limit: "..message:sub(8).."",nil)
- end
- elseif(message:sub(1,3) == "msg") then
- if name == "Reksai_void2600#6638" then
- tfm.exec.chatMessage("<font color='#7D00EF'><b>• [Kai'Sa]</b> "..message:sub(5).."",nil)
- elseif name == "Ashearcher#0000" then
- tfm.exec.chatMessage("<font color='#D7CF08'><b>• [Kazarina]</b> "..message:sub(5).."",nil) end
- elseif message == "help" then
- tfm.exec.chatMessage("<N>"..text.textHelp.."",name)
- elseif message == "cmd" then
- tfm.exec.chatMessage("<N>"..text.textCmd.."",name)
- else
- if vivo == 2 then
- if not tfm.get.room.playerList[name].isShaman then
- data[name].vote=string.upper(message)
- tfm.exec.chatMessage(""..text.textVote.."",name)
- end
- end
- end end
- end
- function eventNewGame()
- rcount=0;
- ui.removeTextArea(27,nil)
- tfm.exec.setGameTime(63)
- vivo=0;
- modo="desativado"
- tempa=19
- votos=0;
- t=false;
- f=false;
- segundos=0;
- min1=0
- min3=0
- seg1=0
- seg2=0
- for name,player in pairs(tfm.get.room.playerList) do
- if name:sub(1,1) == "*" then
- tfm.exec.killPlayer(name)
- tfm.exec.chatMessage("<R>Souris aren't allowed to play on this module. Create an account or log in to play True or False.",name)
- end
- data[name].vote=""
- vivo=vivo+1
- if tfm.get.room.playerList[name].isShaman then
- tfm.exec.setPlayerScore(name,-2,false)
- vivo=vivo-1
- end
- end
- obterJogadores()
- end
- function eventLoop(pass,tempo)
- if af == true then
- if modo == "pergunta" then
- tfm.exec.chatMessage("["..pass.."]<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>",nil)
- end
- end
- local pass2=tempo/1000
- lt=lt+1
- if lt >= 1200 then
- if tfm.get.room.community == "br" then
- tfm.exec.chatMessage("<R>"..text.textLt.."",nil)
- lt=0
- end
- end
- if tfm.get.room.currentMap == "@7277839" then
- tfm.exec.setGameTime(63)
- end
- if lock == true then
- tfm.exec.setGameTime(tempo/950)
- end
- loop=loop+0.5
- if pass >= 3000 and pass <= 179995 then
- if ratos < 6 then
- if tfm.get.room.currentMap == "@7417328" then
- tfm.exec.newGame("@7277839")
- tfm.exec.chatMessage("<R>"..text.mices.."",nil)
- end
- end
- end
- if ratos >= 6 then
- if tfm.get.room.currentMap == "@7277839" then
- changeMap()
- end
- end
- if min1 == minutos-1 then
- ui.addTextArea(125,"<font size='13'><font color='#ff0000'> <font face='Segoe UI'>"..text.textArea1.." <b>"..min1..":"..seg1..""..seg2.."</b> "..text.textArea2.." <b>"..vivo.."</b> "..text.textArea3.." <b>"..minutos.." min.</b>",nil,5,380,790,22,0,0,1.0,true)
- else
- ui.addTextArea(125,"<font size='13'><font color='#010101'> <font face='Segoe UI'>"..text.textArea1.." <b>"..min1..":"..seg1..""..seg2.."</b> "..text.textArea2.." <b>"..vivo.."</b> "..text.textArea3.." <b>"..minutos.." min.</b>",nil,5,380,790,22,0,0,1.0,true)
- end
- if loop == 1 then
- segundos=segundos+1
- seg2=seg2+1
- loop=0
- if seg2 >= 10 then
- seg2=0
- seg1=seg1+1
- if seg1 >= 6 then
- min1=min1+1
- seg1=0
- seg2=0
- end
- if min1 >= minutos then
- for name,player in pairs(tfm.get.room.playerList) do
- if tfm.get.room.playerList[name].isShaman then
- ui.addPopup(1,0,""..text.textTime.."",name,350,175,200,true)
- ui.addPopup(2,0,""..text.textTime.."",name,350,175,200,true)
- end
- end
- tfm.exec.chatMessage("<R>"..text.textTimeOut.."",nil)
- eventChatCommand("Reksai_void2600#6638","admin77")
- end
- end
- end
- tfm.exec.setUIMapName("True or False - RTM 1.120")
- if modo == "pergunta" then
- tempa=tempa-0.5
- end
- for name,player in pairs(tfm.get.room.playerList) do
- if tfm.get.room.playerList[name].isShaman then
- if tfm.get.room.currentMap == "@7417328" then
- if pass > 450 and pass < 1050 then
- tfm.exec.chatMessage("<VP>"..text.textGotShaman.."",name)
- tfm.exec.setPlayerScore(name,-2,false)
- end
- end
- end
- end
- if tempa < 0.1 then
- modo="resposta"
- tempa=0
- for pn, p in pairs(tfm.get.room.playerList) do
- if p.y <= 220 then
- tfm.exec.killPlayer(pn)
- end
- end
- end
- if f == true then
- for pn, p in pairs(tfm.get.room.playerList) do
- if p.x >= 405 then
- tfm.exec.killPlayer(pn)
- modo="desativado"
- end
- end
- f=false;
- end
- if t == true then
- for pn, p in pairs(tfm.get.room.playerList) do
- if p.x <= 395 then
- tfm.exec.killPlayer(pn)
- modo="desativado"
- end
- end
- t=false;
- end
- if modo == "resposta" then
- tfm.exec.setGameTime(63)
- temp2=temp2-0.5
- if temp2 == 1 then
- modo="desativado"
- if resposta == "yes" then
- eventChatCommand("Reksai_void2600#6638","v5")
- else
- eventChatCommand("Reksai_void2600#6638","f5")
- end
- tempa=19
- temp2=3
- pergunta=""
- ui.removeTextArea(27,nil)
- end
- end
- if modo == "desativado" then
- if tempo < 60000 and tempo > 59400 then
- if pass > 10000 then
- for name,player in pairs(tfm.get.room.playerList) do
- if not tfm.get.room.playerList[name].isDead then
- tfm.exec.setPlayerScore(name,1,true)
- end
- end
- if vivo == 2 then
- tfm.exec.chatMessage("<R>"..text.textVoting.."",nil)
- end
- end
- end
- if tfm.get.room.currentMap == "@7417328" then
- if vivo == 1 then
- if tempo < 59000 then
- better=string.upper(shaman)
- tfm.exec.setPlayerScore(shaman,8000,false)
- for name,player in pairs(tfm.get.room.playerList) do
- if data[name].vote == better then
- tfm.exec.setPlayerScore(name,2,true)
- tfm.exec.chatMessage(""..text.textBetWin.."",name)
- end
- end
- changeMap()
- end
- end
- if vivo <= 0 then
- tfm.exec.setGameTime(5)
- obterJogadores()
- changeMap()
- tfm.exec.chatMessage("<R>"..text.textNothing.."",nil)
- end
- if tempo < 500 then
- tfm.exec.setPlayerScore(players[math.random(#players)],1,true)
- for name,player in pairs(tfm.get.room.playerList) do
- if tfm.get.room.playerList[name].isShaman then
- ui.addPopup(1,0,""..text.textTime.."",name,350,175,200,true)
- ui.addPopup(2,0,""..text.textTime.."",name,350,175,200,true)
- end
- end
- tfm.exec.chatMessage("<R>"..text.textTimeLeave.."",nil)
- changeMap()
- end
- end
- end
- if modo == "troca" then
- obterJogadores()
- if tempo < 100 then
- changeMap()
- end
- end
- if vivo == 0 then
- shaman=""
- end
- end
- function eventPopupAnswer(id,name,answer)
- if id == 1 then
- if tfm.get.room.playerList[name].isShaman then
- if tfm.get.room.currentMap == "@7417328" then
- if string.len(answer) >= 174 then
- tfm.exec.chatMessage(""..text.textLongQuestion.."",name)
- elseif string.len(answer) <= 5 then
- tfm.exec.chatMessage(""..text.textShortQuestion.."",name)
- else
- pergunta=answer
- pcall(ui.addPopup(2,1,""..text.textTrueFalse.."",name,350,175,200,true))
- end
- end
- end
- end
- if id == 2 then
- resposta=tostring(answer)
- modo="pergunta"
- ui.addTextArea(27,"<font size='15'><font face='Segoe UI'><p align='center'><font color='#020202'>"..pergunta.."",nil,32,338,720,50,0,0,1.0,true)
- tfm.exec.chatMessage("<CH>"..pergunta.."",nil)
- tfm.exec.chatMessage("<BL>"..answer.."","Reksai_void2600#6638")
- tfm.exec.chatMessage("<BL>"..answer.."","Ashearcher#0000")
- tfm.exec.setGameTime(20)
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.movePlayer(name,400,102,false,1,1,false)
- if tfm.get.room.playerList[name].isShaman then
- tfm.exec.movePlayer(name,400,885,false,1,1,false)
- end
- end
- end
- end
- function eventPlayerDied(name)
- if not tfm.get.room.playerList[name].isShaman then
- vivo=vivo-1
- end
- local i=0
- local n
- for pname,player in pairs(tfm.get.room.playerList) do
- if not player.isDead and not player.isShaman then
- i=i+1
- n=pname
- end
- end
- if i==0 then
- -- não faça nada
- elseif i==1 then
- shaman=n;
- end
- end
- function changeMap()
- tfm.exec.newGame(mapa)
- end
- changeMap()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement