[Официальная мини-игра] Цветовые гонки! |
Cepejjaa « Citoyen » 1590527040000
| 2 | ||
Автор: Cepejjaa Как играть? В цветовых гонках, как и в обычных картах нужно взять сыр и зайти в нору. Но на пути подстерегают цветовые платформы которые усложняют ваш путь. Для исчезновения одного из платформ достаточно выбрать цвет такой же, как и у платформы, которую вы хотите убрать на время, но учтите, если выбрать потом другой цвет, то прошлая платформа вернётся на свое место. Манипулировать платформами может всего лишь один человек, и эта важная роль для прохождений цветовых гонок выдается игроку чисто случайно. Скрины: Коды в луа: -- Russia -- Russia -- By:Cepejjaa#0000 -- Color-racing --26.05.2020 tfm.exec.disablePhysicalConsumables(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoScore(true) for playerName in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(playerName,0x999999) end ------ Старт и помощь ui.addTextArea (50,"<a href='event:help'> Помощь",playerName,730,375,60,20,0x131313,0x212F36,0.6,true) ui.addTextArea (100,"<a href='event:start'> Старт",nil,10,375,50,20,0x131313,0x212F36,0.6,true) eventTextAreaCallback=function(id, playerName, name, a) ------ Рандомная кнопка if name == "start" then ui.addTextArea (0,"Цвет:",p,10,375,50,80,0x131313,0x212F36,0.6,true) ui.addTextArea (1,"",nil,66,375,20,20,0x747474,0x212F36,0.6,true) ui.removeTextArea(100,playerNamer) players = {} for playerName in pairs(tfm.get.room.playerList) do players[#players +1] = playerName end ui.addTextArea (1,"<a href='event:color'> o",players[math.random(#players)],67,375,20,20,0x131313,0x212F36,0.6,true) end if name == "help" then ui.addTextArea (51,"<font size='25' color='#FFFFFF'> Добро пожаловать в цветовые гонки!</font> <font size='12'>Создатель:Cepejjaa#0000. Благодарим Miroslavchik#0000 за найденные баги. <ROSE> Есть вопросы? Есть баги? Есть свои карты? Тогда пишите /c Cepejjaa#0000</ROSE> </font>",playerName,25,40,750,350,0x324650,0x212F36,0.6,true) ui.addTextArea (520,"<a href='event:close'> Закрыть",playerName,370,360,60,20,0x324650,0x212F36,1,true) ui.addTextArea (53,"<a href='event:next'> Дальше",playerName,670,360,60,20,0x324650,0x212F36,1,true) else if name == "next" then ui.addTextArea (510,"<font size='40' color='#FFFF00'> Как играть?</font>",playerName,25,40,750,350,0x324650,0x212F36,0.6,true) ui.addTextArea (511,"<font size='18'>В <ROSE>цветовых</ROSE> гонках, как и в обычных картах нужно взять сыр и зайти в нору. Но на пути постерегают <ROSE>цветовые платформы</ROSE> которые усложняют ваш путь. Для исчезновения одного из <ROSE>платформ</ROSE> достаточно выбрать <ROSE>цвет</ROSE> такой же, как и у <ROSE>платформы</ROSE>, которую вы хотите убрать на время, но учтите, если выбрать потом другой <ROSE>цвет</ROSE>, то прошлая <ROSE>платформа</ROSE> вернётся на свое место. Манипулировать <ROSE>платформами</ROSE> может всего лишь один человек, и эта важная роль для прохождений <ROSE>цветовых</ROSE> гонок выдается игроку чисто случайно.</font>",playerName,25,100,750,350,0x324650,0x212F36,0,true) ui.addTextArea (54,"<a href='event:stop'> Назад",playerName,70,360,60,20,0x324650,0x212F36,1,true) ui.addTextArea (520,"<a href='event:close'> Закрыть",playerName,370,360,60,20,0x324650,0x212F36,1,true) ui.removeTextArea(53,playerName) ui.removeTextArea(51,playerName) else if name == "stop" then ui.addTextArea (51,"<font size='25' color='#FFFFFF'> Добро пожаловать в цветовые гонки!</font> <font size='12'>Создатель:Cepejjaa#0000. Благодарим Miroslavchik#0000 за найденные баги</font>",playerName,25,40,750,350,0x324650,0x212F36,0.6,true) ui.addTextArea (53,"<a href='event:next'> Дальше",playerName,670,360,60,20,0x324650,0x212F36,1,true) ui.addTextArea (520,"<a href='event:close'> Закрыть",playerName,370,360,60,20,0x324650,0x212F36,1,true) ui.removeTextArea(54,playerName) ui.removeTextArea(510,playerName) ui.removeTextArea(511,playerName) else if name == "close" then ui.removeTextArea(51,playerName) ui.removeTextArea(520,playerName) ui.removeTextArea(52,playerName) ui.removeTextArea(53,playerName) ui.removeTextArea(54,playerName) ui.removeTextArea(510,playerName) ui.removeTextArea(511,playerName) end end end end if name == "color" then ui.addTextArea (2,"<a href='event:red'> o",playerName,95,375,20,20,0xFF0000,0xBB0000,0.6,true) ui.addTextArea (3,"<a href='event:yellow'> o",playerName,125,375,20,20,0xFFFF00,0xBBBB00,0.6,true) ui.addTextArea (4,"<a href='event:green'> o",playerName,155,375,20,20,0x00FF00,0x00BB00,0.6,true) ui.addTextArea (5,"<a href='event:blue'> o",playerName,185,375,20,20,0x0000FF,0x0000BB,0.6,true) ui.addTextArea (6,"<a href='event:white'> o",playerName,215,375,20,20,0xFFFFFF,0xBBBBBB,0.6,true) ui.addTextArea (7,"<a href='event:black'> o",playerName,245,375,20,20,0x131313,0x212F36,0.6,true) ui.addTextArea (8,"<a href='event:whiteblue'> o",playerName,275,375,20,20,0x00FFFF,0x00BBBB,0.6,true) ui.addTextArea (9,"<a href='event:whitered'> o",playerName,305,375,20,20,0xFF00FF,0xBB00BB,0.6,true) else if name == "red" then for playerName in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(playerName,0xFF0000) end tfm.exec.addPhysicObject(1,610,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(2,190,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(3,550,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(4,250,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(8,400,175,{ type=12, restitution=0, friction=0, width=185, color=0xBBBB00, height=160, groundCollision=true }) tfm.exec.addPhysicObject(9,400,50,{ type=12, restitution=0, friction=0, width=160, color=0x00BB00, height=55, groundCollision=true }) tfm.exec.addPhysicObject(10,400,330,{ type=12, restitution=0, friction=0, width=180, color=0x0000BB, height=60, groundCollision=true }) tfm.exec.addPhysicObject(11,750,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(12,50,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(13,550,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.addPhysicObject(14,250,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) ui.addTextArea (1,"",nil,66,375,20,20,0xFF0000,0xBB0000,0.6,true) ui.addTextArea (1,"<a href='event:color'> o",playerName,67,375,20,20,0xFF0000,0xBB0000,0.6,true) tfm.exec.removePhysicObject(5) tfm.exec.removePhysicObject(6) tfm.exec.removePhysicObject(7) ui.removeTextArea(2,playerNamer) ui.removeTextArea(3,playerNamer) ui.removeTextArea(4,playerNamer) ui.removeTextArea(5,playerNamer) ui.removeTextArea(6,playerNamer) ui.removeTextArea(7,playerNamer) ui.removeTextArea(8,playerNamer) ui.removeTextArea(9,playerNamer) else if name == "yellow" then for playerName in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(playerName,0xFFFF00) end ui.addTextArea (1,"",nil,66,375,20,20,0xFFFF00,0xBBBB00,0.6,true) ui.addTextArea (1,"<a href='event:color'> o",playerName,67,375,20,20,0xFFFF00,0xBBBB00,0.6,true) tfm.exec.addPhysicObject(1,610,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(2,190,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(3,550,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(4,250,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(5,700,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(6,100,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(9,400,50,{ type=12, restitution=0, friction=0, width=160, color=0x00BB00, height=55, groundCollision=true }) tfm.exec.addPhysicObject(10,400,330,{ type=12, restitution=0, friction=0, width=180, color=0x0000BB, height=60, groundCollision=true }) tfm.exec.addPhysicObject(11,750,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(12,50,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(13,550,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.addPhysicObject(14,250,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.removePhysicObject(8) ui.removeTextArea(2,playerNamer) ui.removeTextArea(3,playerNamer) ui.removeTextArea(4,playerNamer) ui.removeTextArea(5,playerNamer) ui.removeTextArea(6,playerNamer) ui.removeTextArea(7,playerNamer) ui.removeTextArea(8,playerNamer) ui.removeTextArea(9,playerNamer) else if name == "green" then for playerName in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(playerName,0x00FF00) end ui.addTextArea (1,"",nil,66,375,20,20,0x00FF00,0x00BB00,0.6,true) ui.addTextArea (1,"<a href='event:color'> o",playerName,67,375,20,20,0x00FF00,0x00BB00,0.6,true) tfm.exec.removePhysicObject(9) tfm.exec.addPhysicObject(1,610,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(2,190,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(3,550,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(4,250,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(5,700,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(6,100,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(8,400,175,{ type=12, restitution=0, friction=0, width=185, color=0xBBBB00, height=160, groundCollision=true }) tfm.exec.addPhysicObject(10,400,330,{ type=12, restitution=0, friction=0, width=180, color=0x0000BB, height=60, groundCollision=true }) tfm.exec.addPhysicObject(11,750,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(12,50,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(13,550,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.addPhysicObject(14,250,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) ui.removeTextArea(2,playerNamer) ui.removeTextArea(3,playerNamer) ui.removeTextArea(4,playerNamer) ui.removeTextArea(5,playerNamer) ui.removeTextArea(6,playerNamer) ui.removeTextArea(7,playerNamer) ui.removeTextArea(8,playerNamer) ui.removeTextArea(9,playerNamer) else if name == "blue" then for playerName in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(playerName,0x0000FF) end tfm.exec.addPhysicObject(1,610,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(2,190,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(3,550,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(4,250,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(5,700,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(6,100,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(8,400,175,{ type=12, restitution=0, friction=0, width=185, color=0xBBBB00, height=160, groundCollision=true }) tfm.exec.addPhysicObject(9,400,50,{ type=12, restitution=0, friction=0, width=160, color=0x00BB00, height=55, groundCollision=true }) tfm.exec.addPhysicObject(11,750,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(12,50,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(13,550,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.addPhysicObject(14,250,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) ui.addTextArea (1,"",nil,66,375,20,20,0x0000FF,0x0000BB,0.6,true) ui.addTextArea (1,"<a href='event:color'> o",playerName,67,375,20,20,0x0000FF,0x0000BB,0.6,true) tfm.exec.removePhysicObject(10) ui.removeTextArea(2,playerNamer) ui.removeTextArea(3,playerNamer) ui.removeTextArea(4,playerNamer) ui.removeTextArea(5,playerNamer) ui.removeTextArea(6,playerNamer) ui.removeTextArea(7,playerNamer) ui.removeTextArea(8,playerNamer) ui.removeTextArea(9,playerNamer) else if name == "white" then for playerName in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(playerName,0xFFFFFF) end ui.addTextArea (1,"",nil,66,375,20,20,0xFFFFFF,0xBBBBBB,0.6,true) ui.addTextArea (1,"<a href='event:color'> o",playerName,67,375,20,20,0xFFFFFF,0xBBBBBB,0.6,true) tfm.exec.addPhysicObject(3,550,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(4,250,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(5,700,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(6,100,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(8,400,175,{ type=12, restitution=0, friction=0, width=185, color=0xBBBB00, height=160, groundCollision=true }) tfm.exec.addPhysicObject(9,400,50,{ type=12, restitution=0, friction=0, width=160, color=0x00BB00, height=55, groundCollision=true }) tfm.exec.addPhysicObject(10,400,330,{ type=12, restitution=0, friction=0, width=180, color=0x0000BB, height=60, groundCollision=true }) tfm.exec.addPhysicObject(11,750,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(12,50,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(13,550,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.addPhysicObject(14,250,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.removePhysicObject(1) tfm.exec.removePhysicObject(2) ui.removeTextArea(2,playerNamer) ui.removeTextArea(3,playerNamer) ui.removeTextArea(4,playerNamer) ui.removeTextArea(5,playerNamer) ui.removeTextArea(6,playerNamer) ui.removeTextArea(7,playerNamer) ui.removeTextArea(8,playerNamer) ui.removeTextArea(9,playerNamer) else if name == "black" then for playerName in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(playerName,0x000001) end ui.addTextArea (1,"",nil,66,375,20,20,0x131313,0x212F36,0.6,true) ui.addTextArea (1,"<a href='event:color'> o",playerName,67,375,20,20,0x131313,0x212F36,0.6,true) tfm.exec.addPhysicObject(1,610,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(2,190,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(5,700,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(6,100,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(8,400,175,{ type=12, restitution=0, friction=0, width=185, color=0xBBBB00, height=160, groundCollision=true }) tfm.exec.addPhysicObject(9,400,50,{ type=12, restitution=0, friction=0, width=160, color=0x00BB00, height=55, groundCollision=true }) tfm.exec.addPhysicObject(10,400,330,{ type=12, restitution=0, friction=0, width=180, color=0x0000BB, height=60, groundCollision=true }) tfm.exec.addPhysicObject(11,750,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(12,50,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(13,550,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.addPhysicObject(14,250,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.removePhysicObject(3) tfm.exec.removePhysicObject(4) ui.removeTextArea(2,playerNamer) ui.removeTextArea(3,playerNamer) ui.removeTextArea(4,playerNamer) ui.removeTextArea(5,playerNamer) ui.removeTextArea(6,playerNamer) ui.removeTextArea(7,playerNamer) ui.removeTextArea(8,playerNamer) ui.removeTextArea(9,playerNamer) else if name == "whiteblue" then for playerName in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(playerName,0x00FFFF) end ui.addTextArea (1,"",nil,66,375,20,20,0x00FFFF,0x00BBBB,0.6,true) ui.addTextArea (1,"<a href='event:color'> o",playerName,67,375,20,20,0x00FFFF,0x00BBBB,0.6,true) tfm.exec.removePhysicObject(11) tfm.exec.removePhysicObject(12) ui.removeTextArea(2,playerNamer) ui.removeTextArea(3,playerNamer) ui.removeTextArea(4,playerNamer) ui.removeTextArea(5,playerNamer) ui.removeTextArea(6,playerNamer) ui.removeTextArea(7,playerNamer) ui.removeTextArea(8,playerNamer) ui.removeTextArea(9,playerNamer) tfm.exec.addPhysicObject(1,610,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(2,190,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(3,550,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(4,250,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(5,700,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(6,100,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(8,400,175,{ type=12, restitution=0, friction=0, width=185, color=0xBBBB00, height=160, groundCollision=true }) tfm.exec.addPhysicObject(9,400,50,{ type=12, restitution=0, friction=0, width=160, color=0x00BB00, height=55, groundCollision=true }) tfm.exec.addPhysicObject(10,400,330,{ type=12, restitution=0, friction=0, width=180, color=0x0000BB, height=60, groundCollision=true }) tfm.exec.addPhysicObject(13,550,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.addPhysicObject(14,250,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) else if name == "whitered" then for playerName in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(playerName,0xFF00FF) end ui.addTextArea (1,"",nil,66,375,20,20,0xFF00FF,0xBB00BB,0.6,true) ui.addTextArea (1,"<a href='event:color'> o",playerName,67,375,20,20,0xFF00FF,0xBB00BB,0.6,true) tfm.exec.removePhysicObject(13) tfm.exec.removePhysicObject(14) ui.removeTextArea(2,playerNamer) ui.removeTextArea(3,playerNamer) ui.removeTextArea(4,playerNamer) ui.removeTextArea(5,playerNamer) ui.removeTextArea(6,playerNamer) ui.removeTextArea(7,playerNamer) ui.removeTextArea(8,playerNamer) ui.removeTextArea(9,playerNamer) tfm.exec.addPhysicObject(1,610,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(2,190,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(3,550,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(4,250,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(5,700,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(6,100,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(8,400,175,{ type=12, restitution=0, friction=0, width=185, color=0xBBBB00, height=160, groundCollision=true }) tfm.exec.addPhysicObject(9,400,50,{ type=12, restitution=0, friction=0, width=160, color=0x00BB00, height=55, groundCollision=true }) tfm.exec.addPhysicObject(10,400,330,{ type=12, restitution=0, friction=0, width=180, color=0x0000BB, height=60, groundCollision=true }) tfm.exec.addPhysicObject(11,750,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(12,50,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) end end end end end end end end end end mapList = {5696780,5330756,5330762,5330768,5330782,5330869,5330922,7729186} local queueMaps = {} function mapChange() if #queueMaps > 0 then tfm.exec.newGame(queueMaps[1]) queueMaps[1] = nil else tfm.exec.newGame(mapList[math.random(#mapList)]) tfm.exec.addPhysicObject(1,610,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(2,190,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(3,550,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(4,250,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(5,700,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(6,100,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(8,400,175,{ type=12, restitution=0, friction=0, width=185, color=0xBBBB00, height=160, groundCollision=true }) tfm.exec.addPhysicObject(9,400,50,{ type=12, restitution=0, friction=0, width=160, color=0x00BB00, height=55, groundCollision=true }) tfm.exec.addPhysicObject(10,400,330,{ type=12, restitution=0, friction=0, width=180, color=0x0000BB, height=60, groundCollision=true }) tfm.exec.addPhysicObject(11,750,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(12,50,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(13,550,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.addPhysicObject(14,250,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.setUIMapName("Цветовые гонки!") tfm.exec.disableAutoNewGame(true) tfm.exec.disableAfkDeath(false) tfm.exec.disableAutoTimeLeft(false) end end function eventLoop(timeRemaining,timeRemaining) if timeRemaining<=0 then tfm.exec.newGame(mapList[math.random(#mapList)]) tfm.exec.addPhysicObject(1,610,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(2,190,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(3,550,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(4,250,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(5,700,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(6,100,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(8,400,175,{ type=12, restitution=0, friction=0, width=185, color=0xBBBB00, height=160, groundCollision=true }) tfm.exec.addPhysicObject(9,400,50,{ type=12, restitution=0, friction=0, width=160, color=0x00BB00, height=55, groundCollision=true }) tfm.exec.addPhysicObject(10,400,330,{ type=12, restitution=0, friction=0, width=180, color=0x0000BB, height=60, groundCollision=true }) tfm.exec.addPhysicObject(11,750,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(12,50,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(13,550,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.addPhysicObject(14,250,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) ui.addTextArea (100,"<a href='event:start'> Старт",nil,10,375,50,20,0x131313,0x212F36,0.6,true) ui.removeTextArea(0,playerNamer) ui.removeTextArea(1,playerNamer) ui.removeTextArea(2,playerNamer) ui.removeTextArea(3,playerNamer) ui.removeTextArea(4,playerNamer) ui.removeTextArea(5,playerNamer) ui.removeTextArea(6,playerNamer) ui.removeTextArea(7,playerNamer) ui.removeTextArea(8,playerNamer) ui.removeTextArea(9,playerNamer) tfm.exec.setUIMapName("Цветовые гонки!") end end function eventPlayerDied() local i=0 for n,player in pairs(tfm.get.room.playerList) do if not player.isDead then i=i+1 end end if i==0 then tfm.exec.newGame(mapList[math.random(#mapList)]) tfm.exec.addPhysicObject(1,610,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(2,190,327,{ type=12, restitution=0.2, friction=0.3, width=20, color=0xFFFFFF, height=65, groundCollision=true }) tfm.exec.addPhysicObject(3,550,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(4,250,285,{ type=12, restitution=0, friction=0, width=100, color=0x000000, height=20, groundCollision=true }) tfm.exec.addPhysicObject(5,700,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(6,100,175,{ type=12, restitution=0, friction=0, width=100, color=0xBB0000, height=160, groundCollision=true }) tfm.exec.addPhysicObject(8,400,175,{ type=12, restitution=0, friction=0, width=185, color=0xBBBB00, height=160, groundCollision=true }) tfm.exec.addPhysicObject(9,400,50,{ type=12, restitution=0, friction=0, width=160, color=0x00BB00, height=55, groundCollision=true }) tfm.exec.addPhysicObject(10,400,330,{ type=12, restitution=0, friction=0, width=180, color=0x0000BB, height=60, groundCollision=true }) tfm.exec.addPhysicObject(11,750,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(12,50,327,{ type=12, restitution=0, friction=0, width=20, color=0x00BBBB, height=65, groundCollision=true }) tfm.exec.addPhysicObject(13,550,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.addPhysicObject(14,250,75,{ type=12, restitution=0, friction=0, width=40, color=0xBB00BB, height=40, groundCollision=true }) tfm.exec.setUIMapName("Цветовые гонки!") ui.removeTextArea(0,playerNamer) ui.removeTextArea(1,playerNamer) ui.removeTextArea(2,playerNamer) ui.removeTextArea(3,playerNamer) ui.removeTextArea(4,playerNamer) ui.removeTextArea(5,playerNamer) ui.removeTextArea(6,playerNamer) ui.removeTextArea(7,playerNamer) ui.removeTextArea(8,playerNamer) ui.removeTextArea(9,playerNamer) ui.addTextArea (100,"<a href='event:start'> Старт",nil,10,375,50,20,0x131313,0x212F36,0.6,true) end end mapChange() Dernière modification le 1590600240000 |