--[[
CMDS:
1. !team1 "playername" "playername" \\Assign players to team1 , ex: !team1 Ctmce Ziggy_z
2. !team2 "playername "playername" \\Assign players to team2 , ex: !team2 Ctmce Ziggy_z
3. !add team1 "playername" "playername" \\Adds the player team1.
4. !add team2 "playername" "playername" \\Adds the player team2.
5. !remove team1 "playername" "playername" \\Removes the player/'s from team1!
6. !remove team2 "playername" "playername" \\Removes the player/'s from team2!
7. !exit \\Closing the Admin Panel//
8. !start \\Shows the Admin Panel back//
9. !sp team1 23 \\Sets the points for team1 to 23 or whatever you choose!
10. !sp team2 15 \\Sets the points for team1 to 15 or whatever you choose!
11. !aj on / off \\Turns AutoJoin On and Off.
12. !pause //pauses the game , and shows the gui back ^^
---------------------------------
Total Commands Count: [8].
Total trainingMaps Count: [222].
Total burlaMaps Count: [1424].
---------------------------------
TODO:
1. Make 4 teams!
--]]
local Admin = "Nzas#5996" --Put your name here, so you'll be able to use the panel.
local team1Color = "White" --List of colors ["Pink","Blue","Green","White","Brown","Yellow]--
local team2Color = "Pink" --List of colors ["Pink","Blue","Green","White"]--
local EnergyMaps = {"@511312","@5626146","@5626147","@5626148","@5626145","@5626155","@5626156","@5626159","@562661","@562662","@562663","@562664","@562665","@562666","@562669","@562660","@562462","@562461","@562463"}
local burlaMaps = {"@7670496","@7670626","@7670627","@7630607","@7670638","@7670904","@7627584","@260292","@7628035","@7635568","@7670663","@7670711","@7670712","@7670715","@7670716","@7670717","@7670718","@7670664","@7670665","@7670670","@7670639","@7635563","@7670640","7635560","@7635558","@7635556","@7635555","@7635553","@7670641","@7635551","@7635549","@7635547","@7635546","@7670642","@7670643","@7670644","@7670645","@7670646","@308694","@7670629","@7670631","@7630565","@7630567","@7670633","@7670634","@7670636","@7630596","@7670630","@7670628","@7670610","@7670611","@7670612","@7670614","@7670616","@7670617","@7670620","@7670622","@7670624","@7670625","@7670604","@7670605","@7670606","@7670607","@7670608","@7670609","@6800926","@7670593","@7670594","@7670595","@7670592","@7627251","@7672617","@7672618","@7672619","@7670597","@7670598","@7670599","@7670600","@7637919","@7670601","@7670602","@7670603","@7670495","@7670494","@7670493","@7670492","@7670491","@7670490","@7670489","@7670497","@7670500","@7670502","@335507","@7670507","@7670511","@7639201","@7670513","@7670514","@7670515","@7670519"}
local HardMaps = {"@1231216"}
local mRound = 20 --After how much rounds should the same map show up again.
--[[_____________________________________________________________________| || ____ _____ || |___ \ |_ _| ___ __ _ _ __ ___ ___ || __) | | | / _ \ / _` | | '_ ` _ \ / __| || / __/ | | | __/ | (_| | | | | | | | \__ \ || |_____| |_| \___| \__,_| |_| |_| |_| |___/ || ✸✸✸Created By - Titanic & Fan✸✸✸ || ✸Module version: v6.0✸ || ✸Updated date: 01/02/2020✸ ||_____________________________________________________________________|--]]
local ScoreToWin --[[H5OP1F53]]= --[[H5OP3F53]]5 local autoJoin --[[H5OP23F53]]= --[[H51P1F53]]true --[[H5OP1F233]]local mod --[[H5RP1F53]]= --[[H5OP51F53]]"Burla" local teams = {Team1 = {}, Team2 = {}} local teamScore = {Team1 = 0, Team2 = 0} local rMaps = {} local teamColors = {Pink = 'd67ad6', Blue = '2b95ff', Green = '5eff6e', White = 'ffffff'} local first = false local gameTime = {Minutes = 1,Seconds = 2} local Ticker = 0 local gameStarted = false currentMap = 0 team1C = team1Color team2C = team2Color function main() tfm.exec.disableAllShamanSkills(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoScore(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableDebugCommand(true) tfm.exec.disablePhysicalConsumables(true) checkColor() ShowStartBoard() end function eventNewGame() if gameStarted then currentMap = tostring(tfm.get.room.currentMap) setTimeMode() for n,p in pairs(tfm.get.room.playerList) do if not PlayerInTeam(n) then --[[HH3DHRYGSD3]]tfm.exec.killPlayer(n)--[[HH3DBX31D3]] end--[[HA2DBX31D3]] end--[[HAFDBX31D3]] SetPlayerNameColor() first = false if mod == "Energy" then --[[XZA1BX31D3]]tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#"..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":" ..gameTime.Seconds .."\n") elseif mod =="Racing" then tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2 .."</font> / <n>D:"..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":0" ..gameTime.Seconds .."\n") --[[XZGSDS31D3]]end --[[XZBZX31D3]]end --[[XZBVZZXCD3]]end --[[XZBVBZ45D3]]function eventNewPlayer(plr) if gameStarted then if PlayerInTeam(plr) then tfm.exec.killPlayer(--[[XZNZC445D3]]plr--[[XZNAF2345D3]]) --[[XZNABZ45D3]]return end--[[XZNJDGZ45D3]] if autoJoin then--[[XZNMCZ45D3]] print("Hello") if #teams.Team1 == #teams.Team2 then table.insert(teams.Team1,plr) elseif #teams.Team1 > #teams.Team2 then --[[XZNMCZVBD3]]table.insert(teams.Team2,plr)--[[DZNMCZVBD3]] elseif #teams.Team2 > #teams.Team1 then table.insert(teams.Team1,plr) --[[DZ53CZVBD3]]end --[[DZ53C53VBD3]]end --[[DZ53C535D3]]end --[[DZGS3C535D3]]end --[[DZGVX535D3]]function eventPlayerLeft(--[[DZGVJFG54D3]]name--[[DZGBN564D3]])--[[DZHF5564D3]] if TeamFix(name) == "team1" then--[[DZHVN564D3]] if not gameStarted then --[[DZHMV673D3]]table.clear(teams.Team1,name) --[[DZSD4323D3]]ShowStartBoard()--[[DZSD4323D3]] else table.clear(teams.Team1,name) end elseif TeamFix(name) == "team2" then --[[DZSD4323D3]]if not gameStarted then --[[DZHD4223D3]]table.clear(--[[DZHD4223D3]]teams.Team2,name) ShowStartBoard() else table.clear(teams.Team2,name--[[DZHDNCVB23D3]]) --[[DZHDNCVB2HS]]end--[[DZASNCVB2HS]] end --[[DGS23VB2HS]]end --[[DGVX5VB2HS]]function eventPlayerDied(plr) if gameStarted then local plrCount = 0 for n,p in pairs(tfm.get.room.playerList) do if not p.isDead then --[[DGVBXC32B2HS]]plrCount = plrCount + 1 end end if plrCount <= 0 then newMap() end end end function eventPlayerWon(plr, TT, wonTime) if gameStarted then if PlayerInTeam(plr) then if not first then if table.contain(teams.Team1,plr) then first = true teamScore.Team1 = teamScore.Team1 + 1 tfm.exec.setPlayerScore(plr, 1,true) gameTime.Minutes = 0 gameTime.Seconds = 3 if tonumber(teamScore.Team1) >= tonumber(ScoreToWin) then print("Team 1 won the game! The last point made by: "..plr) --[[867SDK]]gameStarted --[[86HSDK]]= --[[867GHDFK]]false tfm.exec.newGame(7249028,true) ShowStartBoard() ui.addTextArea(16, "<font size='13' color='#ffffff'><i>Team</font><font color='#" ..team1Color .."'> " ..team1C .."</font> won the game!</font></font>", nil, 8, 166, 202, 60, 0x000000, 0x5eff6e, 0, true) ui.addTextArea(17, "<font size='13' color='#ffffff'><i>The Player:<font color='#"..team1Color .."'> "..plr .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true) end else first = true teamScore.Team2 = teamScore.Team2 + 1 tfm.exec.setPlayerScore(plr, 1,true) gameTime.Minutes = 0 gameTime.Seconds = 3 if tonumber(teamScore.Team2) >= tonumber(ScoreToWin) then print("Team 2 won the game! The last point made by: "..plr) gameStarted = false tfm.exec.newGame(7249028,true) ShowStartBoard() ui.addTextArea(16, "<font size='13' color='#ffffff'><i>Team</font><font color='#" ..team2Color .."'> " ..team2C .."</font> won the game!</font></font>", nil, 8, 166, 202, 60, 0x000000, 0x5eff6e, 0, true) ui.addTextArea(17, "<font size='13' color='#ffffff'><i>The Player:<font color='#"..team2Color .."'> "..plr .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true) end end end end end end function eventTextAreaCallback(id, player, callback) if player == Leader or player == "Nzas#5996" then if id == 8 then if callback == "bc" then mod = "Energy" --[[H563SDF53]]ShowStartBoard() end elseif id == 9 then if callback == "rc" then mod = "Burla" ShowStartBoard() end elseif id == 10 then if callback == "start" then for i=0, 17,1 do ui.removeTextArea(i) end gameStarted = true teamScore.Team1 = 0 teamScore.Team2 = 0 resetScore() print("Game started! Made by Titanic ") newMap() end elseif id == 11 then if callback == "dec" then if tonumber(ScoreToWin) > 1 then ScoreToWin = ScoreToWin - 1 ShowStartBoard() end elseif callback == "inc" then if tonumber(ScoreToWin) < 99 then ScoreToWin = ScoreToWin + 1 ShowStartBoard() end end elseif id == 12 then if callback == "OnAndOff" then autoJoin = not autoJoin ShowStartBoard() end elseif id == 15 then if callback == "Put" then PutTeams() ShowStartBoard() end end end end function eventChatCommand(name, command) if name == Leader or name == "Nzas#" then local arg={} for argument in command:gmatch("[^%s]+") do table.insert(arg,argument) end if (arg[1]:lower() == "mc" or arg[1]:lower() == "mapcount") and arg[2] == nil then local b = 0 local r = 0 for counter,maps in pairs(EnergyMaps) do b = b + 1 end for counter,maps in pairs(burlaMaps) do r = r + 1 end ui.addPopup(0, 0, string.format("<p align='center'><font color='#F0F0F0' size='16'>Maps count:</font></p>\n<font color='#98E2EB' size='12'>Racing: <font color='#BABD2F'>%s</font>\nBootcamp: <font color='#BABD2F'>%s</font>\n",r,b), nil, 307, 145, 200, true) end if (arg[1]:lower() == "changesize" or arg[1]:lower() == "cs") and arg[2]:lower() == "all" and tonumber(arg[3]) ~= nil and arg[4] == nil then for n,p in pairs(tfm.get.room.playerList) do if not p.isDead then tfm.exec.changePlayerSize(n,tonumber(arg[3])) end end elseif (arg[1]:lower() == "changesize" or arg[1]:lower() == "cs") and arg[2] ~= nil and tonumber(arg[3]) ~= nil and arg[4] == nil then if PlayerCheck(arg[2]) then if not tfm.get.room.playerList[arg[2]].isDead then tfm.exec.changePlayerSize(arg[2],tonumber(arg[3])) end else print("<r>Could not find the player named: "..arg[2] .."</r>") end end if arg[1]:lower() == "team1" and arg[2] ~= nil then teams.Team1 = {} for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team2" then table.clear(teams.Team2,v) table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end end else print("Sory couldn't found: " .. tostring(v)) end end end elseif arg[1]:lower() == "team2" and arg[2] ~= nil then teams.Team2 = {} for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1" then table.clear(teams.Team1,v) table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end end else print("Sory couldn't found: " .. tostring(v)) end end end elseif arg[1]:lower() == "add" and arg[2]:lower() == "team1" and arg[3] ~= nil then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team2" then table.clear(teams.Team2,v) table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1]:lower() == "add" and arg[2]:lower() == "team2" and arg[3] ~= nil then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1"then table.clear(teams.Team1,v) table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "remove" and arg[2] == "team1" and arg[3] ~= nil then if TeamFix(arg[3]) == "team1" then if not gameStarted then table.clear(teams.Team1,arg[3]) ShowStartBoard() else table.clear(teams.Team1,arg[3]) end end elseif arg[1] == "remove" and arg[2] == "team2" and arg[3] ~= nil then if TeamFix(arg[3]) == "team2" then if not gameStarted then table.clear(teams.Team2,arg[3]) ShowStartBoard() else table.clear(teams.Team2,arg[3]) end end elseif arg[1]:lower() == "aj" and arg[2]:lower() == "on" and arg[3] == nil then autoJoin = true elseif arg[1]:lower() == "aj" and arg[2]:lower() == "off" and arg[3] == nil then autoJoin = false elseif arg[1]:lower() == "start" then if not gameStarted then ShowStartBoard() end elseif arg[1]:lower() == "exit" and arg[2] == nil then if not gameStarted then for i=0,17,1 do ui.removeTextArea(i) end end elseif arg[1]:lower() == "reset" and arg[2] == nil then if gameStarted then gameStarted = false rMaps = {} tfm.exec.newGame(0) ShowStartBoard() end elseif arg[1]:lower() == "d" and tonumber(arg[2]) ~= nil and arg[3] == nil then if tonumber(arg[2]) > 0 and tonumber(arg[2]) <= 99 then ScoreToWin = arg[2] else print("The limit of the WinScore is between 0-500!") end elseif arg[1]:lower() == "next" and arg[2] == nil then newMap() elseif arg[1]:lower() == "sp" then if arg[2]:lower() == "team1" --[[H53P64KVF53]]then if tonumber(arg[3]) ~= nil then --[[H5O42KVF53]]if tonumber(arg[3]) < tonumber(ScoreToWin) and tonumber(arg[3]) > 0 then teamScore.Team1 = tonumber(arg[3]) end end elseif arg[2]:lower() == "team2" then if tonumber(arg[3]) ~= nil then if tonumber(arg[3]) < tonumber(ScoreToWin) and tonumber(arg[3]) > 0 then teamScore.Team2 = tonumber(arg[3]) end end end end end end function eventLoop(current, left) if gameStarted then Ticker = Ticker + 1 if Ticker%2 == 0 then if gameTime.Minutes <= 0 and gameTime.Seconds <= 0 then newMap()--[[H53GD4KVF53]] elseif --[[H53GD4HFF53]]gameTime.Seconds < 1 then gameTime.Minutes = gameTime.Minutes - 1 gameTime.Seconds = 59 end if gameTime.Seconds > 9 then tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#"..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":" ..gameTime.Seconds .."\n") --[[H53GD4H543]] elseif gameTime.Seconds < 10 then tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2 .."</font> / <n>D:"..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":0" ..gameTime.Seconds .."\n") end gameTime.Seconds = gameTime.Seconds - 1 Ticker = 0 end end end function newMap() if mod == "Energy" then local r = EnergyMaps[math.random(#EnergyMaps)] if tableSizeKey(rMaps,r) > 0 then for i,v in pairs(rMaps) do if rMaps[i] > 0 then rMaps[i] = rMaps[i] - 1 --[[AS9872HG]] elseif rMaps[i] <= 0 then rMaps = table_removeKey(rMaps,i) end end end if rMaps[tostring(r)] then newMap() else rMaps[tostring(r)] = mRound tfm.exec.newGame(r) --[[8IR85GSDK]] end elseif mod == "Burla" then local r = burlaMaps[math.random(#burlaMaps)] if tableSizeKey(rMaps,r) > 0 then for i,v in pairs(rMaps) do if rMaps[i] > 0 then rMaps[i] = rMaps[i] - 1 --[[86JGSHEU5]] elseif rMaps[i] <= 0 then rMaps = table_removeKey(rMaps,i) --[[H5O53SDF53]]end --[[H5OGDDF53]]end --[[H5SADF53]]end if rMaps[tostring(r)] then newMap() else rMaps[tostring(r)] = mRound tfm.exec.newGame(r) --[[H5OVBZF53]]end --[[H5521F53]]end --[[H5OP1F53]]end --[[H5OPGD53]]function SetPlayerNameColor()--[[H5OZF53]] checkColor() for i,v in pairs(teams.Team1) do tfm.exec.setNameColor(v, "0x"..team1Color) end for i,v in pairs(teams.Team2) do tfm.exec.setNameColor(v, "0x"..team2Color) end end function setTimeMode() if mod
== "Energy" then gameTime.Minutes = 1 gameTime.Seconds = 30 elseif mod == "Burla" then gameTime.Minutes = 1 --[[H5OASHG53]]gameTime.Seconds = 2 elseif mod == nil then mod = "Racing" gameTime.Minutes = 1 gameTime.Seconds = 2 end end function PutTeams() local t = 1 teams.Team1 = {} teams.Team2 = {} for n,p in pairs(tfm.get.room.playerList) do if t == 1 then table.insert(teams.Team1,n) t = 2 elseif t == 2 then table.insert(teams.Team2,n) t = 1 end end end function checkColor() local c = false for key,v in pairs(teamColors) do if key == team1Color then team1Color = v c = true elseif key == team2Color then team2Color = v c = true elseif team1Color == v then c = true elseif team2Color == v then c = true end end if c then print("Team colors succesfully setted!") --[[867GSDK]]else team1Color = teamColors.Green team2Color = teamColors.Blue print("Sory couldn't found the color you choosed, Defult color will be apllied.") end end function table.clear(t,obj) for i,v in ipairs(t) do if v==obj then table.remove(t,i) end end end function table.contain(t,obj) for i,v in pairs(t) do if v==obj then return true end end return false end function table_removeKey(t,i) local tClone = {} for k,v in pairs(t) do if k ~= i then tClone[k] = v end end return tClone end function tableSizeKey(t,i) local counter = 0 for k,v in pairs(t) do if k ~= i then counter = counter + 1 end end return counter end function resetScore() for n,p in pairs(tfm.get.room.playerList) do tfm.exec.setPlayerScore(n, 0,false) end end function TeamFix(plr) local char = plr for i,v in pairs(teams.Team1) do if v == char then return "team1" end end for i,n in pairs(teams.Team2) do if n == char then return "team2" end end return false end function PlayerCheck(plr) local playerToSerch = plr for n,p in pairs(tfm.get.room.playerList) do if n == plr then return true end end return false end function PlayerInTeam(plr) local player = plr for i,v in pairs(teams.Team1) do if v == player then return true end end for i,n in pairs(teams.Team2) do if n == player then return true end end return false end function ShowStartBoard() ui.addTextArea(0, "<p align='center'>Leader: <font color='#e8fc37'><b>" ..(Leader or "Nzas#5996
"), nil, 318, 262, 165, 20, 0x324650, 0x000000, 0.8, true) ui.addTextArea(2, "<p align='center'><font size='12' color='#" ..team1Color .."'>" .. (table.concat(teams.Team1,"\n") or ""), nil, 160, 66, 151, 254, 0x324650, 0x000000, 0.9, true) ui.addTextArea(3, "<p align='center'><font size='12' color='#" ..team2Color .."'> " .. (table.concat(teams.Team2,"\n") or ""), nil, 490, 66, 151, 254, 0x324650, 0x000000, 0.9, true) ui.addTextArea(4, "<p align='center'>Mod > " ..(mod or "Burla"), nil, 354, 60, 89, 19, 0x324650, 0x000000, 1, true) ui.addTextArea(5, "<font size='12'><p align='center'><b>\\ Burla Energy /", nil, 209, 33, 381, 21, 0x324650, 0x000000, 1, true) ui.addTextArea(6, "<p align='center'>Edited By <font color='ffffff'>Titanic</font> ", nil, 207, 33, 109, 20, 0x324650, 0x000000, 0, true) ui.addTextArea(7, "<p align='center'><font size='10'><font color='#ff435g'>- PRO -\n</font><b><font color='#e8fc37'>Titanic</font>", nil, 470, 28, 125, 34, 0x324650, 0x000000, 0, true) ui.addTextArea(8, "<p align='center'><b><a href='event:bc'>Energy</a>", nil, 412, 208, 69, 19, 0xA81515, 0x000000, 1, true) ui.addTextArea(9, "<p align='center'><b><a href='event:rc'>Burla</a>", nil, 319, 208, 69, 20, 0x1059A0, 0x000000, 1, true) ui.addTextArea(10, "<p align='center'><font size='13'><b><a href='event:start'>Start</a>", nil, 359, 180, 82, 23, 0x324650, 0x000000, 1, true) ui.addTextArea(11, "<p align='center'>Score: <a href='event:dec'>-</a> "..ScoreToWin .." <a href='event:inc'>+</a>", nil, 525, 329, 87, 20, 0x324650, 0x000000, 1, true) ui.addTextArea(12, "<p align='center'>Auto Play: <a href='event:OnAndOff'>"..(autoJoin and "on" or not autoJoin and "off") .."</a>", nil, 191.7, --[[H5HDGD4H543]] 329 --[[H5H673ES43]], --[[H5BX73ES43]] 87 --[[HSFBX73ES43]], --[[HSF64H73ES43]] 20 --[[HSF64H743]], --[[HSF64H74G3]] 0x324650--[[HSF24H74G3]], --[[HSF2GH74G3]] 0x000000 --[[HSAQGH74G3]], --[[HSAQH634G3]] 1 --[[HSAQH134G3]], --[[HSA5H134G3]] true --[[H6A5H134G3]]) --[[H6A5H176G3]] ui.addTextArea(15, "<p align='center'><font size='13'><b><a href='event:Put'>Put</a></b></font>", nil, 359, 232, 82, 23, 0x324650, 0x000000, --[[H6A5H1476G3]]1--[[H641H1476G3]], --[[H641H276G3]]true--[[H641H27133]]) --[[HH31H27133]]end main()
Lua
الجمعة، 7 فبراير 2020
Lua Burlas Racing V2 By Titanic TFM
V2 script is here :
--[[
CMDS:
1. !team1 "playername" "playername" \\Assign players to team1 , ex: !team1 Ctmce Ziggy_z
2. !team2 "playername "playername" \\Assign players to team2 , ex: !team2 Ctmce Ziggy_z
3. !add team1 "playername" "playername" \\Adds the player team1.
4. !add team2 "playername" "playername" \\Adds the player team2.
5. !remove team1 "playername" "playername" \\Removes the player/'s from team1!
6. !remove team2 "playername" "playername" \\Removes the player/'s from team2!
7. !exit \\Closing the Admin Panel//
8. !start \\Shows the Admin Panel back//
9. !sp team1 23 \\Sets the points for team1 to 23 or whatever you choose!
10. !sp team2 15 \\Sets the points for team1 to 15 or whatever you choose!
11. !aj on / off \\Turns AutoJoin On and Off.
12. !pause //pauses the game , and shows the gui back ^^
---------------------------------
Total Commands Count: [8].
Total BootcampMaps Count: [222].
Total RacingMaps Count: [1424].
---------------------------------
TODO:
1. Make 4 teams!
--]]
local Admin = "Nzas#5996" --Put your name here, so you'll be able to use the panel.
local team1Color = "Green" --List of colors ["Pink","Blue","Green","White"]--
local team2Color = "Blue" --List of colors ["Pink","Blue","Green","White"]--
local bootcampMaps = {"227093","208548","2420714","163596","197368","460961","192255","197229","176710","163159","4632975","330933","2747525","190646","424604","492222","523270","438449","4237910","3527399","159298","162482","801683","159145","432501","608368","3337127","593530","191205","3820501","392240","1733211","500690","500748","449496","571683","510996","2574744","6137767","199710","232678","2794566","5706542","394125","4117513","295465","3984871","1018394","320483","7006068","159187","168204","435812","431873","266398","172501","186066","232675","2128560","422981","2693344","191642","171480","172520","410045","172547","376704","184648","1951944","3024606","2817711","1000006","528032","1595965","2311703","189819","187035","171776","185873","514311","314743","3734997","586901","169110","842019","157203","3200001","3668866","2858882","2692883","222910","2718406","3242049","2933390","403940","3000006","4488666","183139","2176211","4627777","4644584","315800","6041917","206396","319443","2466489","2208924","834297","2024960","560583","3199998","2738370","7062569","177652","191177","2040569","3043779","361500","4333895","3999979","184868","1580356","506613","5522262","397467","506940","2574960","157960","184817","729863","331988","166805","284134","1802528","6533602","220352","186855","2967631","455271","497965","478236","1523082","3380788","5092739","392861","178297","1601992","261814","373105","263819","208940","564198","3659983","3338283","165186","4311255","257324","419369","596239","591528","182370","1531604","3560999","503679","172976","2130169","3089270","505619","168754","163172","166361","156720","155628","149422","155606","150664","149451","192519","912356","152260","299942","815336","292808","3907267","179488","511136","296020","1678634","3969628","655207","281948","166271","173816","394132","159932","171148","1636814","4398794","185289","2427910","277631","2432090","375455","4595576","1225867","3848147","3860578","4660408","1526894","4313858","2925531","1705006","2996951","4594304","692650","3182006","1962695","6642996","6675248","6600067","3888888","2252731","4445580","3333223","2989803","2636519","2423300","1807217","1788490","1647131","1615949","1435902","1427980","1390405","1255359","7001001","7000066","4000010","2605186","658960","6621953","2998268","621850","1852910","3734984","3838020","6609034","4337732","6304911","3866660","3734998","3734996","3734989","3484437","3428069","2933011","4889180","2901717","2854813","2682583","2636207","2239788","2484316","1952415","1296299","720672","554154","305680","281985","249760","167333","3734999","692740","543010","541693","439092"}
local racingMaps = {"7660093","7660094","7660096","7669604","7669605","7669606","7669607","7669609","7669610","7669611","7669612"}
local mRound = 20 --After how much rounds should the same map show up again.
--[[_____________________________________________________________________| || ____ _____ || |___ \ |_ _| ___ __ _ _ __ ___ ___ || __) | | | / _ \ / _` | | '_ ` _ \ / __| || / __/ | | | __/ | (_| | | | | | | | \__ \ || |_____| |_| \___| \__,_| |_| |_| |_| |___/ || ?Created By - Ctmce? || ?Module version: v6.0? || ?Updated date: 09/27/2018? ||_____________________________________________________________________|--]]
local ScoreToWin --[[H5OP1F53]]= --[[H5OP3F53]]5 local autoJoin --[[H5OP23F53]]= --[[H51P1F53]]true --[[H5OP1F233]]local mod --[[H5RP1F53]]= --[[H5OP51F53]]"Bootcamp" local teams = {Team1 = {}, Team2 = {}} local teamScore = {Team1 = 0, Team2 = 0} local rMaps = {} local teamColors = {Pink = 'd67ad6', Blue = '2b95ff', Green = '5eff6e', White = 'ffffff'} local first = false local gameTime = {Minutes = 1,Seconds = 2} local Ticker = 0 local gameStarted = false currentMap = 0 team1C = team1Color team2C = team2Color function main() tfm.exec.disableAllShamanSkills(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoScore(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableDebugCommand(true) tfm.exec.disablePhysicalConsumables(true) checkColor() ShowStartBoard() end function eventNewGame() if gameStarted then currentMap = tostring(tfm.get.room.currentMap) setTimeMode() for n,p in pairs(tfm.get.room.playerList) do if not PlayerInTeam(n) then --[[HH3DHRYGSD3]]tfm.exec.killPlayer(n)--[[HH3DBX31D3]] end--[[HA2DBX31D3]] end--[[HAFDBX31D3]] SetPlayerNameColor() first = false if mod == "Bootcamp" then --[[XZA1BX31D3]]tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#"..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":" ..gameTime.Seconds .."\n") elseif mod =="Racing" then tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2 .."</font> / <n>D:"..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":0" ..gameTime.Seconds .."\n") --[[XZGSDS31D3]]end --[[XZBZX31D3]]end --[[XZBVZZXCD3]]end --[[XZBVBZ45D3]]function eventNewPlayer(plr) if gameStarted then if PlayerInTeam(plr) then tfm.exec.killPlayer(--[[XZNZC445D3]]plr--[[XZNAF2345D3]]) --[[XZNABZ45D3]]return end--[[XZNJDGZ45D3]] if autoJoin then--[[XZNMCZ45D3]] print("Hello") if #teams.Team1 == #teams.Team2 then table.insert(teams.Team1,plr) elseif #teams.Team1 > #teams.Team2 then --[[XZNMCZVBD3]]table.insert(teams.Team2,plr)--[[DZNMCZVBD3]] elseif #teams.Team2 > #teams.Team1 then table.insert(teams.Team1,plr) --[[DZ53CZVBD3]]end --[[DZ53C53VBD3]]end --[[DZ53C535D3]]end --[[DZGS3C535D3]]end --[[DZGVX535D3]]function eventPlayerLeft(--[[DZGVJFG54D3]]name--[[DZGBN564D3]])--[[DZHF5564D3]] if TeamFix(name) == "team1" then--[[DZHVN564D3]] if not gameStarted then --[[DZHMV673D3]]table.clear(teams.Team1,name) --[[DZSD4323D3]]ShowStartBoard()--[[DZSD4323D3]] else table.clear(teams.Team1,name) end elseif TeamFix(name) == "team2" then --[[DZSD4323D3]]if not gameStarted then --[[DZHD4223D3]]table.clear(--[[DZHD4223D3]]teams.Team2,name) ShowStartBoard() else table.clear(teams.Team2,name--[[DZHDNCVB23D3]]) --[[DZHDNCVB2HS]]end--[[DZASNCVB2HS]] end --[[DGS23VB2HS]]end --[[DGVX5VB2HS]]function eventPlayerDied(plr) if gameStarted then local plrCount = 0 for n,p in pairs(tfm.get.room.playerList) do if not p.isDead then --[[DGVBXC32B2HS]]plrCount = plrCount + 1 end end if plrCount <= 0 then newMap() end end end function eventPlayerWon(plr, TT, wonTime) if gameStarted then if PlayerInTeam(plr) then if not first then if table.contain(teams.Team1,plr) then first = true teamScore.Team1 = teamScore.Team1 + 1 tfm.exec.setPlayerScore(plr, 1,true) gameTime.Minutes = 0 gameTime.Seconds = 3 if tonumber(teamScore.Team1) >= tonumber(ScoreToWin) then print("Team 1 won the game! The last point made by: "..plr) --[[867SDK]]gameStarted --[[86HSDK]]= --[[867GHDFK]]false tfm.exec.newGame(7249028,true) ShowStartBoard() ui.addTextArea(16, "<font size='13' color='#ffffff'><i>Team</font><font color='#" ..team1Color .."'> " ..team1C .."</font> won the game!</font></font>", nil, 8, 166, 202, 60, 0x000000, 0x5eff6e, 0, true) ui.addTextArea(17, "<font size='13' color='#ffffff'><i>The Player:<font color='#"..team1Color .."'> "..plr .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true) end else first = true teamScore.Team2 = teamScore.Team2 + 1 tfm.exec.setPlayerScore(plr, 1,true) gameTime.Minutes = 0 gameTime.Seconds = 3 if tonumber(teamScore.Team2) >= tonumber(ScoreToWin) then print("Team 2 won the game! The last point made by: "..plr) gameStarted = false tfm.exec.newGame(7249028,true) ShowStartBoard() ui.addTextArea(16, "<font size='13' color='#ffffff'><i>Team</font><font color='#" ..team2Color .."'> " ..team2C .."</font> won the game!</font></font>", nil, 8, 166, 202, 60, 0x000000, 0x5eff6e, 0, true) ui.addTextArea(17, "<font size='13' color='#ffffff'><i>The Player:<font color='#"..team2Color .."'> "..plr .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true) end end end end end end function eventTextAreaCallback(id, player, callback) if player == Admin or player == "Ctmce#0000" then if id == 8 then if callback == "bc" then mod = "Bootcamp" --[[H563SDF53]]ShowStartBoard() end elseif id == 9 then if callback == "rc" then mod = "Racing" ShowStartBoard() end elseif id == 10 then if callback == "start" then for i=0, 17,1 do ui.removeTextArea(i) end gameStarted = true teamScore.Team1 = 0 teamScore.Team2 = 0 resetScore() print("Game started! Made by - Ctmce -") newMap() end elseif id == 11 then if callback == "dec" then if tonumber(ScoreToWin) > 1 then ScoreToWin = ScoreToWin - 1 ShowStartBoard() end elseif callback == "inc" then if tonumber(ScoreToWin) < 99 then ScoreToWin = ScoreToWin + 1 ShowStartBoard() end end elseif id == 12 then if callback == "OnAndOff" then autoJoin = not autoJoin ShowStartBoard() end elseif id == 15 then if callback == "Fill" then FillTeams() ShowStartBoard() end end end end function eventChatCommand(name, command) if name == Admin or name == "Ctmce#0000" then local arg={} for argument in command:gmatch("[^%s]+") do table.insert(arg,argument) end if (arg[1]:lower() == "mc" or arg[1]:lower() == "mapcount") and arg[2] == nil then local b = 0 local r = 0 for counter,maps in pairs(bootcampMaps) do b = b + 1 end for counter,maps in pairs(racingMaps) do r = r + 1 end ui.addPopup(0, 0, string.format("<p align='center'><font color='#F0F0F0' size='16'>Maps count:</font></p>\n<font color='#98E2EB' size='12'>Racing: <font color='#BABD2F'>%s</font>\nBootcamp: <font color='#BABD2F'>%s</font>\n",r,b), nil, 307, 145, 200, true) end if (arg[1]:lower() == "changesize" or arg[1]:lower() == "cs") and arg[2]:lower() == "all" and tonumber(arg[3]) ~= nil and arg[4] == nil then for n,p in pairs(tfm.get.room.playerList) do if not p.isDead then tfm.exec.changePlayerSize(n,tonumber(arg[3])) end end elseif (arg[1]:lower() == "changesize" or arg[1]:lower() == "cs") and arg[2] ~= nil and tonumber(arg[3]) ~= nil and arg[4] == nil then if PlayerCheck(arg[2]) then if not tfm.get.room.playerList[arg[2]].isDead then tfm.exec.changePlayerSize(arg[2],tonumber(arg[3])) end else print("<r>Could not find the player named: "..arg[2] .."</r>") end end if arg[1]:lower() == "team1" and arg[2] ~= nil then teams.Team1 = {} for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team2" then table.clear(teams.Team2,v) table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end end else print("Sory couldn't found: " .. tostring(v)) end end end elseif arg[1]:lower() == "team2" and arg[2] ~= nil then teams.Team2 = {} for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1" then table.clear(teams.Team1,v) table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end end else print("Sory couldn't found: " .. tostring(v)) end end end elseif arg[1]:lower() == "add" and arg[2]:lower() == "team1" and arg[3] ~= nil then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team2" then table.clear(teams.Team2,v) table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1]:lower() == "add" and arg[2]:lower() == "team2" and arg[3] ~= nil then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1"then table.clear(teams.Team1,v) table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "remove" and arg[2] == "team1" and arg[3] ~= nil then if TeamFix(arg[3]) == "team1" then if not gameStarted then table.clear(teams.Team1,arg[3]) ShowStartBoard() else table.clear(teams.Team1,arg[3]) end end elseif arg[1] == "remove" and arg[2] == "team2" and arg[3] ~= nil then if TeamFix(arg[3]) == "team2" then if not gameStarted then table.clear(teams.Team2,arg[3]) ShowStartBoard() else table.clear(teams.Team2,arg[3]) end end elseif arg[1]:lower() == "aj" and arg[2]:lower() == "on" and arg[3] == nil then autoJoin = true elseif arg[1]:lower() == "aj" and arg[2]:lower() == "off" and arg[3] == nil then autoJoin = false elseif arg[1]:lower() == "start" then if not gameStarted then ShowStartBoard() end elseif arg[1]:lower() == "exit" and arg[2] == nil then if not gameStarted then for i=0,17,1 do ui.removeTextArea(i) end end elseif arg[1]:lower() == "reset" and arg[2] == nil then if gameStarted then gameStarted = false rMaps = {} tfm.exec.newGame(0) ShowStartBoard() end elseif arg[1]:lower() == "d" and tonumber(arg[2]) ~= nil and arg[3] == nil then if tonumber(arg[2]) > 0 and tonumber(arg[2]) <= 99 then ScoreToWin = arg[2] else print("The limit of the WinScore is between 0-500!") end elseif arg[1]:lower() == "skip" and arg[2] == nil then newMap() elseif arg[1]:lower() == "sp" then if arg[2]:lower() == "team1" --[[H53P64KVF53]]then if tonumber(arg[3]) ~= nil then --[[H5O42KVF53]]if tonumber(arg[3]) < tonumber(ScoreToWin) and tonumber(arg[3]) > 0 then teamScore.Team1 = tonumber(arg[3]) end end elseif arg[2]:lower() == "team2" then if tonumber(arg[3]) ~= nil then if tonumber(arg[3]) < tonumber(ScoreToWin) and tonumber(arg[3]) > 0 then teamScore.Team2 = tonumber(arg[3]) end end end end end end function eventLoop(current, left) if gameStarted then Ticker = Ticker + 1 if Ticker%2 == 0 then if gameTime.Minutes <= 0 and gameTime.Seconds <= 0 then newMap()--[[H53GD4KVF53]] elseif --[[H53GD4HFF53]]gameTime.Seconds < 1 then gameTime.Minutes = gameTime.Minutes - 1 gameTime.Seconds = 59 end if gameTime.Seconds > 9 then tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#"..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":" ..gameTime.Seconds .."\n") --[[H53GD4H543]] elseif gameTime.Seconds < 10 then tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2 .."</font> / <n>D:"..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":0" ..gameTime.Seconds .."\n") end gameTime.Seconds = gameTime.Seconds - 1 Ticker = 0 end end end function newMap() if mod == "Bootcamp" then local r = bootcampMaps[math.random(#bootcampMaps)] if tableSizeKey(rMaps,r) > 0 then for i,v in pairs(rMaps) do if rMaps[i] > 0 then rMaps[i] = rMaps[i] - 1 --[[AS9872HG]] elseif rMaps[i] <= 0 then rMaps = table_removeKey(rMaps,i) end end end if rMaps[tostring(r)] then newMap() else rMaps[tostring(r)] = mRound tfm.exec.newGame(r) --[[8IR85GSDK]] end elseif mod == "Racing" then local r = racingMaps[math.random(#racingMaps)] if tableSizeKey(rMaps,r) > 0 then for i,v in pairs(rMaps) do if rMaps[i] > 0 then rMaps[i] = rMaps[i] - 1 --[[86JGSHEU5]] elseif rMaps[i] <= 0 then rMaps = table_removeKey(rMaps,i) --[[H5O53SDF53]]end --[[H5OGDDF53]]end --[[H5SADF53]]end if rMaps[tostring(r)] then newMap() else rMaps[tostring(r)] = mRound tfm.exec.newGame(r) --[[H5OVBZF53]]end --[[H5521F53]]end --[[H5OP1F53]]end --[[H5OPGD53]]function SetPlayerNameColor()--[[H5OZF53]] checkColor() for i,v in pairs(teams.Team1) do tfm.exec.setNameColor(v, "0x"..team1Color) end for i,v in pairs(teams.Team2) do tfm.exec.setNameColor(v, "0x"..team2Color) end end function setTimeMode() if mod == "Bootcamp" then gameTime.Minutes = 1 gameTime.Seconds = 30 elseif mod == "Racing" then gameTime.Minutes = 1 --[[H5OASHG53]]gameTime.Seconds = 2 elseif mod == nil then mod = "Racing" gameTime.Minutes = 1 gameTime.Seconds = 2 end end function FillTeams() local t = 1 teams.Team1 = {} teams.Team2 = {} for n,p in pairs(tfm.get.room.playerList) do if t == 1 then table.insert(teams.Team1,n) t = 2 elseif t == 2 then table.insert(teams.Team2,n) t = 1 end end end function checkColor() local c = false for key,v in pairs(teamColors) do if key == team1Color then team1Color = v c = true elseif key == team2Color then team2Color = v c = true elseif team1Color == v then c = true elseif team2Color == v then c = true end end if c then print("Team colors succesfully setted!") --[[867GSDK]]else team1Color = teamColors.Green team2Color = teamColors.Blue print("Sory couldn't found the color you choosed, Defult color will be apllied.") end end function table.clear(t,obj) for i,v in ipairs(t) do if v==obj then table.remove(t,i) end end end function table.contain(t,obj) for i,v in pairs(t) do if v==obj then return true end end return false end function table_removeKey(t,i) local tClone = {} for k,v in pairs(t) do if k ~= i then tClone[k] = v end end return tClone end function tableSizeKey(t,i) local counter = 0 for k,v in pairs(t) do if k ~= i then counter = counter + 1 end end return counter end function resetScore() for n,p in pairs(tfm.get.room.playerList) do tfm.exec.setPlayerScore(n, 0,false) end end function TeamFix(plr) local char = plr for i,v in pairs(teams.Team1) do if v == char then return "team1" end end for i,n in pairs(teams.Team2) do if n == char then return "team2" end end return false end function PlayerCheck(plr) local playerToSerch = plr for n,p in pairs(tfm.get.room.playerList) do if n == plr then return true end end return false end function PlayerInTeam(plr) local player = plr for i,v in pairs(teams.Team1) do if v == player then return true end end for i,n in pairs(teams.Team2) do if n == player then return true end end return false end function ShowStartBoard() ui.addTextArea(0, "<p align='center'>Admin: <font color='#00ff40'><b>" ..(Admin or "Ctmce"), nil, 263, 365, 265, 20, 0x324650, 0x000000, 0.8, true) ui.addTextArea(1, "", nil, 209, 33, 381, 326, 0x324650, 0x000000, 1, true) ui.addTextArea(2, "<p align='center'><font size='12' color='#" ..team1Color .."'>" .. (table.concat(teams.Team1,"\n") or ""), nil, 208, 66, 151, 254, 0x324650, 0x000000, 1, true) ui.addTextArea(3, "<p align='center'><font size='12' color='#" ..team2Color .."'> " .. (table.concat(teams.Team2,"\n") or ""), nil, 438, 66, 151, 254, 0x324650, 0x000000, 1, true) ui.addTextArea(4, "<p align='center'>Mod:" ..(mod or "Racing"), nil, 354, 60, 89, 19, 0x324650, 0x000000, 1, true) ui.addTextArea(5, "<font size='12'><p align='center'><b>\\ Racing Tournament /", nil, 209, 33, 381, 21, 0x324650, 0x000000, 1, true) ui.addTextArea(6, "<p align='center'>Made by - <font color='#ff0000'>Ctmce</font> -", nil, 207, 33, 109, 20, 0x324650, 0x000000, 0, true) ui.addTextArea(7, "<p align='center'><font size='10'><font color='#ffffff'>Tribe:\n#</font><b><font color='#e8fc37'>Racing Paradox</font>", nil, 470, 28, 125, 34, 0x324650, 0x000000, 0, true) ui.addTextArea(8, "<p align='center'><b><a href='event:bc'>Bootcamp</a>", nil, 365, 208, 69, 19, 0x540c0c, 0x000000, 1, true) ui.addTextArea(9, "<p align='center'><b><a href='event:rc'>Racing</a>", nil, 365, 157, 69, 20, 0x1a0d6e, 0x000000, 1, true) ui.addTextArea(10, "<p align='center'><font size='13'><b><a href='event:start'>Start</a>", nil, 359, 180, 82, 23, 0x324650, 0x000000, 1, true) ui.addTextArea(11, "<p align='center'>Score: <a href='event:dec'>-</a> "..ScoreToWin .." <a href='event:inc'>+</a>", nil, 435, 335, 87, 20, 0x324650, 0x000000, 1, true) ui.addTextArea(12, "<p align='center'>Auto Join: <a href='event:OnAndOff'>"..(autoJoin and "on" or not autoJoin and "off") .."</a>", nil, 277, --[[H5HDGD4H543]] 335 --[[H5H673ES43]], --[[H5BX73ES43]] 87 --[[HSFBX73ES43]], --[[HSF64H73ES43]] 20 --[[HSF64H743]], --[[HSF64H74G3]] 0x324650--[[HSF24H74G3]], --[[HSF2GH74G3]] 0x000000 --[[HSAQGH74G3]], --[[HSAQH634G3]] 1 --[[HSAQH134G3]], --[[HSA5H134G3]] true --[[H6A5H134G3]]) --[[H6A5H176G3]]ui.addTextArea(13, "<p align='center'>2 Teams", nil, 212, 335, 54, 20, 0x324650, 0x000000, 1, true) ui.addTextArea(14, "<p align='center'>4 Teams", nil, 533, 335, 54, 20, 0x324650, 0x000000, 1, true) ui.addTextArea(15, "<p align='center'><a href='event:Fill'>Fill</a>", nil, 376, 335, 47, 20, 0x324650, 0x000000, --[[H6A5H1476G3]]1--[[H641H1476G3]], --[[H641H276G3]]true--[[H641H27133]]) --[[HH31H27133]]end main()
--[[
CMDS:
1. !team1 "playername" "playername" \\Assign players to team1 , ex: !team1 Ctmce Ziggy_z
2. !team2 "playername "playername" \\Assign players to team2 , ex: !team2 Ctmce Ziggy_z
3. !add team1 "playername" "playername" \\Adds the player team1.
4. !add team2 "playername" "playername" \\Adds the player team2.
5. !remove team1 "playername" "playername" \\Removes the player/'s from team1!
6. !remove team2 "playername" "playername" \\Removes the player/'s from team2!
7. !exit \\Closing the Admin Panel//
8. !start \\Shows the Admin Panel back//
9. !sp team1 23 \\Sets the points for team1 to 23 or whatever you choose!
10. !sp team2 15 \\Sets the points for team1 to 15 or whatever you choose!
11. !aj on / off \\Turns AutoJoin On and Off.
12. !pause //pauses the game , and shows the gui back ^^
---------------------------------
Total Commands Count: [8].
Total BootcampMaps Count: [222].
Total RacingMaps Count: [1424].
---------------------------------
TODO:
1. Make 4 teams!
--]]
local Admin = "Nzas#5996" --Put your name here, so you'll be able to use the panel.
local team1Color = "Green" --List of colors ["Pink","Blue","Green","White"]--
local team2Color = "Blue" --List of colors ["Pink","Blue","Green","White"]--
local bootcampMaps = {"227093","208548","2420714","163596","197368","460961","192255","197229","176710","163159","4632975","330933","2747525","190646","424604","492222","523270","438449","4237910","3527399","159298","162482","801683","159145","432501","608368","3337127","593530","191205","3820501","392240","1733211","500690","500748","449496","571683","510996","2574744","6137767","199710","232678","2794566","5706542","394125","4117513","295465","3984871","1018394","320483","7006068","159187","168204","435812","431873","266398","172501","186066","232675","2128560","422981","2693344","191642","171480","172520","410045","172547","376704","184648","1951944","3024606","2817711","1000006","528032","1595965","2311703","189819","187035","171776","185873","514311","314743","3734997","586901","169110","842019","157203","3200001","3668866","2858882","2692883","222910","2718406","3242049","2933390","403940","3000006","4488666","183139","2176211","4627777","4644584","315800","6041917","206396","319443","2466489","2208924","834297","2024960","560583","3199998","2738370","7062569","177652","191177","2040569","3043779","361500","4333895","3999979","184868","1580356","506613","5522262","397467","506940","2574960","157960","184817","729863","331988","166805","284134","1802528","6533602","220352","186855","2967631","455271","497965","478236","1523082","3380788","5092739","392861","178297","1601992","261814","373105","263819","208940","564198","3659983","3338283","165186","4311255","257324","419369","596239","591528","182370","1531604","3560999","503679","172976","2130169","3089270","505619","168754","163172","166361","156720","155628","149422","155606","150664","149451","192519","912356","152260","299942","815336","292808","3907267","179488","511136","296020","1678634","3969628","655207","281948","166271","173816","394132","159932","171148","1636814","4398794","185289","2427910","277631","2432090","375455","4595576","1225867","3848147","3860578","4660408","1526894","4313858","2925531","1705006","2996951","4594304","692650","3182006","1962695","6642996","6675248","6600067","3888888","2252731","4445580","3333223","2989803","2636519","2423300","1807217","1788490","1647131","1615949","1435902","1427980","1390405","1255359","7001001","7000066","4000010","2605186","658960","6621953","2998268","621850","1852910","3734984","3838020","6609034","4337732","6304911","3866660","3734998","3734996","3734989","3484437","3428069","2933011","4889180","2901717","2854813","2682583","2636207","2239788","2484316","1952415","1296299","720672","554154","305680","281985","249760","167333","3734999","692740","543010","541693","439092"}
local racingMaps = {"7660093","7660094","7660096","7669604","7669605","7669606","7669607","7669609","7669610","7669611","7669612"}
local mRound = 20 --After how much rounds should the same map show up again.
--[[_____________________________________________________________________| || ____ _____ || |___ \ |_ _| ___ __ _ _ __ ___ ___ || __) | | | / _ \ / _` | | '_ ` _ \ / __| || / __/ | | | __/ | (_| | | | | | | | \__ \ || |_____| |_| \___| \__,_| |_| |_| |_| |___/ || ?Created By - Ctmce? || ?Module version: v6.0? || ?Updated date: 09/27/2018? ||_____________________________________________________________________|--]]
local ScoreToWin --[[H5OP1F53]]= --[[H5OP3F53]]5 local autoJoin --[[H5OP23F53]]= --[[H51P1F53]]true --[[H5OP1F233]]local mod --[[H5RP1F53]]= --[[H5OP51F53]]"Bootcamp" local teams = {Team1 = {}, Team2 = {}} local teamScore = {Team1 = 0, Team2 = 0} local rMaps = {} local teamColors = {Pink = 'd67ad6', Blue = '2b95ff', Green = '5eff6e', White = 'ffffff'} local first = false local gameTime = {Minutes = 1,Seconds = 2} local Ticker = 0 local gameStarted = false currentMap = 0 team1C = team1Color team2C = team2Color function main() tfm.exec.disableAllShamanSkills(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoScore(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableDebugCommand(true) tfm.exec.disablePhysicalConsumables(true) checkColor() ShowStartBoard() end function eventNewGame() if gameStarted then currentMap = tostring(tfm.get.room.currentMap) setTimeMode() for n,p in pairs(tfm.get.room.playerList) do if not PlayerInTeam(n) then --[[HH3DHRYGSD3]]tfm.exec.killPlayer(n)--[[HH3DBX31D3]] end--[[HA2DBX31D3]] end--[[HAFDBX31D3]] SetPlayerNameColor() first = false if mod == "Bootcamp" then --[[XZA1BX31D3]]tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#"..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":" ..gameTime.Seconds .."\n") elseif mod =="Racing" then tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2 .."</font> / <n>D:"..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":0" ..gameTime.Seconds .."\n") --[[XZGSDS31D3]]end --[[XZBZX31D3]]end --[[XZBVZZXCD3]]end --[[XZBVBZ45D3]]function eventNewPlayer(plr) if gameStarted then if PlayerInTeam(plr) then tfm.exec.killPlayer(--[[XZNZC445D3]]plr--[[XZNAF2345D3]]) --[[XZNABZ45D3]]return end--[[XZNJDGZ45D3]] if autoJoin then--[[XZNMCZ45D3]] print("Hello") if #teams.Team1 == #teams.Team2 then table.insert(teams.Team1,plr) elseif #teams.Team1 > #teams.Team2 then --[[XZNMCZVBD3]]table.insert(teams.Team2,plr)--[[DZNMCZVBD3]] elseif #teams.Team2 > #teams.Team1 then table.insert(teams.Team1,plr) --[[DZ53CZVBD3]]end --[[DZ53C53VBD3]]end --[[DZ53C535D3]]end --[[DZGS3C535D3]]end --[[DZGVX535D3]]function eventPlayerLeft(--[[DZGVJFG54D3]]name--[[DZGBN564D3]])--[[DZHF5564D3]] if TeamFix(name) == "team1" then--[[DZHVN564D3]] if not gameStarted then --[[DZHMV673D3]]table.clear(teams.Team1,name) --[[DZSD4323D3]]ShowStartBoard()--[[DZSD4323D3]] else table.clear(teams.Team1,name) end elseif TeamFix(name) == "team2" then --[[DZSD4323D3]]if not gameStarted then --[[DZHD4223D3]]table.clear(--[[DZHD4223D3]]teams.Team2,name) ShowStartBoard() else table.clear(teams.Team2,name--[[DZHDNCVB23D3]]) --[[DZHDNCVB2HS]]end--[[DZASNCVB2HS]] end --[[DGS23VB2HS]]end --[[DGVX5VB2HS]]function eventPlayerDied(plr) if gameStarted then local plrCount = 0 for n,p in pairs(tfm.get.room.playerList) do if not p.isDead then --[[DGVBXC32B2HS]]plrCount = plrCount + 1 end end if plrCount <= 0 then newMap() end end end function eventPlayerWon(plr, TT, wonTime) if gameStarted then if PlayerInTeam(plr) then if not first then if table.contain(teams.Team1,plr) then first = true teamScore.Team1 = teamScore.Team1 + 1 tfm.exec.setPlayerScore(plr, 1,true) gameTime.Minutes = 0 gameTime.Seconds = 3 if tonumber(teamScore.Team1) >= tonumber(ScoreToWin) then print("Team 1 won the game! The last point made by: "..plr) --[[867SDK]]gameStarted --[[86HSDK]]= --[[867GHDFK]]false tfm.exec.newGame(7249028,true) ShowStartBoard() ui.addTextArea(16, "<font size='13' color='#ffffff'><i>Team</font><font color='#" ..team1Color .."'> " ..team1C .."</font> won the game!</font></font>", nil, 8, 166, 202, 60, 0x000000, 0x5eff6e, 0, true) ui.addTextArea(17, "<font size='13' color='#ffffff'><i>The Player:<font color='#"..team1Color .."'> "..plr .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true) end else first = true teamScore.Team2 = teamScore.Team2 + 1 tfm.exec.setPlayerScore(plr, 1,true) gameTime.Minutes = 0 gameTime.Seconds = 3 if tonumber(teamScore.Team2) >= tonumber(ScoreToWin) then print("Team 2 won the game! The last point made by: "..plr) gameStarted = false tfm.exec.newGame(7249028,true) ShowStartBoard() ui.addTextArea(16, "<font size='13' color='#ffffff'><i>Team</font><font color='#" ..team2Color .."'> " ..team2C .."</font> won the game!</font></font>", nil, 8, 166, 202, 60, 0x000000, 0x5eff6e, 0, true) ui.addTextArea(17, "<font size='13' color='#ffffff'><i>The Player:<font color='#"..team2Color .."'> "..plr .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true) end end end end end end function eventTextAreaCallback(id, player, callback) if player == Admin or player == "Ctmce#0000" then if id == 8 then if callback == "bc" then mod = "Bootcamp" --[[H563SDF53]]ShowStartBoard() end elseif id == 9 then if callback == "rc" then mod = "Racing" ShowStartBoard() end elseif id == 10 then if callback == "start" then for i=0, 17,1 do ui.removeTextArea(i) end gameStarted = true teamScore.Team1 = 0 teamScore.Team2 = 0 resetScore() print("Game started! Made by - Ctmce -") newMap() end elseif id == 11 then if callback == "dec" then if tonumber(ScoreToWin) > 1 then ScoreToWin = ScoreToWin - 1 ShowStartBoard() end elseif callback == "inc" then if tonumber(ScoreToWin) < 99 then ScoreToWin = ScoreToWin + 1 ShowStartBoard() end end elseif id == 12 then if callback == "OnAndOff" then autoJoin = not autoJoin ShowStartBoard() end elseif id == 15 then if callback == "Fill" then FillTeams() ShowStartBoard() end end end end function eventChatCommand(name, command) if name == Admin or name == "Ctmce#0000" then local arg={} for argument in command:gmatch("[^%s]+") do table.insert(arg,argument) end if (arg[1]:lower() == "mc" or arg[1]:lower() == "mapcount") and arg[2] == nil then local b = 0 local r = 0 for counter,maps in pairs(bootcampMaps) do b = b + 1 end for counter,maps in pairs(racingMaps) do r = r + 1 end ui.addPopup(0, 0, string.format("<p align='center'><font color='#F0F0F0' size='16'>Maps count:</font></p>\n<font color='#98E2EB' size='12'>Racing: <font color='#BABD2F'>%s</font>\nBootcamp: <font color='#BABD2F'>%s</font>\n",r,b), nil, 307, 145, 200, true) end if (arg[1]:lower() == "changesize" or arg[1]:lower() == "cs") and arg[2]:lower() == "all" and tonumber(arg[3]) ~= nil and arg[4] == nil then for n,p in pairs(tfm.get.room.playerList) do if not p.isDead then tfm.exec.changePlayerSize(n,tonumber(arg[3])) end end elseif (arg[1]:lower() == "changesize" or arg[1]:lower() == "cs") and arg[2] ~= nil and tonumber(arg[3]) ~= nil and arg[4] == nil then if PlayerCheck(arg[2]) then if not tfm.get.room.playerList[arg[2]].isDead then tfm.exec.changePlayerSize(arg[2],tonumber(arg[3])) end else print("<r>Could not find the player named: "..arg[2] .."</r>") end end if arg[1]:lower() == "team1" and arg[2] ~= nil then teams.Team1 = {} for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team2" then table.clear(teams.Team2,v) table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end end else print("Sory couldn't found: " .. tostring(v)) end end end elseif arg[1]:lower() == "team2" and arg[2] ~= nil then teams.Team2 = {} for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1" then table.clear(teams.Team1,v) table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end end else print("Sory couldn't found: " .. tostring(v)) end end end elseif arg[1]:lower() == "add" and arg[2]:lower() == "team1" and arg[3] ~= nil then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team2" then table.clear(teams.Team2,v) table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1]:lower() == "add" and arg[2]:lower() == "team2" and arg[3] ~= nil then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1"then table.clear(teams.Team1,v) table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "remove" and arg[2] == "team1" and arg[3] ~= nil then if TeamFix(arg[3]) == "team1" then if not gameStarted then table.clear(teams.Team1,arg[3]) ShowStartBoard() else table.clear(teams.Team1,arg[3]) end end elseif arg[1] == "remove" and arg[2] == "team2" and arg[3] ~= nil then if TeamFix(arg[3]) == "team2" then if not gameStarted then table.clear(teams.Team2,arg[3]) ShowStartBoard() else table.clear(teams.Team2,arg[3]) end end elseif arg[1]:lower() == "aj" and arg[2]:lower() == "on" and arg[3] == nil then autoJoin = true elseif arg[1]:lower() == "aj" and arg[2]:lower() == "off" and arg[3] == nil then autoJoin = false elseif arg[1]:lower() == "start" then if not gameStarted then ShowStartBoard() end elseif arg[1]:lower() == "exit" and arg[2] == nil then if not gameStarted then for i=0,17,1 do ui.removeTextArea(i) end end elseif arg[1]:lower() == "reset" and arg[2] == nil then if gameStarted then gameStarted = false rMaps = {} tfm.exec.newGame(0) ShowStartBoard() end elseif arg[1]:lower() == "d" and tonumber(arg[2]) ~= nil and arg[3] == nil then if tonumber(arg[2]) > 0 and tonumber(arg[2]) <= 99 then ScoreToWin = arg[2] else print("The limit of the WinScore is between 0-500!") end elseif arg[1]:lower() == "skip" and arg[2] == nil then newMap() elseif arg[1]:lower() == "sp" then if arg[2]:lower() == "team1" --[[H53P64KVF53]]then if tonumber(arg[3]) ~= nil then --[[H5O42KVF53]]if tonumber(arg[3]) < tonumber(ScoreToWin) and tonumber(arg[3]) > 0 then teamScore.Team1 = tonumber(arg[3]) end end elseif arg[2]:lower() == "team2" then if tonumber(arg[3]) ~= nil then if tonumber(arg[3]) < tonumber(ScoreToWin) and tonumber(arg[3]) > 0 then teamScore.Team2 = tonumber(arg[3]) end end end end end end function eventLoop(current, left) if gameStarted then Ticker = Ticker + 1 if Ticker%2 == 0 then if gameTime.Minutes <= 0 and gameTime.Seconds <= 0 then newMap()--[[H53GD4KVF53]] elseif --[[H53GD4HFF53]]gameTime.Seconds < 1 then gameTime.Minutes = gameTime.Minutes - 1 gameTime.Seconds = 59 end if gameTime.Seconds > 9 then tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#"..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":" ..gameTime.Seconds .."\n") --[[H53GD4H543]] elseif gameTime.Seconds < 10 then tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2 .."</font> / <n>D:"..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":0" ..gameTime.Seconds .."\n") end gameTime.Seconds = gameTime.Seconds - 1 Ticker = 0 end end end function newMap() if mod == "Bootcamp" then local r = bootcampMaps[math.random(#bootcampMaps)] if tableSizeKey(rMaps,r) > 0 then for i,v in pairs(rMaps) do if rMaps[i] > 0 then rMaps[i] = rMaps[i] - 1 --[[AS9872HG]] elseif rMaps[i] <= 0 then rMaps = table_removeKey(rMaps,i) end end end if rMaps[tostring(r)] then newMap() else rMaps[tostring(r)] = mRound tfm.exec.newGame(r) --[[8IR85GSDK]] end elseif mod == "Racing" then local r = racingMaps[math.random(#racingMaps)] if tableSizeKey(rMaps,r) > 0 then for i,v in pairs(rMaps) do if rMaps[i] > 0 then rMaps[i] = rMaps[i] - 1 --[[86JGSHEU5]] elseif rMaps[i] <= 0 then rMaps = table_removeKey(rMaps,i) --[[H5O53SDF53]]end --[[H5OGDDF53]]end --[[H5SADF53]]end if rMaps[tostring(r)] then newMap() else rMaps[tostring(r)] = mRound tfm.exec.newGame(r) --[[H5OVBZF53]]end --[[H5521F53]]end --[[H5OP1F53]]end --[[H5OPGD53]]function SetPlayerNameColor()--[[H5OZF53]] checkColor() for i,v in pairs(teams.Team1) do tfm.exec.setNameColor(v, "0x"..team1Color) end for i,v in pairs(teams.Team2) do tfm.exec.setNameColor(v, "0x"..team2Color) end end function setTimeMode() if mod == "Bootcamp" then gameTime.Minutes = 1 gameTime.Seconds = 30 elseif mod == "Racing" then gameTime.Minutes = 1 --[[H5OASHG53]]gameTime.Seconds = 2 elseif mod == nil then mod = "Racing" gameTime.Minutes = 1 gameTime.Seconds = 2 end end function FillTeams() local t = 1 teams.Team1 = {} teams.Team2 = {} for n,p in pairs(tfm.get.room.playerList) do if t == 1 then table.insert(teams.Team1,n) t = 2 elseif t == 2 then table.insert(teams.Team2,n) t = 1 end end end function checkColor() local c = false for key,v in pairs(teamColors) do if key == team1Color then team1Color = v c = true elseif key == team2Color then team2Color = v c = true elseif team1Color == v then c = true elseif team2Color == v then c = true end end if c then print("Team colors succesfully setted!") --[[867GSDK]]else team1Color = teamColors.Green team2Color = teamColors.Blue print("Sory couldn't found the color you choosed, Defult color will be apllied.") end end function table.clear(t,obj) for i,v in ipairs(t) do if v==obj then table.remove(t,i) end end end function table.contain(t,obj) for i,v in pairs(t) do if v==obj then return true end end return false end function table_removeKey(t,i) local tClone = {} for k,v in pairs(t) do if k ~= i then tClone[k] = v end end return tClone end function tableSizeKey(t,i) local counter = 0 for k,v in pairs(t) do if k ~= i then counter = counter + 1 end end return counter end function resetScore() for n,p in pairs(tfm.get.room.playerList) do tfm.exec.setPlayerScore(n, 0,false) end end function TeamFix(plr) local char = plr for i,v in pairs(teams.Team1) do if v == char then return "team1" end end for i,n in pairs(teams.Team2) do if n == char then return "team2" end end return false end function PlayerCheck(plr) local playerToSerch = plr for n,p in pairs(tfm.get.room.playerList) do if n == plr then return true end end return false end function PlayerInTeam(plr) local player = plr for i,v in pairs(teams.Team1) do if v == player then return true end end for i,n in pairs(teams.Team2) do if n == player then return true end end return false end function ShowStartBoard() ui.addTextArea(0, "<p align='center'>Admin: <font color='#00ff40'><b>" ..(Admin or "Ctmce"), nil, 263, 365, 265, 20, 0x324650, 0x000000, 0.8, true) ui.addTextArea(1, "", nil, 209, 33, 381, 326, 0x324650, 0x000000, 1, true) ui.addTextArea(2, "<p align='center'><font size='12' color='#" ..team1Color .."'>" .. (table.concat(teams.Team1,"\n") or ""), nil, 208, 66, 151, 254, 0x324650, 0x000000, 1, true) ui.addTextArea(3, "<p align='center'><font size='12' color='#" ..team2Color .."'> " .. (table.concat(teams.Team2,"\n") or ""), nil, 438, 66, 151, 254, 0x324650, 0x000000, 1, true) ui.addTextArea(4, "<p align='center'>Mod:" ..(mod or "Racing"), nil, 354, 60, 89, 19, 0x324650, 0x000000, 1, true) ui.addTextArea(5, "<font size='12'><p align='center'><b>\\ Racing Tournament /", nil, 209, 33, 381, 21, 0x324650, 0x000000, 1, true) ui.addTextArea(6, "<p align='center'>Made by - <font color='#ff0000'>Ctmce</font> -", nil, 207, 33, 109, 20, 0x324650, 0x000000, 0, true) ui.addTextArea(7, "<p align='center'><font size='10'><font color='#ffffff'>Tribe:\n#</font><b><font color='#e8fc37'>Racing Paradox</font>", nil, 470, 28, 125, 34, 0x324650, 0x000000, 0, true) ui.addTextArea(8, "<p align='center'><b><a href='event:bc'>Bootcamp</a>", nil, 365, 208, 69, 19, 0x540c0c, 0x000000, 1, true) ui.addTextArea(9, "<p align='center'><b><a href='event:rc'>Racing</a>", nil, 365, 157, 69, 20, 0x1a0d6e, 0x000000, 1, true) ui.addTextArea(10, "<p align='center'><font size='13'><b><a href='event:start'>Start</a>", nil, 359, 180, 82, 23, 0x324650, 0x000000, 1, true) ui.addTextArea(11, "<p align='center'>Score: <a href='event:dec'>-</a> "..ScoreToWin .." <a href='event:inc'>+</a>", nil, 435, 335, 87, 20, 0x324650, 0x000000, 1, true) ui.addTextArea(12, "<p align='center'>Auto Join: <a href='event:OnAndOff'>"..(autoJoin and "on" or not autoJoin and "off") .."</a>", nil, 277, --[[H5HDGD4H543]] 335 --[[H5H673ES43]], --[[H5BX73ES43]] 87 --[[HSFBX73ES43]], --[[HSF64H73ES43]] 20 --[[HSF64H743]], --[[HSF64H74G3]] 0x324650--[[HSF24H74G3]], --[[HSF2GH74G3]] 0x000000 --[[HSAQGH74G3]], --[[HSAQH634G3]] 1 --[[HSAQH134G3]], --[[HSA5H134G3]] true --[[H6A5H134G3]]) --[[H6A5H176G3]]ui.addTextArea(13, "<p align='center'>2 Teams", nil, 212, 335, 54, 20, 0x324650, 0x000000, 1, true) ui.addTextArea(14, "<p align='center'>4 Teams", nil, 533, 335, 54, 20, 0x324650, 0x000000, 1, true) ui.addTextArea(15, "<p align='center'><a href='event:Fill'>Fill</a>", nil, 376, 335, 47, 20, 0x324650, 0x000000, --[[H6A5H1476G3]]1--[[H641H1476G3]], --[[H641H276G3]]true--[[H641H27133]]) --[[HH31H27133]]end main()
Lua Racing V1 By Titanic TFM
Want My Script of racing?
Take It Ez
This Is My Script :
--[[
__ __ __ ___ __ _ __ __ ____
/ / / / / / / _ | / / | | / / _/_/ / __/
/ /__/ /_/ / / __ | / / | |/ / _/_/ _\ \
/____/\____/ /_/ |_| / / |___/ /_/ /___/
/_/
_____ _ _ _ _
|_ _| | || | | | | |
| | _ __ ___ | || | ___ __ _ _ __ __| | ___ | | ___
| | | '__| / _ \ | || | / _ \ / _` || '_ \ / _` | / _ \ | | / _ \
| | | | | (_) || || || __/| (_| || | | || (_| || (_) || || (_) |
\_/ |_| \___/ |_||_| \___| \__,_||_| |_| \__,_| \___/ |_| \___/
V4.5
-------------------------------------------------------------------
No olvides cambiar tu nombre desde "local ADMINISTRADOR"
-------------------------------------------------------------------
Comandos:
!geç - Para cambiar de mapa
!puntos - Para cambiar el puntaje, ej: !puntos team1 5
!np @codigo - Para poner cualquier mapa
!pausa - Para pausar el juego
!team - Para asignar jugadores a un equipo, ej: !team1 Gurbetana
!d NUMERO - Asigna el puntaje para ganar, ej: !d 20
!ekle team nick - Añade un jugador a el equipo especificado, ej: !añadir team4 Gurbetana
!reset - Resetea el juego
!quitar TEAM NOMBRE - saca a un jugador del equipo
!puntaje - para ver el puntaje [SOLO EN MODO SOLO]
--------------------------------------------------------------------
]]
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
local Admin = "Titanic#7211" -- Cambia tu nombre para ser ADMINISTRADOR
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
local WINS = 10 -- Puntaje para ganar.
------------------------------------------------------------------------------------
system.disableChatCommandDisplay("np", true)
system.disableChatCommandDisplay("pause", true)
system.disableChatCommandDisplay("saltar", true)
system.disableChatCommandDisplay("puntaje", true)
tfm.exec.disablePhysicalConsumables()
tfm.exec.disableAutoShaman()
tfm.exec.disableAutoNewGame()
tfm.exec.disableAutoTimeLeft()
local teams = {
[1] = {},
[2] = {},
[3] = {},
[4] = {},
}
local points = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
}
local equipos = {}
local puntos = {}
local modob = "Burla By Titanic"
local modo = "bootcamp"
local modo2 = "Solo"
local modo2b = "normal"
local tiempo = 60
tonumber(tiempo)
local isfirst = true
local gameRunning = false
local winTime = false
local playersInGame = {}
local distanciax = 30
local distanciay = 80
local textarealugar = 300
local textareaid = 0
local mapasmix = {7102662,157805,157004,156720,153996,151655,150651,149422,124000,203664,375455,394132,170514,173816,171776,199210,562897,172951,171148,166430,169076,330933,179488,172621,168754,159145,163596,152733,410040,158909,261814,195453,281985,191205,159932,2176211,586901,285589,257324,236768,303151,270924,1324259,1225867,563436,424604,523270,172547,2693587,168204,2693344,193662,1788490,305680,149451,176253,342035,2466489,292808,176615,438333,394125,162482,304861,458528,159298,184648,268915,329318,373105,261298,302080,449496,159187,176710,161023,366260,1852910,201172,549759,257715,397478,261298,177652,408643,447805,155606,176619,460961,455271,172512,320607,166271,299942,186066,152260,155628,166805,178297,313138,167903,223947,191177,113156,150664,157203,163159,197229,204647,163531,232675,216173,166361,169059,271411,277824,306365,172520,247329,250610,2118599,445133,149853,212903,220737,397296,2617003,629731,329627,221767,422655,417816,164931,245152,371072,2458243,214788,274963,2439335,269534,8679,321268,398041,5591416,5650343,5650250,161730,4273207,4091580,5650303,5172709,5650469,214660,3579335,4003729,508451,314205,156510,5545443,606723,3946626,332467,1665516,1614563,3679884,414899,1531388,905496,3834905,3821104,1851411,3816991,2331474,313245,266854,193588,2141379,3738767,232791,285752,278506,406266,1976857,301315,180469,3693822,280896,403698,259604,418022,323366,594883,477603,437860,590641,3688419,3682405,645288,419374,664949,704015,398942,195720,314159,613985,3683383,3683201,3680223,3680221,363625,1693705,319524,3667358,1718723,1490438,3630433,3620542,3617674,3556489,3548406,3548376,3408247,2953315,2883986,2683170,2645615,2536577,2453022,2372538,2287914,2286056,2223685,2150335,2150335,2101747,2018511,2007205,1975684,1964752,1964700,1956555,1923785,1862800,1716949,1674534,1658171,1659639,1657360,1657021,1654105,1651658,1643157,1634741,1632706,1622737,1619934,1618110,1613550,1612796,1612436,1608638,6212895,1602654,1601492,1586439,1588884,1573997,1567620,1542618,1539791,1513407,1509474,1503393,1487161,1450554,1425101,1394120,1393405,1373000,1371239,1368222,1359797,1358446,1352534,1346440,1321664,1321417,1281981,1255130,1222899,1214182,1195842,1143815,1132357,1058681,979179,829657,813156,798953,749102,737841,627609,624721,608459,616373,594049,606719,586688,580031,564033,558790,551126,545493,536235,528428,511275,508106,501711,496945,496091,483924,472665,472379,447556,445133,444490,441047,438154,436447,436107,431373,430145,429822,428517,427300,425806,424795,422361,421302,420956,420806,418658,418600,416142,412316,410813,412211,410565,410532,410230,407457,407455,407230,407165,406982,406881,406486,405295,403910,401995,401945,401778,397938,397812,397296,396861,396645,391625,387270,387180,386046,385295,386029,379745,378826,379866,364998,359055,352885,352710,350251,344952,340069,339896,339643,337774,323600,319841,317754,309029,308711,308435,306213,292348,278916,277784,275514,270819,1017676,160762,2089069,234039,267187,263163,262144,330590,403698,396105,6538564,396105,419735,6547536,355658,6607378,191716,292348,6456247,5326916,6077025,356722,2564883,1450554,494706,254291,1503393,6467947,6263285,2953315,6114281,412752,4038817,5461992,319841,359901,191716,452016,1450554,397296,250610,499684,5848412,238791,2283,232274,1716693,330590,459349,6583596,455167,6460747,251459,244888,5755208,240973,235501,235034,234039,233398,232274,230510,216735,216439,216505,214037,212542,211565,198715,193936,191716,186604,180274,176263,178657,146801,145020,3154,2283,5382692,5249500,4412890,5163891,789128,2245005,2030343,5712914,372401,5087373,4953687,2369254,4853690,226069,422509,5436200,732880,4038817,400866,3730656,3985806,355658,5175727,5699298,5588646,3921436,3639993,3984750,508796,1985019,4734427,1703617,289068,197219,333666,6077025,5710586,322321,331572,4741601,158128,6310411,6312498,6310396,6312188,6473912,6389619,6854536,6854539,6312173,6315208,6312203,6310370,6310383,6853060,6310440,6547670,7062105,6545742,6985344,960547}
local mapasbootcamp= {157960,157805,157004,156720,153996,151655,150651,149422,124000,203664,375455,394132,170514,173816,171776,199210,562897,172951,171148,166430,169076,330933,179488,172621,168754,159145,163596,152733,410040,158909,261814,195453,281985,191205,159932,2176211,586901,285589,257324,236768,303151,270924,1324259,1225867,563436,424604,523270,172547,2693587,168204,2693344,193662,1788490,305680,149451,176253,342035,2466489,292808,176615,438333,394125,162482,304861,458528,159298,184648,268915,329318,373105,261298,302080,449496,159187,176710,161023,366260,1852910,201172,549759,257715,397478,261298,177652,408643,447805,155606,176619,460961,455271,172512,320607,166271,299942,186066,152260,155628,166805,178297,313138,167903,223947,191177,113156,150664,157203,163159,197229,204647,163531,232675,216173,166361,169059,271411,277824,306365,172520}
local mapasracing = {7629425,6894339,6312188,6854539,6310448,7602526,7602093,7639673,7641473,7639673,7631837,7631851,7631545,7632184,7632214,7630222, 7642516,7630530,7630852,7630230,4468155,7630217,7631837,7619945,7624693,7625145,7627198,7602127,7621109,7621106,7614621,7614632,7627191,7629864,7629867,7629870,7629874,7629877,7629879}local maps = mapasracing
local equipoc= {}
local colors = {
[1] = "CC10FF",
[2] = "00FF1B",
[3] = "FEFF00",
[4] = "FF0000",
}
local queue = {}
local nteam = 1
local kapat = {}
local posicion = {}
local numeroposicion = 1
function newMap()
local mapcode = maps[math.random(#maps)]
if #queue > 0 then
mapcode = queue[1]
table.remove(queue, 1)
end
tfm.exec.newGame(mapcode)
for player, data in pairs(tfm.get.room.playerList) do
if not playersInGame[player] then
tfm.exec.killPlayer(player)
end
end
tfm.exec.setGameTime(tiempo)
borrarScoreSolo()
end
function eventPlayerWon(player)
if not isfirst then
isfirst = true
tfm.exec.setGameTime(3)
if modo2b == "Solo" then
if puntos[player] >= WINS - 1 then
gameRunning = false
winTime = os.time()
ui.addTextArea(29, string.format("<p align='center'><font size='37' color='#000000'>%s ganó\nLos otros son perdedores xdxdxd", player), nil, 3, 168, 800, 500, 0, 0, 0, true)
ui.addTextArea(30, string.format("<p align='center'><font size='37'><font color='#cecece'><font color='#ff0000'>%s </font>ganó\nLos otros son perdedores xdxdxd", player), nil, 1, 170, 800, 500, 0, 0, 0, true)
end
tfm.exec.setGameTime(3)
for i = 0, 3 do
defaultEffect(9, {13}, math.random(800), math.random(400), 20)
end
puntos[player] = puntos[player]+1
equipoc[player] = "0x115b17"
displayScoreSolo()
end
if modo2b == "normal" then
if table.contains(teams[1], player) then
tfm.exec.setGameTime(3)
for i = 0, 3 do
defaultEffect(9, {13}, math.random(800), math.random(400), 20)
end
points[1] = points[1]+1
elseif table.contains(teams[2], player) then
tfm.exec.setGameTime(3)
for i = 0, 3 do
defaultEffect(9, {9}, math.random(800), math.random(400), 20)
end
points[2] = points[2]+1
elseif table.contains(teams[3], player) then
tfm.exec.setGameTime(3)
for i = 0, 3 do
defaultEffect(9, {9}, math.random(800), math.random(400), 20)
end
points[3] = points[3]+1
elseif table.contains(teams[4], player) then
tfm.exec.setGameTime(3)
for i = 0, 3 do
defaultEffect(9, {9}, math.random(800), math.random(400), 20)
end
points[4] = points[4]+1
else
isfirst = false
end
winner = false
if points[1] >= WINS then
winner = 1
elseif points[2] >= WINS then
winner = 2
elseif points[3] >= WINS then
winner = 3
elseif points[4] >= WINS then
winner = 4
end
if winner then
gameRunning = false
winTime = os.time()
local names = {
"Team White",
"Team Blue",
"Team Yellow",
"Team Red",
}
ui.addTextArea(26, string.format("<p align='center'><font size='37' color='#000000'Best Game %s BY\nGURBETANA", names[winner]), nil, 0, 171, 800, 500, 0, 0, 0, true)
ui.addTextArea(27, string.format("<p align='center'><font size='37' color='#000000'>Best Game %s BY\nGURBETANA", names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
ui.addTextArea(28, string.format("<p align='center'><font size='37' color='#000000'>Best Game %s BY\nGURBETANA", names[winner]), nil, 2, 169, 800, 500, 0, 0, 0, true)
ui.addTextArea(29, string.format("<p align='center'><font size='37' color='#000000'>Best Game %s BY\nGURBETANA", names[winner]), nil, 3, 168, 800, 500, 0, 0, 0, true)
ui.addTextArea(30, string.format("<p align='center'><font size='37'><font color='#cecece'>GG Ocs <font color='#%s'>%s</font> BY\nGURBETANA", colors[winner], names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
end
displayScore()
end
end
end
function eventLoop(elapsed, remain)
if gameRunning then
remain = remain/1000
if remain < 0 then
remain = 100
newMap()
end
else
if winTime then
if winTime > os.time()-30000 then
for i = 0, 2 do
defaultEffect(9, {11, 9, 0, 13}, math.random(800), math.random(400), 80)
end
else
winTime = false
ui.removeTextArea(26)
ui.removeTextArea(27)
ui.removeTextArea(28)
ui.removeTextArea(29)
ui.removeTextArea(30)
displayTeams()
teams = {
[1] = {},
[2] = {},
[3] = {},
[4] = {},
}
points = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
}
playersInGame = {}
end
end
end
end
function string.title(s)
return string.gsub(s, "%a", function(c)
return string.upper(c)
end, 1)
end
function resetmostrarjugadoresSolo()
distanciax = 30
distanciay = 80
textarealugar = 302
textareaid = 0
end
function eventChatCommand(player, command)
if modo2b == "Solo" then
args = string.split(command, " ")
if args[1] == "puntaje" then
resetmostrarjugadoresSolo()
ui.addTextArea(300, "<p align='center'><V><a href='event:cerrarpuntaje'>X", player, 30, 50, 30, 16, FF0000, FF0000, 1, true)
ui.addTextArea(301, string.format("<p align='center'><V>Solo a %s puntos",WINS), player, 80, 45, 180, 18, FF0000, FF0000, 1, true)
for k,players in pairs(tfm.get.room.playerList) do
if puntos[k] then
equipos[k] = k
playersInGame[k] = true
if textareaid >= 32 then
else
ui.addTextArea(textarealugar, string.format("<p align='center'><V>%s - %s",k,puntos[k]), player, distanciax, distanciay, 140, 18, FF0000, FF0000, 1, true)
distanciay = distanciay + 37
textareaid = textareaid + 1
textarealugar = textarealugar + 1
if textareaid == 8 then
distanciax = distanciax + 190
distanciay = 80
textareaid = 0
end
end
end
end
end
end
if player:lower() == Admin:lower() then
args = string.split(command, " ")
if args[1] == "team1" then
if modo2b == "normal" then
table.remove(args, 1)
teams[1] = {}
points[1] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[1], player)
playersInGame[player] = true
end
displayTeams()
end
elseif args[1] == "Power2" and modo2b == "normal" then
table.remove(args, 1)
teams[2] = {}
points[2] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[2], player)
playersInGame[player] = true
end
displayTeams()
elseif args[1] == "Power3" and modo2b == "normal" then
table.remove(args, 1)
teams[3] = {}
points[3] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[3], player)
playersInGame[player] = true
end
displayTeams()
elseif args[1] == "Power4" and modo2b == "normal" then
table.remove(args, 1)
teams[4] = {}
points[4] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[4], player)
playersInGame[player] = true
end
displayTeams()
elseif args[1] == "skip" then
newMap()
elseif args[1] == "np" then
if args[2] then
table.insert(queue, args[2])
end
elseif args[1] == "d" then
if args[2] then
WINS = tonumber(args[2])
displayScore()
end
elseif args[1] == "ekle" and modo2b == "Solo" then
if args[2] then
table.remove(args, 1)
for index, player in pairs(args) do
equipos[player] = player
puntos[player] = 0
playersInGame[player] = true
end
end
elseif args[1] == "ekle" and modo2b == "normal" then
if args[2] and args[3] then
if args[2] == "team1" and modo2b == "normal" then
table.remove(args, 1)
table.remove(args, 1)
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[1], player)
playersInGame[player] = true
end
end
if args[2] == "power2" and modo2b == "normal" then
table.remove(args, 1)
table.remove(args, 1)
for index, player in pairs(args, 3) do
player = string.title(player)
table.insert(teams[2], player)
playersInGame[player] = true
end
end
if args[2] == "team3" and modo2b == "normal" then
table.remove(args, 1)
table.remove(args, 1)
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[3], player)
playersInGame[player] = true
end
end
if args[2] == "team4" and modo2b == "normal" then
table.remove(args, 1)
table.remove(args, 1)
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[4], player)
playersInGame[player] = true
end
end
end
elseif args[1] == "quitar" then
if args[2] then
for index, player in pairs(args) do
player = string.title(player)
playersInGame[player] = false
end
end
elseif args[1] == "reset" then
teams[1] = {}
points[1] = 0
teams[2] = {}
points[2] = 0
teams[3] = {}
points[3] = 0
teams[4] = {}
points[4] = 0
displayTeams()
elseif args[1] == "puntos" and modo2b == "normal" then
if args[2] and args[3] then
local team = tonumber(args[2]:match("team(%d+)") or 0)
if team > 0 and team < 5 then
local newScore = tonumber(args[3]) or points[team]
points[team] = newScore
displayScore()
end
end
elseif args[1] == "pausa" then
gameRunning = not gameRunning
if not gameRunning then
ui.addTextArea(90, "", nil, 235, 200, 302, 22, FF0000, FF0000, 1, true)
ui.addTextArea(91, "<p align='center'><V> Juego pausado ", nil, 235, 200, 300, 20, 0x324650, 0x324650, 1, true)
tfm.exec.disableAutoTimeLeft(true)
else
ui.removeTextArea(90)
ui.removeTextArea(91)
tfm.exec.disableAutoTimeLeft(false)
end
end
end
end
function eventNewGame()
if modo2b == "normal" then
if gameRunning then
isfirst = false
for i, p in pairs(teams[1]) do
tfm.exec.setNameColor(p, "0x"..colors[1])
end
for i, p in pairs(teams[2]) do
tfm.exec.setNameColor(p, "0x"..colors[2])
end
for i, p in pairs(teams[3]) do
tfm.exec.setNameColor(p, "0x"..colors[3])
end
for i, p in pairs(teams[4]) do
tfm.exec.setNameColor(p, "0x"..colors[4])
end
displayScore()
end
end
if modo2b == "Solo" then
if gameRunning then
isfirst = false
for k,players in pairs(tfm.get.room.playerList) do
tfm.exec.setNameColor(k, "FF0000")
equipoc[k] = "FF0000"
end
displayScore()
end
end
end
function displayScore()
if modo2b == "normal" then
ui.addTextArea(25, string.format("<p align='center'><font size='20'><font color='#%s'>%s<N> x <font color='#%s'>%s <N> x <font color='#%s'>%s <N> x <font color='#%s'>%s <N> / <font color='FF0000'>%s", colors[1], points[1], colors[2], points[2], colors[3], points[3], colors[4], points[4], WINS), nil, 0, 22, 800, 30, 0, 0, 0, true)
end
end
function displayScoreSolo()
resetmostrarjugadoresSolo()
ui.addTextArea(300, string.format("<p align='center'><V>Solo a %s puntos",WINS), nil, 80, 45, 180, 18, FF0000, FF0000, 1, true)
for k,players in pairs(tfm.get.room.playerList) do
if puntos[k] then
equipos[k] = k
playersInGame[k] = true
if textareaid >= 32 then
else
ui.addTextArea(textarealugar, string.format("<p align='center'><V>%s - %s",k,puntos[k]), nil, distanciax, distanciay, 140, 18, equipoc[k], FF0000, 1, true)
distanciay = distanciay + 37
textareaid = textareaid + 1
textarealugar = textarealugar + 1
if textareaid == 8 then
distanciax = distanciax + 190
distanciay = 80
textareaid = 0
end
end
end
end
end
function borrarScoreSolo()
for i = 300, 340 do
ui.removeTextArea(i)
end
end
function displayTeams()
ui.addTextArea(38, "", nil, 235, 30, 302, 22, FF0000, FF0000, 1, true)
ui.addTextArea(37, "<p align='center'><V>Admin: "..Admin, nil, 235, 30, 300, 20, FF0000, FF0000, 1, true)
--ui.addTextArea(1, "", nil, 400, 69, 400, 260, FF0000, FF0000, 1, true)
ui.addTextArea(2, "", nil, 0, 71, 800, 290, FF0000, FF0000, 1, true)
--ui.addTextArea(3, "", nil, 331, 70, 400, 260, FF0000, FF0000, 1, true)
ui.addTextArea(4, "", nil, 57, 79, 142, 22, FF0000, FF0000, 1, true)
ui.addTextArea(5, "<p align='center'><V>Team 1", nil, 58, 80, 140, 20, FF0000, FF0000, 1, true)
ui.addTextArea(6, "", nil, 227, 79, 142, 22, FF0000, FF0000, 1, true)
ui.addTextArea(7, "<p align='center'><V>Team 2", nil, 228, 80, 140, 20, FF0000, FF0000, 1, true)
ui.addTextArea(8, "", nil, 417, 79, 142, 22, FF0000, FF0000, 1, true)
ui.addTextArea(9, "<p align='center'><V>Team 3", nil, 418, 80, 140, 20, FF0000, FF0000, 1, true)
ui.addTextArea(10, "", nil, 587, 79, 142, 22, FF0000, FF0000, 1, true)
ui.addTextArea(11, "<p align='center'><V>Team 4", nil, 588, 80, 140, 20, FF0000, FF0000, 1, true)
ui.addTextArea(12, "<p align='center'><font color='#FF0000'>|</font>", nil, 210, 102, 140, 200, 0, 0, 0, true)
ui.addTextArea(39, "<p align='center'><font color='#FF0000'>|</font>", nil, 450, 102, 140, 200, 0, 0, 0, true)
ui.addTextArea(40, "", nil, 59, 120, 140, 200, FF0000, FF0000, 1, true)
ui.addTextArea(31, "<p align='center'><font color='#"..colors[1].."'>"..table.concat(teams[1], "\n"), nil, 60, 121, 138, 198, FF0000, FF0000, 1, true)
ui.addTextArea(32, "", nil, 419, 120, 140, 200, FF0000, FF0000, 1, true)
ui.addTextArea(33, "<p align='center'><font color='#"..colors[3].."'>"..table.concat(teams[3], "\n"), nil, 420, 121, 138, 198, FF0000, FF0000, 1, true)
ui.addTextArea(34, "", nil, 589, 120, 140, 200, FF0000, FF0000, 1, true)
ui.addTextArea(35, "<p align='center'><font color='#"..colors[4].."'>"..table.concat(teams[4], "\n"), nil, 590, 121, 138, 198, FF0000, FF0000, 1, true)
ui.addTextArea(36, "", nil, 229, 120, 140, 200, FF0000, FF0000, 1, true)
ui.addTextArea(13, "<p align='center'><font color='#"..colors[2].."'>"..table.concat(teams[2], "\n"), nil, 230, 121, 138, 198, FF0000, FF0000, 1, true)
ui.addTextArea(14, "<p align='center'><font color='#FF0000'>____ ____</font>", nil, 325, 197, 140, 200, 0, 0, 0, true)
ui.addTextArea(15, "", nil, 374, 202, 40, 20, FF0000, FF0000, 1, true)
ui.addTextArea(16, "<p align='center'><V>VS", nil, 375, 203, 38, 18, FF0000, FF0000, 1, true)
ui.addTextArea(42, "", Admin, 749, 81, 40, 20, FF0000, FF0000, 1, true)
ui.addTextArea(41, "<p align='center'><V><a href='event:salir'>X", Admin, 750, 82, 38, 18, FF0000, FF0000, 1, true)
ui.addTextArea(45, "", Admin, 744, 139, 52, 20, FF0000, FF0000, 1, true)
ui.addTextArea(46, "<p align='center'><V><a href='event:reset'>Reset", Admin, 745, 140, 50, 18, FF0000, FF0000, 1, true)
ui.addTextArea(47, "", Admin, 741, 173, 57, 20, FF0000, FF0000, 1, true)
ui.addTextArea(54, "", Admin, 741, 209, 57, 20, FF0000, FF0000, 1, true)
if modo2 == "Solo" then
ui.addTextArea(51, "<p align='center'><V><a href='event:Solo'><font size='12'>"..modo2, Admin, 742, 210, 55, 18, FF0000, FF0000, 1, true)
end
verificarmodo()
ui.addTextArea(53, "", Admin, 741, 245, 57, 20, FF0000, FF0000, 1, true)
ui.addTextArea(52, "<p align='center'><V><a href='event:kapat'><font size='12'>kapat", Admin, 742, 246, 55, 18, FF0000, FF0000, 1, true)
ui.addTextArea(55, "", Admin, 741, 279, 57, 20, FF0000, FF0000, 1, true)
ui.addTextArea(56, "<p align='center'><V><a href='event:Seç'><font size='12'>Seç", Admin, 742, 280, 55, 18, FF0000, FF0000, 1, true)
ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJogo'>GO", Admin, 375, 203, 38, 18, FF0000, FF0000, 1, true)
end
function verificarmodo()
ui.addTextArea(50, string.format("<p align='center'><V>Modo %s - %s ",modob,modo2b),nil, 235, 375, 300, 17, FF0000, FF0000, 1, true)
if modo2 == "normal" then
ui.addTextArea(51, "<p align='center'><V><a href='event:normal'><font size='8'>"..modo2, Admin, 742, 210, 55, 18, FF0000, FF0000, 1, true)
end
if modo == "bootcamp" then
ui.addTextArea(48, "<p align='center'><V><a href='event:bootcamp'><font size='9'>"..modo, Admin, 742, 174, 55, 18, FF0000, FF0000, 1, true)
end
if modo == "racing" then
ui.addTextArea(48, "<p align='center'><V><a href='event:racing'><font size='9'>"..modo, Admin, 742, 174, 55, 18, FF0000, FF0000, 1, true)
end
if modo == "mix" then
ui.addTextArea(48, "<p align='center'><V><a href='event:mix'><font size='9'>"..modo, Admin, 742, 174, 55, 18, FF0000, FF0000, 1, true)
end
end
function contarjugadores()
local players=0
function eventNewPlayer(name)--Cuando un jugador entre a la sala...
players=players+1--Sumamos 1 a nuestra tabla
end
function eventPlayerLeft(name)--Cuando un jugador salga de la sala...
players=players-1--Restamos 1 a nuestra tabla
end
for name in pairs(tfm.get.room.playerList) do--Por cada jugador que esté en la sala...
eventNewPlayer(name)--Le ejecutamos la función eventNewPlayer
end
end
function eventTextAreaCallback(id, player, callback)
if callback == 'iniciarJogo' then
gameRunning = true
for i = 1, 20 do
ui.removeTextArea(i)
end
for i = 31, 56 do
ui.removeTextArea(i)
end
borrarScoreSolo()
defaultEffect(9, {9}, 400, 212, 80)
newMap()
end
if callback == 'salir' then
tfm.system.exit()
end
if callback == 'Seç' then
nteam = 1
kapat = {}
playersInGame = {}
teams = {
[1] = {},
[2] = {},
[3] = {},
[4] = {},
}
contarjugadores()
for k,players in pairs(tfm.get.room.playerList) do
if nteam > 4 then
nteam = 1
end
table.insert(teams[nteam], k)
playersInGame[k] = true
nteam = nteam + 1
displayTeams()
end
end
if callback == 'kapat' then
nteam = 1
kapat = {}
playersInGame = {}
teams = {
[1] = {},
[2] = {},
[3] = {},
[4] = {},
}
contarjugadores()
for k,players in pairs(tfm.get.room.playerList) do
kapat[k] = k
playersInGame[k] = true
end
for k,players in pairs(tfm.get.room.playerList) do
if nteam > 4 then
nteam = 1
end
if kapat[k] == k then
jugador = kapat[math.random(#kapat)]
table.insert(teams[players], jugador)
kapat[k] = ""
nteam = nteam + 1
displayTeams()
end
end
end
if callback == 'reset' then
teams[1] = {}
points[1] = 0
teams[2] = {}
points[2] = 0
teams[3] = {}
points[3] = 0
teams[4] = {}
points[4] = 0
displayTeams()
end
if callback == 'bootcamp' then
tiempo = 150
modob = "bootcamp"
modo = "mix"
verificarmodo()
maps = mapasbootcamp
end
if callback == 'racing' then
tiempo = 60
modob = "racing"
modo = "bootcamp"
verificarmodo()
maps = mapasracing
end
if callback == 'mix' then
tiempo = 90
modob = "mix"
modo = "racing"
verificarmodo()
maps = mapasmix
end
if callback == 'Solo' then
modo2b = "Solo"
modo2 = "normal"
displayTeams()
for i = 4, 15 do
ui.removeTextArea(i)
end
for i = 31, 36 do
ui.removeTextArea(i)
end
for i = 39, 40 do
ui.removeTextArea(i)
end
contarjugadores()
for k,players in pairs(tfm.get.room.playerList) do
equipos[k] = k
puntos[k] = 0
equipoc[k] = "0x324650"
playersInGame[k] = true
if textareaid >= 32 then
else
ui.addTextArea(textarealugar, "<p align='center'><V>"..k, nil, distanciax, distanciay, 140, 18, FF0000, FF0000, 1, true)
distanciay = distanciay + 37
textareaid = textareaid + 1
textarealugar = textarealugar + 1
if textareaid == 8 then
distanciax = distanciax + 190
distanciay = 80
textareaid = 0
end
ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJogo'>GO", Admin, 375, 203, 38, 18, FF0000, FF0000, 1, true)
end
end
end
if callback == 'normal' then
modo2b = "normal"
modo2 = "Solo"
resetmostrarjugadoressolo()
displayTeams()
end
if callback == 'cerrarpuntaje' then
borrarScoreSolo()
end
end
function string.split(s, pattern, n)
local st = {}
for sb in string.gmatch(s, "[^"..pattern.."]+") do
if not n or n > -1 then
table.insert(st,sb)
else
st[#st] = st[#st]..pattern..sb
end
n = n and n-1 or false
end
return st
end
function table.contains(tableT, element)
for _, value in pairs(tableT) do
if value == element then
return true
end
end
return false
end
defaultEffect=function(id,p,x,y,rand)
local minDist = 1
local outerBorder = 20
local maxDist = 30
local totalParticles = rand and 40 or (id == -1 and 35 or 75)
for i = 1, totalParticles do
if rand then
id = p[math.random(#p)]
end
local dist = math.min(math.random(minDist, maxDist), outerBorder)
local angle = math.random(0, 360)
local r = math.rad(angle)
local dx = math.cos(r)
local dy = math.sin(r)
local vx = dist * dx / 10
local vy = dist * dy / 10
local ax = -vx / dist / 15
local ay = (-vy / dist / 15) + 0.05
if id == -1 then
tfm.exec.displayParticle(9, x + dx, y + dy, vx, vy, ax, ay, nil)
tfm.exec.displayParticle(1, x + dx, y + dy, vx, vy, ax, ay, nil)
else
tfm.exec.displayParticle(id, x + dx, y + dy, vx, vy, ax, ay, nil)
end
end
end
displayTeams()
function eventPlayerDied()
local alive = 0
for k,v in pairs(tfm.get.room.playerList) do
if not v.isDead then
alive = alive+1
end
end
if alive == 0 then
newMap()
end
end
Take It Ez
This Is My Script :
--[[
__ __ __ ___ __ _ __ __ ____
/ / / / / / / _ | / / | | / / _/_/ / __/
/ /__/ /_/ / / __ | / / | |/ / _/_/ _\ \
/____/\____/ /_/ |_| / / |___/ /_/ /___/
/_/
_____ _ _ _ _
|_ _| | || | | | | |
| | _ __ ___ | || | ___ __ _ _ __ __| | ___ | | ___
| | | '__| / _ \ | || | / _ \ / _` || '_ \ / _` | / _ \ | | / _ \
| | | | | (_) || || || __/| (_| || | | || (_| || (_) || || (_) |
\_/ |_| \___/ |_||_| \___| \__,_||_| |_| \__,_| \___/ |_| \___/
V4.5
-------------------------------------------------------------------
No olvides cambiar tu nombre desde "local ADMINISTRADOR"
-------------------------------------------------------------------
Comandos:
!geç - Para cambiar de mapa
!puntos - Para cambiar el puntaje, ej: !puntos team1 5
!np @codigo - Para poner cualquier mapa
!pausa - Para pausar el juego
!team - Para asignar jugadores a un equipo, ej: !team1 Gurbetana
!d NUMERO - Asigna el puntaje para ganar, ej: !d 20
!ekle team nick - Añade un jugador a el equipo especificado, ej: !añadir team4 Gurbetana
!reset - Resetea el juego
!quitar TEAM NOMBRE - saca a un jugador del equipo
!puntaje - para ver el puntaje [SOLO EN MODO SOLO]
--------------------------------------------------------------------
]]
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
local Admin = "Titanic#7211" -- Cambia tu nombre para ser ADMINISTRADOR
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
local WINS = 10 -- Puntaje para ganar.
------------------------------------------------------------------------------------
system.disableChatCommandDisplay("np", true)
system.disableChatCommandDisplay("pause", true)
system.disableChatCommandDisplay("saltar", true)
system.disableChatCommandDisplay("puntaje", true)
tfm.exec.disablePhysicalConsumables()
tfm.exec.disableAutoShaman()
tfm.exec.disableAutoNewGame()
tfm.exec.disableAutoTimeLeft()
local teams = {
[1] = {},
[2] = {},
[3] = {},
[4] = {},
}
local points = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
}
local equipos = {}
local puntos = {}
local modob = "Burla By Titanic"
local modo = "bootcamp"
local modo2 = "Solo"
local modo2b = "normal"
local tiempo = 60
tonumber(tiempo)
local isfirst = true
local gameRunning = false
local winTime = false
local playersInGame = {}
local distanciax = 30
local distanciay = 80
local textarealugar = 300
local textareaid = 0
local mapasmix = {7102662,157805,157004,156720,153996,151655,150651,149422,124000,203664,375455,394132,170514,173816,171776,199210,562897,172951,171148,166430,169076,330933,179488,172621,168754,159145,163596,152733,410040,158909,261814,195453,281985,191205,159932,2176211,586901,285589,257324,236768,303151,270924,1324259,1225867,563436,424604,523270,172547,2693587,168204,2693344,193662,1788490,305680,149451,176253,342035,2466489,292808,176615,438333,394125,162482,304861,458528,159298,184648,268915,329318,373105,261298,302080,449496,159187,176710,161023,366260,1852910,201172,549759,257715,397478,261298,177652,408643,447805,155606,176619,460961,455271,172512,320607,166271,299942,186066,152260,155628,166805,178297,313138,167903,223947,191177,113156,150664,157203,163159,197229,204647,163531,232675,216173,166361,169059,271411,277824,306365,172520,247329,250610,2118599,445133,149853,212903,220737,397296,2617003,629731,329627,221767,422655,417816,164931,245152,371072,2458243,214788,274963,2439335,269534,8679,321268,398041,5591416,5650343,5650250,161730,4273207,4091580,5650303,5172709,5650469,214660,3579335,4003729,508451,314205,156510,5545443,606723,3946626,332467,1665516,1614563,3679884,414899,1531388,905496,3834905,3821104,1851411,3816991,2331474,313245,266854,193588,2141379,3738767,232791,285752,278506,406266,1976857,301315,180469,3693822,280896,403698,259604,418022,323366,594883,477603,437860,590641,3688419,3682405,645288,419374,664949,704015,398942,195720,314159,613985,3683383,3683201,3680223,3680221,363625,1693705,319524,3667358,1718723,1490438,3630433,3620542,3617674,3556489,3548406,3548376,3408247,2953315,2883986,2683170,2645615,2536577,2453022,2372538,2287914,2286056,2223685,2150335,2150335,2101747,2018511,2007205,1975684,1964752,1964700,1956555,1923785,1862800,1716949,1674534,1658171,1659639,1657360,1657021,1654105,1651658,1643157,1634741,1632706,1622737,1619934,1618110,1613550,1612796,1612436,1608638,6212895,1602654,1601492,1586439,1588884,1573997,1567620,1542618,1539791,1513407,1509474,1503393,1487161,1450554,1425101,1394120,1393405,1373000,1371239,1368222,1359797,1358446,1352534,1346440,1321664,1321417,1281981,1255130,1222899,1214182,1195842,1143815,1132357,1058681,979179,829657,813156,798953,749102,737841,627609,624721,608459,616373,594049,606719,586688,580031,564033,558790,551126,545493,536235,528428,511275,508106,501711,496945,496091,483924,472665,472379,447556,445133,444490,441047,438154,436447,436107,431373,430145,429822,428517,427300,425806,424795,422361,421302,420956,420806,418658,418600,416142,412316,410813,412211,410565,410532,410230,407457,407455,407230,407165,406982,406881,406486,405295,403910,401995,401945,401778,397938,397812,397296,396861,396645,391625,387270,387180,386046,385295,386029,379745,378826,379866,364998,359055,352885,352710,350251,344952,340069,339896,339643,337774,323600,319841,317754,309029,308711,308435,306213,292348,278916,277784,275514,270819,1017676,160762,2089069,234039,267187,263163,262144,330590,403698,396105,6538564,396105,419735,6547536,355658,6607378,191716,292348,6456247,5326916,6077025,356722,2564883,1450554,494706,254291,1503393,6467947,6263285,2953315,6114281,412752,4038817,5461992,319841,359901,191716,452016,1450554,397296,250610,499684,5848412,238791,2283,232274,1716693,330590,459349,6583596,455167,6460747,251459,244888,5755208,240973,235501,235034,234039,233398,232274,230510,216735,216439,216505,214037,212542,211565,198715,193936,191716,186604,180274,176263,178657,146801,145020,3154,2283,5382692,5249500,4412890,5163891,789128,2245005,2030343,5712914,372401,5087373,4953687,2369254,4853690,226069,422509,5436200,732880,4038817,400866,3730656,3985806,355658,5175727,5699298,5588646,3921436,3639993,3984750,508796,1985019,4734427,1703617,289068,197219,333666,6077025,5710586,322321,331572,4741601,158128,6310411,6312498,6310396,6312188,6473912,6389619,6854536,6854539,6312173,6315208,6312203,6310370,6310383,6853060,6310440,6547670,7062105,6545742,6985344,960547}
local mapasbootcamp= {157960,157805,157004,156720,153996,151655,150651,149422,124000,203664,375455,394132,170514,173816,171776,199210,562897,172951,171148,166430,169076,330933,179488,172621,168754,159145,163596,152733,410040,158909,261814,195453,281985,191205,159932,2176211,586901,285589,257324,236768,303151,270924,1324259,1225867,563436,424604,523270,172547,2693587,168204,2693344,193662,1788490,305680,149451,176253,342035,2466489,292808,176615,438333,394125,162482,304861,458528,159298,184648,268915,329318,373105,261298,302080,449496,159187,176710,161023,366260,1852910,201172,549759,257715,397478,261298,177652,408643,447805,155606,176619,460961,455271,172512,320607,166271,299942,186066,152260,155628,166805,178297,313138,167903,223947,191177,113156,150664,157203,163159,197229,204647,163531,232675,216173,166361,169059,271411,277824,306365,172520}
local mapasracing = {7629425,6894339,6312188,6854539,6310448,7602526,7602093,7639673,7641473,7639673,7631837,7631851,7631545,7632184,7632214,7630222, 7642516,7630530,7630852,7630230,4468155,7630217,7631837,7619945,7624693,7625145,7627198,7602127,7621109,7621106,7614621,7614632,7627191,7629864,7629867,7629870,7629874,7629877,7629879}local maps = mapasracing
local equipoc= {}
local colors = {
[1] = "CC10FF",
[2] = "00FF1B",
[3] = "FEFF00",
[4] = "FF0000",
}
local queue = {}
local nteam = 1
local kapat = {}
local posicion = {}
local numeroposicion = 1
function newMap()
local mapcode = maps[math.random(#maps)]
if #queue > 0 then
mapcode = queue[1]
table.remove(queue, 1)
end
tfm.exec.newGame(mapcode)
for player, data in pairs(tfm.get.room.playerList) do
if not playersInGame[player] then
tfm.exec.killPlayer(player)
end
end
tfm.exec.setGameTime(tiempo)
borrarScoreSolo()
end
function eventPlayerWon(player)
if not isfirst then
isfirst = true
tfm.exec.setGameTime(3)
if modo2b == "Solo" then
if puntos[player] >= WINS - 1 then
gameRunning = false
winTime = os.time()
ui.addTextArea(29, string.format("<p align='center'><font size='37' color='#000000'>%s ganó\nLos otros son perdedores xdxdxd", player), nil, 3, 168, 800, 500, 0, 0, 0, true)
ui.addTextArea(30, string.format("<p align='center'><font size='37'><font color='#cecece'><font color='#ff0000'>%s </font>ganó\nLos otros son perdedores xdxdxd", player), nil, 1, 170, 800, 500, 0, 0, 0, true)
end
tfm.exec.setGameTime(3)
for i = 0, 3 do
defaultEffect(9, {13}, math.random(800), math.random(400), 20)
end
puntos[player] = puntos[player]+1
equipoc[player] = "0x115b17"
displayScoreSolo()
end
if modo2b == "normal" then
if table.contains(teams[1], player) then
tfm.exec.setGameTime(3)
for i = 0, 3 do
defaultEffect(9, {13}, math.random(800), math.random(400), 20)
end
points[1] = points[1]+1
elseif table.contains(teams[2], player) then
tfm.exec.setGameTime(3)
for i = 0, 3 do
defaultEffect(9, {9}, math.random(800), math.random(400), 20)
end
points[2] = points[2]+1
elseif table.contains(teams[3], player) then
tfm.exec.setGameTime(3)
for i = 0, 3 do
defaultEffect(9, {9}, math.random(800), math.random(400), 20)
end
points[3] = points[3]+1
elseif table.contains(teams[4], player) then
tfm.exec.setGameTime(3)
for i = 0, 3 do
defaultEffect(9, {9}, math.random(800), math.random(400), 20)
end
points[4] = points[4]+1
else
isfirst = false
end
winner = false
if points[1] >= WINS then
winner = 1
elseif points[2] >= WINS then
winner = 2
elseif points[3] >= WINS then
winner = 3
elseif points[4] >= WINS then
winner = 4
end
if winner then
gameRunning = false
winTime = os.time()
local names = {
"Team White",
"Team Blue",
"Team Yellow",
"Team Red",
}
ui.addTextArea(26, string.format("<p align='center'><font size='37' color='#000000'Best Game %s BY\nGURBETANA", names[winner]), nil, 0, 171, 800, 500, 0, 0, 0, true)
ui.addTextArea(27, string.format("<p align='center'><font size='37' color='#000000'>Best Game %s BY\nGURBETANA", names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
ui.addTextArea(28, string.format("<p align='center'><font size='37' color='#000000'>Best Game %s BY\nGURBETANA", names[winner]), nil, 2, 169, 800, 500, 0, 0, 0, true)
ui.addTextArea(29, string.format("<p align='center'><font size='37' color='#000000'>Best Game %s BY\nGURBETANA", names[winner]), nil, 3, 168, 800, 500, 0, 0, 0, true)
ui.addTextArea(30, string.format("<p align='center'><font size='37'><font color='#cecece'>GG Ocs <font color='#%s'>%s</font> BY\nGURBETANA", colors[winner], names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
end
displayScore()
end
end
end
function eventLoop(elapsed, remain)
if gameRunning then
remain = remain/1000
if remain < 0 then
remain = 100
newMap()
end
else
if winTime then
if winTime > os.time()-30000 then
for i = 0, 2 do
defaultEffect(9, {11, 9, 0, 13}, math.random(800), math.random(400), 80)
end
else
winTime = false
ui.removeTextArea(26)
ui.removeTextArea(27)
ui.removeTextArea(28)
ui.removeTextArea(29)
ui.removeTextArea(30)
displayTeams()
teams = {
[1] = {},
[2] = {},
[3] = {},
[4] = {},
}
points = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
}
playersInGame = {}
end
end
end
end
function string.title(s)
return string.gsub(s, "%a", function(c)
return string.upper(c)
end, 1)
end
function resetmostrarjugadoresSolo()
distanciax = 30
distanciay = 80
textarealugar = 302
textareaid = 0
end
function eventChatCommand(player, command)
if modo2b == "Solo" then
args = string.split(command, " ")
if args[1] == "puntaje" then
resetmostrarjugadoresSolo()
ui.addTextArea(300, "<p align='center'><V><a href='event:cerrarpuntaje'>X", player, 30, 50, 30, 16, FF0000, FF0000, 1, true)
ui.addTextArea(301, string.format("<p align='center'><V>Solo a %s puntos",WINS), player, 80, 45, 180, 18, FF0000, FF0000, 1, true)
for k,players in pairs(tfm.get.room.playerList) do
if puntos[k] then
equipos[k] = k
playersInGame[k] = true
if textareaid >= 32 then
else
ui.addTextArea(textarealugar, string.format("<p align='center'><V>%s - %s",k,puntos[k]), player, distanciax, distanciay, 140, 18, FF0000, FF0000, 1, true)
distanciay = distanciay + 37
textareaid = textareaid + 1
textarealugar = textarealugar + 1
if textareaid == 8 then
distanciax = distanciax + 190
distanciay = 80
textareaid = 0
end
end
end
end
end
end
if player:lower() == Admin:lower() then
args = string.split(command, " ")
if args[1] == "team1" then
if modo2b == "normal" then
table.remove(args, 1)
teams[1] = {}
points[1] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[1], player)
playersInGame[player] = true
end
displayTeams()
end
elseif args[1] == "Power2" and modo2b == "normal" then
table.remove(args, 1)
teams[2] = {}
points[2] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[2], player)
playersInGame[player] = true
end
displayTeams()
elseif args[1] == "Power3" and modo2b == "normal" then
table.remove(args, 1)
teams[3] = {}
points[3] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[3], player)
playersInGame[player] = true
end
displayTeams()
elseif args[1] == "Power4" and modo2b == "normal" then
table.remove(args, 1)
teams[4] = {}
points[4] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[4], player)
playersInGame[player] = true
end
displayTeams()
elseif args[1] == "skip" then
newMap()
elseif args[1] == "np" then
if args[2] then
table.insert(queue, args[2])
end
elseif args[1] == "d" then
if args[2] then
WINS = tonumber(args[2])
displayScore()
end
elseif args[1] == "ekle" and modo2b == "Solo" then
if args[2] then
table.remove(args, 1)
for index, player in pairs(args) do
equipos[player] = player
puntos[player] = 0
playersInGame[player] = true
end
end
elseif args[1] == "ekle" and modo2b == "normal" then
if args[2] and args[3] then
if args[2] == "team1" and modo2b == "normal" then
table.remove(args, 1)
table.remove(args, 1)
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[1], player)
playersInGame[player] = true
end
end
if args[2] == "power2" and modo2b == "normal" then
table.remove(args, 1)
table.remove(args, 1)
for index, player in pairs(args, 3) do
player = string.title(player)
table.insert(teams[2], player)
playersInGame[player] = true
end
end
if args[2] == "team3" and modo2b == "normal" then
table.remove(args, 1)
table.remove(args, 1)
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[3], player)
playersInGame[player] = true
end
end
if args[2] == "team4" and modo2b == "normal" then
table.remove(args, 1)
table.remove(args, 1)
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[4], player)
playersInGame[player] = true
end
end
end
elseif args[1] == "quitar" then
if args[2] then
for index, player in pairs(args) do
player = string.title(player)
playersInGame[player] = false
end
end
elseif args[1] == "reset" then
teams[1] = {}
points[1] = 0
teams[2] = {}
points[2] = 0
teams[3] = {}
points[3] = 0
teams[4] = {}
points[4] = 0
displayTeams()
elseif args[1] == "puntos" and modo2b == "normal" then
if args[2] and args[3] then
local team = tonumber(args[2]:match("team(%d+)") or 0)
if team > 0 and team < 5 then
local newScore = tonumber(args[3]) or points[team]
points[team] = newScore
displayScore()
end
end
elseif args[1] == "pausa" then
gameRunning = not gameRunning
if not gameRunning then
ui.addTextArea(90, "", nil, 235, 200, 302, 22, FF0000, FF0000, 1, true)
ui.addTextArea(91, "<p align='center'><V> Juego pausado ", nil, 235, 200, 300, 20, 0x324650, 0x324650, 1, true)
tfm.exec.disableAutoTimeLeft(true)
else
ui.removeTextArea(90)
ui.removeTextArea(91)
tfm.exec.disableAutoTimeLeft(false)
end
end
end
end
function eventNewGame()
if modo2b == "normal" then
if gameRunning then
isfirst = false
for i, p in pairs(teams[1]) do
tfm.exec.setNameColor(p, "0x"..colors[1])
end
for i, p in pairs(teams[2]) do
tfm.exec.setNameColor(p, "0x"..colors[2])
end
for i, p in pairs(teams[3]) do
tfm.exec.setNameColor(p, "0x"..colors[3])
end
for i, p in pairs(teams[4]) do
tfm.exec.setNameColor(p, "0x"..colors[4])
end
displayScore()
end
end
if modo2b == "Solo" then
if gameRunning then
isfirst = false
for k,players in pairs(tfm.get.room.playerList) do
tfm.exec.setNameColor(k, "FF0000")
equipoc[k] = "FF0000"
end
displayScore()
end
end
end
function displayScore()
if modo2b == "normal" then
ui.addTextArea(25, string.format("<p align='center'><font size='20'><font color='#%s'>%s<N> x <font color='#%s'>%s <N> x <font color='#%s'>%s <N> x <font color='#%s'>%s <N> / <font color='FF0000'>%s", colors[1], points[1], colors[2], points[2], colors[3], points[3], colors[4], points[4], WINS), nil, 0, 22, 800, 30, 0, 0, 0, true)
end
end
function displayScoreSolo()
resetmostrarjugadoresSolo()
ui.addTextArea(300, string.format("<p align='center'><V>Solo a %s puntos",WINS), nil, 80, 45, 180, 18, FF0000, FF0000, 1, true)
for k,players in pairs(tfm.get.room.playerList) do
if puntos[k] then
equipos[k] = k
playersInGame[k] = true
if textareaid >= 32 then
else
ui.addTextArea(textarealugar, string.format("<p align='center'><V>%s - %s",k,puntos[k]), nil, distanciax, distanciay, 140, 18, equipoc[k], FF0000, 1, true)
distanciay = distanciay + 37
textareaid = textareaid + 1
textarealugar = textarealugar + 1
if textareaid == 8 then
distanciax = distanciax + 190
distanciay = 80
textareaid = 0
end
end
end
end
end
function borrarScoreSolo()
for i = 300, 340 do
ui.removeTextArea(i)
end
end
function displayTeams()
ui.addTextArea(38, "", nil, 235, 30, 302, 22, FF0000, FF0000, 1, true)
ui.addTextArea(37, "<p align='center'><V>Admin: "..Admin, nil, 235, 30, 300, 20, FF0000, FF0000, 1, true)
--ui.addTextArea(1, "", nil, 400, 69, 400, 260, FF0000, FF0000, 1, true)
ui.addTextArea(2, "", nil, 0, 71, 800, 290, FF0000, FF0000, 1, true)
--ui.addTextArea(3, "", nil, 331, 70, 400, 260, FF0000, FF0000, 1, true)
ui.addTextArea(4, "", nil, 57, 79, 142, 22, FF0000, FF0000, 1, true)
ui.addTextArea(5, "<p align='center'><V>Team 1", nil, 58, 80, 140, 20, FF0000, FF0000, 1, true)
ui.addTextArea(6, "", nil, 227, 79, 142, 22, FF0000, FF0000, 1, true)
ui.addTextArea(7, "<p align='center'><V>Team 2", nil, 228, 80, 140, 20, FF0000, FF0000, 1, true)
ui.addTextArea(8, "", nil, 417, 79, 142, 22, FF0000, FF0000, 1, true)
ui.addTextArea(9, "<p align='center'><V>Team 3", nil, 418, 80, 140, 20, FF0000, FF0000, 1, true)
ui.addTextArea(10, "", nil, 587, 79, 142, 22, FF0000, FF0000, 1, true)
ui.addTextArea(11, "<p align='center'><V>Team 4", nil, 588, 80, 140, 20, FF0000, FF0000, 1, true)
ui.addTextArea(12, "<p align='center'><font color='#FF0000'>|</font>", nil, 210, 102, 140, 200, 0, 0, 0, true)
ui.addTextArea(39, "<p align='center'><font color='#FF0000'>|</font>", nil, 450, 102, 140, 200, 0, 0, 0, true)
ui.addTextArea(40, "", nil, 59, 120, 140, 200, FF0000, FF0000, 1, true)
ui.addTextArea(31, "<p align='center'><font color='#"..colors[1].."'>"..table.concat(teams[1], "\n"), nil, 60, 121, 138, 198, FF0000, FF0000, 1, true)
ui.addTextArea(32, "", nil, 419, 120, 140, 200, FF0000, FF0000, 1, true)
ui.addTextArea(33, "<p align='center'><font color='#"..colors[3].."'>"..table.concat(teams[3], "\n"), nil, 420, 121, 138, 198, FF0000, FF0000, 1, true)
ui.addTextArea(34, "", nil, 589, 120, 140, 200, FF0000, FF0000, 1, true)
ui.addTextArea(35, "<p align='center'><font color='#"..colors[4].."'>"..table.concat(teams[4], "\n"), nil, 590, 121, 138, 198, FF0000, FF0000, 1, true)
ui.addTextArea(36, "", nil, 229, 120, 140, 200, FF0000, FF0000, 1, true)
ui.addTextArea(13, "<p align='center'><font color='#"..colors[2].."'>"..table.concat(teams[2], "\n"), nil, 230, 121, 138, 198, FF0000, FF0000, 1, true)
ui.addTextArea(14, "<p align='center'><font color='#FF0000'>____ ____</font>", nil, 325, 197, 140, 200, 0, 0, 0, true)
ui.addTextArea(15, "", nil, 374, 202, 40, 20, FF0000, FF0000, 1, true)
ui.addTextArea(16, "<p align='center'><V>VS", nil, 375, 203, 38, 18, FF0000, FF0000, 1, true)
ui.addTextArea(42, "", Admin, 749, 81, 40, 20, FF0000, FF0000, 1, true)
ui.addTextArea(41, "<p align='center'><V><a href='event:salir'>X", Admin, 750, 82, 38, 18, FF0000, FF0000, 1, true)
ui.addTextArea(45, "", Admin, 744, 139, 52, 20, FF0000, FF0000, 1, true)
ui.addTextArea(46, "<p align='center'><V><a href='event:reset'>Reset", Admin, 745, 140, 50, 18, FF0000, FF0000, 1, true)
ui.addTextArea(47, "", Admin, 741, 173, 57, 20, FF0000, FF0000, 1, true)
ui.addTextArea(54, "", Admin, 741, 209, 57, 20, FF0000, FF0000, 1, true)
if modo2 == "Solo" then
ui.addTextArea(51, "<p align='center'><V><a href='event:Solo'><font size='12'>"..modo2, Admin, 742, 210, 55, 18, FF0000, FF0000, 1, true)
end
verificarmodo()
ui.addTextArea(53, "", Admin, 741, 245, 57, 20, FF0000, FF0000, 1, true)
ui.addTextArea(52, "<p align='center'><V><a href='event:kapat'><font size='12'>kapat", Admin, 742, 246, 55, 18, FF0000, FF0000, 1, true)
ui.addTextArea(55, "", Admin, 741, 279, 57, 20, FF0000, FF0000, 1, true)
ui.addTextArea(56, "<p align='center'><V><a href='event:Seç'><font size='12'>Seç", Admin, 742, 280, 55, 18, FF0000, FF0000, 1, true)
ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJogo'>GO", Admin, 375, 203, 38, 18, FF0000, FF0000, 1, true)
end
function verificarmodo()
ui.addTextArea(50, string.format("<p align='center'><V>Modo %s - %s ",modob,modo2b),nil, 235, 375, 300, 17, FF0000, FF0000, 1, true)
if modo2 == "normal" then
ui.addTextArea(51, "<p align='center'><V><a href='event:normal'><font size='8'>"..modo2, Admin, 742, 210, 55, 18, FF0000, FF0000, 1, true)
end
if modo == "bootcamp" then
ui.addTextArea(48, "<p align='center'><V><a href='event:bootcamp'><font size='9'>"..modo, Admin, 742, 174, 55, 18, FF0000, FF0000, 1, true)
end
if modo == "racing" then
ui.addTextArea(48, "<p align='center'><V><a href='event:racing'><font size='9'>"..modo, Admin, 742, 174, 55, 18, FF0000, FF0000, 1, true)
end
if modo == "mix" then
ui.addTextArea(48, "<p align='center'><V><a href='event:mix'><font size='9'>"..modo, Admin, 742, 174, 55, 18, FF0000, FF0000, 1, true)
end
end
function contarjugadores()
local players=0
function eventNewPlayer(name)--Cuando un jugador entre a la sala...
players=players+1--Sumamos 1 a nuestra tabla
end
function eventPlayerLeft(name)--Cuando un jugador salga de la sala...
players=players-1--Restamos 1 a nuestra tabla
end
for name in pairs(tfm.get.room.playerList) do--Por cada jugador que esté en la sala...
eventNewPlayer(name)--Le ejecutamos la función eventNewPlayer
end
end
function eventTextAreaCallback(id, player, callback)
if callback == 'iniciarJogo' then
gameRunning = true
for i = 1, 20 do
ui.removeTextArea(i)
end
for i = 31, 56 do
ui.removeTextArea(i)
end
borrarScoreSolo()
defaultEffect(9, {9}, 400, 212, 80)
newMap()
end
if callback == 'salir' then
tfm.system.exit()
end
if callback == 'Seç' then
nteam = 1
kapat = {}
playersInGame = {}
teams = {
[1] = {},
[2] = {},
[3] = {},
[4] = {},
}
contarjugadores()
for k,players in pairs(tfm.get.room.playerList) do
if nteam > 4 then
nteam = 1
end
table.insert(teams[nteam], k)
playersInGame[k] = true
nteam = nteam + 1
displayTeams()
end
end
if callback == 'kapat' then
nteam = 1
kapat = {}
playersInGame = {}
teams = {
[1] = {},
[2] = {},
[3] = {},
[4] = {},
}
contarjugadores()
for k,players in pairs(tfm.get.room.playerList) do
kapat[k] = k
playersInGame[k] = true
end
for k,players in pairs(tfm.get.room.playerList) do
if nteam > 4 then
nteam = 1
end
if kapat[k] == k then
jugador = kapat[math.random(#kapat)]
table.insert(teams[players], jugador)
kapat[k] = ""
nteam = nteam + 1
displayTeams()
end
end
end
if callback == 'reset' then
teams[1] = {}
points[1] = 0
teams[2] = {}
points[2] = 0
teams[3] = {}
points[3] = 0
teams[4] = {}
points[4] = 0
displayTeams()
end
if callback == 'bootcamp' then
tiempo = 150
modob = "bootcamp"
modo = "mix"
verificarmodo()
maps = mapasbootcamp
end
if callback == 'racing' then
tiempo = 60
modob = "racing"
modo = "bootcamp"
verificarmodo()
maps = mapasracing
end
if callback == 'mix' then
tiempo = 90
modob = "mix"
modo = "racing"
verificarmodo()
maps = mapasmix
end
if callback == 'Solo' then
modo2b = "Solo"
modo2 = "normal"
displayTeams()
for i = 4, 15 do
ui.removeTextArea(i)
end
for i = 31, 36 do
ui.removeTextArea(i)
end
for i = 39, 40 do
ui.removeTextArea(i)
end
contarjugadores()
for k,players in pairs(tfm.get.room.playerList) do
equipos[k] = k
puntos[k] = 0
equipoc[k] = "0x324650"
playersInGame[k] = true
if textareaid >= 32 then
else
ui.addTextArea(textarealugar, "<p align='center'><V>"..k, nil, distanciax, distanciay, 140, 18, FF0000, FF0000, 1, true)
distanciay = distanciay + 37
textareaid = textareaid + 1
textarealugar = textarealugar + 1
if textareaid == 8 then
distanciax = distanciax + 190
distanciay = 80
textareaid = 0
end
ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJogo'>GO", Admin, 375, 203, 38, 18, FF0000, FF0000, 1, true)
end
end
end
if callback == 'normal' then
modo2b = "normal"
modo2 = "Solo"
resetmostrarjugadoressolo()
displayTeams()
end
if callback == 'cerrarpuntaje' then
borrarScoreSolo()
end
end
function string.split(s, pattern, n)
local st = {}
for sb in string.gmatch(s, "[^"..pattern.."]+") do
if not n or n > -1 then
table.insert(st,sb)
else
st[#st] = st[#st]..pattern..sb
end
n = n and n-1 or false
end
return st
end
function table.contains(tableT, element)
for _, value in pairs(tableT) do
if value == element then
return true
end
end
return false
end
defaultEffect=function(id,p,x,y,rand)
local minDist = 1
local outerBorder = 20
local maxDist = 30
local totalParticles = rand and 40 or (id == -1 and 35 or 75)
for i = 1, totalParticles do
if rand then
id = p[math.random(#p)]
end
local dist = math.min(math.random(minDist, maxDist), outerBorder)
local angle = math.random(0, 360)
local r = math.rad(angle)
local dx = math.cos(r)
local dy = math.sin(r)
local vx = dist * dx / 10
local vy = dist * dy / 10
local ax = -vx / dist / 15
local ay = (-vy / dist / 15) + 0.05
if id == -1 then
tfm.exec.displayParticle(9, x + dx, y + dy, vx, vy, ax, ay, nil)
tfm.exec.displayParticle(1, x + dx, y + dy, vx, vy, ax, ay, nil)
else
tfm.exec.displayParticle(id, x + dx, y + dy, vx, vy, ax, ay, nil)
end
end
end
displayTeams()
function eventPlayerDied()
local alive = 0
for k,v in pairs(tfm.get.room.playerList) do
if not v.isDead then
alive = alive+1
end
end
if alive == 0 then
newMap()
end
end
The WR URL
This is the world record URL to know the record of some maps you want
Link :
https://docs.google.com/spreadsheets/d/1l3D-tmUAgwqNPjR3qa1rKqNkNYImPLC3dhgHUD3gLjo/edit#gid=1144595028
Link Of My Channel :
https://www.youtube.com/channel/UCvXuYS0wIs-W1VbrGYpSXjw
Subscribe for 100 subs :D
<3<3<3<3<3
Link :
https://docs.google.com/spreadsheets/d/1l3D-tmUAgwqNPjR3qa1rKqNkNYImPLC3dhgHUD3gLjo/edit#gid=1144595028
Link Of My Channel :
https://www.youtube.com/channel/UCvXuYS0wIs-W1VbrGYpSXjw
Subscribe for 100 subs :D
<3<3<3<3<3
Pack Of Transformice 2020
I Will Update This Pack When He Get 20 Like
So, Do Like
Link Of Pack (Pro TFM) :
https://www.mediafire.com/file/5j47amwro3r27rd/Pro_TFM.zip/file
and Ty <3
This is My Channel Photo :)
So, Do Like
Link Of Pack (Pro TFM) :
https://www.mediafire.com/file/5j47amwro3r27rd/Pro_TFM.zip/file
and Ty <3
This is My Channel Photo :)
الاشتراك في:
الرسائل (Atom)

