Advertisement
Haxhhhhhhhhh

RTM 1.120

May 16th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.60 KB | None | 0 0
  1. tfm.exec.disableAutoNewGame(true)
  2. tfm.exec.disableAutoScore(true)
  3. tfm.exec.disableAutoTimeLeft(true)
  4. tfm.exec.disableAfkDeath(true)
  5. tfm.exec.disableAllShamanSkills(true)
  6. tfm.exec.disablePhysicalConsumables(true)
  7. tfm.exec.setRoomMaxPlayers(35)
  8. t=false;
  9. f=false;
  10. tempa=20   
  11. ratos=0
  12. loop=0
  13. temp2=3
  14. resposta="0"
  15. players={}
  16. data={}
  17. af=false;
  18. votos=0
  19. vivo=0;
  20. min1=0
  21. seg1=0
  22. seg2=0
  23. lt=0
  24. rcount=0
  25. segundos=0
  26. lock=false;
  27. pergunta=""
  28. shaman=""
  29. lock=false
  30. minutos=10;
  31. modo="desativado"
  32. system.disableChatCommandDisplay("admin77")
  33. system.disableChatCommandDisplay("change")
  34. system.disableChatCommandDisplay("kill")
  35. system.disableChatCommandDisplay("admin78")
  36. system.disableChatCommandDisplay("admin79")
  37. system.disableChatCommandDisplay("limite")
  38. system.disableChatCommandDisplay("msg")
  39. system.disableChatCommandDisplay("return")
  40. mapa="@7417328"
  41. lang = {}
  42.  
  43. lang.br = {
  44.   textFalse = "A resposta era FALSO!",
  45.   textTrue = "A resposta era VERDADEIRO!",
  46.   textRandom = "Um shaman aleatório foi escolhido.",
  47.   textSkip = "O shaman passou a vez.",
  48.   textPergunta = "Insira a sua pergunta:<br><br>NÃO USE SÍMBOLOS ESPECIAIS NA PERGUNTA!",
  49.   textTime = "Tempo esgotado!",
  50.   textShaman = "Não é permitido o uso de objetos de shaman.",
  51.   textNothingWins = "Ninguém venceu esta partida. :(",
  52.   textWinner = " venceu a partida!",
  53.   textNothing = "Não tivemos vencedor nessa partida.",
  54.   textTimeOut = "O tempo da partida acabou! Outro shaman será escolhido.",
  55.   textTimeLeave = "Tempo esgotado! Outro shaman será escolhido.",
  56.   textTrueFalse = "Envie SIM se a resposta for verdadeira ou NÃO se a resposta for falsa.",
  57.   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",
  58.   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",
  59.   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.",
  60.   textLowTime = "O tempo da partida está acabando.",
  61.   mices = "São necessários pelo menos 6 jogadores para jogar True or False",
  62.   textArea1 = "Tempo da partida:",
  63.   textArea2 = "Ratos vivos:",
  64.   textArea3 = "Limite de tempo:",
  65.   textLongQuestion = "Sua pergunta é muito longa. Tente usar uma pergunta menor.",
  66.   textShortQuestion = "Sua pergunta é muito curta ou não é permitida.",
  67.   textCmd = "<VP>Comandos do jogo:<br><br>!per = faz uma pergunta (quando você é shaman)<br>!skip = pula a sua vez (quando você é shaman)",
  68.   textVote = "Seu voto foi registrado com sucesso.",
  69.   textBetWin = "<VP>Você acertou a aposta! +2 pontos adicionados.",
  70.   textBetLose = "<R>Você perdeu a aposta. :(",
  71.   textLt = "<J>Use o comando /ban [nome] para reportar alguém que esteja infrigindo as regras da sala.",
  72.   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)",
  73.   textCancel = "<R>Esta pergunta foi cancelada por ",
  74.   textNoVote = "A votação ainda não está disponível.",
  75.   textReturn = "O shaman teve 2 cancelamentos de perguntas. O próximo cancelamento implicará na perda da vez de shaman."
  76. }
  77. lang.en = {
  78.   textFalse = "The answer was FALSE!",
  79.   textTrue = "The answer was TRUE!",
  80.   textRandom = "A random shaman has been choosed.",
  81.   textSkip = "The shaman skipped your turn.",
  82.   textPergunta = "Type your question here:",
  83.   textTime = "Time is up!",
  84.   textShaman = "Don't are allowed shaman objects.",
  85.   textNothingWins = "Nothing wins the game. :(",
  86.   textWinner = " wons the game!",
  87.   textNothing = "Aren't winners on this game.",
  88.   textTimeOut = "The game time is gone! Other shaman has been choosed.",
  89.   textTimeLeave = "Time is up! Other shaman has been choosed.",
  90.   textTrueFalse = "Send YES if the answer is TRUE or send NO if the answer is FALSE.",
  91.   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",
  92.   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.",
  93.   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.",
  94.   textLowTime = "The match time is ending.",
  95.   mices = "Are needed at least 6 players to play True or False.",
  96.   textArea1 = "Match time:",
  97.   textArea2 = "Mices alive:",
  98.   textArea3 = "Time limit:",
  99.   textLongQuestion = "Your question is very long. Try to use a short question.",
  100.   textShortQuestion = "Your question is very short or isn't allowed.",
  101.   textCmd = "<VP>Game commands:<br><br>!per = make a question (only for shaman)<br>!skip = skip your shaman turn (only for shaman)",
  102.   textVote = "Your vote has been registered.",
  103.   textBetWin = "<VP>You win the bet! +2 points added to your score.",
  104.   textBetLose = "<R>You lose the bet :(",
  105.   textVoting = "<J>Voting avaiable! Type <b>!Username</b> to vote on user who you think that will win the match. (remember to put #number)",
  106.   textCancel = "<R>The question has been cancelled by ",
  107.   textNoVote = "The vote system is locked at moment.",
  108.   textTempMod = "",
  109.   textReturn = "The shaman have 2 question skips. The next cancel will cause the loss of turn."
  110. }
  111. if tfm.get.room.community == "br" then
  112.     text = lang.br
  113. else
  114.     text = lang.en
  115. end
  116. function obterJogadores()
  117.     players={}
  118.     for name,player in pairs(tfm.get.room.playerList) do
  119.             if not tfm.get.room.playerList[name].isDead then
  120.             table.insert(players,name)
  121.             end
  122.     end
  123. end
  124. function eventNewPlayer(name)
  125.     newData={
  126.         ["vote"]=""
  127.             }
  128.     data[name]=newData;
  129.     ratos=ratos+1;
  130.     tfm.exec.chatMessage("<J>"..text.textEnter.."",name)
  131.     obterJogadores()
  132. end
  133. for name,player in pairs(tfm.get.room.playerList) do
  134.     tfm.exec.setPlayerScore(name,0,false)
  135.     eventNewPlayer(name)
  136. end
  137. function eventPlayerLeft(name)
  138.     ratos=ratos-1;
  139.     obterJogadores()
  140. end
  141. function eventChatCommand(name,message)
  142.     if tfm.get.room.currentMap == "@7417328" then
  143.     if message == "f5" then
  144.         if name == "Reksai_void2600#6638" then
  145.             t=true;
  146.             tfm.exec.chatMessage("<R>"..text.textFalse.."",nil)
  147.             modo="desativado" end
  148.     elseif message == "skip" then
  149.             if tfm.get.room.playerList[name].isShaman then
  150.             obterJogadores()
  151.             tfm.exec.chatMessage("<R>"..text.textSkip.."",nil)
  152.             eventChatCommand("Reksai_void2600#6638","admin77") end         
  153.     elseif message == "v5" then
  154.         if name == "Reksai_void2600#6638" then
  155.             f=true;
  156.             tfm.exec.chatMessage("<VP>"..text.textTrue.."",nil)
  157.             modo="desativado" end
  158.     elseif message == "lock" then
  159.         if modo == "desativado" then
  160.         if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
  161.             if lock == true then
  162.                 tfm.exec.chatMessage("Time lock disabled",nil)
  163.                 lock=false;
  164.             else
  165.                 lock=true;
  166.                 tfm.exec.chatMessage("Time lock enabled",nil)
  167.             end
  168.             end
  169.         end
  170.     elseif message == "change" then
  171.         if modo == "desativado" then
  172.         if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
  173.             if af == true then
  174.                 tfm.exec.chatMessage("Modo anti-sopro desativado.",nil)
  175.                 af=false;
  176.             else
  177.                 af=true;
  178.                 tfm.exec.chatMessage("Modo anti-sopro habilitado.",nil)
  179.             end
  180.             end
  181.         end
  182.     elseif message == "per" then
  183.         if tfm.get.room.playerList[name].isShaman then
  184.             if modo == "desativado" then
  185.                 ui.removeTextArea(27,nil)
  186.                 ui.addPopup(1,2,""..text.textPergunta.."",name,250,125,350,true)
  187.             end
  188.         end
  189.     elseif message == "return" then
  190.         if modo == "pergunta" then
  191.         if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
  192.             tempa=20
  193.             temp2=3
  194.             modo="desativado"
  195.             tfm.exec.setGameTime(63)
  196.             ui.removeTextArea(27,nil)
  197.             pergunta=""
  198.             resposta="0"
  199.             rcount=rcount+1
  200.             if name == "Ashearcher#0000" then
  201.                 tfm.exec.chatMessage(""..text.textCancel.."Kazarina",nil)
  202.             else
  203.                 tfm.exec.chatMessage(""..text.textCancel..""..name.."",nil)
  204.             end
  205.             for name,player in pairs(tfm.get.room.playerList) do
  206.                 tfm.exec.movePlayer(name,400,1,false,1,1,false)
  207.             end
  208.             if rcount == 2 then
  209.                 tfm.exec.chatMessage("<VP><br>"..text.textReturn.."",nil)
  210.             end
  211.             if rcount == 3 then
  212.                 eventChatCommand("Reksai_void2600#6638","admin77")
  213.                 rcount=0
  214.             end
  215.         end end
  216.     elseif(message:sub(0,6) == "limite") then
  217.         if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
  218.             minutos=tonumber(message:sub(8))
  219.             if minutos == 0 then
  220.                 tfm.exec.chatMessage("Time limit disabled",nil)
  221.                 minutos=999
  222.             elseif minutos > 30 then
  223.                 tfm.exec.chatMessage("Time limit: 20 minutes.",nil)
  224.                 minutos=30
  225.             else
  226.                 tfm.exec.chatMessage("Time limit: "..minutos.." minutes.",nil)
  227.             end
  228.         end
  229.     elseif(message:sub(1,7) == "admin77") then
  230.         if modo == "desativado" then
  231.         if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
  232.             changeMap()
  233.             tfm.exec.setShaman(message:sub(50))
  234.         end end
  235.     elseif(message:sub(1,7) == "admin78") then
  236.         if modo == "desativado" then
  237.         if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
  238.             tfm.exec.setPlayerScore(message:sub(9),8001,false)
  239.             changeMap()
  240.         end end
  241.     elseif(message:sub(1,7) == "admin79") then
  242.         if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
  243.             tfm.exec.setPlayerScore(message:sub(9),0,false)
  244.         end
  245.     elseif(message:sub(1,4) == "mode") then
  246.         if modo == "desativado" then
  247.         if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
  248.             tfm.exec.chatMessage("Command disabled",name)
  249.             end
  250.         end
  251.     elseif(message:sub(0,4) == "kill") then
  252.         if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
  253.             tfm.exec.killPlayer(message:sub(6))
  254.         end
  255.     elseif(message:sub(0,6) == "rlimit") then
  256.         if name == "Reksai_void2600#6638" or name == "Ashearcher#0000" then
  257.             tfm.exec.setRoomMaxPlayers(message:sub(8))
  258.             tfm.exec.chatMessage("Mice limit: "..message:sub(8).."",nil)
  259.         end
  260.     elseif(message:sub(1,3) == "msg") then
  261.         if name == "Reksai_void2600#6638" then
  262.             tfm.exec.chatMessage("<font color='#7D00EF'><b>• [Kai'Sa]</b> "..message:sub(5).."",nil)
  263.         elseif name == "Ashearcher#0000" then
  264.             tfm.exec.chatMessage("<font color='#D7CF08'><b>• [Kazarina]</b> "..message:sub(5).."",nil) end
  265.     elseif message == "help" then
  266.         tfm.exec.chatMessage("<N>"..text.textHelp.."",name)
  267.     elseif message == "cmd" then
  268.         tfm.exec.chatMessage("<N>"..text.textCmd.."",name)
  269.     else
  270.         if vivo == 2 then
  271.         if not tfm.get.room.playerList[name].isShaman then
  272.             data[name].vote=string.upper(message)
  273.             tfm.exec.chatMessage(""..text.textVote.."",name)
  274.         end
  275.         end
  276.     end end
  277. end
  278. function eventNewGame()
  279.     rcount=0;
  280.     ui.removeTextArea(27,nil)
  281.     tfm.exec.setGameTime(63)
  282.     vivo=0;
  283.     modo="desativado"
  284.     tempa=19
  285.     votos=0;
  286.     t=false;
  287.     f=false;
  288.     segundos=0;
  289.     min1=0
  290.     min3=0
  291.     seg1=0
  292.     seg2=0
  293.     for name,player in pairs(tfm.get.room.playerList) do
  294.         if name:sub(1,1) == "*" then
  295.             tfm.exec.killPlayer(name)
  296.             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)
  297.         end
  298.         data[name].vote=""
  299.         vivo=vivo+1
  300.         if tfm.get.room.playerList[name].isShaman then
  301.             tfm.exec.setPlayerScore(name,-2,false)
  302.             vivo=vivo-1
  303.         end
  304.     end
  305.     obterJogadores()
  306. end
  307. function eventLoop(pass,tempo)
  308.     if af == true then
  309.         if modo == "pergunta" then
  310.             tfm.exec.chatMessage("["..pass.."]<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>",nil)
  311.         end
  312.     end
  313.     local pass2=tempo/1000
  314.     lt=lt+1
  315.     if lt >= 1200 then
  316.         if tfm.get.room.community == "br" then
  317.             tfm.exec.chatMessage("<R>"..text.textLt.."",nil)
  318.             lt=0
  319.         end
  320.     end
  321.     if tfm.get.room.currentMap == "@7277839" then
  322.         tfm.exec.setGameTime(63)
  323.     end
  324.     if lock == true then
  325.         tfm.exec.setGameTime(tempo/950)
  326.     end
  327.     loop=loop+0.5
  328.     if pass >= 3000 and pass <= 179995 then
  329.         if ratos < 6 then
  330.             if tfm.get.room.currentMap == "@7417328" then
  331.                 tfm.exec.newGame("@7277839")
  332.                 tfm.exec.chatMessage("<R>"..text.mices.."",nil)
  333.             end
  334.         end
  335.     end
  336.     if ratos >= 6 then
  337.         if tfm.get.room.currentMap == "@7277839" then
  338.             changeMap()
  339.         end
  340.     end
  341.     if min1 == minutos-1 then
  342.         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)
  343.     else
  344.         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)
  345.     end
  346.     if loop == 1 then
  347.         segundos=segundos+1
  348.         seg2=seg2+1
  349.         loop=0
  350.     if seg2 >= 10 then
  351.         seg2=0
  352.         seg1=seg1+1
  353.         if seg1 >= 6 then
  354.             min1=min1+1
  355.             seg1=0
  356.             seg2=0
  357.             end
  358.             if min1 >= minutos then
  359.                 for name,player in pairs(tfm.get.room.playerList) do
  360.                     if tfm.get.room.playerList[name].isShaman then
  361.                         ui.addPopup(1,0,""..text.textTime.."",name,350,175,200,true)
  362.                         ui.addPopup(2,0,""..text.textTime.."",name,350,175,200,true)
  363.                     end
  364.                 end
  365.                 tfm.exec.chatMessage("<R>"..text.textTimeOut.."",nil)
  366.                 eventChatCommand("Reksai_void2600#6638","admin77")
  367.             end
  368.         end
  369.     end
  370.     tfm.exec.setUIMapName("True or False - RTM 1.120")
  371.     if modo == "pergunta" then
  372.         tempa=tempa-0.5
  373.     end
  374.     for name,player in pairs(tfm.get.room.playerList) do
  375.         if tfm.get.room.playerList[name].isShaman then
  376.        if tfm.get.room.currentMap == "@7417328" then
  377.             if pass > 450 and pass < 1050 then
  378.                 tfm.exec.chatMessage("<VP>"..text.textGotShaman.."",name)
  379.         tfm.exec.setPlayerScore(name,-2,false)
  380.          end
  381.             end
  382.         end
  383.     end
  384.     if tempa < 0.1 then
  385.         modo="resposta"
  386.         tempa=0
  387.         for pn, p in pairs(tfm.get.room.playerList) do
  388.             if p.y <= 220 then
  389.                 tfm.exec.killPlayer(pn)
  390.             end
  391.         end
  392.     end
  393.     if f == true then
  394.         for pn, p in pairs(tfm.get.room.playerList) do
  395.             if p.x >= 405 then
  396.                 tfm.exec.killPlayer(pn)
  397.                 modo="desativado"
  398.             end
  399.         end
  400.         f=false;
  401.     end
  402.     if t == true then
  403.         for pn, p in pairs(tfm.get.room.playerList) do
  404.             if p.x <= 395 then
  405.                 tfm.exec.killPlayer(pn)
  406.                 modo="desativado"
  407.             end
  408.         end
  409.         t=false;
  410.     end
  411.     if modo == "resposta" then
  412.         tfm.exec.setGameTime(63)
  413.         temp2=temp2-0.5
  414.         if temp2 == 1 then
  415.             modo="desativado"
  416.             if resposta == "yes" then
  417.                 eventChatCommand("Reksai_void2600#6638","v5")
  418.             else
  419.                 eventChatCommand("Reksai_void2600#6638","f5")
  420.             end
  421.             tempa=19
  422.             temp2=3
  423.             pergunta=""
  424.             ui.removeTextArea(27,nil)
  425.         end
  426.     end
  427.     if modo == "desativado" then
  428.     if tempo < 60000 and tempo > 59400 then
  429.         if pass > 10000 then
  430.             for name,player in pairs(tfm.get.room.playerList) do
  431.             if not tfm.get.room.playerList[name].isDead then
  432.                 tfm.exec.setPlayerScore(name,1,true)
  433.             end
  434.         end
  435.         if vivo == 2 then
  436.             tfm.exec.chatMessage("<R>"..text.textVoting.."",nil)
  437.         end
  438.     end
  439.     end
  440. if tfm.get.room.currentMap == "@7417328" then
  441.     if vivo == 1 then
  442.         if tempo < 59000 then
  443.             better=string.upper(shaman)
  444.             tfm.exec.setPlayerScore(shaman,8000,false)
  445.             for name,player in pairs(tfm.get.room.playerList) do
  446.                 if data[name].vote == better then
  447.                     tfm.exec.setPlayerScore(name,2,true)
  448.                     tfm.exec.chatMessage(""..text.textBetWin.."",name)
  449.                 end
  450.             end
  451.             changeMap()
  452.         end
  453.     end
  454.     if vivo <= 0 then
  455.         tfm.exec.setGameTime(5)
  456.         obterJogadores()
  457.         changeMap()
  458.         tfm.exec.chatMessage("<R>"..text.textNothing.."",nil)
  459.     end
  460.     if tempo < 500 then
  461.         tfm.exec.setPlayerScore(players[math.random(#players)],1,true)
  462.         for name,player in pairs(tfm.get.room.playerList) do
  463.             if tfm.get.room.playerList[name].isShaman then
  464.                 ui.addPopup(1,0,""..text.textTime.."",name,350,175,200,true)
  465.                 ui.addPopup(2,0,""..text.textTime.."",name,350,175,200,true)
  466.             end
  467.         end
  468.         tfm.exec.chatMessage("<R>"..text.textTimeLeave.."",nil)
  469.         changeMap()
  470.     end
  471.     end
  472.     end
  473.     if modo == "troca" then
  474.         obterJogadores()
  475.         if tempo < 100 then
  476.             changeMap()
  477.         end
  478.     end
  479.     if vivo == 0 then
  480.         shaman=""
  481.     end
  482. end
  483. function eventPopupAnswer(id,name,answer)
  484.     if id == 1 then
  485.         if tfm.get.room.playerList[name].isShaman then
  486.             if tfm.get.room.currentMap == "@7417328" then
  487.                 if string.len(answer) >= 174 then
  488.                     tfm.exec.chatMessage(""..text.textLongQuestion.."",name)
  489.                 elseif string.len(answer) <= 5 then
  490.                     tfm.exec.chatMessage(""..text.textShortQuestion.."",name)
  491.                 else
  492.                     pergunta=answer
  493.                     pcall(ui.addPopup(2,1,""..text.textTrueFalse.."",name,350,175,200,true))
  494.                 end
  495.             end
  496.         end
  497.     end
  498.     if id == 2 then
  499.         resposta=tostring(answer)
  500.         modo="pergunta"
  501.         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)
  502.         tfm.exec.chatMessage("<CH>"..pergunta.."",nil)
  503.         tfm.exec.chatMessage("<BL>"..answer.."","Reksai_void2600#6638")
  504.         tfm.exec.chatMessage("<BL>"..answer.."","Ashearcher#0000")
  505.         tfm.exec.setGameTime(20)
  506.         for name,player in pairs(tfm.get.room.playerList) do
  507.             tfm.exec.movePlayer(name,400,102,false,1,1,false)
  508.             if tfm.get.room.playerList[name].isShaman then
  509.                 tfm.exec.movePlayer(name,400,885,false,1,1,false)
  510.             end
  511.         end
  512.     end
  513. end
  514. function eventPlayerDied(name)
  515.     if not tfm.get.room.playerList[name].isShaman then
  516.         vivo=vivo-1
  517.     end
  518.     local i=0
  519.     local n
  520.     for pname,player in pairs(tfm.get.room.playerList) do
  521.         if not player.isDead and not player.isShaman then
  522.             i=i+1
  523.             n=pname
  524.         end
  525.     end
  526.     if i==0 then
  527.         -- não faça nada
  528.     elseif i==1 then
  529.         shaman=n;
  530.     end
  531. end
  532. function changeMap()
  533.     tfm.exec.newGame(mapa)
  534. end
  535. changeMap()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement