Advertisement
Guest User

Rotacion elegida

a guest
Feb 24th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.20 KB | None | 0 0
  1. admins = {Tocutoeltuco = true, Baulinmg = true}
  2. activadovanilla = false
  3. activadonormal = false
  4. activadopuno = false
  5. activadopcuatro = false
  6. activadopcinco = false
  7. activadopseis = false
  8. activadopsiete = false
  9. activadopocho = false
  10. activadopnueve = false
  11. mapasvanilla = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210}
  12. mapasnormales = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,154859,3790673,5707285,4365311,1796467,2621331,1799015,4973378,1334402,5555555,2066584,457558,3420648,923485,334288,248644,387149,387149,3965601,141827,220999,3765910,3197968,2969368,505722,5226524,165808,1190826,1190826,1563226,5547549,2589845,1429444,3425103,4140588,1864676,1566067,1262791,869865,1733791,4903937,4696244,4783875,4929330,4628279,4638968,4667932,4916531,1951139,1615397,357214,504166,1564378,4872938,5605031,1728174,2462668,1871593,5089993,1360297,452773,251052,422305,1452753,149514,212956,2476452,4940118,3296027,3265149,1912644,3165231,2989211,257008,5578313,631342,5529776,3937231,1311201,5592547,2899026,876556,2386468,1338514}
  13. mapaspuno = {1566067,1262791,869865,1733791,4903937,4696244,4783875,4929330,4628279,4638968,4667932,4916531,1951139}
  14. mapaspcuatro = {1615397,357214,504166,1564378,4872938,5605031,1728174,2462668,1871593,5089993,1360297,452773,251052}
  15. mapaspcinco = {154859,3790673,5707285,4365311,1796467,2621331,1799015,4973378,1334402,5555555,2066584,457558,3420648}
  16. mapaspseis = {923485,334288,248644,387149,387149,3965601,141827,220999,3765910,3197968}
  17. mapaspsiete = {2969368,505722,5226524,165808,1190826,1190826,1563226,5547549,2589845,1429444,3425103,4140588,1864676}
  18. mapaspocho = {422305,1452753,149514,212956,2476452,4940118,3296027,3265149,1912644,3165231,2989211}
  19. mapaspnueve = {257008,5578313,631342,5529776,3937231,1311201,5592547,2899026,876556,2386468,1338514}
  20.  
  21. function nuevaPartida()
  22.         if activadovanilla==true then
  23.                         tfm.exec.newGame(mapasvanilla[math.random(#mapasvanilla)])
  24.         end
  25.         if activadonormal==true then
  26.                         tfm.exec.newGame(mapasnormales[math.random(#mapasnormales)])
  27.         end
  28.         if activadopuno==true then
  29.                         tfm.exec.newGame(mapaspuno[math.random(#mapaspuno)])
  30.         end
  31.         if activadopcuatro==true then
  32.                         tfm.exec.newGame(mapaspcuatro[math.random(#mapaspcuatro)])
  33.         end
  34.         if activadopcinco==true then
  35.                         tfm.exec.newGame(mapaspcinco[math.random(#mapaspcinco)])
  36.         end
  37.         if activadopseis==true then
  38.                         tfm.exec.newGame(mapaspseis[math.random(#mapaspseis)])
  39.         end
  40.         if activadopsiete==true then
  41.                         tfm.exec.newGame(mapaspsiete[math.random(#mapaspsiete)])
  42.         end
  43.         if activadopocho==true then
  44.                         tfm.exec.newGame(mapaspocho[math.random(#mapaspocho)])
  45.         end
  46.         if activadopnueve==true then
  47.                         tfm.exec.newGame(mapaspnueve[math.random(#mapaspnueve)])
  48.         end
  49. end
  50.  
  51. function eventLoop(a,timeLeft)
  52. if timeLeft <= 0 then
  53. nuevaPartida()
  54. end
  55. end
  56.  
  57. function eventNewGame()
  58.         if tfm.get.room.currentMap=="@0" then
  59.         tfm.exec.setUIMapName("<font color='#38FF00'>Ahora mismo no hay ninguna rotación activa.</font>")
  60.         nuevaPartida()
  61.         end
  62.         if activadovanilla==true then
  63.                 tfm.exec.setUIMapName("<font color='#38FF00'>Rotación </font><rose>VANILLA <font color='#38FF00'>activada.")
  64.         end
  65.         if activadonormal==true then
  66.                 tfm.exec.setUIMapName("<font color='#38FF00'>Rotación </font><rose>NORMAL <font color='#38FF00'>activada.")
  67.         end
  68.         if activadopuno==true then
  69.                 tfm.exec.setUIMapName("<font color='#38FF00'>Rotación </font><rose>P1 <font color='#38FF00'>activada.")
  70.         end
  71.         if activadopcuatro==true then
  72.                 tfm.exec.setUIMapName("<font color='#38FF00'>Rotación </font><rose>P4 <font color='#38FF00'>activada.")
  73.         end
  74.         if activadopcinco==true then
  75.                 tfm.exec.setUIMapName("<font color='#38FF00'>Rotación </font><rose>P5 <font color='#38FF00'>activada.")
  76.         end
  77.         if activadopseis==true then
  78.                 tfm.exec.setUIMapName("<font color='#38FF00'>Rotación </font><rose>P6 <font color='#38FF00'>activada.")
  79.         end
  80.         if activadopsiete==true then
  81.                 tfm.exec.setUIMapName("<font color='#38FF00'>Rotación </font><rose>P7 <font color='#38FF00'>activada.")
  82.         end
  83.         if activadopocho==true then
  84.                 tfm.exec.setUIMapName("<font color='#38FF00'>Rotación </font><rose>P8 <font color='#38FF00'>activada.")
  85.         end
  86.         if activadopnueve==true then
  87.                 tfm.exec.setUIMapName("<font color='#38FF00'>Rotación </font><rose>P9 <font color='#38FF00'>activada.")
  88.         end
  89. end
  90.  
  91. for a in pairs(tfm.get.room.playerList) do
  92.         eventNewGame()
  93. end
  94.  
  95. function eventChatCommand(n, cmd)
  96.         if admins[n] then
  97.                 if cmd == "rotacionvanilla" then
  98.                         activadovanilla = true
  99.                         activadonormal = false
  100.                         activadopuno = false
  101.                         activadopcuatro = false
  102.                         activadopcinco = false
  103.                         activadopseis = false
  104.                         activadopsiete = false
  105.                         activadopocho = false
  106.                         activadopnueve = false
  107.                         tfm.exec.newGame(mapasvanilla[math.random(#mapasvanilla)])
  108.                 end
  109.         end
  110.         if admins[n] then
  111.                 if cmd == "rotacionnormal" then
  112.                         activadovanilla = false
  113.                         activadonormal = true
  114.                         activadopuno = false
  115.                         activadopcuatro = false
  116.                         activadopcinco = false
  117.                         activadopseis = false
  118.                         activadopsiete = false
  119.                         activadopocho = false
  120.                         activadopnueve = false
  121.                         tfm.exec.newGame(mapasnormales[math.random(#mapasnormales)])
  122.                 end
  123.         end
  124.         if admins[n] then
  125.                 if cmd == "rotacionp1" then
  126.                         activadovanilla = false
  127.                         activadonormal = false
  128.                         activadopuno = true
  129.                         activadopcuatro = false
  130.                         activadopcinco = false
  131.                         activadopseis = false
  132.                         activadopsiete = false
  133.                         activadopocho = false
  134.                         activadopnueve = false
  135.                         tfm.exec.newGame(mapaspuno[math.random(#mapaspuno)])
  136.                 end
  137.         end
  138.         if admins[n] then
  139.                 if cmd == "rotacionp4" then
  140.                         activadovanilla = false
  141.                         activadonormal = false
  142.                         activadopuno = false
  143.                         activadopcuatro = true
  144.                         activadopcinco = false
  145.                         activadopseis = false
  146.                         activadopsiete = false
  147.                         activadopocho = false
  148.                         activadopnueve = false
  149.                         tfm.exec.newGame(mapaspcuatro[math.random(#mapaspcuatro)])
  150.                 end
  151.         end
  152.         if admins[n] then
  153.                 if cmd == "rotacionp5" then
  154.                         activadovanilla = false
  155.                         activadonormal = false
  156.                         activadopuno = false
  157.                         activadopcuatro = false
  158.                         activadopcinco = true
  159.                         activadopseis = false
  160.                         activadopsiete = false
  161.                         activadopocho = false
  162.                         activadopnueve = false
  163.                         tfm.exec.newGame(mapaspcinco[math.random(#mapaspcinco)])
  164.                 end
  165.         end
  166.         if admins[n] then
  167.                 if cmd == "rotacionp6" then
  168.                         activadovanilla = false
  169.                         activadonormal = false
  170.                         activadopuno = false
  171.                         activadopcuatro = false
  172.                         activadopcinco = false
  173.                         activadopseis = true
  174.                         activadopsiete = false
  175.                         activadopocho = false
  176.                         activadopnueve = false
  177.                         tfm.exec.newGame(mapaspseis[math.random(#mapaspseis)])
  178.                 end
  179.         end
  180.         if admins[n] then
  181.                 if cmd == "rotacionp7" then
  182.                         activadovanilla = false
  183.                         activadonormal = false
  184.                         activadopuno = false
  185.                         activadopcuatro = false
  186.                         activadopcinco = false
  187.                         activadopseis = false
  188.                         activadopsiete = true
  189.                         activadopocho = false
  190.                         activadopnueve = false
  191.                         tfm.exec.newGame(mapaspsiete[math.random(#mapaspsiete)])
  192.                 end
  193.         end
  194.         if admins[n] then
  195.                 if cmd == "rotacionp8" then
  196.                         activadovanilla = false
  197.                         activadonormal = false
  198.                         activadopuno = false
  199.                         activadopcuatro = false
  200.                         activadopcinco = false
  201.                         activadopseis = false
  202.                         activadopsiete = false
  203.                         activadopocho = true
  204.                         activadopnueve = false
  205.                         tfm.exec.newGame(mapaspocho[math.random(#mapaspocho)])
  206.                 end
  207.         end
  208.         if admins[n] then
  209.                 if cmd == "rotacionp9" then
  210.                         activadovanilla = false
  211.                         activadonormal = false
  212.                         activadopuno = false
  213.                         activadopcuatro = false
  214.                         activadopcinco = false
  215.                         activadopseis = false
  216.                         activadopsiete = false
  217.                         activadopocho = false
  218.                         activadopnueve = true
  219.                         tfm.exec.newGame(mapaspnueve[math.random(#mapaspnueve)])
  220.                 end
  221.         end
  222.  
  223.         if admins[n] then
  224.                 if cmd == "sinrotacion" then
  225.                         activadovanilla = false
  226.                         activadonormal = false
  227.                         activadopuno = false
  228.                         activadopcuatro = false
  229.                         activadopcinco = false
  230.                         activadopseis = false
  231.                         activadopsiete = false
  232.                         activadopocho = false
  233.                         activadopnueve = false
  234.                         tfm.exec.setUIMapName("<font color='#38FF00'>Ahora no habrá ninguna rotación.</font>")
  235.                 end
  236.         end
  237. end
  238.  
  239. system.disableChatCommandDisplay("rotacionvanilla")
  240. system.disableChatCommandDisplay("rotacionnormal")
  241. system.disableChatCommandDisplay("rotacionp1")
  242. system.disableChatCommandDisplay("rotacionp4")
  243. system.disableChatCommandDisplay("rotacionp5")
  244. system.disableChatCommandDisplay("rotacionp6")
  245. system.disableChatCommandDisplay("rotacionp7")
  246. system.disableChatCommandDisplay("rotacionp8")
  247. system.disableChatCommandDisplay("rotacionp9")
  248. system.disableChatCommandDisplay("sinrotacion")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement