Advertisement
Novohp

Concatenar

Nov 18th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.05 KB | None | 0 0
  1. ------------------------
  2. -- @Version: 4.9
  3. -- @OBS1: Bug da flecha para a esquerda corrigido.
  4. -- @OBS2: Corrigido, apenas os Hunters jogam as flechas
  5. -- @OBS3: A barra de vida diminui.
  6. -- @OBS4: Adicionado rotação de mapas.
  7. -- @OBS5: Adicionado Skills.
  8.  
  9. ------------------------
  10.  
  11. --[[Traduções]]--
  12.  
  13. translations = {
  14.      br = {  -- br = Brasil = Pt_br = Português brasil.
  15.         welcome = "Bem-vindo ao #DeaddlyHunt. Utilize os atalhos: H [Help], P [Perfil], T [Atualizações]",
  16.         tab_profile = "Perfil",
  17.         tab_Howtoplay = "Como jogar?",
  18.         tab_help = "Para mais informações pressione [H]",
  19.         tab_requiredXP = "XP Requerido",
  20.         tab_title = "Titulo",
  21.         tab_Level = "Nivel",
  22.         tab_healing = "Cura",
  23.         tab_LevelNext = "Você agora é nível",
  24.         tab_victoriesHunter = "Vitorias sendo Caçador",
  25.         tab_victoriesMonsters = "Vitorias sendo Monstro",
  26.         tab_MonsterRed = "<R><B>Você nasceu como um Monster! Tire a energia dos Caçadores!!</B></R>",
  27.         tab_HunterBlue = "<BV><B>Você nasceu como um caçador! Fleche os Monstros!!</B></BV>",
  28.         tab_helpStarGame1 = "<font size='15'>Seja bem-vindo ao mini game #Deadlyhunt, aprenda abaixo como jogar.: <br><B><R>Se você é um Monstro</R></B>: Você é o todo poderoso Monstro Vermelho, possui apenas [3] vidas e deve ir atrás dos jogadores azuis (Caçadores), corram atrás deles e pressionem [ESPAÇO] ou pressionem [↓] para remover a energia vital deles. Utilize sua skill Apagão para afetar a tela dos caçadores. <br><B><BV>Se você é um Caçador</BV></B>: Você é o Salvador da humanidade e deve usar suas incríveis flechas para lançar os monstros para fora do mapa, se as coisas começarem a ficar difíceis você pode usar sua Skill de cura uma vez por rodada e aumentar um pouco mais sua vida para que você e seu time possam vencer.</font>",      
  29.         tab_helpStarGame2 = "<font size='15'><i>Livro de mágicas:</i>\n<b>livros especiais que liberam as classes e novos poderes na loja.</b></font>",
  30.         tab_helpStarGame3 = "<font size='14'><i>Cartas/missões:</i>\n<b>quando sua classe chegar ao limite de bônus, você recebe uma carta com missões, para a conquista de uma nova classe. E novos clãs.</b></font>",
  31.         tab_SkillUsedHunter = "<B>Você está com + 30% de energia! Poderá usar essa skill temporaria, novamente na proxima rodada!</B>",
  32.         tab_SkillUsedMonster = "<B>Você alterou a visão dos caçadores! Poderá usar essa skill temporaria, novamente na proxima rodada!</B>",
  33.         tab_AffectedHunter = "<B>Sua visão foi afetada por um monstro!</B>",
  34.         close = "Fechar",
  35.     },
  36.    
  37.     en = { -- en = English = Inglês
  38.         welcome      = "Welcome to #DeaddlyHunt. Use the shortcuts: H [Help], P [Profile], T [Updates]",
  39.         tab_profile  = "Profile",
  40.         tab_Howtoplay ="How to play?",
  41.         tab_help = "For more information press H",
  42.         tab_requiredXP = "Required XP",
  43.         tab_title = "Title",
  44.         tab_Level = "Level",
  45.         tab_healing = "healing",
  46.         tab_LevelNext = "You are now level",
  47.         tab_victoriesHunter = "Hunters win!",
  48.         tab_victoriesMonsters = "Monsters win!",
  49.         tab_MonsterRed = "<R><B>You are a Monster! Kill the hunters!!</B></R>",
  50.         tab_HunterBlue = "<BV><B>You are a Hunter! Shoot an arrow to the Monsters!!</B></BV>",
  51.         tab_helpStarGame1 = "<font size='13'>Welcome to #Deadlyhunt. How to play:<R>Monster:</R> Duck near a Hunter to attack [↓] and you have 3 lives. <li><BV>Hunter:</BV></li> When you're running towards a monster press [SPACE] to attack with arrows, but be aware that it can also damage your teammates. \n<B>Game Modes:</b>\n<li> <R>Aie</R></li>: In aie mode, you can not fall from great heights, otherwise you will get killed! Watch out! <li><BV>Normal</BV></li>: Normal mode without any modifications.</font>\n\n<p align='center'><I><U>More games modes coming soon!</p>",
  52.         tab_helpStarGame2 = "<font size='15'><i>SpellBook:</i>\n<b>special books that release classes and new powers in the store.</b></font>",
  53.         tab_helpStarGame3 = "<font size='14'><i>Letters/missions:</i>\n<b>When your class get to the bonus limit, you receive a letter with missions, to the conquest of a new class.</b></font>",
  54.         tab_SkillUsedHunter = "<B>You have + 30% energy! You can use this temporary skill again in the next round!</B>",
  55.         tab_SkillUsedMonster = "<B>You changed the vision of the hunters! You can use this temporary skill again in the next round!</B>",
  56.         tab_AffectedHunter = "<B>Your vision was affected by a monster!</B>",
  57.         close = "Close",
  58.     }
  59. }
  60. --------------------------------
  61.  
  62. --[[ Disable ]]--
  63.  
  64. for _, v in next, {'AutoShaman', 'AutoNewGame', 'AutoTimeLeft', 'PhysicalConsumables', 'AfkDeath', 'MortCommand', 'AutoScore'} do
  65.     tfm.exec['disable' .. v]()
  66. end
  67.  
  68. tfm.exec.chatMessage =print
  69. -------------------------------
  70.  
  71. --[[ Script data ]]--
  72.  
  73. newData = {}
  74. tempo = os.time()
  75. maps = {7308494,7308488,7311388}
  76. p = {}
  77. hunters=0
  78. monsters=0
  79. local hunters = {}
  80. local monsters = {}
  81.  
  82. deleteObject={}
  83.  
  84. SkillHunter = true
  85. SkillMonster = true
  86.  
  87. function eventNewPlayer(name)
  88. newData[name] = {
  89.   Team = "",
  90.   Xp = 0,
  91.   XpLevel = 0,
  92.   Level = 0,
  93.   Life = 100,
  94.   lang = "",
  95.   LifeMonster = 1,
  96.   winHunter = 0,
  97.   winMonster = 0,
  98.   tempo = os.time()
  99. }  
  100. newData[name].lang = translations[tfm.get.room.playerList[name].community] and tfm.get.room.playerList[name].community or 'en' -- define a linguagem do jogador
  101. ---------------------------------------
  102.  
  103. --[[ Win System ]]--
  104.  
  105. function eventLoop(currentTime,timeRemaining)
  106.   for _,obj in ipairs(deleteObject) do
  107.     if obj.time < os.time()-1000 then
  108.       tfm.exec.removeObject(obj.id)
  109.       table.remove(deleteObject,_)
  110.   end
  111. end
  112. if (timeRemaining <= 20000 or hunters == 0 or monsters == 0) and timeRemaining >= 19500 then
  113.   local victory=""
  114.     if hunters > monsters then
  115.       victory="Hunter"
  116.       tfm.exec.giveCheese(i)
  117.       tfm.exec.playerVictory(i)
  118.         elseif monsters > hunters then
  119.           victory="Monster"
  120.             elseif monsters == hunters then
  121.               victory="none"
  122. end
  123.     for i,v in pairs(tfm.get.room.playerList) do
  124.       if newData[i].Team == victory  then
  125.         tfm.exec.giveCheese(i)
  126.         tfm.exec.playerVictory(i)
  127.         if victory == "Monster" then
  128.           print("funcionou")
  129.         newData[i].winMonster = newData[i].winMonster + 5
  130.       if victory == "Hunter" then
  131.         print("funcionou hunter")
  132.         newData[i].winHunter = newData[i].winHunter + 5
  133.       else
  134.         if v.isDead then
  135.           tfm.exec.respawnPlayer(i)
  136.         end
  137.       end
  138.       if victory == "none" then
  139.         tfm.exec.killPlayer(i)
  140.         newData[i].winMonster = newData[i].winMonster + 5
  141.         newData[i].winHunter = newData[i].winHunter + 5
  142.       end
  143.       tfm.exec.setGameTime(10)
  144.     partidaTerminou=true
  145.     end
  146.   end
  147. end
  148. end
  149.  
  150.   if timeRemaining <= 0 then
  151.     tfm.exec.newGame(maps[math.random(#maps)])
  152.   end
  153. end
  154. ---------------------------------------
  155.  
  156. --[[ Team System ]]--
  157.  
  158. function eventNewGame()
  159.   hunters=0
  160.   monsters=0
  161.   teamtime=math.random(0,1)
  162.   for p,n in pairs(tfm.get.room.playerList) do
  163.     if teamtime == 0 then
  164.       newData[p].Team = "Monster"
  165.       tfm.exec.setNameColor(p, 0xCB546B) -- color red
  166.       tfm.exec.chatMessage(""..translations[newData[p].lang].tab_MonsterRed.."",p)
  167.       ui.removeTextArea(0,p)
  168.       ui.removeTextArea(2,p)
  169.       ui.removeTextArea(3,p)
  170.       ui.removeTextArea(4,p)
  171.       ui.removeTextArea(5,p)
  172.       ui.removeTextArea(5000,p)
  173.       ui.removeTextArea(5001,p)
  174.       SkillMonster = true
  175.       newData[p].LifeMonster=3
  176.       tfm.exec.movePlayer(p,73,234,false,0,0,false)
  177.       teamtime=1
  178.     monsters=monsters+1
  179.     else
  180.       newData[p].Team = "Hunter"
  181.       tfm.exec.setNameColor(p, 0x2F7FCC)
  182.       tfm.exec.chatMessage(""..translations[newData[p].lang].tab_HunterBlue.."",p)
  183.       ui.removeTextArea(50,p)
  184.       ui.removeTextArea(51,p)
  185.       ui.removeTextArea(001,p)
  186.       ui.removeTextArea(002,p)
  187.       ui.removeTextArea(003,p)
  188.       ui.removeTextArea(004,p)
  189.       SkillHunter = true
  190.       newData[p].Life = 100
  191.       tfm.exec.movePlayer(p,1500,250,false,0,0,false)
  192.       teamtime=0
  193.     hunters=hunters+1
  194.     end
  195.     LifeStatus(p)
  196.     --eventPlayerDied(p)
  197.     LifeStatusMonster(p)
  198.     tfm.exec.newGame(maps[math.random(#maps)])
  199.   tfm.exec.setGameTime(120)
  200.   end
  201. end
  202.  
  203. --[[ Level System ]]--
  204.  
  205. function SubLevel(name,xp)
  206.   newData[name].XpLevel = newData[name].XpLevel + XpLevel
  207.     if newData[name].XpLevel >= 100 then
  208.       newData[name].XpLevel = 100
  209.       newData[name].Level = newData[name].Level + 1
  210.       newData[name].XpLevel = newData[name].XpLevel - 100
  211.   end
  212. end
  213. ---------------------------------------
  214.  
  215. function eventChatCommand(p,c)
  216.   if c == [[p]] then
  217.     ui.addTextArea(40, "", p, 226, 37, 306, 205, 0x313a4a, 0x313a4a, 1, true)
  218.     ui.addTextArea(41, "<font size='15'><p align='center'>"..p.."<b></p>", p, 226, 37, 306, 25, 0x2c3438, 0x2c3438, 1, true)
  219.     ui.addTextArea(42, ""..translations[newData[p].lang].tab_victoriesHunter.."", p, 228, 74, 132, 20, 0x313a4a, 0x313a4a, 1, true)
  220.     ui.addTextArea(43, "<font size='15'><p align='center'>"..newData[p].winHunter.."/1000<b></p>", p, 228, 100, 166, 22, 0x375361, 0x2c3438, 1, true)
  221.     ui.addTextArea(44, ""..translations[newData[p].lang].tab_victoriesMonsters.."", p, 229, 134, 141, 20, 0x313a4a, 0x313a4a, 1, true)
  222.     ui.addTextArea(45, "<font size='15'><p align='center'>"..newData[p].winMonster.."/1000<b></p>", p, 228, 161, 166, 22, 0x375361, 0x2c3438, 1, true)
  223.     ui.addTextArea(46, ""..translations[newData[p].lang].tab_title.."", p, 427, 74, 100, 20, 0x313a4a, 0x313a4a, 1, true)
  224.     ui.addTextArea(47, "<font size='15'><p align='center'><b></p>", p, 416, 100, 109, 22, 0x375361, 0x2c3438, 1, true)
  225.     ui.addTextArea(48, ""..translations[newData[p].lang].tab_Level.."", p, 419, 134, 108, 20, 0x313a4a, 0x313a4a, 1, true)
  226.     ui.addTextArea(49, "<font size='15'><p align='center'>"..newData[p].XpLevel.."<b></p>", p, 418, 161, 108, 22, 0x375361, 0x2c3438, 1, true)
  227.     ui.addTextArea(50, "<font size='15'><a href='event:closeprofile'><b><R>X</R></a>", p, 512, 37, 17, 25, 0x2c3438, 0x2c3438, 0, true)
  228.       elseif c == [[h]] then
  229.         ui.addTextArea(100, "", p, 79, 74, 641, 252, 0x313a4a, 0x313a4a, 1, true)
  230.         ui.addTextArea(103, ""..translations[newData[p].lang].tab_helpStarGame1.."", p, 86, 86, 628, 227, 0x313a4a, 0x2c3438, 1, true)
  231.         ui.addTextArea(104, "<font size='15'><a href='event:closehelp'><b><R>X</R></a>", p, 686, 87, 28, 30, 0x2c3438, 0x2c3438, 0, true)
  232.     end
  233. end
  234. -------------------------------
  235. -- @ Sistema de jogar flechas
  236. -- @ Os caçadores atiram flechas
  237. --------------------------------
  238. function balls(name)
  239.   if k == 32 and tfm.get.room.playerList[p].isFacingRight == true and info[p].time < os.time()-1500 then
  240.     info[p].time = os.time()
  241.     tfm.exec.movePlayer(p,0,0,true,100,0,false)
  242.   elseif k == 32 and tfm.get.room.playerList[p].isFacingRight == false and info[p].time < os.time()-1500 then
  243.     info[p].time = os.time()
  244.     tfm.exec.movePlayer(p,0,0,true,-100,0,false)
  245.     end
  246. local facingLeft = {}
  247. for name in pairs(tfm.get.room.playerList) do
  248.   for _,key in pairs{0,2,3,32} do system.bindKeyboard(name, key, true)
  249.     end
  250. end
  251. function eventKeyboard(name, key, down, x, y)
  252.   if key == 3 and newData[name].tempo < os.time()-1050 then
  253.     if newData[name].Team ~= "Monster" then
  254.         newData[name].tempo = os.time();
  255.           if tfm.get.room.playerList[name].isFacingRight then
  256.             obj_id = tfm.exec.addShamanObject(35, x+20, y, 0, 20)
  257.           else
  258.             obj_id = tfm.exec.addShamanObject(35, x-20, y, 0, -20)
  259.           end
  260.      
  261.       table.insert(deleteObject,{id=obj_id,time=os.time()})
  262.           else
  263.             eventKeyboard(name,32,down,x,y)
  264.         end
  265.     end
  266. if key == 32 and newData[name].Team == "Monster" then
  267.   for n,player in pairs(tfm.get.room.playerList) do
  268.     if name ~= n and  newData[n].Team ~= "Monster" and newData[n].Life ~= 0 and x >= player.x - 15 and x <= player.x + 15 and y >= player.y - 15 and y <= player.y + 15 then
  269.       newData[n].Life = newData[n].Life - math.random(0,3)
  270.       tfm.exec.displayParticle(5,x,y,-0.2,-0.2,0,0)
  271.       LifeStatus(n)
  272.           break
  273.         end
  274.       end
  275.     end
  276.   end
  277. end
  278. balls("Hpassos")
  279.  
  280. function eventPlayerWon(name)
  281. tfm.exec.setGameTime(5)
  282. end
  283.  
  284.  
  285. -----------------------
  286. -- @TextAreas do jogo.
  287. -- @TextAras do Xp/Mana
  288. -----------------------
  289. -- @TextAra dos dados dos player [Profile] / [Help]
  290.    LifeStatus(name)
  291.   ui.addTextArea(200, "", name, 9, 27, 22, 20, 0x2b8a34, 0x2b8a34, 1, true)
  292.   ui.addTextArea(201, "<p align='center'><a href='event:profile'><B>P</B></a></p>", name, 9, 27, 22, 20, 0x313a4a, 0x313a4a, 0.6, true)
  293.   ui.addTextArea(202, "", name, 44, 27, 22, 20, 0x2b8a34, 0x2b8a34, 1, true)
  294.   ui.addTextArea(203, "<p align='center'><a href='event:help'><B>H</B></a></p>", name, 44, 27, 22, 20, 0x313a4a, 0x313a4a, 0.6, true)
  295. end
  296. -------------------------------
  297. -- @EventTextAreaCallback
  298. -- @
  299. -------------------------------
  300. function eventTextAreaCallback(t,p,link)
  301.   if link == [[profile]] then
  302.     ui.addTextArea(40, "", p, 226, 37, 306, 205, 0x313a4a, 0x313a4a, 1, true)
  303.     ui.addTextArea(41, "<font size='15'><p align='center'>"..p.."<b></p>", p, 226, 37, 306, 25, 0x2c3438, 0x2c3438, 1, true)
  304.     ui.addTextArea(42, ""..translations[newData[p].lang].tab_victoriesHunter.."", p, 228, 74, 132, 20, 0x313a4a, 0x313a4a, 1, true)
  305.     ui.addTextArea(43, "<font size='15'><p align='center'>"..newData[p].winHunter.."/1000<b></p>", p, 228, 100, 166, 22, 0x375361, 0x2c3438, 1, true)
  306.     ui.addTextArea(44, ""..translations[newData[p].lang].tab_victoriesMonsters.."", p, 229, 134, 141, 20, 0x313a4a, 0x313a4a, 1, true)
  307.     ui.addTextArea(45, "<font size='15'><p align='center'>"..newData[p].winMonster.."/1000<b></p>", p, 228, 161, 166, 22, 0x375361, 0x2c3438, 1, true)
  308.     ui.addTextArea(46, ""..translations[newData[p].lang].tab_title.."", p, 427, 74, 100, 20, 0x313a4a, 0x313a4a, 1, true)
  309.     ui.addTextArea(47, "<font size='15'><p align='center'><b></p>", p, 416, 100, 109, 22, 0x375361, 0x2c3438, 1, true)
  310.     ui.addTextArea(48, ""..translations[newData[p].lang].tab_Level.."", p, 419, 134, 108, 20, 0x313a4a, 0x313a4a, 1, true)
  311.     ui.addTextArea(49, "<font size='15'><p align='center'>"..newData[p].XpLevel.."<b></p>", p, 418, 161, 108, 22, 0x375361, 0x2c3438, 1, true)
  312.     ui.addTextArea(50, "<font size='15'><a href='event:closeprofile'><b><R>X</R></a>", p, 512, 37, 17, 25, 0x2c3438, 0x2c3438, 0, true)
  313.   elseif link == [[closeprofile]] then
  314.     for i = 40,50 do --
  315.       ui.removeTextArea(i,p)
  316.     end
  317.   elseif link == [[help]] then
  318.       ui.addTextArea(100, "", p, 79, 74, 641, 252, 0x313a4a, 0x313a4a, 1, true)
  319.       ui.addTextArea(103, ""..translations[newData[p].lang].tab_helpStarGame1.."", p, 86, 86, 628, 227, 0x313a4a, 0x2c3438, 1, true)
  320.       ui.addTextArea(104, "<font size='15'><a href='event:closehelp'><b><R>X</R></a>", p, 686, 87, 28, 30, 0x2c3438, 0x2c3438, 0, true)
  321.   elseif link == [[closehelp]] then
  322.     for i = 100,104 do
  323.       ui.removeTextArea(i,p)
  324.     end
  325.   elseif link == [[SkillHunter2]] and newData[p].Team ~= "Monster" then
  326.     print("Chamou")
  327.     if SkillHunter then
  328.       newData[p].Life = newData[p].Life + 30
  329.       tfm.exec.chatMessage("<B>Você está com + 30% de energia! Poderá usar essa skill temporaria, novamente na proxima rodada!</B>",p)
  330.       SkillHunter = false
  331.       print(""..newData[p].Life.."")      
  332.     end
  333.     LifeStatus(p)
  334.   elseif link == [[SkillMonster1]] and newData[p].Team == "Monster" then
  335.     if SkillMonster then
  336.     for i,v in pairs(tfm.get.room.playerList) do
  337.       if newData[i].Team == "Hunter" then
  338.         ui.addTextArea(5000, "", i, -4599, -4799, 9999, 9999, 0x1a0000, 0x1a0000, 0.9, true)
  339.         tfm.exec.chatMessage("<B>Sua visão foi afetada por um mostro! .</B>", i)
  340.       end
  341.     end
  342.       tfm.exec.chatMessage("<B>Você afetou a visão dos caçadores! Poderá usar essa skill temporaria, novamente na proxima rodada!</B>",i)
  343.       SkillMonster = false
  344.     end
  345.   end
  346. end
  347. ------------------------
  348. -- @Sistema interligados a Vida/energia
  349. --@
  350. ------------------------
  351. -- @Status
  352. -- @TextArea da vida do Monster.
  353. function LifeStatusMonster(name)
  354.   if newData[name].Team == "Monster" then
  355.     local color = "#de0707"
  356.   if newData[name].LifeMonster == 2 then
  357.     color = "#23a62a"
  358.   elseif newData[name].LifeMonster == 1 then
  359.     color = "#8c278c"
  360.   elseif newData[name].LifeMonster == 0 then
  361.     color = "#b09d30"
  362.   end
  363.     ui.addTextArea(51, "<font size='40' color='"..color.."'>❤</font><font size='26'><B>x"..newData[name].LifeMonster.."</B>", name, 16, 344, 100, 100, 0xde0707, 0x000000, 0, true)
  364.     end
  365. end
  366. ---
  367. --@Status
  368. -- @System Status Hunter
  369. function LifeStatus(name)
  370.   if newData[name].Team ~= "Monster" then
  371.     if newData[name].Life <= 0 then
  372.       newData[name].Life = 0
  373.       tfm.exec.killPlayer(name)
  374.     end
  375.     local cod = 226
  376.   if newData[name].Life > 100 then
  377.       cod = 280
  378.     else
  379.       cod = 226
  380.     end
  381.     ui.addTextArea(0, "", name, 254, 372, (newData[name].Life*2.1), 10, 0x006191, 0x006191, 1, true)
  382.     ui.addTextArea(1, "<p align='center'>"..newData[name].Life.."/100</p>", name, 252, 368, cod, 18, 0x324650, 0x000000, 0.4, true)
  383.     ui.addTextArea(2, "", name, 715, 365, 69, 18, 0x2b8a34, 0x2b8a34, 1, true)
  384.     ui.addTextArea(3, "<a href='event:SkillHunter2'><B><R>Cura</R></B></a>", name, 715, 365, 69, 18, 0x313a4a, 0x313a4a, 0.8, true)
  385. else
  386.     ui.removeTextArea(0,name)ui.removeTextArea(1,name)
  387. end
  388. ----------
  389. --@Verifica se o jogador é MOnstro e lhe dá skills de monstros.
  390. if newData[name].Team ~= "Hunter" then
  391.     ui.addTextArea(001, "", name, 715, 365, 69, 18, 0x2b8a34, 0x2b8a34, 1, true)
  392.     ui.addTextArea(002, "<a href='event:SkillMonster1'><B><BV>off lights</BV></B></a>", name, 715, 365, 69, 18, 0x313a4a, 0x313a4a, 0.8, true)
  393. end
  394. -- @Verifica se o jogado está com a energia abaixo de 50, e lhe dá o poder de meep!
  395. --@Monstro Morre renasce 3 vezes.
  396.  
  397. function eventPlayerDied(name)
  398.   if newData[name].Team == "Monster" then
  399.     newData[name].LifeMonster = newData[name].LifeMonster - 1
  400.     LifeStatusMonster(name)
  401.     if newData[name].LifeMonster <= 0 then
  402.       monsters=monsters-1
  403.       tfm.exec.chatMessage("Acabaram-se todas as suas vidas :(", name)
  404.     else
  405.       tfm.exec.respawnPlayer(name)
  406.       tfm.exec.movePlayer(name,73,234,false,0,0,false)
  407.     end
  408.   else
  409.     if newData[name].Life <= 0 then
  410.       hunters=hunters-1
  411.     end
  412. end
  413.    if newData[name].Life > 0 and newData[name].Team == "Hunter" then
  414.     tfm.exec.respawnPlayer(name)
  415.     tfm.exec.movePlayer(name,1500,250,false,0,0,false)
  416.     ui.removeTextArea(5000,name)
  417.     ui.removeTextArea(5001,name)
  418.     newData[name].Life = newData[name].Life - 10
  419.     if newData[name].Life <= 0 then
  420.       tfm.exec.killPlayer(name)
  421.       tfm.exec.chatMessage("<B>Sua energia chegou ao fim! </B>:(", name)
  422.     end
  423.   end
  424.   LifeStatus(name)
  425. end
  426. end
  427.  
  428. tfm.exec.newGame(maps[math.random(#maps)])
  429. table.foreach(tfm.get.room.playerList,eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement