Advertisement
Hpassospi

[lua] Bufpuf!!

Oct 22nd, 2014
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. function eventNewPlayer(name)
  2. tfm.exec.bindKeyboard(name,40,true,true)
  3. end
  4.  
  5. for name,player in pairs(tfm.get.room.playerList) do
  6. eventNewPlayer(name)
  7. end
  8.  
  9. function eventKeyboard(name,key,down,x,y)
  10. if key==40 then
  11. tfm.exec.addShamanObject(24,x,y+20)
  12. end
  13. end
  14.  
  15. function main()
  16. tfm.exec.disableAutoShaman(true)
  17. tfm.exec.disableAutoNewGame(true)
  18. tfm.exec.newGame(maps[math.random(#maps)])
  19. end
  20. time={}    
  21. maps={0,1,2,3,4,5,6,7,8,9,10}
  22.  
  23. function eventLoop(time,remaining)
  24. if remaining<=0 then
  25. tfm.exec.newGame(maps[math.random(#maps)])
  26. end
  27. end
  28.  
  29. function eventPlayerDied()
  30. local i=0
  31. for n,player in pairs(tfm.get.room.playerList) do
  32. if not player.isDead then
  33. i=i+1
  34. end
  35. end
  36. if i==0 then
  37. tfm.exec.newGame(maps[math.random(#maps)])
  38. end
  39. end
  40. main()
  41. function eventPlayerDied(p)
  42. tfm.exec.respawnPlayer(p)
  43. end
  44. function eventChatCommand(p,cm)
  45. if cm == [[mort]] then
  46. tfm.exec.killPlayer(p)
  47. end
  48. end
  49. tfm.exec.setUIMapName("Bufpuf!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement