Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commands = {"c", "try", "ng", "bonus"}
- for i,command in ipairs(commands) do system.
- disableChatCommandDisplay(command,true)
- end
- votos = 0
- tfm.exec.setGameTime(1800)
- tfm.exec.setUIMapName(" ''COMPLÉTALO EN ...'' <font color = '#FFFFFF'>Comenzará en breves segundos... ")
- tfm.exec.disablePhysicalConsumables()
- local admins = {"Hackinnzkt#0000", "Roroneo#0000", "Sebah#8993", "Juanfmlal#0000", "Twiisa#0000", "Hackinzkt#0000"}
- local trys = 0
- local timer = 20
- function isAdmin (playerName)
- for _,adminName in pairs(admins) do
- if playerName == adminName then return true end
- end
- return false
- end
- function eventChatCommand (playerName, command)
- if command:sub(1,14) == "COMPLÉTALO EN" then
- if isAdmin (playerName) then
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.newGame(command:sub(17,24))
- tfm.exec.disableAfkDeath(true)
- tfm.exec.newGame(command:sub(17,24))
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.setGameTime(1800)
- ui.removeTextArea(1, nil)
- ui.removeTextArea(2, nil)
- ui.removeTextArea(4, nil)
- ui.removeTextArea(5, nil)
- ui.removeTextArea(877,nil)
- ui.removeTextArea(876,nil)
- ui.removeTextArea(878,nil)
- ui.removeTextArea(879,nil)
- ui.removeTextArea(6,nil)
- ui.addTextArea(3, "<p align='center'><font size='15' color='0xFFFFF'>COMPLÉTALO EN <font color='#CFD500'>"..command:sub(16).."</font></font>",nil,368, 369, 399, 23, 0x000000, 0xC4CE19,0.6, true)
- ui.addTextArea(21, "<p align='center'><font size='19' color='0xFFFFF'><a href='event:close'>»</a></font>",name, 777, 365, 20, 25,0,0xC4CE19, 0.4,false)
- tfm.exec.setUIMapName(" ''COMPLÉTALO EN ...'' - ManageR:<font color='#D900FF'> "..playerName.."</font> ")
- votos = 0
- trys = 0
- autoreset = command:sub(17,24)
- manager = playerName
- mapInfo = command:sub(16)
- end
- end
- if command:sub(1,3) == "try" then
- if isAdmin (playerName) then
- if trys >= 5 then
- ui.addPopup(1,5,"<p align='center'><font color='#ff0606'>ERROR:\n</font> No puedes dar más de 5 trys o sobrepasar un bonus try..</p>",playerName,300,200,200);
- else
- trys = trys + 1
- managerTry = playerName
- maxtrys = command:sub(5)
- ui.addTextArea(2, "<p align='center'><font size='20' color='0xFFFFF'>Try "..trys.."<font color = '#CFD500'>/"..command:sub(5).."</font>",nil, 0, 20, 800, 25, 0, 0, 0, true)
- ui.removeTextArea(5, nil)
- ui.removeTextArea(1, nil)
- tfm.exec.newGame(autoreset)
- tfm.exec.setUIMapName(" ''COMPLÉTALO EN ...'' - ManageR:<font color='#D900FF'> "..managerTry.."</font> ")
- print("<rose>ManageR: "..managerTry.." Usó el comando: !try</font>")
- end
- end
- end
- if command == "bonus" then
- ui.addTextArea(876, "", nil, 322, 258, 168, 39, 0x324650, 0xF8FF00, 0.5, true)
- ui.addTextArea(877, "<p align='center'><font size='14'>VOTACIÓN POPULAR</font>\n\n ¿Te gustaría un try más? (Bonus Try)\n\n Votacion:<font color='#C3D42A'> "..votos.."</font>/8", nil, 322, 163, 169, 88, 0x2E3744, 0xC3D42A, 1, true)
- ui.addTextArea(878, "<p align='center'><a href='event:si'>Sí</a>", nil, 336, 268, 39, 19, 0x262C34, 0x000000, 1, true)
- ui.addTextArea(879, "<p align='center'><p align='center'><a href='event:no'>No</a>", nil, 433, 268, 39, 19, 0x262C34, 0x000000, 1, true)
- end
- if command == "c" then
- if isAdmin (playerName) then
- tfm.exec.setGameTime(500)
- timer = 20
- ui.removeTextArea(2, nil)
- ui.removeTextArea(5, nil)
- ui.removeTextArea(20,name)
- ui.addTextArea(3, "<p align='center'><font size='15' color='0xFFFFF'>COMPLÉTALO EN <font color='#CFD500'>"..mapInfo.."</font></font>",name, 368, 369, 399, 23, 0x000000, 0xC4CE19,0.6, true)
- ui.addTextArea(21, "<p align='center'><font size='19' color='0xFFFFF'><a href='event:close'>»</a></font>",name, 777, 365, 20, 25,0,0xC4CE19, 0.4,false)
- end
- end
- if command == "ng" then
- if isAdmin (playerName) then
- ui.addTextArea(5, "<p align='center'><font size='25' color='#CC0000'>¡NADIE GANA!</font>",nil, 0, 20, 800, 60, 0, 0, 0, true)
- ui.removeTextArea(1, nil)
- ui.removeTextArea(2, nil)
- ui.removeTextArea(3, nil)
- ui.removeTextArea(4, nil)
- end
- end
- if command == "info" then
- ui.addTextArea(2000, "<br><p align='center'><font size='20'><b><font face='Soopafresh'>Información sobre COMPLÉTALO EN ...</b><br></font><font size = '11'>\n <font color='#FFFFFF'>Es una modalidad para aumentar tu rango. Si completas un mapa en el tiempo dado, podrás aumentar de rango.</font> \n \n <font color='#FFD600'> Calentamiento:</font> Antes de empezar un mapa tendrás un tiempo de calentamiento para que puedas inspeccionar el mapa o aprendértelo. \n \n <font color='#FFD600'> Try:</font> Es el número de intentos u oportunidades que tendrás para completar el mapa en el tiempo indicado. \n \n <font color='#FFFFFF'> (Las milésimas no cuentan) ", playerName, 254, 50, 290, 280, 0x313131, 0x000000, 1, true)
- ui.addTextArea(2001, "<a href='event:x'>X</a>", playerName, 530, 50, 15, 15, 0xE30000, 0x000000, 0.5, true)
- end
- end
- function startGame()
- bonusTime = 10000
- tfm.exec.newGame(autoreset)
- tfm.exec.setGameTime(1800)
- ui.removeTextArea(4, nil)
- ui.removeTextArea(1, nil)
- ui.removeTextArea(877,nil)
- ui.removeTextArea(876,nil)
- ui.removeTextArea(878,nil)
- ui.removeTextArea(879,nil)
- ui.removeTextArea(6,nil)
- votos = 0
- tfm.exec.setUIMapName(" ''COMPLÉTALO EN ...'' - ManageR:<font color='#D900FF'> "..manager.." </font> ")
- -- ManageRColors
- tfm.exec.setNameColor("Hackinnzkt",0xFCF903)
- tfm.exec.setNameColor("Roroneo",0xD500FF)
- tfm.exec.setNameColor("Sebah#8993",0xD500FF)
- tfm.exec.setNameColor("Juanfmlal",0xD500FF)
- tfm.exec.setNameColor("Twiisa",0xD500FF)
- end
- function eventLoop (time, remaining)
- if remaining <= 500000 then
- ui.addTextArea(1, "<p align='center'><font size='12px' color='#FFFFFF'>CALENTAMIENTO: <font color='#CFD500'>"..math.floor(timer).."s</font>", nil, 2, 25,794, 20, 0x292929, 0x292929, 0.8,false)
- timer = timer - 0.5
- if remaining <= 479000 then
- ui.addTextArea(1, "<p align='center'><font size='12px' color='#FFFFFF'>CALENTAMIENTO: <font color='#CFD500'>0s</font>", nil, 2, 25,794, 20, 0x910000, 0x910000, 0.8,false)
- if remaining <= 477000 then
- ui.removeTextArea(1, nil)
- ui.removeTextArea(3, nil)
- ui.removeTextArea(22, nil)
- ui.removeTextArea(21, nil)
- ui.addTextArea(20, "<p align='center'><font size='19' color='0xFFFFF'><a href='event:show'>«</a></font>",name, 777, 365, 20, 25,0,0xC4CE19, 0.2,false)
- --math.floor(
- startGame()
- end
- end
- end
- if bonusTime >= 1 then
- bonusTime=bonusTime-1
- elseif bonusTime <= 0 then
- tfm.exec.newGame(autoreset)
- ui.addTextArea(2, "<p align='center'><font color = '#CFD500' size='20'>BONUS TRY!!!</font>",nil, 0, 20, 800, 25, 0, 0, 0, true)
- bonusTime = 10000
- end
- if bonusTime <= 4 then
- ui.addTextArea(6, " Iniciando...", nil, 341, 268, 150, 25, 0x324650, 0x000000, 0, true)
- end
- end
- function eventPlayerWon(playerName, timeElapsed, timeElapsedSinceRespawn)
- ui.addTextArea(4, "<p align='center'><font size='14' color='#4AC400'>Tu time: "..(timeElapsedSinceRespawn/100).."s</font>",playerName, 650, 345, 140, 19, 0, 0, 0.2, true)
- tfm.exec.respawnPlayer(playerName)
- end
- function eventPlayerDied(playerName)
- tfm.exec.respawnPlayer(playerName)
- end
- function eventPlayerRespawn(playerName)
- -- ManageRColors
- tfm.exec.setNameColor("Hackinnzkt",0xFCF903)
- tfm.exec.setNameColor("Roroneo",0xD500FF)
- tfm.exec.setNameColor("Sebah#8993",0xD500FF)
- tfm.exec.setNameColor("Juanfmlal",0xD500FF)
- tfm.exec.setNameColor("Twiisa",0xD500FF)
- end
- bonusTime = 10000
- function eventTextAreaCallback(id, name, cb)
- if cb == "show" then
- ui.addTextArea(3, "<p align='center'><font size='15' color='0xFFFFF'>COMPLÉTALO EN <font color='#CFD500'>"..mapInfo.."</font></font>",name, 368, 369, 399, 23, 0x000000, 0xC4CE19,0.6, true)
- ui.addTextArea(21, "<p align='center'><font size='19' color='0xFFFFF'><a href='event:close'>»</a></font>",name, 777, 365, 20, 25,0,0xC4CE19, 0.4,false)
- ui.removeTextArea(20,name)
- end
- if cb == "close" then
- ui.removeTextArea(22,name)
- ui.removeTextArea(3,name)
- ui.removeTextArea(20,name)
- ui.removeTextArea(21,name)
- ui.addTextArea(20, "<p align='center'><font size='19' color='0xFFFFF'><a href='event:show'>«</a></font>",name, 777, 365, 20, 25,0,0xC4CE19, 0.2,false)
- end
- if cb == "x" then
- ui.removeTextArea(2000,name)
- ui.removeTextArea(2001,name)
- end
- if cb == "si" then
- if votos >=7 then
- votos = votos + 1
- ui.addTextArea(877, "<p align='center'><font size='14'>VOTACIÓN POPULAR</font>\n\n ¿Te gustaría un try más? (Bonus Try)\n\n Votacion:<font color='#C3D42A'> "..votos.."</font>/8", nil, 322, 163, 169, 88, 0x2E3744, 0xC3D42A, 1, true)
- ui.addTextArea(6, "Preparando bonus try...", nil, 341, 268, 150, 25, 0x324650, 0x000000, 0, true)
- bonusTime = 10
- ui.removeTextArea(878,nil)
- ui.removeTextArea(879,nil)
- elseif votos >=7 and bonusTime <= 0 then
- tfm.exec.newGame(autoreset)
- ui.removeTextArea(877,nil)
- ui.removeTextArea(876,nil)
- ui.removeTextArea(878,nil)
- ui.removeTextArea(879,nil)
- ui.removeTextArea(6,nil)
- ui.removeTextArea(5, nil)
- ui.addTextArea(2, "<p align='center'><font color = '#CFD500' size='20'>BONUS TRY!!!</font>",nil, 0, 20, 800, 25, 0, 0, 0, true)
- else
- votos = votos + 1
- print(" <font color ='#C3D42A'>"..name.."</font> votó por: Sí ")
- ui.addTextArea(877, "<p align='center'><font size='14'>VOTACIÓN POPULAR</font>\n\n ¿Te gustaría un try más? (Bonus Try)\n\n Votacion:<font color='#C3D42A'> "..votos.."</font>/8", nil, 322, 163, 169, 88, 0x2E3744, 0xC3D42A, 1, true)
- ui.addTextArea(6, "Esperando resultados...", name, 341, 268, 150, 25, 0x324650, 0x000000, 0, true)
- ui.removeTextArea(878,name)
- ui.removeTextArea(879,name)
- end
- end
- if cb == "no" then
- print(" <font color ='#C3D42A'>"..name.."</font> votó por: No ")
- ui.addTextArea(6, "Esperando resultados...", name, 341, 268, 150, 25, 0x324650, 0x000000, 0, true)
- ui.removeTextArea(878,name)
- ui.removeTextArea(879,name)
- end
- if cb == "no" then
- print(" <font color ='#C3D42A'>"..name.."</font> votó por: No ")
- ui.addTextArea(6, "Esperando resultados...", name, 341, 268, 150, 25, 0x324650, 0x000000, 0, true)
- ui.removeTextArea(878,name)
- ui.removeTextArea(879,name)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement