Advertisement
alditojeje

Untitled

Dec 5th, 2019
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.82 KB | None | 0 0
  1. -- #SIZERACE
  2.  
  3. local banidos = {}
  4. w = 262
  5. w1 = 262
  6. x = 809
  7. x1 = -267
  8. data = {}
  9. local time = os.time();
  10. local run = os.time();
  11. local contagem = 1000;
  12. local tempo = os.time();
  13. local s=1
  14. local players = {}
  15. winners = {}
  16. jugadores = 0
  17. local adm = {["Rafapkzz#8588"] = true,["Brsowl#0000"] = true,["Blood#3565"] = true}
  18.  
  19.  
  20. maps = {"7662190","7662196","7519027","7520354","7520442","7519258","7521273"}
  21. keys = {66, 67, 86, 88}
  22.  
  23. miceInfo = {}
  24. tfm.exec.disableAutoTimeLeft()
  25. tfm.exec.disableAfkDeath()
  26. tfm.exec.disableAutoNewGame()
  27. --tfm.exec.setGameTime(90)
  28. tfm.exec.disableAutoShaman()
  29. tfm.exec.disableMinimalistMode()
  30. tfm.exec.disablePhysicalConsumables()
  31. tfm.exec.disableAutoScore()
  32. tfm.exec.newGame(maps[math.random(#maps)])
  33. tfm.exec.disableAfkDeath()
  34.  
  35.  
  36. function eventNewGame()
  37. tfm.exec.setGameTime(183)
  38. adminsColores()
  39. winners = {}
  40. jugadores = 0
  41. players()
  42. end
  43.  
  44. function eventPlayerDied(nick)
  45. tfm.exec.changePlayerSize(nick, 1)
  46. tfm.exec.respawnPlayer(nick)
  47. adminsColores()
  48. end
  49.  
  50. function adminsColores()
  51. for k, v in next, adm
  52. do tfm.exec.setNameColor(k, 0xFF0000)
  53. end
  54. end
  55. adminsColores()
  56.  
  57. for _, v in next, {'np','ban','unban','help'} do
  58. system.disableChatCommandDisplay(v)
  59. end
  60.  
  61. function split(t,s)
  62. local a={}
  63. for i,v in string.gmatch(t,string.format("[^%s]+",s or "%s")) do
  64. table.insert(a,i)
  65. end
  66. return a
  67. end
  68.  
  69. function eventPlayerLeft (playerName)
  70. jugadores = jugadores - 1
  71. for i=1, #winners do
  72. if playerName == winners[i] then
  73. table.remove(winners,i)
  74. end
  75. end
  76. end
  77.  
  78. function players()
  79. for k in pairs(tfm.get.room.playerList) do
  80. jugadores = jugadores + 1
  81. end
  82. end
  83.  
  84. function eventPlayerWon(nick)
  85. table.insert(winners,nick)
  86. if #winners >= jugadores then
  87. tfm.exec.setGameTime(5)
  88. end
  89. tfm.exec.changePlayerSize(nick, 1)
  90. tfm.exec.setPlayerScore(nick, 1,true)
  91. --[[ if tfm.get.room.playerList[nick].community=="pl" then
  92. tfm.exec.chatMessage("<font color='#fff000'>Gracz " .. nick .. " wlasnie wygral runde!")
  93. else
  94. tfm.exec.chatMessage("<font color='#fff000'>Player " .. nick .. " has just won the round!")
  95. end --]]
  96. end
  97.  
  98. function eventKeyboard(nick, key)
  99. if key==88 and miceInfo[nick].lastTransform < os.time() - 2000 then
  100. tfm.exec.changePlayerSize(nick, 0.3)
  101. miceInfo[nick].lastTransform = os.time()
  102. end
  103. if key==67 and miceInfo[nick].lastTransform < os.time() - 2000 then
  104. tfm.exec.changePlayerSize(nick, 1)
  105. miceInfo[nick].lastTransform = os.time()
  106. end
  107. if key==86 and miceInfo[nick].lastTransform < os.time() - 2000 then
  108. tfm.exec.changePlayerSize(nick, 2.1)
  109. miceInfo[nick].lastTransform = os.time()
  110. end
  111. if key==66 and miceInfo[nick].lastTransform < os.time() - 2000 then
  112. tfm.exec.changePlayerSize(nick, 3.5)
  113. miceInfo[nick].lastTransform = os.time()
  114. end
  115. end
  116.  
  117. function eventTextAreaCallback(id, nick, call)
  118. if call=="cerrar" then
  119. for i = 0, 17, 1 do
  120. ui.removeTextArea(i, nick)
  121. end
  122. end
  123. end
  124.  
  125. function eventNewPlayer(nick)
  126. for i = 1,#keys do
  127. system.bindKeyboard(nick, keys[i], false, true)
  128. end
  129. miceInfo[nick] = {lastTransform = 0}
  130. end
  131.  
  132. function eventLoop(currentTime, remainingTime)
  133. if remainingTime <= 500 then
  134. tfm.exec.newGame(maps[math.random(#maps)])
  135. end
  136. end
  137.  
  138. for nick in next, tfm.get.room.playerList do
  139. eventNewPlayer(nick)
  140. end
  141.  
  142. function eventChatCommand(name, cmd)
  143. local arg = split(cmd, " ")
  144.  
  145. if arg[1] == "help" then
  146. help(name)
  147. end
  148. --[[ if arg[1] == 'lang' or arg[1] == 'langue' or arg[1] == 'lingua' then
  149. if (arg[2]) then
  150. arg[2] = arg[2]:lower()
  151. -- data[name].lang = (translations[arg[2]] -- and arg[2] or data[name].lang)
  152. -- end
  153. --[[ if arg[1] == "p" then
  154. local p
  155. if arg[2] then
  156. p = ''
  157. p = arg[2]:lower():gsub('%a', string.upper, 1)
  158. else
  159. p = name
  160. end--
  161. end
  162. if tfm.get.room.playerList[p] then
  163. sendMenu(4, ""..translate(name, 'tribe')..""..tfm.get.room.playerList[p].tribeName.." "..translate(name, 'rounds')..""..data[p].rounds..""..translate(name, 'wons')..""..data[p].wins.."", name, 205, 50, 372, 200, 1)
  164. ui.addTextArea(90, "<p align='center'><font size='20'><B><J>"..p, name, 238, 80, 316, 47, 0x082330, 0x082330, 0, true)
  165. end --]]
  166. if adm[name] then
  167. if arg[1] == "ban" then
  168. local p
  169. if arg[2] then
  170. p = ''
  171. p = arg[2]:lower():gsub('%a', string.upper, 1)
  172. banidos[arg[2]] = true
  173. ui.addTextArea(666, "", arg[2], -1500, -1500, 3000, 3000, 1, 1, 1, true)
  174. tfm.exec.killPlayer(arg[2])
  175. end
  176. end
  177. if arg[1] == "unban" then
  178. local p
  179. if arg[2] then
  180. p = ''
  181. p = arg[2]:lower():gsub('%a', string.upper, 1)
  182. banidos[arg[2]] = nil
  183. ui.removeTextArea(666, arg[2])
  184.  
  185. end
  186. end
  187. if arg[1] == "np" then
  188. if arg[2] then
  189. tfm.exec.newGame(arg[2])
  190. else
  191. tfm.exec.newGame(maps[math.random(#maps)]) -- Roda um mapa aleatório quando o tempo acabar
  192. end
  193. end
  194. end
  195. end
  196.  
  197. function help(name)
  198. if tfm.get.room.playerList[name].community == "br" then
  199. ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
  200. ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Ajuda<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
  201. ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
  202. ui.addTextArea(3, "<p align='center'><V><a href='event:cerrar'><font color='#F93018'><b>X", name, 495, 60, 60, 20, 0x073247, 0x121212, 1, true)
  203. ui.addTextArea(4, "<p align='center'><VP>Bem Vindo ao <BV>#Sizerace<VP>! Aqui você terá de alternar os tamanhos do seu rato para superar as dificuldades que se encontram em cada mapa. Você pode trocar o seu tamanho em um intervalo de <BV>2<VP> segundos, Seja o mais rapido e divirta-se!<CS> <br><br><b>Letra X</b> = Tamanho 0.3<br><b>Letra C</b> = Tamanho 1.0<br><b>Letra V</b> = Tamanho 2.1<br><b>Letra B</b> = Tamanho 3.5<br><br><ROSE>Versão feita por:<ROSE> <CE>Rafapkzz#8588<CE><ROSE>,<ROSE> <CE>Brsowl#0000 <ROSE>e<CE> Blood#3565<ROSE>.<br><br>Créditos: <CE>Boxofkrain#0000<ROSE>.", name, 248, 100, 300, 265, 0, 0, 0, true)
  204. elseif tfm.get.room.playerList[name].community == "es" then
  205. ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
  206. ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Ayuda<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
  207. ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
  208. ui.addTextArea(3, "<p align='center'><V><a href='event:cerrar'><font color='#F93018'><b>X", name, 495, 60, 60, 20, 0x073247, 0x121212, 1, true)
  209. ui.addTextArea(4, "<p align='center'><VP>¡Bienvenido a <BV>#Sizerace<VP>! Aquí tendrá que cambiar el tamaño de su ratón para superar las dificultades de cada mapa. Puedes cambiar tu tamaño cada <BV>2<VP> segundos, ¡sé el más rápido y diviértete!<CS> <br><br><b>Letra X</b> = Tamaño 0.3<br><b>Letra C</b> = Tamaño 1.0<br><b>Letra V</b> = Tamaño 2.1<br><b>Letra B</b> = Tamaño 3.5<br><br><ROSE>Versión hecha por:<ROSE> <CE>Rafapkzz#8588<CE><ROSE>,<ROSE> <CE>Pro#1435 <ROSE>y<CE> Blood#3565<ROSE>.<br><br>Créditos: <CE>Boxofkrain#0000.<CE>", name, 248, 100, 300, 265, 0, 0, 0, true)
  210. elseif tfm.get.room.playerList[name].community == "pl" then
  211. ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
  212. ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Pomoc<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
  213. ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
  214. ui.addTextArea(3, "<p align='center'><V><a href='event:cerrar'><font color='#F93018'><b>X", name, 495, 60, 60, 20, 0x073247, 0x121212, 1, true)
  215. ui.addTextArea(4, "<p align='center'><VP>Witamy w <BV>#Sizerace<VP>! Tutaj będziesz musiał zmienić rozmiar myszy, aby przezwyciężyć trudności napotykane na każdej mapie. Możesz zmienić swój rozmiar w zakresie <BV>2<VP> sekund, Bądź najszybszy i baw się dobrze!<CS> <br><br><b>Lyrics X</b> = Rozmiar 0.3<br><b>Lyrics C</b> = Rozmiar 1.0<br><b>Lyrics V</b> = Rozmiar 2.1<br><b>Lyrics B</b> = Rozmiar 3.5<br><br><ROSE>Wersja wykonana przez:<ROSE> <CE>Rafapkzz#8588<CE><ROSE>,<ROSE> <CE>Brsowl#0000 <ROSE>e<CE> Blood#3565<ROSE>.<br><br>Kredyty: <CE>Boxofkrain#0000<ROSE>.", name, 248, 100, 300, 265, 0, 0, 0, true)
  216. else
  217. ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
  218. ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Help<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
  219. ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
  220. ui.addTextArea(3, "<p align='center'><V><a href='event:cerrar'><font color='#F93018'><b>X", name, 495, 60, 60, 20, 0x073247, 0x121212, 1, true)
  221. ui.addTextArea(4, "<p align='center'><VP>Welcome to <BV>#Sizerace<VP>! In this room, you have to change the size of your mice to overcome the difficulties of each map. You can change your size each <BV>2<VP> seconds, be the fastest and have fun!<CS> <br><br><b>Letter X</b> = Size 0.3<br><b>Letter C</b> = Size 1.0<br><b>Lettter V</b> = Size 2.1<br><b>Letter B</b> = Size 3.5<br><br><ROSE>Version made by:<ROSE> <CE>Rafapkzz#8588<CE><ROSE>,<ROSE> <CE>Pro#1435 <ROSE>and<CE> Blood#3565<ROSE>.<br><br>Credits: <CE>Boxofkrain#0000.<CE>", name, 248, 100, 300, 265, 0, 0, 0, true)
  222. end
  223. end
  224. --tfm.exec.setRoomMaxPlayers(25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement