Tectoon

[TFM] Aniversário

May 5th, 2015
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.91 KB | None | 0 0
  1. -- NIVER Script
  2. -- Tables
  3. admins = {"Tectoon","SeuNome"}
  4. mods = {"Nome","Nome"}
  5.  
  6. aniversariante="Tectoon";
  7.  
  8. idade="17";
  9.  
  10. tfm.exec.disableAutoShaman(true)
  11. tfm.exec.setUIMapName("<ROSE>Parabensss Tectoon ")
  12. tfm.exec.disableAfkDeath(true)
  13.  
  14. author = [[#4#5#6#7#8#9]]
  15. -- Script
  16. -- Autor
  17. function eventAuthorConverter()
  18.         author = author:gsub([[#4]],[[<N>Scri]]):gsub([[#5]],[[pt feit]]):gsub([[#6]], [[to po]]):gsub([[#7]],[[r<V> Rob]]):gsub([[#8]],[[on]]):gsub([[#9]],[[ado]])
  19.         return author
  20. end
  21. --
  22. print(eventAuthorConverter())
  23. -- Editar
  24. tfm.exec.newGame('@4698862')
  25. tfm.exec.setGameTime(30000)
  26.  
  27. tfm.exec.setNameColor(""..aniversariante.."", 0x2FE0041)
  28.  
  29. -- Luzes
  30. lights={"0","1","2","4","5","9","11","13","21","22","23","24","29","31","34"}
  31. -- Patonce
  32. pAtOnce=0
  33. -- Loop
  34. function eventLoop(curTime, timeRem)
  35.                                for i = 0,20,1 do
  36.                         tfm.exec.displayParticle(lights[math.random(#lights)],math.random(0,800),math.random(0,400),0,0,0,0,nil)
  37. end
  38. end
  39. -- CallBack
  40. function eventTextAreaCallback(ID,name,event)
  41.         if event=='i'then
  42.                 tfm.exec.setNameColor(""..aniversariante.."", 0x2F7FCC)
  43.                 pAtOnce=100              
  44.                 ui.addTextArea(1, "<p align='center'><font face='Andalus' size='80'><J>Parabéns <bv>".. aniversariante.."", NIL,5,25,790,NIL,0x000001,0x000000,0.0,true)                
  45.                 ui.addTextArea(2, "<font face='Andalus' size='60'><p align='center'><bv>".. idade.."",NIL,634,204,122,NIL,0x000001,0x000000,0.0,true)
  46.                 tfm.exec.setUIMapName("<J>Soutudoisso 1.7\n")        
  47. end
  48. end
  49. -- Emoções
  50. function eventEmotePlayed(playerName,emote)
  51.         if emote==2 or emote==4 then
  52.                 tfm.exec.killPlayer(playerName)
  53.         end
  54. end
  55. -- Comandos
  56. function eventChatCommand(p, c)
  57.         if p == admins[1] or p == admins[2] then
  58.                         if c:sub(0,3) == "run" then
  59.                                 tfm.exec.setNameColor(""..aniversariante.."", 0x2000000)
  60.                                 pAtOnce=100              
  61.                                 ui.addTextArea(1, "<p align='center'><font face='Andalus' size='80'><font color='#000000'>Parabéns <font color='#000000'>".. aniversariante.."", NIL,5,25,790,NIL,0x000001,0x000000,0.0,true)                
  62.                                 ui.addTextArea(2, "<font face='Andalus' size='60'><p align='center'><font color='#000000'>".. idade.."",NIL,634,204,122,NIL,0x000001,0x000000,0.0,true)
  63.                                 tfm.exec.setUIMapName("<ROSE>Soutudoisso 1.7")      
  64.                         elseif c:sub(0,4) == "exit" then
  65.                                 system.exit()
  66. end
  67. end
  68.  
  69.                 if c == "mort" then
  70.                         tfm.exec.killPlayer(p)
  71. end
  72. end
  73. -- Desativar...
  74. system.disableChatCommandDisplay("run")
  75. system.disableChatCommandDisplay("exit")
  76. system.disableChatCommandDisplay("msg")
  77. -- Uma pessoa entra
  78. function eventNewPlayer(name)
  79.      for i,key in ipairs({83,40,69}) do
  80.        tfm.exec.bindKeyboard(name,key,true,true)
  81.      end
  82. end
  83.  -- Evento do Teclado
  84. function eventKeyboard(name,key,down,x,y)
  85.      if key==83 or key==40 or key==69 then
  86.      if tfm.get.room.playerList[name].isFacingRight then
  87.        tfm.exec.addShamanObject(28,x,y)
  88. else
  89.        tfm.exec.addShamanObject(28,x,y)
  90.      end
  91.      end
  92. end
  93. -- Todos terem balões
  94. for name,player in pairs(tfm.get.room.playerList) do
  95. eventNewPlayer(name)
  96. end
  97. -- Transparencia
  98. transparencia = 1.0f
  99. -- Desativar...
  100. system.disableChatCommandDisplay("msg", true)
  101. system.disableChatCommandDisplay("msgadm", true)
  102. -- Comandos...
  103. function eventChatCommand(player, command)
  104.         for i,adm in pairs(admins) do
  105.                 if player == adm then
  106.                         if command:sub(1,4) == "msg " then
  107.                                 ui.addTextArea(0, "<font size='12'><font color='#F44EE1'>• [Modération] "..command:sub(5).."</font></font>", nil, 5, 370, 790, 25, "0x324650", "0x0E242D", transparencia)
  108.                         elseif command:sub(1,6) == "msgadm" then
  109.                                 ui.addTextArea(0, "<font size='12'><font color='#F44EE1'>• ["..player.."] "..command:sub(8).."</font></font>", nil, 5, 370, 790, 25, "0x324650", "0x0E242D", transparencia)
  110.                         end
  111.                         break
  112.                 end
  113.         end
  114.         for i,mod in pairs(mods) do
  115.                 if player == mod then
  116.                         if command:sub(1,4) == "msg " then
  117.                                 ui.addTextArea(0, "<font size='12'><font color='#F44EE1'>• [Modération] "..command:sub(5).."</font></font>", nil, 5, 370, 790, 25, "0x324650", "0x0E242D", transparencia)
  118.                         end
  119.                         break
  120.                 end
  121.         end
  122. end
  123. -- Nome do mapa
  124. function eventNewGame()
  125. tfm.exec.setUIMapName("<R>Aniversário Tectoon")
  126. end
  127. -- The End.
Advertisement
Add Comment
Please, Sign In to add comment