Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for _,f in next,{"AutoScore","AutoNewGame","AutoTimeLeft","AllShamanSkills","PhysicalConsumables","AfkDeath"} do
- tfm.exec["disable"..f](false)
- end
- tfm.exec.setRoomMaxPlayers(35)
- t=false;
- f=false;
- tempa=20
- ratos=0
- loop=0
- temp2=3
- resposta="0"
- players={}
- votos=0
- vivo=0;
- min1=0
- seg1=0
- seg2=0
- lt=0
- segundos=0
- lock=false;
- pergunta=""
- shaman=""
- lock=false
- minutos=8;
- modo="desativado"
- for _,f in next,{"admin77","admin78","limite"} do
- system.disableChatCommandDisplay(f)
- end
- 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!",
- 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!</b><br><BL>Para maiores informações sobre o jogo, digite !help.<br><br><VP>Atualização RTM 1.123:<br>- Correção de pequenos bugs",
- 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 Forzaldenon#0000<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)",
- textLt = "<J>Use o comando /ban [nome] para reportar alguém que esteja infrigindo as regras da sala.",
- }
- 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!",
- 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!</b><br><V>For more information of the game, type !help.<br><br><VP>Update RTM 1.123:<br>- Correction of small bugs",
- 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 Forzaldenon#0000.",
- 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)",
- textLt = ""
- }
- 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)
- 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 == "Forzaldenon#0000" 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("Forzaldenon#0000","admin77") end
- elseif message == "v5" then
- if name == "Forzaldenon#0000" then
- f=true;
- tfm.exec.chatMessage("<VP>"..text.textTrue.."",nil)
- modo="desativado" 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 == "admin77" then
- if modo == "desativado" then
- if name == "Forzaldenon#0000" 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 == "Forzaldenon#0000" or name == "Ashearcher#0000" then
- tfm.exec.setPlayerScore(message:sub(9),8001,false)
- changeMap()
- end end
- elseif(message:sub(0,4) == "kill") then
- if name == "Forzaldenon#0000" or name == "Ashearcher#0000" then
- tfm.exec.killPlayer(message:sub(6))
- end
- elseif message == "help" then
- tfm.exec.chatMessage("<N>"..text.textHelp.."",name)
- elseif message == "cmd" then
- tfm.exec.chatMessage("<N>"..text.textCmd.."",name)
- end
- end
- end
- function eventNewGame()
- 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
- 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)
- 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("Forzaldenon#0000","admin77")
- end
- end
- end
- tfm.exec.setUIMapName("True or False - RTM 1.123")
- 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("Forzaldenon#0000","v5")
- else
- eventChatCommand("Forzaldenon#0000","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
- end
- end
- if tfm.get.room.currentMap == "@7417328" then
- if vivo == 1 then
- if tempo < 59000 then
- tfm.exec.setPlayerScore(shaman,8000,false)
- 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.."","Forzaldenon#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