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(50)
- t=false;
- f=false;
- tempa=20
- ratos=0
- loop=0
- temp2=7
- resposta="0"
- players={}
- votos=0
- vivo=0;
- min1=0
- seg1=0
- seg2=0
- segundos=0
- lock=false;
- pergunta=""
- shaman=""
- lock=false
- minutos=12;
- modo="desativado"
- system.disableChatCommandDisplay("admin77")
- system.disableChatCommandDisplay("admin78")
- system.disableChatCommandDisplay("kill")
- system.disableChatCommandDisplay("msg")
- system.disableChatCommandDisplay("v5")
- system.disableChatCommandDisplay("f5")
- mapa="@7002987"
- 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:",
- 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 1 se a resposta for verdadeira ou 2 se a resposta for falsa.",
- textEnter = "<b>Bem-vindo ao module True or False! Criado por Haxhhhhhhhhh.</b><br><BL>Para maiores informações sobre o jogo, digite !help.<br><br><VP>Atualização RTM 1.61:<br>- Remoção do comando !s<br>- Pequenas alterações no script<br>- Adição de mods temporários: Priscilamel e Skyymellu",
- 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>As partidas têm um tempo máximo de acordo com o número de ratos na sala.<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 (seu nome, idade, sexo, etc)<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 (ex: biscoito ou bolacha)<br>entre outros...<br><br>- Sugestões e Problemas reporte para Haxhhhhhhhhh.",
- 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 4 jogadores para jogar True or False",
- textArea1 = "Tempo da partida:",
- textArea2 = "Ratos vivos:",
- textArea3 = "Travamento 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)"
- }
- 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 1 if the answer is TRUE or send 2 if the answer is FALSE.",
- textEnter = "<b>Welcome to module True or False! Created by Haxhhhhhhhhh.</b><br><V>For more information of the game, type !help.<br><br><VP>Update RTM 1.61:<br>- Removal of !s command<br>- Small changes on script",
- 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>The rounds have a time according to mices on the room.<br>If you are the shaman, type !per to make a question.<br>QUESTIONS DON'T ALLOWED ON GAME:<br>- Questions involving pessoal things (name, age, gender...)<br>- Questions involving opinions<br>- Questions involving racism, pornography, sexual things...<br>- 'Troll' questions, included questions that aren't intencional<br>- Questions that cause turmoil on room<br>and many more...<br><br>Suggestions and problems report to Haxhhhhhhhhh.",
- 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 4 players to play True or False.",
- textArea1 = "Match time:",
- textArea2 = "Mices alive:",
- textArea3 = "Time lock (temporary):",
- 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)"
- }
- 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 == "@7002987" then
- if message == "skip" then
- if tfm.get.room.playerList[name].isShaman then
- obterJogadores()
- tfm.exec.chatMessage("<R>"..text.textSkip.."",nil)
- eventChatCommand("Haxhhhhhhhhh","admin77")
- end
- end
- if message == "f5" then
- if name == "Haxhhhhhhhhh" then
- t=true;
- tfm.exec.chatMessage("<R>"..text.textFalse.."",nil)
- modo="desativado"
- end
- end
- if message == "v5" then
- if name == "Haxhhhhhhhhh" then
- f=true;
- tfm.exec.chatMessage("<VP>"..text.textTrue.."",nil)
- modo="desativado"
- end
- end
- if message == "lock" then
- if modo == "desativado" then
- if name == "Haxhhhhhhhhh" or name == "D571" 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 end
- if 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
- end end
- if message == "return" then
- if modo == "pergunta" then
- if name == "Haxhhhhhhhhh" or name == "D571" or name == "Priscilamel" or name == "Skyymellu" then
- tempa=20
- temp2=7
- modo="desativado"
- tfm.exec.setGameTime(60)
- ui.removeTextArea(27,nil)
- pergunta=""
- resposta="0"
- tfm.exec.chatMessage("<R>The question has been cancelled by "..name.."",nil)
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.movePlayer(name,400,102,false,1,1,false)
- end
- end end
- end
- if(message:sub(1,7) == "admin77") then
- if modo == "desativado" then
- if name == "Haxhhhhhhhhh" or name == "D571" or name == "Priscilamel" or name == "Skyymellu" then
- tfm.exec.newGame(mapa)
- tfm.exec.setShaman(message:sub(9))
- end end
- end
- if(message:sub(1,7) == "admin78") then
- if modo == "desativado" then
- if name == "Haxhhhhhhhhh" or name == "D571" then
- tfm.exec.disableAutoShaman(true)
- tfm.exec.newGame(mapa)
- tfm.exec.setShaman(message:sub(9))
- tfm.exec.disableAutoShaman(false)
- end end
- end
- if(message:sub(0,6) == "limite") then
- if name == "Haxhhhhhhhhh" or name == "D571" then
- minutos=tonumber(message:sub(8)*60)
- tfm.exec.chatMessage("Time limit: "..minutos.." minutes.",nil)
- end
- end
- if(message:sub(0,4) == "kill") then
- if name == "Haxhhhhhhhhh" or name == "D571" then
- tfm.exec.killPlayer(message:sub(6))
- end
- end
- if(message:sub(0,6) == "rlimit") then
- if name == "Haxhhhhhhhhh" or name == "D571" then
- tfm.exec.setRoomMaxPlayers(message:sub(8))
- tfm.exec.chatMessage("Mice limit: "..message:sub(8).."",nil)
- end
- end
- if(message:sub(1,3) == "msg") then
- if name == "Haxhhhhhhhhh" then
- tfm.exec.chatMessage("<font color='#dedf01'><b>• [Kazarina]</b> "..message:sub(5).."",nil) end
- if name == "D571" then
- tfm.exec.chatMessage("<font color='#beca32'><b>• [Cassiopeia]</b> "..message:sub(5).."",nil) end
- if name == "Caitlyndma7" then
- tfm.exec.chatMessage("<font color='#d39c0d'><b>• [Caitlyn]</b> "..message:sub(5).."",nil) end end
- if message == "help" then
- tfm.exec.chatMessage("<N>"..text.textHelp.."",name)
- end
- if message == "cmd" then
- tfm.exec.chatMessage("<N>"..text.textCmd.."",name)
- end
- end
- function eventSummoningEnd(name,type,x,y,angle,vx,vy,obj)
- for name,player in pairs(tfm.get.room.playerList) do
- if tfm.get.room.currentMap == "@7002987" then
- if tfm.get.room.playerList[name].isShaman then
- obterJogadores()
- tfm.exec.chatMessage("<ROSE>"..text.textShaman.."",nil)
- eventChatCommand("Haxhhhhhhhhh","admin77")
- end
- end
- end
- end
- function eventNewGame()
- ui.removeTextArea(27,nil)
- tfm.exec.setGameTime(63)
- vivo=0;
- modo="desativado"
- tempa=20
- 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
- vivo=vivo+1
- if tfm.get.room.playerList[name].isShaman then
- tfm.exec.setPlayerScore(name,-2,false)
- end
- end
- obterJogadores()
- end
- function eventLoop(pass,tempo)
- if tfm.get.room.currentMap == "90" then
- tfm.exec.setGameTime(60)
- end
- local pass2=tempo/1000
- loop=loop+0.5
- if pass >= 3000 and pass <= 179995 then
- if ratos < 4 then
- if tfm.get.room.currentMap == "@7002987" then
- tfm.exec.newGame(90)
- tfm.exec.chatMessage("<R>"..text.mices.."",nil)
- end
- end
- end
- if ratos >= 4 then
- if tfm.get.room.currentMap == "90" then
- tfm.exec.newGame("@7002987")
- end
- end
- ui.addTextArea(125,"<font size='13'><font color='#000000'> <font face='Segoe UI'>"..text.textArea1.." <b>"..min1..":"..seg1..""..seg2.."</b> "..text.textArea2.." <b>"..vivo.."</b> "..text.textArea3.." <b>"..tostring(lock).."</b>",nil,5,380,790,22,0,0,1.0,true)
- 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("Haxhhhhhhhhh","admin77")
- end
- end
- end
- tfm.exec.setUIMapName("True or False - RTM 1.61")
- 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 == "@7002987" 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 <= 250 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 == "1" then
- eventChatCommand("Haxhhhhhhhhh","v5")
- elseif resposta == "2" then
- eventChatCommand("Haxhhhhhhhhh","f5")
- end
- tempa=20
- temp2=7
- pergunta=""
- ui.removeTextArea(27,nil)
- end
- end
- if modo == "desativado" then
- if tempo < 61000 and tempo > 60500 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 == "@7002987" then
- if vivo == 0 then
- tfm.exec.setGameTime(5)
- obterJogadores()
- tfm.exec.newGame(mapa)
- tfm.exec.chatMessage("<R>"..text.textNothing.."",nil)
- end
- if vivo == 1 then
- if tempo < 60000 then
- tfm.exec.setPlayerScore(shaman,8000,false)
- eventChatCommand("Haxhhhhhhhhh","admin77")
- end
- end
- if lock == false then
- 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)
- eventChatCommand("Haxhhhhhhhhh","admin77")
- end
- end
- end
- end
- if modo == "troca" then
- obterJogadores()
- if tempo < 100 then
- tfm.exec.newGame(mapa)
- 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 == "@7002987" then
- if string.len(answer) >= 186 then
- tfm.exec.chatMessage(""..text.textLongQuestion.."",name)
- elseif string.len(answer) <= 10 then
- tfm.exec.chatMessage(""..text.textShortQuestion.."",name)
- else
- pergunta=answer
- pcall(ui.addPopup(2,2,""..text.textTrueFalse.."",name,350,175,200,true))
- end
- end
- end
- end
- if id == 2 then
- if answer == "1" or answer == "2" then
- resposta=tostring(answer)
- modo="pergunta"
- ui.addTextArea(27,"<font size='16'><font face='Segoe UI'><font color='#000000'>"..pergunta.."",nil,235,215,325,100,0,0,1.0,true)
- tfm.exec.chatMessage("<CH>"..pergunta.."",nil)
- tfm.exec.chatMessage("<BL>"..answer.."","Haxhhhhhhhhh")
- tfm.exec.setGameTime(20)
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.movePlayer(name,400,172,false,1,1,false)
- if tfm.get.room.playerList[name].isShaman then
- tfm.exec.movePlayer(name,400,885,false,1,1,false)
- end
- end
- elseif answer == "" then
- -- não faça nada
- else
- ui.addPopup(2,2,""..text.textTrueFalse.."",name,350,175,200,true)
- end
- end
- end
- function eventPlayerDied(name)
- vivo=vivo-1
- 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
- tfm.exec.newGame(mapa)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement