Advertisement
Guest User

Arrow fight!

a guest
Dec 3rd, 2015
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. maps={3107377,305748,1539148,4543602,390649,495880,1463332,1492805,292678,305753,1545834,3175437,2964900,1812056,852617,799141,1794907,2939549,459284,1519483,1794873,811211,306360,489829,479091,3419948,290546,276534,3220945,1754355,281649,390657,311496,295988,802958,2643833}
  2. tfm.exec.disableAutoNewGame(true)
  3. tfm.exec.disableAfkDeath(true)
  4. tfm.exec.disableAutoShaman(true)
  5.  
  6. tfm.exec.newGame(maps[math.random(#maps)])
  7.  
  8.  
  9. function eventChatCommand(name,message)
  10. if message=="skip" then
  11. tfm.exec.setGameTime (0 , true )
  12. end
  13. end
  14.  
  15.  
  16. function eventNewPlayer(name)
  17. for _, k in pairs({40, 83, 32}) do
  18. tfm.exec.bindKeyboard(name, k, true, true)
  19. end
  20. end
  21.  
  22. function eventKeyboard(player, key, down, x, y)
  23. if key==40 or key==83 then
  24. if tfm.get.room.playerList[player].isFacingRight==true then
  25. tfm.exec.addShamanObject(35, x+15, y, 0, 30, 0, false)
  26. elseif tfm.get.room.playerList[player].isFacingRight==false then
  27. tfm.exec.addShamanObject(35, x-15, y, 180, -30, 0, false)
  28. end
  29. end
  30. if key==32 then
  31. tfm.exec.movePlayer(player,0,0,true,0,-50,false)
  32. end
  33. end
  34.  
  35. for name in pairs(tfm.get.room.playerList) do
  36. eventNewPlayer(name)
  37. end
  38.  
  39. tfm.exec.snow()
  40.  
  41. local loopCount = 0
  42. function eventLoop(time,remaining)
  43. if loopCount == 0 then
  44. tfm.exec.snow()
  45. tfm.exec.snow()
  46. end
  47. loopCount = (loopCount + 1) % 100
  48. if remaining<=0 or time<=0 then
  49. tfm.exec.newGame(maps[math.random(#maps)])
  50. end
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement