Advertisement
Haxhhhhhhhhh

SurvivorSpree v1.3

Jul 27th, 2016
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.04 KB | None | 0 0
  1. tfm.exec.disableAutoNewGame(true)
  2. tfm.exec.disableAfkDeath(true)
  3. mapas={"@290971","@293222","@293487","@290865","@276534","@280159","@280120","@279689","@1676629","@3079426","@2393716","@289932","@292592","@305748","@3587860","@837797","@1533333"}
  4. spree=0
  5. vivo=0;
  6. shama=""
  7. sprem=0
  8. sala=0;
  9. data={}
  10. tempspree=0
  11. system.disableChatCommandDisplay("status")
  12. function eventNewPlayer(n)
  13.     sala=sala+1
  14.     newData={
  15.     ["shaman"]=0;
  16.     ["sobre"]=0;
  17.         ["spreem"]=0;
  18.         ["kills"]=0;
  19.         ["killed"]=0;
  20.         };
  21.     data[n] = newData;
  22. end
  23. function eventPlayerVampire(playerName)
  24.     vivo=vivo-1
  25.     tfm.exec.setPlayerScore(playerName,-1000,false)
  26. end
  27. for name,player in pairs(tfm.get.room.playerList) do
  28.     eventNewPlayer(name)
  29. end
  30. function eventChatCommand(name,message)
  31.     if message == "status" then
  32.         ui.addPopup(0,0,"<font size='12'>Seus status:<br><br>Ratos mortos: "..data[name].kills.."<br>Você morreu: "..data[name].killed.."<br>Você foi shaman "..data[name].shaman.." vezes<br>Você sobreviveu "..data[name].sobre.." vezes",name,350,175,200,true)
  33.     end
  34. end
  35. function eventLoop(currentTime, timeRemaining)
  36.     if vivo <= 0 then
  37.         tfm.exec.newGame(mapas[math.random(#mapas)])
  38.     end
  39.     tempspree=tempspree+1
  40.     if tempspree == 20 then
  41.         spree=0
  42.         tempspree=0
  43.         ui.removeTextArea(0,nil)
  44.         print("Spree zerado")
  45.     end
  46.     tfm.exec.setUIMapName("<N>SurvivorSpree versão 1.3 / Tempo restante: <J>"..timeRemaining.." <N>/ Ratos na sala: <J>"..sala.." <N>/ Ratos vivos: <J>"..vivo.."</J>")
  47.     if timeRemaining <= 1000 then
  48.         for name,player in pairs(tfm.get.room.playerList) do
  49.             if not tfm.get.room.playerList[name].isDied then
  50.                 tfm.exec.giveCheese(name)
  51.                 tfm.exec.playerVictory(name)
  52.             end
  53.         end
  54.         tfm.exec.newGame(mapas[math.random(#mapas)])
  55.     end
  56. end
  57. function eventPlayerWon(playerName)
  58.     vivo=vivo-1
  59.     if not tfm.get.room.playerList[playerName].isShaman then
  60.         data[playerName].sobre=data[playerName].sobre+1
  61.     end
  62.     if pos == 1 then
  63.         ui.addPopup(0, 0, "Parabéns "..playerName.."! Você firstou!", NIL, 300, 30, 300, true)
  64.     end
  65. end
  66. function eventNewGame()
  67.     vivo=-1;
  68.     sala=0;
  69.     tempspree=0
  70.     for name,player in pairs(tfm.get.room.playerList) do
  71.         sala=sala+1
  72.         vivo=vivo+1
  73.         tfm.exec.setPlayerScore(name,10,false)
  74.         if tfm.get.room.playerList[name].isShaman then
  75.             tfm.exec.setPlayerScore(name,-1001,false)
  76.             shama=name
  77.         end
  78.     end
  79.     data[shama].shaman=data[shama].shaman+1
  80. end
  81. function eventPlayerDied(playerName)
  82.     data[playerName].killed=data[playerName].killed+1
  83.     data[shama].kills=data[shama].kills+1
  84.     tfm.exec.setPlayerScore(playerName,-1000,false)
  85.     vivo=vivo-1
  86.     spree=spree+1
  87.     print(spree)
  88.     if spree == 3 then
  89.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x3<font color='#909090'> do shaman!",nil,0,30,300,35)
  90.         tempspree=1
  91.     elseif spree == 4 then
  92.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x4<font color='#909090'> Shaman está enfurecido!",nil,0,30,400,35)
  93.         tempspree=1
  94.     elseif spree == 5 then
  95.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x5<font color='#909090'> Shaman está implacável!",nil,0,30,400,35)
  96.         tempspree=1
  97.     elseif spree == 6 then
  98.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x6<font color='#909090'> Shaman está dominando!",nil,0,30,400,35)
  99.         tempspree=1
  100.     elseif spree == 7 then
  101.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x7<font color='#909090'> Shaman é grandioso!",nil,0,30,370,35)
  102.         tempspree=1
  103.     elseif spree == 8 then
  104.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x8<font color='#909090'> Shaman é lendário!",nil,0,30,370,35)
  105.         tempspree=1
  106.     elseif spree >= 9 and spree <= 12 then
  107.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x"..spree.."<font color='#909090'> Shaman é supremo!",nil,0,30,370,35)
  108.         tempspree=1
  109.     elseif spree >= 13 and spree <= 16 then
  110.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x"..spree.."<font color='#909090'> Shaman é um deus!",nil,0,30,370,35)
  111.         tempspree=1
  112.     elseif spree >= 17 and spree <= 20 then
  113.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x"..spree.."<font color='#909090'> Shaman é foda!",nil,0,30,370,35)
  114.         tempspree=1
  115.     elseif spree >= 21 and spree <= 24 then
  116.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x"..spree.."<font color='#909090'> Shaman está com hack!",nil,0,30,370,35)
  117.         tempspree=1
  118.     elseif spree >= 25 and spree <= 28 then
  119.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x"..spree.."<font color='#909090'> Shaman é incrível!",nil,0,30,370,35)
  120.         tempspree=1
  121.     elseif spree >= 29 and spree <= 32 then
  122.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x"..spree.."<font color='#909090'> Shaman é um assassino!",nil,0,30,390,35)
  123.         tempspree=1
  124.     elseif spree >= 33 then
  125.         ui.addTextArea(0,"<font size='25'><font color='#ffff00'>x"..spree.."<font color='#909090'> Shaman é um imortal!",nil,0,30,370,35)
  126.         tempspree=1
  127.     end
  128.     if tfm.get.room.playerList[playerName].isShaman then
  129.         tfm.exec.newGame(mapas[math.random(#mapas)])
  130.     end
  131. end
  132. function eventPlayerLeft(playerName)
  133.     vivo=vivo-1
  134.     sala=sala-1
  135. end
  136. tfm.exec.newGame(mapas[math.random(#mapas)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement