Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for _, v in next, {'AutoShaman', 'AutoNewGame', 'AfkDeath', 'AutoTimeLeft'} do
- tfm.exec['disable' .. v]()
- end
- local tempo = 0
- local Admin = "Hugotitas" -- Aqui vc muda seu nome, dentro das aspas
- local cor={"0xffffff","0x00000"}
- mapas = {164931,7073393,7098884}
- local go=false
- local players = {}
- function setColors()
- for i,v in pairs(tfm.get.room.playerList) do
- if Admin ~= i then
- tfm.exec.setNameColor(i,0x2E2E2E)
- else
- tfm.exec.setNameColor(i,0xFFD100)
- end
- end
- end
- setColors()
- function eventNewGame()
- code = tfm.get.room.currentMap
- if code == '@164931' then
- ui.removeTextArea(0,nil)
- ui.removeTextArea(3,nil)
- ui.removeTextArea(4,nil)
- ui.addTextArea(3,"<font size='35'><R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n",nil,643,10,0,1000,0,0,80,false)
- elseif code == '@7073393' then
- ui.removeTextArea(0,nil)
- ui.removeTextArea(3,nil)
- ui.removeTextArea(4,nil)
- ui.addTextArea(3,"<font size='35'><R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n",nil,611,10,0,1000,0,0,80,false)
- elseif code == '@7098884' then
- ui.removeTextArea(0,nil)
- ui.removeTextArea(3,nil)
- ui.addTextArea(3,"<font size='35'><R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n",nil,519,10,0,1000,0,0,80,false)
- ui.addTextArea(4,"<font size='35'><R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n<R>|\n<J>|\n",nil,259,10,0,1000,0,0,80,false)
- end
- end
- function eventNewPlayer(name)
- ui.addWindow(1, "Player : <V>"..Admin.."", nil, 665, 28, 130, 28, 1, true,false, "Fechar")
- ui.addTextArea(1,"<font size='14'><a href='event:m'>Mudar Jogador : ",Admin,5,28,0,0,0x153139,0x132C33,1,true)
- table.insert(players, name)
- end
- function eventPlayerLeft(name)
- for k, v in ipairs(players) do
- if name == v then
- table.remove(players, k)
- end
- end
- end
- function eventTextAreaCallback(id,name,call)
- if call == "m" then
- ui.addTextArea(2,"Jogadores : <VI>\n"..table.concat(players, '\n').."</VI>\n<R>________________</R>\n\n<B><a href='event:nome'>Nome</a></B> | <B><a href='event:a'>Aleatório</B>",Admin,5,60,120,nil,0x153139,0x132C33,1,true)
- end
- if call == "nome" then
- ui.addPopup(0,2," Nome do Jogador :",Admin,344,100,200,true)
- end
- if call == "a" then
- Admin = players[math.random(#players)]
- ui.removeTextArea(1, name)
- ui.removeTextArea(2, name)
- ui.addWindow(1, "Player : <V>"..Admin.."", nil, 665, 28, 130, 28, 1, true,false, "Fechar")
- ui.addTextArea(1,"<font size='14'><a href='event:m'>Mudar Jogador : ",Admin,5,28,0,0,0x153139,0x132C33,1,true)
- setColors()
- end
- end
- function eventPlayerWon(name)
- go=false
- tfm.exec.playerVictory(name)
- end
- function ui.addWindow(id, text, player, x, y, width, height, alpha, corners, closeButton, buttonText)
- id = tostring(id)
- ui.addTextArea(id.."000000000", "", player, x, y, width, height, 0x573926, 0x573926, alpha, true)
- ui.addTextArea(id.."0", "", player, x+1, y+1, width-2, height-2, 0x8a583c, 0x8a583c, alpha, true)
- ui.addTextArea(id.."00", "", player, x+3, y+3, width-6, height-6, 0x2b1f19, 0x2b1f19, alpha, true)
- ui.addTextArea(id.."000", "", player, x+4, y+4, width-8, height-8, 0xc191c, 0xc191c, alpha, true)
- ui.addTextArea(id.."0000", "", player, x+5, y+5, width-10, height-10, 0x2d5a61, 0x2d5a61, alpha, true)
- ui.addTextArea(id.."00000", text, player, x+5, y+6, width-10, height-12, 0x142b2e, 0x142b2e, alpha, true)
- local imageId = {}
- if corners then
- table.insert(imageId, tfm.exec.addImage("155cbe97a3f.png", "&1", x-7, (y+height)-22, player))
- table.insert(imageId, tfm.exec.addImage("155cbe99c72.png", "&1", x-7, y-7, player))
- table.insert(imageId, tfm.exec.addImage("155cbe9bc9b.png", "&1", (x+width)-20, (y+height)-22, player))
- table.insert(imageId, tfm.exec.addImage("155cbea943a.png", "&1", (x+width)-20, y-7, player))
- end
- if closeButton then
- ui.addTextArea(id.."000000", "", player, x+8, y+height-22, width-16, 13, 0x7a8d93, 0x7a8d93, alpha, true)
- ui.addTextArea(id.."0000000", "", player, x+9, y+height-21, width-16, 13, 0xe1619, 0xe1619, alpha, true)
- ui.addTextArea(id.."00000000", "", player, x+9, y+height-21, width-17, 12, 0x314e57, 0x314e57, alpha, true)
- ui.addTextArea(id.."", buttonText, player, x+9, y+height-24, width-17, nil, 0x314e57, 0x314e57, 0, true)
- end
- return imageId
- end
- function eventLoop()
- if go then
- tempo = tempo + 0.5
- if not tostring(tempo):find('.5') then
- ui.addTextArea(0,"<font size='35'><J><p align='center'>"..tempo,nil,364,360,70,70,0x000001,1,80,true)
- end
- end
- end
- function eventPopupAnswer(id,name,r)
- if id == 0 then
- if r then
- nome = r:lower():gsub('%a', string.upper, 1)
- end
- if tfm.get.room.playerList[nome] then
- ui.removeTextArea(2,name)
- ui.removeTextArea(1,name)
- Admin = nome
- ui.addTextArea(1,"<font size='14'><a href='event:m'>Mudar Jogador : ",nome,5,28,0,0,0x153139,0x132C33,1,true)
- ui.addWindow(1, "Player : <V>"..Admin.."", nil, 665, 28, 130, 28, 1, true,false, "Fechar")
- setColors()
- else
- ui.addPopup(0,3,"<font size ='14' color='#FF00DE'>[•]</font><font color='#FED000' size='14'> O jogador <font color='#00F9FE'>"..nome.."</font> não se encontra na sala.",name,300,200,300,true)
- end
- end
- end
- function eventChatCommand(name,cmd)
- if name == Admin then
- if cmd == "t_madeira" then
- tempo = 0
- go=true
- tfm.exec.newGame('<C><P F="2" Ca="" /><Z><S><S L="800" X="400" H="27" Y="387" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="22" H="375" X="276" Y="188" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S L="27" H="327" X="464" Y="212" T="0" P="0,0,0.3,0.2,0,0,0,0" /><S L="22" X="812" H="375" Y="186" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S P="0,0,0,0.2,0,0,0,0" L="22" X="-10" Y="192" T="1" m="" H="375" /></S><D><P X="32" Y="486" T="1" P="0,0" /><P X="37" Y="435" T="1" P="0,0" /><P X="71" Y="477" T="1" P="0,0" /><P X="775" Y="482" T="1" P="0,0" /><P X="781" Y="406" T="1" P="0,0" /><P X="752" Y="474" T="1" P="0,0" /><F Y="32" X="462" /><DS Y="358" X="77" /><T Y="41" X="464" /></D><O /></Z></C>')
- ui.setMapName("Treinamento_Madeira")
- tfm.exec.movePlayer(name,394,354,false,0,0,false)
- ui.removeTextArea(3,nil)
- ui.removeTextArea(4,nil)
- for k,v in pairs(tfm.get.room.playerList) do
- if k ~= Admin then
- tfm.exec.killPlayer(k)
- end
- end
- end
- end
- if name == Admin then
- if cmd == "t_chocolate" then
- tempo = 0
- go=true
- tfm.exec.newGame('<C><P F="2" Ca="" /><Z><S><S L="800" X="400" H="27" Y="387" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="22" X="276" H="375" Y="188" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S L="22" H="375" X="812" Y="186" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S P="0,0,0,0.2,0,0,0,0" L="22" H="375" Y="192" T="1" m="" X="-10" /><S L="27" H="327" X="462" Y="213" T="4" P="0,0,20,0.2,0,0,0,0" /></S><D><P X="32" Y="486" T="1" P="0,0" /><P X="37" Y="435" T="1" P="0,0" /><P X="71" Y="477" T="1" P="0,0" /><P X="775" Y="482" T="1" P="0,0" /><P X="781" Y="406" T="1" P="0,0" /><P X="752" Y="474" T="1" P="0,0" /><F Y="32" X="462" /><DS Y="358" X="77" /><T Y="38" X="463" /></D><O /></Z></C>')
- ui.setMapName("Treinamento_Chocolate")
- tfm.exec.movePlayer(name,394,354,false,0,0,false)
- ui.removeTextArea(3,nil)
- ui.removeTextArea(4,nil)
- for k,v in pairs(tfm.get.room.playerList) do
- if k ~= Admin then
- tfm.exec.killPlayer(k)
- end
- end
- end
- end
- if name == Admin then
- if cmd == "t_terra" then
- tempo = 0
- go=true
- tfm.exec.newGame('<C><P F="2" Ca="" /><Z><S><S L="800" H="27" X="400" Y="387" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0,0.2,0,0,0,0" L="22" H="375" Y="188" T="1" m="" X="276" /><S P="0,0,0,0.2,0,0,0,0" L="22" X="812" Y="186" T="1" m="" H="375" /><S L="22" H="375" X="-10" Y="192" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S L="27" X="462" H="322" Y="210" T="5" P="0,0,0.3,0.2,0,0,0,0" /></S><D><P P="0,0" Y="486" T="1" X="32" /><P P="0,0" Y="435" T="1" X="37" /><P P="0,0" Y="477" T="1" X="71" /><P P="0,0" Y="482" T="1" X="775" /><P P="0,0" Y="406" T="1" X="781" /><P P="0,0" Y="474" T="1" X="752" /><F Y="37" X="460" /><DS Y="358" X="77" /><T Y="44" X="459" /></D><O /></Z></C>')
- ui.setMapName("Treinamento_Terra")
- tfm.exec.movePlayer(name,394,354,false,0,0,false)
- ui.removeTextArea(3,nil)
- ui.removeTextArea(4,nil)
- for k,v in pairs(tfm.get.room.playerList) do
- if k ~= Admin then
- tfm.exec.killPlayer(k)
- end
- end
- end
- end
- if name == Admin then
- if cmd == "t_grama" then
- tempo = 0
- go=true
- tfm.exec.newGame('<C><P F="2" Ca="" /><Z><S><S L="800" H="27" X="400" Y="387" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0,0.2,0,0,0,0" L="22" H="375" Y="188" T="1" m="" X="276" /><S P="0,0,0,0.2,0,0,0,0" L="22" X="812" Y="186" T="1" m="" H="375" /><S L="22" H="375" X="-10" Y="192" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S L="29" X="464" H="324" Y="212" T="6" P="0,0,0.3,0.2,0,0,0,0" /></S><D><P P="0,0" Y="486" T="1" X="32" /><P P="0,0" Y="435" T="1" X="37" /><P P="0,0" Y="477" T="1" X="71" /><P P="0,0" Y="482" T="1" X="775" /><P P="0,0" Y="406" T="1" X="781" /><P P="0,0" Y="474" T="1" X="752" /><F Y="37" X="460" /><DS Y="358" X="77" /><T Y="44" X="462" /></D><O /></Z></C>')
- ui.setMapName("Treinamento_Grama")
- tfm.exec.movePlayer(name,394,354,false,0,0,false)
- ui.removeTextArea(3,nil)
- ui.removeTextArea(4,nil)
- for k,v in pairs(tfm.get.room.playerList) do
- if k ~= Admin then
- tfm.exec.killPlayer(k)
- end
- end
- end
- end
- if name == Admin then
- if cmd == "t_areia" then
- tempo = 0
- go=true
- tfm.exec.newGame('<C><P F="2" Ca="" /><Z><S><S L="800" H="27" X="400" Y="387" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0,0.2,0,0,0,0" L="22" H="375" Y="188" T="1" m="" X="276" /><S P="0,0,0,0.2,0,0,0,0" L="22" X="812" Y="186" T="1" m="" H="375" /><S L="22" H="375" X="-10" Y="192" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S L="28" X="465" H="324" Y="213" T="7" P="0,0,0.1,0.2,0,0,0,0" /></S><D><P P="0,0" Y="486" T="1" X="32" /><P P="0,0" Y="435" T="1" X="37" /><P P="0,0" Y="477" T="1" X="71" /><P P="0,0" Y="482" T="1" X="775" /><P P="0,0" Y="406" T="1" X="781" /><P P="0,0" Y="474" T="1" X="752" /><F Y="37" X="460" /><DS Y="358" X="77" /><T Y="44" X="462" /></D><O /></Z></C>')
- ui.setMapName("Treinamento_Areia")
- tfm.exec.movePlayer(name,394,354,false,0,0,false)
- ui.removeTextArea(3,nil)
- ui.removeTextArea(4,nil)
- for k,v in pairs(tfm.get.room.playerList) do
- if k ~= Admin then
- tfm.exec.killPlayer(k)
- end
- end
- end
- end
- if name == Admin then
- if cmd == "t_pedra" then
- tempo = 0
- go=true
- tfm.exec.newGame('<C><P F="2" Ca="" /><Z><S><S L="800" H="27" X="400" Y="387" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0,0.2,0,0,0,0" L="22" X="276" Y="188" T="1" m="" H="375" /><S P="0,0,0,0.2,0,0,0,0" L="22" H="375" Y="186" T="1" m="" X="812" /><S L="22" X="-10" H="375" Y="192" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S L="28" H="322" X="466" Y="214" T="10" P="0,0,0.3,0,0,0,0,0" /></S><D><P P="0,0" Y="486" T="1" X="32" /><P P="0,0" Y="435" T="1" X="37" /><P P="0,0" Y="477" T="1" X="71" /><P P="0,0" Y="482" T="1" X="775" /><P P="0,0" Y="406" T="1" X="781" /><P P="0,0" Y="474" T="1" X="752" /><F Y="37" X="460" /><DS Y="358" X="77" /><T Y="45" X="462" /></D><O /></Z></C>')
- ui.setMapName("Treinamento_Pedra")
- tfm.exec.movePlayer(name,394,354,false,0,0,false)
- ui.removeTextArea(3,nil)
- ui.removeTextArea(4,nil)
- for k,v in pairs(tfm.get.room.playerList) do
- if k ~= Admin then
- tfm.exec.killPlayer(k)
- end
- end
- end
- end
- if name == Admin then
- if cmd == "t_neve" then
- tempo = 0
- go=true
- tfm.exec.newGame('<C><P F="2" Ca="" /><Z><S><S L="800" H="27" X="400" Y="387" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0,0.2,0,0,0,0" L="22" X="276" Y="188" T="1" m="" H="375" /><S P="0,0,0,0.2,0,0,0,0" L="22" H="375" Y="186" T="1" m="" X="812" /><S L="22" X="-10" H="375" Y="192" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S L="27" X="463" H="319" Y="214" T="11" P="0,0,0.05,0.1,0,0,0,0" /></S><D><P P="0,0" Y="486" T="1" X="32" /><P P="0,0" Y="435" T="1" X="37" /><P P="0,0" Y="477" T="1" X="71" /><P P="0,0" Y="482" T="1" X="775" /><P P="0,0" Y="406" T="1" X="781" /><P P="0,0" Y="474" T="1" X="752" /><F Y="37" X="460" /><DS Y="358" X="77" /><T Y="47" X="459" /></D><O /></Z></C>')
- ui.setMapName("Treinamento_Neve")
- tfm.exec.movePlayer(name,394,354,false,0,0,false)
- ui.removeTextArea(3,nil)
- ui.removeTextArea(4,nil)
- for k,v in pairs(tfm.get.room.playerList) do
- if k ~= Admin then
- tfm.exec.killPlayer(k)
- end
- end
- end
- end
- if name == Admin then
- if cmd == "t_kina" then
- tfm.exec.newGame(mapas[math.random(#mapas)])
- end
- end
- end
- for all in pairs(tfm.get.room.playerList) do
- eventNewPlayer(all)
- end
Add Comment
Please, Sign In to add comment