Advertisement
Tectoon

[TFM] Survivor

Mar 22nd, 2015
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.73 KB | None | 0 0
  1. -- By Tectoon
  2. -- Lua Script Transformice
  3. -- Quando sobra apenas 1 rato vivo, ele ganha queijo e entra na toca
  4. tfm.exec.disableAutoNewGame(true);
  5. maps={"6297832", "6296970", "6290162", "5498543", "2939549", "3067251" , "2732060" , "1388662" , "1522692" , "5805758" , "4978958" , "4934730" , "290546" , "1754355" , "306382" , "1812056" , "1794907" , "1794873" , "1543937" , "1539148" , "1533374" , "1533333" , "1528388" , "1528388" , "1525486" , "1519483" , "1515058" , "1492805" , "1463332" , "1277941" , "908739" , "866256" , "852617" , "848697" , "811211" , "803074" , "802975" , "802958" , "799141" , "799141" , "797964" , "793117" , "770675" , "697561" , "540495" , "521931" , "500312" , "495880" , "490248" , "479091" , "478116" , "464787" , "459284" , "397066" , "393406" , "392646" , "392616" , "391738" , "391643" , "390649" , "390386" , "390386" , "311496" , "307930" , "306360" , "305753" , "305748" , "304482" , "304198" , "302224" , "300404" , "299123" , "296033" , "295988" , "293487" , "293222" , "292678" , "292592" , "291643" , "291399" , "290974" , "290971" , "290865" , "290725" , "289964" , "289932" , "281649" , "281492" , "281479" , "281431" , "280159" , "280120" , "279689" , "276534" , "5742568" , "4842994" , "307925" , "937383" , "5175883" , "5727516" , "5651376" , "2964900" , "5583170" , "5734549" , "4679748" , "4705798" , "958881" , "391664" , "5239078" , "3584826" , "5514055" , "3579303" , "4543602" , "1661909" , "390657" , "573817" , "333020" , "4329532" , "3540608" , "492283" , "1026249" , "1545834" , "1659906" , "3322939" , "3295213" , "3699989" , "5532572" , "741041" , "489470" , "395246" , "292672" , "306106" , "3584123" , "3107377" , "3685564" , "787131" , "2408376" , "3620709" , "3587860" , "3549404" , "481676" , "3550350" , "3480467" , "3473722" , "4794242" , "290388" , "3419948" , "2931068" , "3349286" , "2842113" , "391057" , "3400319" , "1514928" , "2526952" , "489829" , "3146721" , "3175437" , "5800128" , "5771238" , "5764777" , "5721894" , "5721064" , "5720967" , "5720727", "6255153", "@6230154" }; -- Aqui você coloca o codigo dos mapas que você quer executar
  6. -- Os mapas serão executados aletoriamente e não na sequencia.
  7.  
  8. function eventLoop(timePassed, timeLeft)
  9.     if alive == 1 then
  10.         for name,player in pairs(tfm.get.room.playerList) do
  11.             if not player.isDead then
  12.                 tfm.exec.giveCheese(name)
  13.                 tfm.exec.playerVictory(name)
  14.             end
  15.         end
  16.     elseif alive == 0 or timeLeft < 1000 then
  17.         nextRound();
  18.     end
  19. end
  20.  
  21. function nextRound()
  22.     tfm.exec.newGame(maps[math.random(#maps)]);
  23. end
  24.  
  25. function eventNewGame()
  26.     alive=0
  27.     for name,player in pairs(tfm.get.room.playerList) do
  28.         alive=alive+1
  29.     end
  30. end
  31.  
  32. function eventPlayerDied(name)
  33.     alive=alive-1
  34. end
  35.  
  36. function eventPlayerWon(name)
  37.     alive=alive-1
  38. end
  39.  
  40. nextRound();
  41.  
  42. table.foreach({math, tfm.exec}, function(n, tab) table.foreach(tab, function(nome, func) _G[nome]= func; end) end)
  43.  
  44. function eventSummoningStart(p,id,x,y) ----------- Essa Função, junto com a de cima, é para proibir o Divino Mode!
  45.     killPlayer(sqrt((x -tfm.get.room.playerList[p].x)^2 +(y -tfm.get.room.playerList[p].y)^2) > 120 and p or "");
  46. end
  47. print("Script ON")
  48.  
  49. ui.addTextArea(3,"<p align='center'><a href='event:Ajuda'>Regras</a></p>",NIL,700,20,95,20,1,1,0.5,true)
  50.  
  51. --CallBack
  52.  
  53. function eventTextAreaCallback(id, player, link)
  54. if link == "Ajuda" then
  55. ui.addTextArea(1,"<p align='center'>Survivor <br><br><a href='event:fechar'>Fechar Painel</a></br><br>Bem vindo ao minigame de sobrevivência! Regras: Cuidado: os shamans querem eliminar todos os ratos! Seja o último rato a ficar de pé para ganhar a partida. Criador do minigame Tectoon</br</p>",player,250,100,400,200,1,1,0.9,true)
  56. end
  57. if link == "fechar" then
  58. if id == 1 then
  59. ui.removeTextArea(1,player)
  60. end
  61. end
  62. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement