Advertisement
Brenower

[Evento]Evento de Natal [TFM] [Brenower]

Nov 5th, 2013
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.30 KB | None | 0 0
  1. --- Versão 1.2
  2. --- Créditos:Brenower e Joaovictors
  3. --- Mapa por Luukaszika
  4. --- Precisa ficar em cima do livro para saber o que pode ganhar
  5. --- Quando player morre ele automaticamente renasce
  6. --- Novas palavras
  7. --- Quando novo player chega na partida renasce automaticamente
  8. --- Novidades em breve.
  9. --- Script
  10. --- Tables
  11. admins={"Brenower"};
  12. palavras={"Nada. ;D","Um milhão de reais.","5 Centavos","Que tal um boneco?","Uma fantasia dos Powers Rangens.","1000 Morangos.<br>Só que não. e.e</br>",
  13. "Um cheiro no cur.<br>Brinks e.e</br>","Uma bicicleta futurística.;O","10 reais","Uma calça de mendigo","Uma jaqueta jeans","Viagem para Nova York",
  14. "Um celular chingue linge","Um nootribook. e.e","Um netribook.","Uma viagem para a Disney.","Ver o novo bouboum.--Vixee ta perto de chegar.;D"}
  15. --- Começo do Script
  16. tfm.exec.disableAutoNewGame(true)
  17. tfm.exec.disableAutoShaman(true)
  18. tfm.exec.disableAutoTimeLeft(true)
  19. tfm.exec.disableAfkDeath(true)
  20. tfm.exec.disableAutoScore(true)
  21. for player in pairs(tfm.get.room.playerList) do
  22. tfm.exec.setPlayerScore(player, 0, false)
  23.         end
  24. tfm.exec.newGame("@4479397")
  25. --- Comandos
  26. function eventChatCommand(player, cm)
  27.         if cm == "posição" then
  28.                 if tfm.get.room.playerList then
  29. if tfm.get.room.playerList[player].x then
  30.         if tfm.get.room.playerList[player].y then
  31.                 ui.addPopup(0, 0, "Você esta no x:".. tfm.get.room.playerList[player].x.." e no y:".. tfm.get.room.playerList[player].y.."", player, 300, 175, 200)
  32.                 end
  33.         end
  34.         end
  35. end
  36. if cm == "oque" then
  37.                 merece = palavras[math.random(1, #palavras)]
  38.                                 if tfm.get.room.playerList[player].x < 150 then
  39.                                         if tfm.get.room.playerList[player].x < 185 then
  40.                                         if tfm.get.room.playerList[player].score == 0 then
  41.                         ui.addPopup(0, 0, "Você vai ganhar:".. merece, player, 300, 175, 200)
  42.                         tfm.exec.setPlayerScore(player, 1, true)
  43.         end
  44.         end
  45. end
  46. end
  47. end
  48. --- Player morre
  49. function eventPlayerDied(player)
  50.         tfm.exec.respawnPlayer(player)
  51. end
  52. --- Novo player na sala
  53. function eventNewPlayer(player)
  54.         tfm.exec.respawnPlayer(player)
  55. end
  56. --- Fim do Script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement