Advertisement
Tectoon

[TFM] Untitled

Oct 16th, 2015
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.91 KB | None | 0 0
  1. deSpawn={}
  2. players={}
  3. isnt={}
  4.  
  5. admin = {Sagazgamer = true}
  6. version = 0.5
  7.  
  8. players = {}
  9. -- Mapas Vanila
  10. mapas={[[0]],[[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]],[[136]],[[137]],[[138]],[[139]],[[140]],[[141]],[[142]],[[143]],[[200]],[[201]],[[202]],[[203]],[[204]],[[205]],[[206]],[[207]],[[208]],[[209]],[[210]]};
  11.  
  12.  
  13. tfm.exec.disableAutoShaman(true);
  14. tfm.exec.newGame(mapas[math.random(#mapas)])
  15.  
  16. -- rund
  17.  
  18. function nextRound()
  19.     tfm.exec.newGame(mapas[math.random(#mapas)]);
  20. end
  21.  
  22. function eventNewGame()
  23.     for name, player in pairs(tfm.get.room.playerList) do
  24.     isnt[name]=true
  25.     end
  26.     vivo=0
  27.     for name,player in pairs(tfm.get.room.playerList) do
  28.         vivo=vivo+1
  29.     end
  30.     tfm.exec.setUIMapName("InvoObject")
  31. end
  32.  
  33. -- Time
  34.  
  35. function eventLoop(time,remaining)
  36.     for k,v in ipairs(deSpawn) do
  37.         if os.time()>v[2]+3000 then
  38.             tfm.exec.removeObject(v[1])
  39.             table.remove(deSpawn,k)
  40.         end
  41. end
  42.     if vivo == 0 or time < 1000 then
  43.         nextRound();
  44.     end
  45. end
  46.  
  47. -- Runda noua
  48.  
  49. nextRound();
  50. --Invocatie
  51.  
  52. function eventNewPlayer(name)
  53. tfm.exec.bindKeyboard(name,49,true,true)
  54. tfm.exec.bindKeyboard(name,50,true,true)
  55. tfm.exec.bindKeyboard(name,51,true,true)
  56. tfm.exec.bindKeyboard(name,52,true,true)
  57. tfm.exec.bindKeyboard(name,53,true,true)
  58. tfm.exec.bindKeyboard(name,54,true,true)
  59. tfm.exec.bindKeyboard(name,55,true,true)
  60. end
  61.  
  62. for name,player in pairs(tfm.get.room.playerList) do
  63.  eventNewPlayer(name)
  64. end
  65.  
  66.  
  67. function eventKeyboard(name,key,down,x,y)
  68.  if key==49 and players and isnt[name] then
  69. local id=tfm.exec.addShamanObject(26,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y)
  70. table.insert(deSpawn,{id,os.time()})
  71.  end
  72.  if key==50 and players and isnt[name] then
  73. local id=tfm.exec.addShamanObject(27,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y)
  74. table.insert(deSpawn,{id,os.time()})
  75. end
  76.   if key==51 and players and isnt[name] then
  77. local id=tfm.exec.addShamanObject(7,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y)
  78. table.insert(deSpawn,{id,os.time()})
  79. end
  80.  if key==52 and players and isnt[name] then
  81. local id=tfm.exec.addShamanObject(59,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y)
  82. table.insert(deSpawn,{id,os.time()})
  83. end
  84.   if key==53 and players and isnt[name] then
  85. local id=tfm.exec.addShamanObject(57,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+20)
  86. table.insert(deSpawn,{id,os.time()})
  87. end
  88. if key==54 and players and isnt[name] then
  89. local id=tfm.exec.addShamanObject(39,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y)
  90. table.insert(deSpawn,{id,os.time()})
  91. end
  92. if key==55 and players and isnt[name] then
  93. local id=tfm.exec.addShamanObject(40,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+20)
  94. table.insert(deSpawn,{id,os.time()})
  95. end
  96. end
  97.  
  98. function eventChatCommand(name,command)
  99.         if admin[name] then
  100.          if command=="color" then
  101.                 tfm.exec.setNameColor(name, 0xED67EA)
  102.          
  103.                 end
  104.         end
  105. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement