Advertisement
Guest User

aaaaa

a guest
Oct 31st, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. tfm.exec.disableAutoNewGame(true)
  2. maps={0,1,2,3,4,5,6,7,8,9,10}
  3.  
  4. function eventLoop(time,remaining)
  5. if remaining<=0 then
  6. tfm.exec.newGame(maps[math.random(#maps)])
  7. end
  8. end
  9.  
  10. function eventPlayerDied()
  11. local i=0
  12. for n,player in pairs(tfm.get.room.playerList) do
  13. if not player.isDead then
  14. i=i+1
  15. end
  16. end
  17. if i==0 then
  18. tfm.exec.newGame(maps[math.random(#maps)])
  19. end
  20. end
  21.  
  22. local R = 120
  23. Rsq = R*R
  24.  
  25. for name, player in pairs(tfm.get.room.playerList) do
  26. system.bindMouse(name,true)
  27. end
  28.  
  29. function eventMouse(name,x,y)
  30. local dx = tfm.get.room.playerList[name].x - x
  31. local dy = tfm.get.room.playerList[name].y - y
  32. local distance = dx*dx + dy*dy
  33. if distance < Rsq then
  34. tfm.exec.addShamanObject(10, x, y)
  35. end
  36. end
  37.  
  38. tfm.exec.setNameColor("Sebitacapoda", 0xffffff)
  39.  
  40. tfm.exec.setUIMapName("Prueba Super Kakona , (Y)")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement