Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Transformice script by Misterthepro and Odeyasitos (remastered, first version was created by Ctmce), thanks to Eduardomol,
- Mbappe, Noob, Flixpersito and Blood for help me.
- Anti-macros by Tocutoeltocu.
- Obs: Auto-admin
- README:
- Commands:
- 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. !macro on // activate anti-macros
- 13. !macro off // desactivate anti-macros, default option
- 14. !admin Name#code // add player to admin list, ex: !admin Noob#5388
- 15. !unadmin Name#code // delete admin from admin list (you can't delete the host player), ex: !unadmin Edudekarly#3398
- ]]--
- --Admin/Game Setup--
- local _, msg = pcall(nil)
- local adminGet = string.match(msg,"^(.-)%.")
- local admin = {adminGet} -- only the first position of the array will be shown in the gui
- local ScoreToWin = 20 --Type here the amount of points need to win the game(Leave it at the same number it is right now if you want to change it in the Setup Panel)--
- local autoJoin = true
- local team1Color = "Blue"
- local team2Color = "Red"
- ---Game Time Settings----
- local gameTime = 63
- --^^^^^^^^^^^^^^^^^^^CHANGE ONLY THE THINGS ABOVE^^^^^^^^^^^^^^^^^^^--
- --DO NOT CHANGE THE SCRIPT!--
- local teams = {Team1 = {}, Team2 = {}}
- --Team score--
- local teamScore = {Team1 = 0, Team2 = 0}
- --------------
- local teamColors = {Blue = '2F7FCC', Red = 'CB546B'}
- local first = false
- ----array for maps already played------------------------
- local already_maps = {}
- -----------------------------
- local gameStarted = false
- currentMap = 0
- team1C = team1Color
- team2C = team2Color
- --[[MACRO--]]
- macroON = false
- macro_time = 2000
- macro_warn = 18
- macro_freeze = 24
- macro_keys = {
- [38] = "Up",
- [87] = "W",
- [90] = "Z"
- }
- macro_info = {}
- mice_info = {}
- concatenation = {}
- os_time = os.time
- --[[END MACRO VARIABLES]]
- local chosenGameMode = "BC & RC"
- local vanillaMaps = {2, 11, 12, 19, 22, 40, 44, 45, 55, 57, 67, 69, 71, 73, 74, 79, 80, 86, 123, 127, 138, 142, 145, 150, 172, 173, 174, 189, 7833293, 7833292, 7833291, 7833290, 7833289, 7833288, 7833271, 7833272, 7833260, 7833265, 7830960, 7833268, 7833269, 7833270, 7831136, 7831065, 7833169, 7833263, 7833266, 7833279, 7833281, 7833282, 7833259, 7815665, 7815151, 7815374, 7833287, 7838835, 7838838, 7838930, 7838967, 7838914, 7838910, 7839014, 7839038, 7839046, 7839806, 7839461, 7839471, 7839368, 7839507, 7839493, 7839374, 7839942, 7840463, 7840122, 7840110, 7839819, 7840207, 7840167, 7840646, 7840728, 7840186, 7840366, 7840379, 7840176, 7840159, 7840392, 7840404, 7840564, 7840635, 7839352, 7840902, 7841488, 7844856, 7844642, 7844643, 7844648, 7844650, 7844660, 7844661, 7844664, 7844984, 2111371, 7848597, 7848605, 7848626, 7848738, 7848782}
- local bootcampOldMaps = {"1733211","512887","1046877","541693","692740","272689","277427","327354","500690","3295967","378704","1646448","319443","455271","1615949","2423300","692650","4595576","375455","185289","159932","394132","166271","281948","511136","179488","299942","149451","150664","155628","166361","163172","168754","172976","182370","419369","257324","478236","220352","166805","331988","184817","2040569","191177","177652","560583","834297","206396","315800","403940","222910","157203","169110","586901","185873","171776","189819","528032","1000006","172547","410045","172520","171480","422981","232675","186066","172501","435812","168204","159187","320483","295465","199710","2574744","510996","571683","500748","191205","593530","608368","432501","159145","162482","159298","523270","492222","190646","330933","163159","176710","192255","460961","163596","332130","227093","258908","330841","268915","169059","208653","556841","169076","444589","305567","155765","155480","158053","163531","164916","166032","166056","166430","170514","172621","172951","175280","182769","447805","216173","171482","366809","303151","313216","3402881","1853689","305614","4537590","4523127","4883346","3737744","3558682","1580835","6254869","157805","158909","158417","159691","163094","163506","165186","166333","169139","171148","172512","172605","173623","175204","176507","176253","176619","179005","179492","180801","185428","185529","185887","190996","191203","191443","192959","193662","195116","195672","198988","199210","199826","202574","203664","204488","205240","208056","209848","213752","213755","213874","214631","214755","217261","222377","223174","224108","225484","225744","230588","231137","231921","232469","236768","237091","242291","242351","247311","248650","254785","257715","257218","258192","259319","264091","268668","270143","270924","271193","271411","272402","272518","275897","277824","279337","282584","289865","290824","295630","295932","296518","297442","301610","302080","303939","304861","305820","306309","306655","308855","307465","307324","315666","315573","318129","322026","322282","322582","325259","327743","329318","330967","332906","332811","333002","337644","344010","354984","359923","357892","360383","365061","364955","368839","371174","373105","373620","374779","379254","380516","383358","391924","392434","393426","395310","395216","396502","397469","401630","403755","406154","408643","410040","419335","419635","420877","424685","424900","431433","431624","431749","439092","438364","438333","440592","454049","457726","458528","462004","467137","476706","482791","485994","492399","496610","499986","500000","500894","501887","504485","507884","541223","531084","541729","549666","560526","563436","568122","574183","586901","593204","593431","593530","597348","605255","698992","842167","868262","886744","1032212","1066607","1156092","1266330","1162831","1593066","1990413","2132250","2416969","2803483","2850177","2918822","2932238","3725142","4249695","4334509","3979220","4593355","4604660","5056463","4794517","4585855","5086564","5110700","5131117","5198136","5394505","5955681","6000049","6075471"}
- esta = function(p, L) -- L lista de jugadores --
- for _, v in pairs(L) do
- if p == v then
- return true
- end
- end
- return false
- end
- function tablefind(tab,el)
- for index, value in pairs(tab) do
- if value == el then
- return index
- end
- end
- return nil
- end
- new_map = function(L)
- local r = L[math.random(#L)]
- table.remove(L,tablefind(L, r))
- table.insert(already_maps, r)
- if #already_maps > #L/2 then
- for _,v in ipairs(already_maps) do
- table.insert(L,v)
- end
- already_maps = {}
- end
- return tostring(r)
- end
- local getBootcampOld = function() return new_map(bootcampOldMaps) end
- local getVanilla = function() return new_map(vanillaMaps) end
- local gameMode = {
- ["BC & RC"] = {"#3", "#17", "#13", "#17"},
- ["Bootcamp"] = {"#3", "#13"},
- ["Vanilla"] = {getVanilla},
- ["Racing"] = {"#17"},
- ["Bootcamp old"] = {getBootcampOld},
- ["P7"] = {"#7"},
- ["BC & RC & V"] = {"#3", "#17", getVanilla ,"#13", "#17", getVanilla, getBootcampOld, "#17", getVanilla},
- ["P17 & P7"] = {"#17", "#7"}
- }
- local indexMapToPlay = 1
- function mapToPlay()
- len = #gameMode[chosenGameMode]
- if type(gameMode[chosenGameMode][indexMapToPlay]) == 'function' then
- map = gameMode[chosenGameMode][indexMapToPlay]()
- else
- map = gameMode[chosenGameMode][indexMapToPlay]
- end
- if indexMapToPlay == len then
- indexMapToPlay = 1
- else
- indexMapToPlay = indexMapToPlay + 1
- end
- tfm.exec.newGame(map)
- end
- function main()
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAllShamanSkills(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoScore(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableDebugCommand(true)
- tfm.exec.disablePhysicalConsumables(true)
- checkColor()
- ShowStartBoard()
- system.disableChatCommandDisplay("macro")
- system.disableChatCommandDisplay("skip")
- system.disableChatCommandDisplay("admin")
- system.disableChatCommandDisplay("unadmin")
- tfm.exec.newGame(7692692,true)
- for name in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end
- end
- function establecerEquipos()
- teams.Team1 = {}
- teams.Team2 = {}
- local equipo = 1
- local jugadoresTotal = {}
- for name, p in pairs(tfm.get.room.playerList) do
- table.insert(jugadoresTotal, name)
- end
- for i = 1, #jugadoresTotal do
- numJugador = math.random(#jugadoresTotal)
- agregarJugador = jugadoresTotal[numJugador]
- table.remove(jugadoresTotal, numJugador)
- if equipo == 1 then
- table.insert(teams.Team1, agregarJugador)
- equipo = 2
- elseif equipo == 2 then
- table.insert(teams.Team2, agregarJugador)
- equipo = 1
- end
- end
- ui.addTextArea(3, "<p align='center'><font color='#CB546B'>" .. (table.concat(teams.Team1,"\n") or ""), nil, 15, 72, 180, 266, 0x2B2B2B, 0x121212, 1, true)
- ui.addTextArea(4, "<p align='center'><font color='#2F7FCC'>" .. (table.concat(teams.Team2,"\n") or ""), nil, 605, 72, 180, 266, 0x2B2B2B, 0x121212, 1, true)
- end
- function eventNewGame()
- if gameStarted then
- tfm.exec.setGameTime(gameTime)
- currentMap = tostring(tfm.get.room.currentMap)
- for n,p in pairs(tfm.get.room.playerList) do
- if not PlayerInTeam(n) then
- tfm.exec.killPlayer(n)
- end
- end
- SetPlayerNameColor()
- first = false
- tfm.exec.setUIMapName(currentMap .. " <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin)
- end
- end
- function eventNewPlayer(plr)
- local info = {}
- for key in next, macro_keys do
- info[key] = {0, os_time() + macro_time, false, false}
- system.bindKeyboard(plr, key, true, true)
- end
- macro_info[plr] = info
- mice_info[plr] = {adv = 0}
- if gameStarted then
- if PlayerInTeam(plr) then tfm.exec.killPlayer(plr) return end
- if autoJoin then
- if #teams.Team1 == #teams.Team2 then
- table.insert(teams.Team1,plr)
- elseif #teams.Team1 > #teams.Team2 then
- table.insert(teams.Team2,plr)
- end
- end
- else
- tfm.exec.respawnPlayer(plr)
- end
- end
- function eventPlayerDied(plr)
- if gameStarted then
- local plrCount = 0
- for n,p in pairs(tfm.get.room.playerList) do
- if not p.isDead then
- plrCount = plrCount + 1
- end
- end
- if plrCount <= 0 then
- mapToPlay()
- end
- end
- end
- function teamWon(team, color, player, teamColor)
- print(team.." won the game! The last point made by: "..player)
- gameStarted = false
- tfm.exec.newGame(7692692,true)
- ShowStartBoard()
- ui.addTextArea(16, "<font size='13' color='#ffffff'><i>Team</font><font color='#" ..teamColor.."'> " ..color .."</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='#"..teamColor.."'> "..player .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true)
- end
- function eventPlayerWon(plr, TT, wonTime)
- if gameStarted then
- if PlayerInTeam(plr) then
- if not first then
- first = true
- if table.contain(teams.Team1,plr) then
- teamScore.Team1 = teamScore.Team1 + 1
- tfm.exec.setPlayerScore(plr, 1,true)
- if tonumber(teamScore.Team1) >= tonumber(ScoreToWin) then
- teamWon("Team 1", team1C, plr, teamColors.Blue)
- end
- else
- teamScore.Team2 = teamScore.Team2 + 1
- tfm.exec.setPlayerScore(plr, 1,true)
- if tonumber(teamScore.Team2) >= tonumber(ScoreToWin) then
- teamWon("Team 2", team2C, plr, teamColors.Red)
- end
- end
- tfm.exec.setGameTime(4)
- tfm.exec.setUIMapName(currentMap .. " <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin)
- end
- end
- end
- end
- if_admin = function (name)
- for p = 1, #admin do
- if name == admin[p] then
- return true
- 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 eventChatCommand(name, command)
- if if_admin(name) then
- local arg={}
- for argument in command:gmatch("[^%s]+") do
- table.insert(arg,argument)
- 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
- math.randomseed(os.time())
- math.random(); math.random(); math.random()
- if not gameStarted then
- ShowStartBoard()
- tfm.exec.disableAutoNewGame(true)
- 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() == "finish" and arg[2] == "script" and arg[3] == nil then
- system.exit()
- elseif arg[1]:lower() == "reset" and arg[2] == nil then
- if gameStarted then
- gameStarted = false
- tfm.exec.newGame(7692692)
- 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]) <= 100 then
- ScoreToWin = arg[2]
- else
- print("The limit of the WinScore is between 0-500!")
- end
- if gameStarted then
- tfm.exec.setUIMapName(currentMap .. " <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin)
- end
- elseif arg[1]:lower() == "skip" and arg[2] == nil then
- mapToPlay()
- elseif arg[1]:lower() == "admin" and PlayerCheck(arg[2]) and arg[3] == nil then
- if tablefind(admin, arg[2]) == nil then
- table.insert(admin, arg[2])
- end
- elseif arg[1]:lower() == "unadmin" and PlayerCheck(arg[2]) and arg[3] == nil then
- local position = tablefind(admin, arg[2])
- if position ~= nil and position > 1 then
- table.remove(admin, position)
- end
- elseif arg[1]:lower() == "macro" and arg[2] == "on" and arg[3] == nil then
- macroON = true
- elseif arg[1]:lower() == "macro" and arg[2] == "off" and arg[3] == nil then
- macroON = false
- elseif arg[1]:lower() == "sp" then
- if arg[2]:lower() == "team1" then
- if tonumber(arg[3]) ~= nil then
- 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 and left < 0 then
- mapToPlay()
- end
- end
- function SetPlayerNameColor()
- 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 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!")
- 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 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 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 eventTextAreaCallback(id, player, callback)
- if if_admin(player) then
- if id == 8 then
- if callback == "Bootcamp" then
- chosenGameMode = "Bootcamp"
- ShowStartBoard()
- end
- elseif id == 9 then
- if callback == "Racing" then
- chosenGameMode = "Racing"
- ShowStartBoard()
- end
- elseif id == 18 then
- if callback == "BC & RC" then
- chosenGameMode = "BC & RC"
- ShowStartBoard()
- end
- elseif id == 10 then
- if callback == "start" then
- math.randomseed(os.time())
- math.random(); math.random(); math.random()
- for i=0, 19,1 do
- ui.removeTextArea(i)
- end
- gameStarted = true
- teamScore.Team1 = 0
- teamScore.Team2 = 0
- resetScore()
- mapToPlay()
- 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
- establecerEquipos()
- ShowStartBoard()
- end
- elseif id == 19 then
- if callback == "otherMode" then
- for i=0, 19,1 do
- ui.removeTextArea(i)
- end
- ShowAditionalGameModes()
- end
- elseif id >= 200 and id <= 206 then
- for i=200, 228,1 do
- ui.removeTextArea(i)
- end
- chosenGameMode = callback
- ShowStartBoard()
- end
- end
- end
- function ShowStartBoard()
- ui.addTextArea(0, "<p align='center'>Administrador: <font color='#00ff40'><b>" .. admin[1], nil, 263, 367, 265, 20, 0x324650, 0x000000, 0.8, true)
- ui.addTextArea(1, "", nil, 209, 33, 381, 328, 0x324650, 0x000000, 1, true)
- ui.addTextArea(2, "<p align='center'><font size='12' color='#" ..team1Color .."'>" .. (table.concat(teams.Team1,"\n") or ""), nil, 209, 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: " ..(chosenGameMode or "BC & RC"), nil, 339, 301, 120, 19, 0x324650, 0x000000, 1, true)
- ui.addTextArea(5, "<font size='12'><p align='center'><b>\\ LUA by Misterthepro and odeyasitos/", nil, 209, 33, 381, 21, 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, 335, 87, 20, 0x324650, 0x000000, 1, true)
- ui.addTextArea(15, "<p align='center'><a href='event:Fill'>Fill</a>", nil, 376, 335, 47, 20, 0x324650, 0x000000, 1, true)
- ui.addTextArea(10, "<p align='center'><font size='13'><b><a href='event:start'>Start</a>", nil, 359, 212, 82, 23, 0x120D0D, 0x000000, 1, true)
- ui.addTextArea(18, "<p align='center'><b><a href='event:BC & RC'>BC & RC</a>", nil, 365, 80, 69, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(8, "<p align='center'><b><a href='event:Bootcamp'>Bootcamp</a>", nil, 365, 113, 69, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(9, "<p align='center'><b><a href='event:Racing'>Racing</a>", nil, 365, 146, 69, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(19, "<p align='center'><b><a href='event:otherMode'>Otro</a>", nil,365 , 179, 69, 20, 0x001f3f, 0x000000, 1, true)
- end
- function ShowAditionalGameModes()
- ui.addTextArea(200, "", nil, 209, 33, 381, 328, 0x324650, 0x000000, 1, true)
- ui.addTextArea(201, "<font size='12'><p align='center'><b>\\ OTROS MODOS DE JUEGO /", nil, 215, 38, 369, 21, 0x324650, 0x000000, 1, true)
- ui.addTextArea(202, "<p align='center'><b><a href='event:Vanilla'>Vanilla</a>", nil, 215, 72, 112, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(203, "<p align='center'><b><a href='event:Bootcamp old'>Bootcamp old</a>", nil, 215, 105, 112, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(204, "<p align='center'><b><a href='event:P7'>P7</a>", nil, 215, 138, 112, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(205, "<p align='center'><b><a href='event:BC & RC & V'>BC & RC & V</a>", nil, 215, 171, 112, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(206, "<p align='center'><b><a href='event:P17 & P7'>P17 & P7</a>", nil,215 , 204, 112, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(207, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,215 , 237, 112, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(208, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,215 , 270, 112, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(209, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,215 , 303, 112, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(210, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,215 , 336, 112, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(211, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,342 , 72, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(212, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,342 , 105, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(213, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,342 , 138, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(214, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,342 , 171, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(215, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,342 , 204, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(216, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,342 , 237, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(217, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,342 , 270, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(218, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,342 , 303, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(219, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,342 , 336, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(220, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,470 , 72, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(221, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,470 , 105, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(222, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,470 , 138, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(223, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,470 , 171, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(224, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,470 , 204, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(225, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,470 , 237, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(226, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,470 , 270, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(227, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,470 , 303, 113, 20, 0x001f3f, 0x000000, 1, true)
- ui.addTextArea(228, "<p align='center'><b><a href='event:'>Coming soon</a>", nil,470 , 336, 113, 20, 0x001f3f, 0x000000, 1, true)
- end
- eventKeyboard = function(player, key)
- if macroON then
- if not macro_keys[key] then return end -- By tocutoeltocu
- local info = macro_info[player][key]
- local now = os_time()
- info[1] = info[1] + 1
- if now >= info[2] then
- --print(player .. " saltos:" .. info[1])
- if info[4] and mice_info[player].adv==0 then
- local count = 3
- concatenation[1] = "<r>[AntiMacro] <bv>"
- concatenation[2] = player
- concatenation[3] = "<bl> frozen."
- local data
- for _key, name in next, macro_keys do
- data = macro_info[player][_key]
- count = count + 4
- concatenation[count - 3] = " "
- concatenation[count - 2] = name
- concatenation[count - 1] = ": "
- if now >= data[2] and info ~= data then
- concatenation[count] = "0"
- else
- concatenation[count] = data[1]
- end
- end
- local msg = table.concat(concatenation, "", 1, count)
- print(msg)
- tfm.exec.freezePlayer(player)
- mice_info[player].adv = 1
- end
- info[1] = 1
- info[2] = now + macro_time
- info[3] = false
- info[4] = false
- return
- elseif not info[3] and info[1] >= macro_warn and mice_info[player].adv==0 then
- info[3] = true
- local count = 3
- concatenation[1] = "<j>[AntiMacro] <bv>"
- concatenation[2] = player
- concatenation[3] = "<bl> may be using macros."
- local data
- for _key, name in next, macro_keys do
- data = macro_info[player][_key]
- count = count + 4
- concatenation[count - 3] = " "
- concatenation[count - 2] = name
- concatenation[count - 1] = ": "
- if now >= data[2] then
- concatenation[count] = "0"
- else
- concatenation[count] = data[1]
- end
- end
- local msg = table.concat(concatenation, "", 1, count)
- print(msg)
- elseif not info[4] and info[1] >= macro_freeze then
- info[4] = true
- end
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement