Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- #SIZERACE
- local banidos = {}
- w = 262
- w1 = 262
- x = 809
- x1 = -267
- data = {}
- local time = os.time();
- local run = os.time();
- local contagem = 1000;
- local tempo = os.time();
- local s=1
- local players = {}
- winners = {}
- jugadores = 0
- local adm = {["Rafapkzz#8588"] = true,["Brsowl#0000"] = true,["Blood#3565"] = true}
- maps = {"7662190","7662196","7519027","7520354","7520442","7519258","7521273"}
- keys = {66, 67, 86, 88}
- miceInfo = {}
- tfm.exec.disableAutoTimeLeft()
- tfm.exec.disableAfkDeath()
- tfm.exec.disableAutoNewGame()
- --tfm.exec.setGameTime(90)
- tfm.exec.disableAutoShaman()
- tfm.exec.disableMinimalistMode()
- tfm.exec.disablePhysicalConsumables()
- tfm.exec.disableAutoScore()
- tfm.exec.newGame(maps[math.random(#maps)])
- tfm.exec.disableAfkDeath()
- function eventNewGame()
- tfm.exec.setGameTime(183)
- adminsColores()
- winners = {}
- jugadores = 0
- players()
- end
- function eventPlayerDied(nick)
- tfm.exec.changePlayerSize(nick, 1)
- tfm.exec.respawnPlayer(nick)
- adminsColores()
- end
- function adminsColores()
- for k, v in next, adm
- do tfm.exec.setNameColor(k, 0xFF0000)
- end
- end
- adminsColores()
- for _, v in next, {'np','ban','unban','help'} do
- system.disableChatCommandDisplay(v)
- end
- function split(t,s)
- local a={}
- for i,v in string.gmatch(t,string.format("[^%s]+",s or "%s")) do
- table.insert(a,i)
- end
- return a
- end
- function eventPlayerLeft (playerName)
- jugadores = jugadores - 1
- for i=1, #winners do
- if playerName == winners[i] then
- table.remove(winners,i)
- end
- end
- end
- function players()
- for k in pairs(tfm.get.room.playerList) do
- jugadores = jugadores + 1
- end
- end
- function eventPlayerWon(nick)
- table.insert(winners,nick)
- if #winners >= jugadores then
- tfm.exec.setGameTime(5)
- end
- tfm.exec.changePlayerSize(nick, 1)
- tfm.exec.setPlayerScore(nick, 1,true)
- --[[ if tfm.get.room.playerList[nick].community=="pl" then
- tfm.exec.chatMessage("<font color='#fff000'>Gracz " .. nick .. " wlasnie wygral runde!")
- else
- tfm.exec.chatMessage("<font color='#fff000'>Player " .. nick .. " has just won the round!")
- end --]]
- end
- function eventKeyboard(nick, key)
- if key==88 and miceInfo[nick].lastTransform < os.time() - 2000 then
- tfm.exec.changePlayerSize(nick, 0.3)
- miceInfo[nick].lastTransform = os.time()
- end
- if key==67 and miceInfo[nick].lastTransform < os.time() - 2000 then
- tfm.exec.changePlayerSize(nick, 1)
- miceInfo[nick].lastTransform = os.time()
- end
- if key==86 and miceInfo[nick].lastTransform < os.time() - 2000 then
- tfm.exec.changePlayerSize(nick, 2.1)
- miceInfo[nick].lastTransform = os.time()
- end
- if key==66 and miceInfo[nick].lastTransform < os.time() - 2000 then
- tfm.exec.changePlayerSize(nick, 3.5)
- miceInfo[nick].lastTransform = os.time()
- end
- end
- function eventTextAreaCallback(id, nick, call)
- if call=="cerrar" then
- for i = 0, 17, 1 do
- ui.removeTextArea(i, nick)
- end
- end
- end
- function eventNewPlayer(nick)
- for i = 1,#keys do
- system.bindKeyboard(nick, keys[i], false, true)
- end
- miceInfo[nick] = {lastTransform = 0}
- end
- function eventLoop(currentTime, remainingTime)
- if remainingTime <= 500 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- for nick in next, tfm.get.room.playerList do
- eventNewPlayer(nick)
- end
- function eventChatCommand(name, cmd)
- local arg = split(cmd, " ")
- if arg[1] == "help" then
- help(name)
- end
- --[[ if arg[1] == 'lang' or arg[1] == 'langue' or arg[1] == 'lingua' then
- if (arg[2]) then
- arg[2] = arg[2]:lower()
- -- data[name].lang = (translations[arg[2]] -- and arg[2] or data[name].lang)
- -- end
- --[[ if arg[1] == "p" then
- local p
- if arg[2] then
- p = ''
- p = arg[2]:lower():gsub('%a', string.upper, 1)
- else
- p = name
- end--
- end
- if tfm.get.room.playerList[p] then
- 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)
- ui.addTextArea(90, "<p align='center'><font size='20'><B><J>"..p, name, 238, 80, 316, 47, 0x082330, 0x082330, 0, true)
- end --]]
- if adm[name] then
- if arg[1] == "ban" then
- local p
- if arg[2] then
- p = ''
- p = arg[2]:lower():gsub('%a', string.upper, 1)
- banidos[arg[2]] = true
- ui.addTextArea(666, "", arg[2], -1500, -1500, 3000, 3000, 1, 1, 1, true)
- tfm.exec.killPlayer(arg[2])
- end
- end
- if arg[1] == "unban" then
- local p
- if arg[2] then
- p = ''
- p = arg[2]:lower():gsub('%a', string.upper, 1)
- banidos[arg[2]] = nil
- ui.removeTextArea(666, arg[2])
- end
- end
- if arg[1] == "np" then
- if arg[2] then
- tfm.exec.newGame(arg[2])
- else
- tfm.exec.newGame(maps[math.random(#maps)]) -- Roda um mapa aleatório quando o tempo acabar
- end
- end
- end
- end
- function help(name)
- if tfm.get.room.playerList[name].community == "br" then
- ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
- ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Ajuda<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
- ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
- 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)
- 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)
- elseif tfm.get.room.playerList[name].community == "es" then
- ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
- ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Ayuda<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
- ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
- 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)
- 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)
- elseif tfm.get.room.playerList[name].community == "pl" then
- ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
- ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Pomoc<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
- ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
- 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)
- 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)
- else
- ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
- ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Help<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
- ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
- 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)
- 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)
- end
- end
- --tfm.exec.setRoomMaxPlayers(25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement