Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commands = {"print", "changetime", "teach", "aport", "resetmap", "l"}
- for i,command in ipairs(commands) do system.
- disableChatCommandDisplay(command,true)
- end
- local admins = {"Hackinnzkt#0000", "Roroneo", "Sebah#8993", "Twiisa#0000", "Juanfmlal#0000","Hackinzkt#0000"}
- -- Load script
- tfm.exec.setNameColor("Hackinnzkt",0xFCF903)
- tfm.exec.setNameColor("Roroneo",0xD500FF)
- tfm.exec.setNameColor("Sebah",0xD500FF)
- tfm.exec.setNameColor("Twiisa",0xD500FF)
- tfm.exec.setNameColor("Juanfmlal",0xD500FF)
- tfm.exec.setUIMapName("MAPA POR RANGO")
- tfm.exec.disablePhysicalConsumables()
- ui.addTextArea(1000, "<p align='center'><font size='12px' color='#FFFFFF'><a href='event:openOptions'>»</a>", nil, 3, 365,15, 25, 0x000000, 0xFF0804, 0.5,false)
- tfm.exec.setGameTime(480) -- TIEMPO INICIAL
- function eventNewPlayer(playerName)
- tfm.exec.setUIMapName("MAPA POR RANGO")
- ui.addTextArea(1000, "<p align='center'><font size='12px' color='#FFFFFF'><a href='event:openOptions'>»</a>", nil, 3, 365,15, 25, 0x000000, 0xFF0804, 0.5,false)
- tfm.exec.bindKeyboard(playerName,32,true,true)
- system.bindMouse(playerName)
- end
- local t=0
- function eventLoop(time,remaining)
- rm = remaining
- if remaining<=120000 then
- ui.addTextArea(1, "<p align='center'><font size='12px' color='#FF0804'>AVISO: QUEDAN 2 MINUTOS", nil, 5, 25,790, 18, 0x000000, 0xFF0804, 0.5,false)
- if remaining<=110000 then
- ui.removeTextArea(1, nil)
- if remaining<=0 then
- ui.addTextArea(2, "", nil, 5, 24,790, 400, 0x111111, 0x111111, 0.5, false)
- ui.addTextArea(0, "<p align='center'><font size='13px' color='#FFD800'><b>¡Se ha acabo el tiempo!</b> <font size='13px' color='#FFFFFF'><br> Pasando al siguiente mapa...", nil, 5, 170, 790, 40, 0x000000, 0xFF0804, 0.7,false)
- timeout ()
- end
- end
- end
- if t >= 1 then
- t=t-1
- elseif t == 0 then
- ui.removeTextArea(11,nil)
- ui.removeTextArea(10,nil)
- ui.removeTextArea(1115,nil)
- end
- if t <= 21 and reset== true then
- ui.addTextArea(12,"<p align='center'><font color='#FFCB00'>AVISO: </font><font color='#FFFFFF'>El mapa será reiniciado en "..math.floor(t).." segundos...",nil, 250, 370, nil, nil, 0x000000F, 0xCC0000, 0.4, true)
- t=t+0.5
- end
- if t <= 1 and reset== true then
- system.exit ()
- end
- end
- function timeout ()
- for name, player in pairs(tfm.get.room.playerList) do
- tfm.exec.killPlayer(name)
- end
- end
- function isAdmin (playerName)
- for _,adminName in pairs(admins) do
- if playerName == adminName then return true end
- end
- return false
- end
- function eventMouse(name,x,y)
- if admins[name.."teach_mode"] == true and isAdmin (name) then
- tfm.exec.addShamanObject("0", x, y);
- ui.addTextArea(10, "<p align='center'><font size='12px' color='#FFFFFF'>ManageR: <font color='#FFE300'>"..name.."</font> está enseñando.", nil, x, y,300, 25, 0x000000, 0xFF0804, 0,false)
- t=2
- end
- end
- function eventKeyboard(name,key,down,x,y)
- if key==32 and admins[name.."teach_mode"] == true and isAdmin (name) then
- tfm.exec.movePlayer(name,0,0,true,0,-50,false)
- end
- end
- function modeTeach (playerName)
- system.bindMouse(playerName, true)
- tfm.exec.bindKeyboard(playerName,32,true,true)
- end
- for name, player in pairs(tfm.get.room.playerList) do
- modeTeach(name)
- eventNewPlayer(playerName)
- end
- reset = false
- function eventChatCommand (playerName, command)
- args = {}
- for arg in command:gmatch ("[^%s]+") do
- table.insert (args, arg)
- end
- if command:sub(1,5) == "teach" then
- if admins[playerName.."teach_mode"] ~= true then
- admins[playerName.."teach_mode"] = true
- ui.addTextArea(9255, "TeachMode: ACTIVADO.", playerName, 339, 364, 147, 19, 0x000000, 0xcc0404, 0.2, true)
- else
- admins[playerName.."teach_mode"] = false
- ui.removeTextArea(10,nil)
- ui.removeTextArea(9255,name)
- end
- end
- if command:sub(1,5) == "aport" then
- nulTime = 1
- playerAport = command:sub(10)
- if isAdmin (playerName) then
- tfm.exec.setGameTime(math.floor(rm/1000) + command:sub(7,9) )
- ui.addTextArea(11,"<p align='center'><font color='#FF00FC'>BONUS TIME:</font><font color='#FFFFFF'> <font color='#FFFB00'>"..playerAport.."</font> aportó "..command:sub(7,9).." segundos más! </font></a>",nil, 250, 30, 350, nil, 0x000000F, 0xCC0000, 0.6, true)
- ui.addTextArea(1115, "<font color ='#FFFFFF' size='18'>¡GRACIAS!", nil, 350, 59, 150, 25, 0x324650, 0x000000, 0, true)
- t= 10
- local size = 5;
- local x_position = 400;
- local y_position = 100;
- for t=0,2*math.pi,0.1 do
- x=(16*math.sin(t)^3)*size + x_position
- y=(13*math.cos(t)-5*math.cos(2*t)-2*math.cos(3*t)-math.cos(4*t))*size
- y=-y + y_position
- tfm.exec.addShamanObject(0,x,y);
- end
- end
- end
- if command:sub(1,10) == "changetime" then
- if isAdmin (playerName) then
- tfm.exec.setGameTime(command:sub(12))
- end
- end
- if command == "l" then
- if isAdmin (playerName) then
- ui.addTextArea(3467, "<font color='#FEFF00'>1</font> min = <font color='#FEFF00'>60</font>s\n<font color='#FEFF00'>2</font> min = <font color='#FEFF00'>120</font>s\n<font color='#FEFF00'>3</font> min = <font color='#FEFF00'>180</font>s\n<font color='#FEFF00'>4</font> min = <font color='#FEFF00'>240</font>\n<font color='#FEFF00'>5</font> min = <font color='#FEFF00'>300</font>s\n<font color='#FEFF00'>6</font> min = <font color='#FEFF00'>360</font>s\n<font color='#FEFF00'>7</font> min = <font color='#FEFF00'>420</font>s\n<font color='#FEFF00'>8</font> min = <font color='#FEFF00'>480</font>s", playerName, 694, 243, 100, 148, 0x00000F, 0x5B00AE, 1, true)
- ui.addTextArea(3468, "<font size='10' color='#FFFFFF'><b>Lista de tiempos</b>", playerName, 694, 207, 100, 22, 0x00000F, 0x5B00AE, 1, true)
- ui.addTextArea(3469, "<p align='center'><font color='#FFFFFF'><a href='event:cerrarL'>Cerrar</a>", playerName, 696, 375, 96, 18, 0x970101, 0x50000F, 1, true)
- end
- end
- if command == "resetmap" then
- if isAdmin (playerName) then
- reset = true
- t = 21
- print(" "..playerName.." usó el comando resetmap")
- ui.addTextArea(12,"<p align='center'><font color='#FFCB00'>AVISO: </font><font color='#FFFFFF'>El mapa será reiniciado en "..t.." segundos...",nil, 250, 370, nil, nil, 0x000000F, 0xCC0000, 0.4, true)
- end
- end
- if command=="print" then
- if isAdmin (playerName) then
- ui.addPopup(0,2,"<p align='center'>Escribe tu mensaje en el siguiente cuadro</p>",playerName,300,200,200);
- end
- end
- end
- hackin = {"Admin"}
- function eventPopupAnswer(Id, name, answer)
- hackin = name
- if Id==0 and hackin =="Hackinnzkt#0000" then
- ui.addTextArea(922,"<p align='center'><font size='12px' color='#FF5DE7'><b><ZKT><a href='event:xPrint'>[<font color='#C8FFFF'>T-KING</font> "..name.."] <N><b><p align='center'><font size='12px' color='#F7FF00'><a href='event:xPrint'>"..answer.."</font>",nil, 0, 373, nil, nil, nil, nil, 0.2, true)
- else
- ui.addTextArea(922,"<p align='center'><font size='12px' color='#FF5DE7'><b><ZKT><a href='event:xPrint'>[<font color='#C8A7FF'>ManageR</font> "..name.."] <N><b><p align='center'><font size='12px' color='#F7FF00'><a href='event:xPrint'>"..answer.."</font>",nil, 0, 373, nil, nil, nil, nil, 0.2, true)
- end
- end
- function eventPlayerRespawn (playerName)
- tfm.exec.setNameColor("Hackinnzkt",0xFCF903)
- tfm.exec.setNameColor("Roroneo",0xD500FF)
- tfm.exec.setNameColor("Sebah",0xD500FF)
- tfm.exec.setNameColor("Twiisa",0xD500FF)
- tfm.exec.setNameColor("Juanfmlal",0xD500FF)
- end
- function eventTextAreaCallback(id, name, cb)
- if cb == "openOptions" then
- ui.addTextArea(1001, "<p align='center'><font size='12px' color='#FFFFFF'><a href ='event:closeOptions'>«</a>", name, 3, 365,15, 25, 0x000000, 0xFF0804, 0.5,false)
- ui.addTextArea(1002, "<p align='center'><font size='12px' color='#FF0804'> ", name, 25, 365,310, 25, 0x000000, 0xFF0804, 0.5,false)
- ui.addTextArea(1003, "<p align='center'><font size='12px' color='#FFAE04'><a href='event:openInfo'>Info</a>", name, 28, 368,50, 20, 0x000000, 0xFF716F, 0.8,false)
- ui.addTextArea(1004, "<p align='center'><font size='12px' color='#FFAE04'><a href='event:openAyuda'>Ayuda</a>", name, 90, 368,50, 20, 0x000000, 0xFF716F, 0.8,false)
- ui.addTextArea(1005, "<p align='center'><font size='12px' color='#FFAE04'><a href='event:openBonusTime'>Bonus Time</a>", name, 152, 368,80, 20, 0x000000, 0xFF716F, 0.8,false)
- ui.addTextArea(1006, "<p align='center'><font size='12px' color='#FFAE04'><a href='event:openBoostRank'>Boost Rank</a>", name, 244, 368,85, 20, 0x000000, 0xFF716F, 0.8,false)
- ui.removeTextArea(1000, name)
- end
- if cb == "closeOptions" then
- ui.addTextArea(1000, "<p align='center'><font size='12px' color='#FFFFFF'><a href='event:openOptions'>»</a>", name, 3, 365,15, 25, 0x000000, 0xFF0804, 0.5,false)
- ui.removeTextArea(1001, name)
- ui.removeTextArea(1002, name)
- ui.removeTextArea(1003, name)
- ui.removeTextArea(1004, name)
- ui.removeTextArea(1005, name)
- ui.removeTextArea(1006, name)
- end
- if cb == "openInfo" then
- ui.addTextArea(2000, "<br><p align='center'><font size='20'><b><font face='Soopafresh'>Información sobre MAPA POR RANGO</b><br></font><font size = '11'>\n <font color='#FFFFFF'>Es una de las modalidades principales para ganar rango.\n\n Debes completar el mapa que esté puesto, tendrás 8 minutos para hacerlo, si lo logras, subirás 1 rango.</font> \n\n No esperes mapas fáciles, ni pidas que los cambien. ", name, 254, 50, 290, 280, 0x313131, 0x000000, 1, true)
- ui.addTextArea(2001, "<a href='event:xInfo'>X</a>", name, 530, 50, 15, 15, 0xE30000, 0x000000, 0.5, true)
- print(" <font color='#B2AB00'>"..name.."</font> in <font color='#9E87CB'>"..cb.."</font> ")
- end
- if cb == "xInfo" then
- ui.removeTextArea(2000, name)
- ui.removeTextArea(2001, name)
- end
- if cb == "openAyuda" then
- ui.addTextArea(3000, "<br><p align='center'><font size='20'><b><font face='Soopafresh'>AYUDA</b><br></font><font size = '11'>\n <font color='#FFFFFF'><rose>¿Cómo gano rango?</rose>\n Completando el mapa que esté puesto.\n\n <rose>¿Cuántos rangos puedo ganar?</rose>\n 1 por mapa, 2 por día.\n\n <rose>¿Cuánto dura un mapa por rango?</rose>\n Cada mapa dura 8 minutos.\n\n <rose>¿Cuándo se hace mapa por rango (hora o día)?</rose>\n En cualquier momento del día, lo normal son 2 cesiones de mapa por rango al día. ", name, 254, 50, 290, 280, 0x313131, 0x000000, 1, true)
- ui.addTextArea(3001, "<a href='event:xAyuda'>X</a>", name, 530, 50, 15, 15, 0xE30000, 0x000000, 0.5, true)
- print(" <font color='#B2AB00'>"..name.."</font> in <font color='#9E87CB'>"..cb.."</font> ")
- end
- if cb == "xAyuda" then
- ui.removeTextArea(3000, name)
- ui.removeTextArea(3001, name)
- end
- if cb == "openBonusTime" then
- ui.addTextArea(4000, "<br><p align='center'><font size='20'><b><font face='Soopafresh'>BONUS TIME</b><br></font><font size = '11'>\n <font color='#D5D5D5'>Bonus time es una herramienta extra por pago, que te permite colocar tiempo extra al mapa.\n Esta herramienta es muy últil si estás apunto de pasar un mapa, pero queda poco tiempo.\n\n <font color='#FFFFFF'>Cada minuto extra equivale a <font color='#E7E300'>10 quesos</font>\n\n <rose>¿Cómo comprar?</rose>\n <font color='#FFFFFF'>Simplemente debes enviarle un intercambio a Hackinnzkt o ManageR encargado.</font>\n\n\n <font color='#8E8E8E'>(Los ingresos serán utilizados para la tribu como premios) ", name, 254, 50, 290, 280, 0x313131, 0x000000, 1, true)
- ui.addTextArea(4001, "<a href='event:xBonusTime'>X</a>", name, 530, 50, 15, 15, 0xE30000, 0x000000, 0.5, true)
- print(" <font color='#B2AB00'>"..name.."</font> in <font color='#9E87CB'>"..cb.."</font> ")
- end
- if cb == "xBonusTime" then
- ui.removeTextArea(4000, name)
- ui.removeTextArea(4001, name)
- end
- if cb == "openBoostRank" then
- ui.addTextArea(5000, "<br><p align='center'><font size='20'><b><font face='Soopafresh'>BOOST RANK</b><br></font><font size = '11'>\n <font color='#D5D5D5'>Boost rank es una herramienta extra por pago, que te permite aumentar de rango más rápido que los demás.\n\n <rose>¿Cómo funciona?</rose>\n <font color='#FFFFFF'>Lo que hace el boost rank es duplicar la cantidad de rangos ganados.\n Completaste un mapa por rango, ganarás 2 rangos por pasar el mapa. O sea que si ganas los dos rangos del día, en total subirás 4 rangos en un solo día!</font>\n\n <rose>¿Cómo comprar?</rose>\n <font color='#FFFFFF'>El boost rank tiene un precio de: <font color='#E6DD05'>100 quesos</font> del inventario (otorgados a Hackinnzkt). Su precio es elevado porque no todos podrán tener esa gran ventaja, así que si quieres un boost rank empieza a ahorrar!</font>\n<font size='10' color='#8E8E8E'>(Los ingresos serán utilizados para la tribu como premios)</font> ", name, 254, 50, 290, 330, 0x313131, 0x000000, 1, true)
- ui.addTextArea(5001, "<a href='event:xBoostRank'>X</a>", name, 530, 50, 15, 15, 0xE30000, 0x000000, 0.5, true)
- print(" <font color='#B2AB00'>"..name.."</font> in <font color='#9E87CB'>"..cb.."</font> ")
- end
- if cb == "xBoostRank" then
- ui.removeTextArea(5000, name)
- ui.removeTextArea(5001, name)
- end
- if cb == "xPrint" then
- ui.removeTextArea(922,name)
- end
- if cb == "xMsgBonusTime" then
- ui.removeTextArea(11,name)
- end
- if cb == "cerrarL" then
- ui.removeTextArea(3467,name)
- ui.removeTextArea(3468,name)
- ui.removeTextArea(3469,name)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement