Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. particles = { 1, 2, 4, 9, 11 }
  2.  
  3. map = 0
  4.  
  5. tfm.exec.newGame(map)
  6. tfm.exec.snow()
  7. tfm.exec.disableAutoNewGame(true)
  8. tfm.exec.disableAutoTimeLeft(true)
  9.  
  10. function eventNewGame()
  11. if map >= 80 then
  12. map = 0
  13. end
  14. end
  15.  
  16. function getMouseCount()
  17. local count = 0
  18. for name in pairs(tfm.get.room.playerList) do
  19. if not tfm.get.room.playerList[name].isDead then
  20. count = count + 1
  21. end
  22. end
  23. return count
  24. end
  25.  
  26. function eventLoop(a, b)
  27. for i = 0, 75 do
  28. tfm.exec.displayParticle(particles[math.random(#particles)],math.random(0, 800), math.random(50, 350), 0, 0, 0, 0, nil)
  29. end
  30.  
  31. local n = getMouseCount()
  32. if b <= 0 or n == 0 then
  33. map = map +1
  34. tfm.exec.newGame(map)
  35. end
  36. end
  37.  
  38. function eventPlayerDied(name)
  39. removeObject(name)
  40. local i = 0
  41. for n,player in pairs(tfm.get.room.playerList) do
  42. if not player.isDead then
  43. i = i + 1
  44. end
  45. end
  46. if i == 0 then
  47. map = map + 1
  48. tfm.exec.newGame(map)
  49. end
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement