Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------
- -- @Version: 4.9
- -- @OBS1: Bug da flecha para a esquerda corrigido.
- -- @OBS2: Corrigido, apenas os Hunters jogam as flechas
- -- @OBS3: A barra de vida diminui.
- -- @OBS4: Adicionado rotação de mapas.
- -- @OBS5: Adicionado Skills.
- ------------------------
- --[[Traduções]]--
- translations = {
- br = { -- br = Brasil = Pt_br = Português brasil.
- welcome = "Bem-vindo ao #DeaddlyHunt. Utilize os atalhos: H [Help], P [Perfil], T [Atualizações]",
- tab_profile = "Perfil",
- tab_Howtoplay = "Como jogar?",
- tab_help = "Para mais informações pressione [H]",
- tab_requiredXP = "XP Requerido",
- tab_title = "Titulo",
- tab_Level = "Nivel",
- tab_healing = "Cura",
- tab_LevelNext = "Você agora é nível",
- tab_victoriesHunter = "Vitorias sendo Caçador",
- tab_victoriesMonsters = "Vitorias sendo Monstro",
- tab_MonsterRed = "<R><B>Você nasceu como um Monster! Tire a energia dos Caçadores!!</B></R>",
- tab_HunterBlue = "<BV><B>Você nasceu como um caçador! Fleche os Monstros!!</B></BV>",
- 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>",
- 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>",
- 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>",
- tab_SkillUsedHunter = "<B>Você está com + 30% de energia! Poderá usar essa skill temporaria, novamente na proxima rodada!</B>",
- tab_SkillUsedMonster = "<B>Você alterou a visão dos caçadores! Poderá usar essa skill temporaria, novamente na proxima rodada!</B>",
- tab_AffectedHunter = "<B>Sua visão foi afetada por um monstro!</B>",
- close = "Fechar",
- },
- en = { -- en = English = Inglês
- welcome = "Welcome to #DeaddlyHunt. Use the shortcuts: H [Help], P [Profile], T [Updates]",
- tab_profile = "Profile",
- tab_Howtoplay ="How to play?",
- tab_help = "For more information press H",
- tab_requiredXP = "Required XP",
- tab_title = "Title",
- tab_Level = "Level",
- tab_healing = "healing",
- tab_LevelNext = "You are now level",
- tab_victoriesHunter = "Hunters win!",
- tab_victoriesMonsters = "Monsters win!",
- tab_MonsterRed = "<R><B>You are a Monster! Kill the hunters!!</B></R>",
- tab_HunterBlue = "<BV><B>You are a Hunter! Shoot an arrow to the Monsters!!</B></BV>",
- 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>",
- tab_helpStarGame2 = "<font size='15'><i>SpellBook:</i>\n<b>special books that release classes and new powers in the store.</b></font>",
- 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>",
- tab_SkillUsedHunter = "<B>You have + 30% energy! You can use this temporary skill again in the next round!</B>",
- tab_SkillUsedMonster = "<B>You changed the vision of the hunters! You can use this temporary skill again in the next round!</B>",
- tab_AffectedHunter = "<B>Your vision was affected by a monster!</B>",
- close = "Close",
- }
- }
- --------------------------------
- --[[ Disable ]]--
- for _, v in next, {'AutoShaman', 'AutoNewGame', 'AutoTimeLeft', 'PhysicalConsumables', 'AfkDeath', 'MortCommand', 'AutoScore'} do
- tfm.exec['disable' .. v]()
- end
- tfm.exec.chatMessage =print
- -------------------------------
- --[[ Script data ]]--
- newData = {}
- tempo = os.time()
- maps = {7308494,7308488,7311388}
- p = {}
- hunters=0
- monsters=0
- local hunters = {}
- local monsters = {}
- deleteObject={}
- SkillHunter = true
- SkillMonster = true
- function eventNewPlayer(name)
- newData[name] = {
- Team = "",
- Xp = 0,
- XpLevel = 0,
- Level = 0,
- Life = 100,
- lang = "",
- LifeMonster = 1,
- winHunter = 0,
- winMonster = 0,
- tempo = os.time()
- }
- newData[name].lang = translations[tfm.get.room.playerList[name].community] and tfm.get.room.playerList[name].community or 'en' -- define a linguagem do jogador
- ---------------------------------------
- --[[ Win System ]]--
- function eventLoop(currentTime,timeRemaining)
- for _,obj in ipairs(deleteObject) do
- if obj.time < os.time()-1000 then
- tfm.exec.removeObject(obj.id)
- table.remove(deleteObject,_)
- end
- end
- if (timeRemaining <= 20000 or hunters == 0 or monsters == 0) and timeRemaining >= 19500 then
- local victory=""
- if hunters > monsters then
- victory="Hunter"
- tfm.exec.giveCheese(i)
- tfm.exec.playerVictory(i)
- elseif monsters > hunters then
- victory="Monster"
- elseif monsters == hunters then
- victory="none"
- end
- for i,v in pairs(tfm.get.room.playerList) do
- if newData[i].Team == victory then
- tfm.exec.giveCheese(i)
- tfm.exec.playerVictory(i)
- if victory == "Monster" then
- print("funcionou")
- newData[i].winMonster = newData[i].winMonster + 5
- if victory == "Hunter" then
- print("funcionou hunter")
- newData[i].winHunter = newData[i].winHunter + 5
- else
- if v.isDead then
- tfm.exec.respawnPlayer(i)
- end
- end
- if victory == "none" then
- tfm.exec.killPlayer(i)
- newData[i].winMonster = newData[i].winMonster + 5
- newData[i].winHunter = newData[i].winHunter + 5
- end
- tfm.exec.setGameTime(10)
- partidaTerminou=true
- end
- end
- end
- end
- if timeRemaining <= 0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- ---------------------------------------
- --[[ Team System ]]--
- function eventNewGame()
- hunters=0
- monsters=0
- teamtime=math.random(0,1)
- for p,n in pairs(tfm.get.room.playerList) do
- if teamtime == 0 then
- newData[p].Team = "Monster"
- tfm.exec.setNameColor(p, 0xCB546B) -- color red
- tfm.exec.chatMessage(""..translations[newData[p].lang].tab_MonsterRed.."",p)
- ui.removeTextArea(0,p)
- ui.removeTextArea(2,p)
- ui.removeTextArea(3,p)
- ui.removeTextArea(4,p)
- ui.removeTextArea(5,p)
- ui.removeTextArea(5000,p)
- ui.removeTextArea(5001,p)
- SkillMonster = true
- newData[p].LifeMonster=3
- tfm.exec.movePlayer(p,73,234,false,0,0,false)
- teamtime=1
- monsters=monsters+1
- else
- newData[p].Team = "Hunter"
- tfm.exec.setNameColor(p, 0x2F7FCC)
- tfm.exec.chatMessage(""..translations[newData[p].lang].tab_HunterBlue.."",p)
- ui.removeTextArea(50,p)
- ui.removeTextArea(51,p)
- ui.removeTextArea(001,p)
- ui.removeTextArea(002,p)
- ui.removeTextArea(003,p)
- ui.removeTextArea(004,p)
- SkillHunter = true
- newData[p].Life = 100
- tfm.exec.movePlayer(p,1500,250,false,0,0,false)
- teamtime=0
- hunters=hunters+1
- end
- LifeStatus(p)
- --eventPlayerDied(p)
- LifeStatusMonster(p)
- tfm.exec.newGame(maps[math.random(#maps)])
- tfm.exec.setGameTime(120)
- end
- end
- --[[ Level System ]]--
- function SubLevel(name,xp)
- newData[name].XpLevel = newData[name].XpLevel + XpLevel
- if newData[name].XpLevel >= 100 then
- newData[name].XpLevel = 100
- newData[name].Level = newData[name].Level + 1
- newData[name].XpLevel = newData[name].XpLevel - 100
- end
- end
- ---------------------------------------
- function eventChatCommand(p,c)
- if c == [[p]] then
- ui.addTextArea(40, "", p, 226, 37, 306, 205, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(41, "<font size='15'><p align='center'>"..p.."<b></p>", p, 226, 37, 306, 25, 0x2c3438, 0x2c3438, 1, true)
- ui.addTextArea(42, ""..translations[newData[p].lang].tab_victoriesHunter.."", p, 228, 74, 132, 20, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(43, "<font size='15'><p align='center'>"..newData[p].winHunter.."/1000<b></p>", p, 228, 100, 166, 22, 0x375361, 0x2c3438, 1, true)
- ui.addTextArea(44, ""..translations[newData[p].lang].tab_victoriesMonsters.."", p, 229, 134, 141, 20, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(45, "<font size='15'><p align='center'>"..newData[p].winMonster.."/1000<b></p>", p, 228, 161, 166, 22, 0x375361, 0x2c3438, 1, true)
- ui.addTextArea(46, ""..translations[newData[p].lang].tab_title.."", p, 427, 74, 100, 20, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(47, "<font size='15'><p align='center'><b></p>", p, 416, 100, 109, 22, 0x375361, 0x2c3438, 1, true)
- ui.addTextArea(48, ""..translations[newData[p].lang].tab_Level.."", p, 419, 134, 108, 20, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(49, "<font size='15'><p align='center'>"..newData[p].XpLevel.."<b></p>", p, 418, 161, 108, 22, 0x375361, 0x2c3438, 1, true)
- ui.addTextArea(50, "<font size='15'><a href='event:closeprofile'><b><R>X</R></a>", p, 512, 37, 17, 25, 0x2c3438, 0x2c3438, 0, true)
- elseif c == [[h]] then
- ui.addTextArea(100, "", p, 79, 74, 641, 252, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(103, ""..translations[newData[p].lang].tab_helpStarGame1.."", p, 86, 86, 628, 227, 0x313a4a, 0x2c3438, 1, true)
- ui.addTextArea(104, "<font size='15'><a href='event:closehelp'><b><R>X</R></a>", p, 686, 87, 28, 30, 0x2c3438, 0x2c3438, 0, true)
- end
- end
- -------------------------------
- -- @ Sistema de jogar flechas
- -- @ Os caçadores atiram flechas
- --------------------------------
- function balls(name)
- if k == 32 and tfm.get.room.playerList[p].isFacingRight == true and info[p].time < os.time()-1500 then
- info[p].time = os.time()
- tfm.exec.movePlayer(p,0,0,true,100,0,false)
- elseif k == 32 and tfm.get.room.playerList[p].isFacingRight == false and info[p].time < os.time()-1500 then
- info[p].time = os.time()
- tfm.exec.movePlayer(p,0,0,true,-100,0,false)
- end
- local facingLeft = {}
- for name in pairs(tfm.get.room.playerList) do
- for _,key in pairs{0,2,3,32} do system.bindKeyboard(name, key, true)
- end
- end
- function eventKeyboard(name, key, down, x, y)
- if key == 3 and newData[name].tempo < os.time()-1050 then
- if newData[name].Team ~= "Monster" then
- newData[name].tempo = os.time();
- if tfm.get.room.playerList[name].isFacingRight then
- obj_id = tfm.exec.addShamanObject(35, x+20, y, 0, 20)
- else
- obj_id = tfm.exec.addShamanObject(35, x-20, y, 0, -20)
- end
- table.insert(deleteObject,{id=obj_id,time=os.time()})
- else
- eventKeyboard(name,32,down,x,y)
- end
- end
- if key == 32 and newData[name].Team == "Monster" then
- for n,player in pairs(tfm.get.room.playerList) do
- 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
- newData[n].Life = newData[n].Life - math.random(0,3)
- tfm.exec.displayParticle(5,x,y,-0.2,-0.2,0,0)
- LifeStatus(n)
- break
- end
- end
- end
- end
- end
- balls("Hpassos")
- function eventPlayerWon(name)
- tfm.exec.setGameTime(5)
- end
- -----------------------
- -- @TextAreas do jogo.
- -- @TextAras do Xp/Mana
- -----------------------
- -- @TextAra dos dados dos player [Profile] / [Help]
- LifeStatus(name)
- ui.addTextArea(200, "", name, 9, 27, 22, 20, 0x2b8a34, 0x2b8a34, 1, true)
- 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)
- ui.addTextArea(202, "", name, 44, 27, 22, 20, 0x2b8a34, 0x2b8a34, 1, true)
- 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)
- end
- -------------------------------
- -- @EventTextAreaCallback
- -- @
- -------------------------------
- function eventTextAreaCallback(t,p,link)
- if link == [[profile]] then
- ui.addTextArea(40, "", p, 226, 37, 306, 205, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(41, "<font size='15'><p align='center'>"..p.."<b></p>", p, 226, 37, 306, 25, 0x2c3438, 0x2c3438, 1, true)
- ui.addTextArea(42, ""..translations[newData[p].lang].tab_victoriesHunter.."", p, 228, 74, 132, 20, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(43, "<font size='15'><p align='center'>"..newData[p].winHunter.."/1000<b></p>", p, 228, 100, 166, 22, 0x375361, 0x2c3438, 1, true)
- ui.addTextArea(44, ""..translations[newData[p].lang].tab_victoriesMonsters.."", p, 229, 134, 141, 20, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(45, "<font size='15'><p align='center'>"..newData[p].winMonster.."/1000<b></p>", p, 228, 161, 166, 22, 0x375361, 0x2c3438, 1, true)
- ui.addTextArea(46, ""..translations[newData[p].lang].tab_title.."", p, 427, 74, 100, 20, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(47, "<font size='15'><p align='center'><b></p>", p, 416, 100, 109, 22, 0x375361, 0x2c3438, 1, true)
- ui.addTextArea(48, ""..translations[newData[p].lang].tab_Level.."", p, 419, 134, 108, 20, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(49, "<font size='15'><p align='center'>"..newData[p].XpLevel.."<b></p>", p, 418, 161, 108, 22, 0x375361, 0x2c3438, 1, true)
- ui.addTextArea(50, "<font size='15'><a href='event:closeprofile'><b><R>X</R></a>", p, 512, 37, 17, 25, 0x2c3438, 0x2c3438, 0, true)
- elseif link == [[closeprofile]] then
- for i = 40,50 do --
- ui.removeTextArea(i,p)
- end
- elseif link == [[help]] then
- ui.addTextArea(100, "", p, 79, 74, 641, 252, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(103, ""..translations[newData[p].lang].tab_helpStarGame1.."", p, 86, 86, 628, 227, 0x313a4a, 0x2c3438, 1, true)
- ui.addTextArea(104, "<font size='15'><a href='event:closehelp'><b><R>X</R></a>", p, 686, 87, 28, 30, 0x2c3438, 0x2c3438, 0, true)
- elseif link == [[closehelp]] then
- for i = 100,104 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[SkillHunter2]] and newData[p].Team ~= "Monster" then
- print("Chamou")
- if SkillHunter then
- newData[p].Life = newData[p].Life + 30
- tfm.exec.chatMessage("<B>Você está com + 30% de energia! Poderá usar essa skill temporaria, novamente na proxima rodada!</B>",p)
- SkillHunter = false
- print(""..newData[p].Life.."")
- end
- LifeStatus(p)
- elseif link == [[SkillMonster1]] and newData[p].Team == "Monster" then
- if SkillMonster then
- for i,v in pairs(tfm.get.room.playerList) do
- if newData[i].Team == "Hunter" then
- ui.addTextArea(5000, "", i, -4599, -4799, 9999, 9999, 0x1a0000, 0x1a0000, 0.9, true)
- tfm.exec.chatMessage("<B>Sua visão foi afetada por um mostro! .</B>", i)
- end
- end
- tfm.exec.chatMessage("<B>Você afetou a visão dos caçadores! Poderá usar essa skill temporaria, novamente na proxima rodada!</B>",i)
- SkillMonster = false
- end
- end
- end
- ------------------------
- -- @Sistema interligados a Vida/energia
- --@
- ------------------------
- -- @Status
- -- @TextArea da vida do Monster.
- function LifeStatusMonster(name)
- if newData[name].Team == "Monster" then
- local color = "#de0707"
- if newData[name].LifeMonster == 2 then
- color = "#23a62a"
- elseif newData[name].LifeMonster == 1 then
- color = "#8c278c"
- elseif newData[name].LifeMonster == 0 then
- color = "#b09d30"
- end
- 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)
- end
- end
- ---
- --@Status
- -- @System Status Hunter
- function LifeStatus(name)
- if newData[name].Team ~= "Monster" then
- if newData[name].Life <= 0 then
- newData[name].Life = 0
- tfm.exec.killPlayer(name)
- end
- local cod = 226
- if newData[name].Life > 100 then
- cod = 280
- else
- cod = 226
- end
- ui.addTextArea(0, "", name, 254, 372, (newData[name].Life*2.1), 10, 0x006191, 0x006191, 1, true)
- ui.addTextArea(1, "<p align='center'>"..newData[name].Life.."/100</p>", name, 252, 368, cod, 18, 0x324650, 0x000000, 0.4, true)
- ui.addTextArea(2, "", name, 715, 365, 69, 18, 0x2b8a34, 0x2b8a34, 1, true)
- ui.addTextArea(3, "<a href='event:SkillHunter2'><B><R>Cura</R></B></a>", name, 715, 365, 69, 18, 0x313a4a, 0x313a4a, 0.8, true)
- else
- ui.removeTextArea(0,name)ui.removeTextArea(1,name)
- end
- ----------
- --@Verifica se o jogador é MOnstro e lhe dá skills de monstros.
- if newData[name].Team ~= "Hunter" then
- ui.addTextArea(001, "", name, 715, 365, 69, 18, 0x2b8a34, 0x2b8a34, 1, true)
- ui.addTextArea(002, "<a href='event:SkillMonster1'><B><BV>off lights</BV></B></a>", name, 715, 365, 69, 18, 0x313a4a, 0x313a4a, 0.8, true)
- end
- -- @Verifica se o jogado está com a energia abaixo de 50, e lhe dá o poder de meep!
- --@Monstro Morre renasce 3 vezes.
- function eventPlayerDied(name)
- if newData[name].Team == "Monster" then
- newData[name].LifeMonster = newData[name].LifeMonster - 1
- LifeStatusMonster(name)
- if newData[name].LifeMonster <= 0 then
- monsters=monsters-1
- tfm.exec.chatMessage("Acabaram-se todas as suas vidas :(", name)
- else
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,73,234,false,0,0,false)
- end
- else
- if newData[name].Life <= 0 then
- hunters=hunters-1
- end
- end
- if newData[name].Life > 0 and newData[name].Team == "Hunter" then
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,1500,250,false,0,0,false)
- ui.removeTextArea(5000,name)
- ui.removeTextArea(5001,name)
- newData[name].Life = newData[name].Life - 10
- if newData[name].Life <= 0 then
- tfm.exec.killPlayer(name)
- tfm.exec.chatMessage("<B>Sua energia chegou ao fim! </B>:(", name)
- end
- end
- LifeStatus(name)
- end
- end
- tfm.exec.newGame(maps[math.random(#maps)])
- table.foreach(tfm.get.room.playerList,eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement