Advertisement
Fooksie

derby

Aug 4th, 2013
1,400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 35.29 KB | None | 0 0
  1. topmouse="*Souris"
  2. round=0
  3. places=0
  4. players={}
  5. seedmod=4
  6. bombPower=20
  7. bombRadius=100
  8. bombClock=1000
  9. mineBoom=5
  10. mineClock=3000
  11. arrowSpeed=40
  12. pickupCount=3
  13. uiBackground=0x000000
  14. uiBorder=0xFFFFFF
  15. uiAlpha=0.8
  16. imgToken={
  17.     "P9tQW0r.png",
  18.     "EG4lG5p.png",
  19.     "MTtMREM.png",
  20.     "wwkx2qp.png",
  21.     "uZd3sZA.png",
  22.     "YklOFSC.png",
  23.     "M29setX.png"
  24.     }
  25. map={
  26.     code=0,
  27.     tokens={},
  28.     name="Unknown",
  29.     author=topmouse
  30.     }
  31. standardKeys={
  32.     40, --DOWN
  33.     83, --DOWN
  34.     37, --LEFT
  35.     81, --LEFT
  36.     39, --RIGHT
  37.     68  --RIGHT
  38.     }
  39. defaultKeys={
  40.     pickup=69,
  41.     airjump=75,
  42.     bomb=76
  43.     }
  44. defaultPlayer={
  45.     airjumps=0,
  46.     arrows=0,
  47.     bombs=0,
  48.     dashL=0,
  49.     dashR=0,
  50.     rocketjump=math.huge
  51.     }
  52. admins={
  53.     "Fxie",
  54.     "Thewav",
  55.     "Begentle",
  56.     "Shamousey"
  57.     }
  58. maps={
  59.     "@4139085",
  60.     "@4152173",
  61.     "@4174846",
  62.     "@4181712",
  63.     --"@4202354", --http://pastebin.com/6agBEqYJ
  64.     "@4243103",
  65.     "@4258010",
  66.     "@4263120",
  67.     "@4276338",
  68.     "@4276585",
  69.     "@4276587",
  70.     "@4281169"
  71.     }
  72. text={
  73.     _inventory="%s airjumps | %s arrows | %s bombs",
  74.     _inventoryAdv="%s warps | %s pocketbombs | %s mines",
  75.     author="Fxie",
  76.     greet="Welcome to the %s for reckless racing.",
  77.     greetSub="Compete in a PVP race to the finish line! Type %s to learn the controls.",
  78.     greetTest="This is a testing room for derby maps. To load a derby map, type %s",
  79.     roomRandom="This room only plays randomly generated derby maps!",
  80.     roomAdvanced="You are in %shard mode%s. To play in standard mode, toggle shaman hard mode.",
  81.     mgmtJoin="Manager %s just connected.",
  82.     help="Making it in derby",
  83.     helpDash="Double-tap left or right to dash (requires airjump)",
  84.     helpRocketjump="Duck to charge up a rocketjump, then blast off!",
  85.     helpArrows="Click to shoot arrows/pocketbombs!",
  86.     helpAirjump="Press %s to use an airjump/warp!",
  87.     helpBombs="Press %s to drop bombs/mines!",
  88.     helpPickup="Press %s on a token to pick it up!",
  89.     helpControl="Adjusting the keys",
  90.     helpControlInstruct="Click the key to change it",
  91.     helpControlAirjump="Use Airjump",
  92.     helpControlBomb="Use Bombs",
  93.     helpCredits="Making derby possible",
  94.     helpCreditsCoding="Coded by %s",
  95.     helpCreditsTranslation="%s translation by %s",
  96.     tutorialPickup="Press %s on this to pick it up!",
  97.     tutorialUse="You got %s! Press %s to use one!",
  98.     newRace="Race to the finish line!",
  99.     wonRace="%s won the race!",
  100.     wonRound="%s won the round with %d points!",
  101.     respawn="Respawning in %d seconds...",
  102.     pickup="Picked up %s!",
  103.     keySet="Press any key for %s...",
  104.     look={
  105.         _1_9="Hey there foxy lady -.^",
  106.         _2_4="What a schick tophat, Moe!",
  107.         _2_10="You're looking pretty artsy *-*",
  108.         _4_1="That's a freakin' cute bow you're wearing :3",
  109.         _5_2="Hey there farmer!"
  110.         }
  111.     }
  112. --[[text.BR={
  113.     author="Maxxzinnn",
  114.     greet="Bem-vindo a %s para uma corrida ousada.",
  115.     greetSub="Compita em uma corrida PVP até a linha de chegada! Pressione %s para aprender os controles.",
  116.     mgmtJoin="Administrador %s acabou de se conectar.",
  117.     help="Aprendendo a jogar derby",
  118.     helpDash="Aperte duas vezes para a esquerda ou direita para se impulsionar para frente (é necessário ter o pulo aéreo)",
  119.     helpRocketjump="Abaixe por pelo menos 1 segundo para poder ser lançado para cima (segure por mais tempo para voar mais alto), então solte! Você irá ser lançado para cima.",
  120.     helpAirjump="Pressione %s para ativar o segundo pulo no ar (Se disponível)",
  121.     helpArrows="Pressione %s para atirar setas para trás e %s para atirar para frente",
  122.     helpBombs="Pressione %s para lançar uma bomba",
  123.     helpPickup="Pressione %s em um token de poder para pega-lo",
  124.     helpEtc="Confira também... ",
  125.     helpTokens="Tokens de poder",
  126.     helpTokensGeneral="Existem 3 tipos de tokens de poder: Pulo aéreo, seta, e tokens bomba.",
  127.     helpTokensHave="Você pode pegar os tokens de poder pressionando %s neles, mas você só pode pegar cada token de poder uma vez por vida (é restaurado para o normal quando você morre ou quando começa um novo jogo)",
  128.     helpControl="Ajustando as teclas",
  129.     helpControlSet="Digite %s para alterar os controles",
  130.     helpControlGet="Digite %s para ter suas configuações, e %s para carrega-los (mais rápido do que altera-los de novo)",
  131.     helpControlReset="Digite %s para restaurar os controles para o padrão (eles restauram a cada vez que você sai da sala)",
  132.     newRace="Corra até a linha de chegada!",
  133.     wonRace="%s venceu a corrida!",
  134.     wonRound="%s venceu a partida com %d pontos!",
  135.     respawn="Revivendo em %d segundos...",
  136.     pickup="Você coletou %s!",
  137.     pickupAdd="Agora você tem %s.",
  138.     pickupHave="Você já tem este!",
  139.     keySet="Pressione uma tecla por %s...",
  140.     keySetInvalid="Copie os dados do %s para alterar os controles da sua configuração atual!",
  141.     keySuccess="Controles configurados!",
  142.     keyReset="Mudando controles para o padrão"
  143.     }
  144. text.ES={
  145.     author="Bogkitty",
  146.     greet="Bienvenido al %s.",
  147.     greetSub="¡Compite en una carrera PVP hasta la línea de meta! Escribe %s para aprender los controles.",
  148.     mgmtJoin="El mánager %s se ha conectado.",
  149.     help="Cómo jugar derby",
  150.     helpDash="Presiona dos veces izquiera o derecha para impulsarte (requiere salto en el aire)",
  151.     helpRocketjump="¡Salta como un cohete agachándote durante al menos 1 segundo (más tiempo para mayor poder), luego liberalo! Serás tirado hacia abajo y rebotarás en el suelo.",
  152.     helpAirjump="Presiona %s para activar un segundo salto en el aire (si está disponible)",
  153.     helpArrows="Presiona %s para disparar flechas detrás de ti y %s para disparar delante",
  154.     helpBombs="Presiona %s para poner bombas",
  155.     helpPickup="Presiona %s en una ficha de power-up para obtenerla",
  156.     helpEtc="También echa un vistazo... ",
  157.     helpTokens="Fichas de power-ups",
  158.     helpTokensGeneral="Hay 3 tipos de fantásticas fichas de power-up en derby: salto en el aire, flechas y fichas de bomba.",
  159.     helpTokensHave="Puedes recoger las fichas presionando %s sobre ellas, sin embargo, sólo puedes recoger una ficha por vida (se reinicia cuando mueres o un nuevo juego comienza)",
  160.     helpControl="Ajustando las flechas",
  161.     helpControlSet="Escribe %s para cambiar los controles",
  162.     helpControlGet="Escribe %s para acceder a tu ajuste de teclado, y %s para cargarlos (más rápido que ajustándolos otra vez)",
  163.     helpControlReset="Escribe %s para reiniciar los controles a su predeterminado (también se reinician cada vez que dejas la sala)",
  164.     newRace="¡Compite hasta la línea de meta!",
  165.     wonRace="%s ganó la carrera!",
  166.     wonRound="%s ganó la ronda con %d puntos!",
  167.     respawn="Reviviendo en %d segundos...",
  168.     pickup="¡Has recogido %s!",
  169.     pickupAdd="Ahora tienes %s.",
  170.     pickupHave="¡Ya tienes eso!",
  171.     keySet="Presiona una tecla para %s...",
  172.     keySetInvalid="¡Copia los datos de %s para establecer la configuración de tus teclas actual!",
  173.     keySuccess="¡Teclado establecido!",
  174.     keyReset="Configuración de las teclas reiniciada al predeterminado",
  175.     look={
  176.         _1_9="¿Qué tal, señorita? -.^",
  177.         _2_4="¡Qué sombrero de copa tan elegante, Moe!",
  178.         _2_10="Te ves muy artístico *-*",
  179.         _4_1="Es un lazo muy bonito el que llevas puesto :3",
  180.         _5_2="¡Hola granjero!"
  181.         }
  182.     }
  183. text.FR={
  184.     author="Thewav",
  185.     greet="Bienvenue au salon %s pour faire des courses dégantées.",
  186.     greetTest="Ceci est un salon de test pour le mini-jeu derby. Pour charger une map pour le mini-jeu, tape %s",
  187.     greetSub="Élimine t'es adversaires pour finir premier! Pour connaitre les touches tape %s .",
  188.     mgmtJoin="Le manager %s vient de se connecter.",
  189.     help="Ce qui en fait une course folle",
  190.     helpDash="Appuie deux fois sur la flèche de gauche ou de droite pour avoir un bonus de vitesse (utilise 1 airjump)",
  191.     helpRocketjump="Accroupie toi puis releve toi pour faire un RocketJump",
  192.     helpAirjump="Appuie sur %s  pour pouvoir sauter une deuxième fois pendant que tu es dans les airs (utilise 1 airjump)",
  193.     helpArrows="Appuie sur %s pour envoyer des flèches derrière toi ou %s pour en envoyer devant",
  194.     helpBombs="Appuie sur %s faire exploser une bombe",
  195.     helpPickup="Appuie sur %s pour prendre un jeton bonus",
  196.     helpEtc="Pour en savoir plus... ",
  197.     helpTokens="Les jetons bonus",
  198.     helpTokensGeneral="Il y a trois type de jeton bonus: airjump, flèche (arrow), et bombe (bomb).",
  199.     helpTokensHave="Tu peux prendre un jeton bonus en appuyant sur %s quand tu es dessus, tu peus prendre un jetons bonus qu'une seul fois par vie.",
  200.     helpControl="Assignation des touches",
  201.     helpControlSet="Appuie sur %s pour changer les touches par défaut",
  202.     helpControlGet="Appuie sur %s pour connaitre les touches assignées, et %s pour les chargées.",
  203.     helpControlReset="Appuie sur %s pour revenir au paramètres par défaut (Ils sont aussi remis par défaut quand tu quittes le salon.)",
  204.     newRace="Cours jusqu'à la ligne d'arrivée",
  205.     wonRace="%s a gagné la course!",
  206.     wonRound="%s a gagné la partie avec %d points!",
  207.     respawn="Résurrection dans %d secondes...",
  208.     pickup="Tu as ramassé %s!",
  209.     pickupAdd="Tu as maintenant %s.",
  210.     pickupHave="Tu as déjà pris ceci!",
  211.     keySet="Appuie sur la touche %s pour ...",
  212.     keySetInvalid="Coppie %s to set keys from your current settings!",
  213.     keySuccess="Touches assignées!",
  214.     keyReset="Paramètres remis par defaut "
  215.     }
  216. text.NL={
  217.     author="Jordynl, Faranys",
  218.     greet="Welkom in de %s voor roekeloos racen.",
  219.     greetSub="Doe mee in een PVP race tot aan de finish! Typ %s om de bediening te leren.",
  220.     greetTest="Dit is een testkamer voor derby maps. Om een derbymap te laden, type %s",
  221.     mgmtJoin="Manager %s heeft zonet verbonden.",
  222.     help="Hoe het werkt in Derby",
  223.     helpDash="Druk dubbel op links of rechts om te vliegen (vereist luchtsprong)",
  224.     helpRocketjump="Raketspring door ingeduwt te houden, dan los te laten!",
  225.     helpAirjump="Druk op %s om een tweede sprong in de lucht te activeren (indien beschikbaar)",
  226.     helpArrows="Druk op %s om pijlen achter je te schieten en op %s om vooruit te schieten",
  227.     helpBombs="Druk op %s om bommen te platsen",
  228.     helpPickup="Druk op %s op een power-up teken om het te krijgen",
  229.     helpEtc="Bekijk ook... ",
  230.     helpTokens="Power-up Tekens",
  231.     helpTokensGeneral="Er zijn 3 types awesome power-up tekens te vinden in derby: luchtsprong, pijl, en bom tekens.",
  232.     helpTokensHave="Je kan tekens oprapen door op %s te klikken op ze, je kan echter maar één teken oprapen per leven (reset wanneer je sterft of een nieuw spel begint)",
  233.     helpControl="De toetsen veranderen",
  234.     helpControlSet="Typ %s om de bediening te veranderen",
  235.     helpControlGet="Typ %s om je toetseninstelling te krijgen, en %s om ze te laden (sneller dan ze opnieuw in te stellen)",
  236.     helpControlReset="Typ %s om de bediening te resetten naar hun origineel (ze resetten ook als je de kamer verlaat)",
  237.     helpCredits="Maak derby mogelijk",
  238.     helpCreditsCoding="Geprogrammeerd door %s",
  239.     helpCreditsTranslation="%s vertaling door %s",
  240.     newRace="Race naar de finish!",
  241.     wonRace="%s heeft de race gewonnen!",
  242.     wonRound="%s heeft de ronde gewonnen met %d punten!",
  243.     respawn="Herspawnen in %d seconden...",
  244.     pickup="%s opgeraapt!",
  245.     pickupAdd="Je hebt nu %s.",
  246.     pickupHave="Je hebt dat al!",
  247.     keySet="Druk een toets om %s...",
  248.     keySetInvalid="Kopieer de data %s om de toetsen in te stellen van je huidige instelling!",
  249.     keySuccess="Toetseninstelling!",
  250.     keyReset="Toetseninstelling terug naar origineel",
  251.     getKeys="Toetseninstelling: %s",
  252.     getMaps="Maps (%d totaal): %s",
  253.     look={
  254.         _1_9="Hey daar sexy dame -.^",
  255.         _2_4="What a schick tophat, Moe!",
  256.         _2_10="Jij ziet er kunstig uit *-*",
  257.         _4_1="Das een serieus schattige boog dat je draagt :3",
  258.         _5_2="Hey daar boer!"
  259.         }
  260.     }
  261. text.TR={
  262.     author="Ediz",
  263.     greet="%s'ye, pervasız yarışa hoşgeldiniz.",
  264.     greetSub="PVP yarışında bitiş çizgisine kadar yarışın! Kontrolleri öğrenmek için %s yazın",
  265.     mgmtJoin="Menajer %s giriş yaptı.",
  266.     help="Derby'i oynamak",
  267.     helpDash= "Hızlanmak için sola ya da sağa basın (havada zıplama jetonu gerektirir)",
  268.     helpRocketjump="Roket zıplama için eğilme tuşuna basılı tutun, sonra bırakın!",
  269.     helpAirjump="İkinci zıplamayı aktif etmek için %s tuşuna basın (jetonunuz varsa)",
  270.     helpArrows="Arkanıza ok fırlatmak için %s, önünüze fırlatmak için %s tuşuna basın",
  271.     helpBombs="Bomba koymak için %s tuşuna basın",
  272.     helpPickup="Bir özellik almak için bir jetonun üstüne gelip %s tuşuna basın",
  273.     helpEtc="Aynı zamanda bunlara bakın...",
  274.     helpTokens="Özel Güç Jetonları",
  275.     helpTokensGeneral="3 farklı özel güç jetonları vardır: havada zıplama, ok ve bomba jetonları.",
  276.     helpTokensHave="Bir jetonun üstünde durduğunuzda o jetonu %s tuşuyla alabilirsiniz, fakat her jeton her yaşam için bir kere alınabilir.(öldüğünüz zaman ya da yeni oyun başladığı zaman yeniden alabilirsiniz)",
  277.     helpControl="Tuşları ayarlamak",
  278.     helpControlSet="Kontrolleri değiştirmek için %s yazın.",
  279.     helpControlGet="Şu anki kontrollerinizi öğrenmek için %s, açmak için %s yazın. (Kontrolleri tekrar yazmaktan daha hızlı)",
  280.     helpControlReset="Kontrolleri orjinal haline getirmek için %s yazın. (Ayrıca odadan çıktığınız her zaman orjinal haline döner)",
  281.     tutorialPickup="Bunu almak için %s tuşuna basın!",
  282.     tutorialUse="%s aldınız! Bir tane kullanmak için %s tuşuna basın!",
  283.     newRace="Bitiş çizgisine yarışın!",
  284.     wonRace="%s yarışı kazandı!",
  285.     wonRound="%s turu %d puanla kazandı!",
  286.     respawn="%d saniye içinde yeniden doğacaksınız...",
  287.     pickup="%s aldınız!",
  288.     pickupAdd="Artık %s sahipsiniz.",
  289.     pickupHave="Zaten bunu aldınız!",
  290.     keySet="%s için bir tuşa basın...",
  291.     keySetInvalid="%s 'daki veriyi kopyalayıp şu anki ayarlara ekleyin!",
  292.     keySuccess="Tuşlar kaydedildi!",
  293.     keyReset="Tuşlar orjinal hallerine döndürüldü"
  294.     }]]--
  295.  
  296. --Lua fundamentals
  297. function table.random(table)
  298.     return table[math.random(#table)]
  299.     end
  300.  
  301. --I can't believe they still don't have this
  302. function ui.addTAStyle(id, text, player, x, y, width, height)
  303.     local filler=width and height and "" or text
  304.     ui.addTextArea(id+2, filler, player, x, y, width, height, 0x6a8fa2, 0x6a8fa2, 1, true)
  305.     ui.addTextArea(id+1, filler, player, x, y+2, width, height, 0x000001, 0x000001, 1, true)
  306.     ui.addTextArea(id, text, player, x, y+1, width, height, 0x324650, 0x324650, 1, true)
  307.     end
  308. function ui.removeTAStyle(id, player)
  309.     ui.removeTextArea(id+2, player)
  310.     ui.removeTextArea(id+1, player)
  311.     ui.removeTextArea(id, player)
  312.     end
  313.  
  314. --Sign my ass
  315. function isAdmin(name)
  316.     for i=1, #admins do
  317.         if admins[i]==name then
  318.             return true
  319.             end
  320.         end
  321.     end
  322.  
  323. --Set dem mice
  324. function setPlayer(name)
  325.     for prop, value in pairs(defaultPlayer) do
  326.         players[name][prop]=value
  327.         end
  328.     updateInv(name)
  329.     end
  330.  
  331. --Set dem tuts
  332. function setTutorial(name)
  333.     local tutToken={x=math.huge}
  334.     local player=players[name]
  335.     for i, token in ipairs(map.tokens) do
  336.         if token.x<tutToken.x and not player.tokens[i] then
  337.             tutToken=token
  338.             end
  339.         end
  340.     if tutToken.type then
  341.         player.tutorial=tutToken
  342.         ui.addTextArea(-1, text.tutorialPickup:format("<J>E<N>"), name, math.max(tutToken.x-100, 20), tutToken.y>100 and tutToken.y-60 or tutToken.y+40, 200, nil, uiBackground, uiBorder, uiAlpha)
  343.         end
  344.     end
  345.  
  346. --Set dem keys
  347. function setKeys(name, keys)
  348.     local player=players[name]
  349.     for control, key in pairs(player.keys) do
  350.         tfm.exec.bindKeyboard(name, key, true, false)
  351.         end
  352.     for control, key in pairs(keys) do
  353.         player.keys[control]=key
  354.         tfm.exec.bindKeyboard(name, key, true, true)
  355.         end
  356.     for i, key in ipairs(standardKeys) do
  357.         tfm.exec.bindKeyboard(name, key, true, true)
  358.         end
  359.     for i, key in ipairs({40, 83}) do
  360.         tfm.exec.bindKeyboard(name, key, false, true)
  361.         end
  362.     end
  363.  
  364. --Mice accessories
  365. function getLook(name)
  366.     local look=tfm.get.room.playerList[name].look
  367.     local items={look:match("%d+")}
  368.     for item in look:match(";(.+)"):gmatch("[^, ]+") do
  369.         table.insert(items, tonumber(item:match("%d+")) or 0)
  370.         end
  371.     return items
  372.     end
  373.  
  374. --Token "art"
  375. function drawToken(id, name, got)
  376.     local token=map.tokens[id]
  377.     if token then
  378.         if players[name].tokenImgs[id] then
  379.             tfm.exec.removeImage(players[name].tokenImgs[id])
  380.             end
  381.         if got==true then
  382.             players[name].tokenImgs[id]=tfm.exec.addImage(imgToken[7], "_50", token.x-18, token.y-18, name)
  383.             --ui.addTextArea(id*2, " ", name, token.x-10, token.y-10, 20, 20, 0x080808, 0x000000, 0.25)
  384.         elseif players[name].advanced then
  385.             players[name].tokenImgs[id]=tfm.exec.addImage(imgToken[token.type+3], "_50", token.x-18, token.y-18, name)
  386.             --[[
  387.             ui.addTextArea(id*2, "<font size='30'><b>"..({"w", "*", "."})[token.type].."</b></font>", name, token.x-15, token.y-15, 30, 30, 0x000000, 0xFFFFFF, 0.5)
  388.             if got~=false then
  389.                 ui.addTextArea(id*2+1, ({"Warp", "Pocketbomb", "Mine"})[token.type], name, token.x-20, token.y-35, nil, nil, nil, nil, 0)
  390.                 end
  391.             --]]--
  392.         else
  393.             players[name].tokenImgs[id]=tfm.exec.addImage(imgToken[token.type], "_50", token.x-18, token.y-18, name)
  394.             --[[
  395.             ui.addTextArea(id*2, "<font size='30'><b>"..({"^", "=", "O"})[token.type].."</b></font>", name, token.x-15, token.y-15, 30, 30, 0x000000, 0xFFFFFF, 0.5)
  396.             if got~=false then
  397.                 ui.addTextArea(id*2+1, ({"Airjump", "Arrow", "Bomb"})[token.type], name, token.x-20, token.y-35, nil, nil, nil, nil, 0)
  398.                 end
  399.             --]]--
  400.             end
  401.         end
  402.     end
  403.  
  404. --Inventory check
  405. function updateInv(name)
  406.     local player=players[name]
  407.     local text=(player.advanced and text._inventoryAdv or text._inventory):format(
  408.         "<J><b>"..player.airjumps.."</b><N>",
  409.         "<J><b>"..player.arrows.."</b><N>",
  410.         "<J><b>"..player.bombs.."</b><N>")
  411.     ui.updateTextArea(232, text, name)
  412.     ui.updateTextArea(231, text, name)
  413.     ui.updateTextArea(230, text, name)
  414.     end
  415.  
  416. --Experimental P0 maps
  417. function generateMap(seed)
  418.     seed=tonumber(seed) or os.time()
  419.     map.seed=seed
  420.     math.randomseed(seed)
  421.     local setSpawn, setCheese, setHole=false, false, false
  422.     local ground, gfloat
  423.     local gprev={X=0, Y=0, H=400, L=0}
  424.     local grounds, micestuff, objects={}, {}, {}
  425.     function XML(tag, object)
  426.         tag="<"..tag.." "
  427.         for prop, val in pairs(object) do
  428.             tag=tag..prop..'="'..val..'" '
  429.             end
  430.         return tag.."/>"
  431.         end
  432.     function makeGround(ground)
  433.         table.insert(grounds, XML("S", ground))
  434.         if ground.T==6 and ground.L>40 then
  435.             table.insert(micestuff, XML("P", {
  436.                 P=math.random()<0.5 and "0, 0" or "0, 1",
  437.                 X=ground.X+math.random(30-ground.L/2, ground.L/2-30),
  438.                 Y=ground.Y-ground.H/2,
  439.                 T=table.random({0, 1, 2, 3, 5, 11, 12})
  440.                 }))
  441.             end
  442.         if not setSpawn and ground.X<400 and math.random()<0.75 then
  443.             setSpawn=true
  444.             ground.item=true
  445.             table.insert(micestuff, 1, XML("T", {
  446.                 X=ground.X,
  447.                 Y=ground.Y-ground.H/2
  448.                 }))
  449.         elseif not setCheese and ground.X>2400 and math.random()<ground.X/3200 then
  450.             setCheese=true
  451.             ground.item=true
  452.             table.insert(micestuff, 2, XML("F", {
  453.                 X=ground.X,
  454.                 Y=ground.Y-ground.H/2-10
  455.                 }))
  456.         elseif not setHole and ground.X>1600 and math.random()<ground.X/3200 then
  457.             setHole=true
  458.             ground.item=true
  459.             table.insert(micestuff, 3, XML("T", {
  460.                 X=ground.X,
  461.                 Y=ground.Y-ground.H/2
  462.                 }))
  463.         elseif math.random()<0.25+ground.L/400 then
  464.             ground.item=true
  465.             table.insert(objects, XML("O", {
  466.                 X=ground.X,
  467.                 Y=ground.Y-ground.H/2-20,
  468.                 C=table.random({14, 22, 11})
  469.                 }))
  470.             end
  471.         end
  472.     while gprev.X+gprev.L/2<3200 do
  473.         ground={
  474.             T=6,
  475.             X=gprev.X+gprev.L/2,
  476.             L=math.random(2, 6)*40,
  477.             H=math.random()<0.5 and 40 or math.random(6)*40
  478.             }
  479.         if ground.X+ground.L>3200 then
  480.             ground.L=3200-ground.X
  481.             end
  482.         ground.X=ground.X+ground.L/2
  483.         ground.Y=400-ground.H/2
  484.         if math.random()<0.75 or ground.X+ground.L/2==3200 then
  485.             makeGround(ground)
  486.             if ground.H>gprev.H and gprev.L>80 or gprev.item==nil then
  487.                 for y=40, ground.H-gprev.H, 40 do
  488.                     table.insert(objects, XML("O", {
  489.                         X=ground.X-ground.L/2-20,
  490.                         Y=ground.Y-ground.H/2-20+y,
  491.                         C=15
  492.                         }))
  493.                     end
  494.                 end
  495.         else
  496.             ground.H=0
  497.             end
  498.         gprev=ground
  499.         if ground.H<200 and gprev.H<200 and ground.H==0 or math.random()<0.25 then
  500.             gfloat={
  501.                 T=6,
  502.                 X=gprev.X-gprev.L/2,
  503.                 Y=math.random(2, 4)*40+20,
  504.                 L=math.random(2, 4)*40,
  505.                 H=40
  506.                 }
  507.             gfloat.X=gfloat.X+gfloat.L/2
  508.             gfloat.X=gfloat.X-gfloat.X%40-(gfloat.L%80)/2
  509.             while gfloat.X-gfloat.L/2<0 do
  510.                 gfloat.X=gfloat.X+40
  511.                 end
  512.             if gfloat.X+gfloat.L/2<=ground.X+ground.L/2 then
  513.                 makeGround(gfloat)
  514.                 end
  515.             end
  516.         end
  517.     while not setSpawn do
  518.         makeGround({
  519.             T=6,
  520.             X=60,
  521.             Y=100,
  522.             L=120,
  523.             H=40
  524.             })
  525.         end
  526.     return table.concat({
  527.         '<C><P title="',
  528.         table.random({"La Plaine", "Terres lointaines", "La Prairie"}),
  529.         '" F="',
  530.         table.random({0, 1, 2, 7}),
  531.         '" defilante="-1,-1,-1,1" L="3200" /><Z><S>',
  532.         '<S X="400" N="" Y="5" T="12" H="10" P="0, 0, 0, 0, 0, 0, 0, 0" L="2400" o="324650" />',
  533.         '<S X="2800" N="" Y="5" T="12" H="10" P="0, 0, 0, 0, 0, 0, 0, 0" L="2400" o="324650" />',
  534.         table.concat(grounds),
  535.         '</S><D>',
  536.         table.concat(micestuff),
  537.         '</D><O>',
  538.         table.concat(objects),
  539.         '</O></Z></C>'
  540.         })
  541.     end
  542.  
  543. --New beginnings
  544. function eventNewGame()
  545.     places=0
  546.     ui.removeTextArea(-1)
  547.     tfm.exec.setGameTime(120)
  548.     tfm.exec.setNameColor(topmouse, 0xFFFF00)
  549.     tfm.exec.chatMessage("<J>"..text.newRace)
  550.     if tfm.get.room.xmlMapInfo then
  551.         map.name=tfm.get.room.xmlMapInfo.xml:match('<P[^/]+title="([^"]+)"') or "Unknown"
  552.         map.author=tfm.get.room.xmlMapInfo.author or "Tigrounette"
  553.         local type, token
  554.         for object in tfm.get.room.xmlMapInfo.xml:gmatch("<O [^/]+/>") do
  555.             type=tonumber(object:match('C="(%d+)"'))
  556.             if type==14 or type==22 or type==11 then
  557.                 table.insert(map.tokens, {
  558.                     x=tonumber(object:match('X="(%d+)"')) or 0,
  559.                     y=tonumber(object:match('Y="(%d+)"')) or 0,
  560.                     type=type==14 and 1 or type==22 and 2 or 3
  561.                     })
  562.                 end
  563.             end
  564.         end
  565.     tfm.exec.setUIMapName("<J>"..map.name)
  566.     tfm.exec.setUIShamanName("<J>"..topmouse.."<N> Top mouse! ")
  567.     for name, player in pairs(tfm.get.room.playerList) do
  568.         setPlayer(name)
  569.         players[name].tokenImgs={}
  570.         eventPlayerRespawn(name)
  571.         updateInv(name)
  572.         end
  573.     end
  574.  
  575. --A continuum
  576. function eventLoop(time, remaining, queue, seed)
  577.     if remaining>30000 and places>0 then
  578.         tfm.exec.setGameTime(30)
  579.     elseif remaining>500 then
  580.         local timestamp=os.time()
  581.         for name, player in pairs(players) do
  582.             if timestamp-player.rocketjump>400 and timestamp-player.rocketjump<2000 then
  583.                 local p=tfm.get.room.playerList[name]
  584.                 tfm.exec.displayParticle(29, p.x, p.y, 0, -2, 0, 0.1)
  585.                 end
  586.             end
  587.     else
  588.         round=round+1
  589.         if round%12==0 then
  590.             local topscore=0
  591.             tfm.exec.setNameColor(topmouse, 0)
  592.             for name, player in pairs(tfm.get.room.playerList) do
  593.                 tfm.exec.setNameColor(name, 0)
  594.                 tfm.exec.setPlayerScore(name, 0)
  595.                 if player.score>topscore then
  596.                     topscore=player.score
  597.                     topmouse=name
  598.                     end
  599.                 end
  600.             tfm.exec.chatMessage("<ROSE>"..text.wonRound:format(topmouse, topscore))
  601.             end
  602.         for i=1, #map.tokens*2+1 do
  603.             ui.removeTextArea(i)
  604.             end
  605.         map.seed=nil
  606.         map.tokens={}
  607.         if round%#maps==1 then
  608.             table.sort(maps, function() return math.random()>.5 end)
  609.             end
  610.         if queue then
  611.             if seed then
  612.                 map.code=generateMap(queue)
  613.             else
  614.                 map.code=queue
  615.                 end
  616.         elseif round%seedmod==0 then
  617.             map.code=generateMap()
  618.         else
  619.             map.code=maps[round%#maps+1]
  620.             end
  621.         tfm.exec.setGameTime(5)
  622.         tfm.exec.newGame(map.code)
  623.         end
  624.     end
  625.  
  626. --Click on sh*t
  627. function eventTextAreaCallback(id, name, callback)
  628.     if callback=="help" then
  629.         eventChatCommand(name, callback)
  630.     elseif callback=="controls" then
  631.         eventChatCommand(name, "help controls")
  632.     elseif callback=="set_airjump" or callback=="set_bomb" then
  633.         callback=callback=="set_airjump" and "airjump" or "bomb"
  634.         tfm.exec.chatMessage(text.keySet:format(callback), name)
  635.         players[name].keyset=callback
  636.         for key=48, 57 do
  637.             tfm.exec.bindKeyboard(name, key, true, true)
  638.             end
  639.         for key=65, 90 do
  640.             tfm.exec.bindKeyboard(name, key, true, true)
  641.             end
  642.     elseif callback=="credits" then
  643.         eventChatCommand(name, callback)
  644.     elseif callback=="close" then
  645.         ui.removeTAStyle(110)
  646.         ui.removeTAStyle(120)
  647.         ui.removeTAStyle(130)
  648.         ui.removeTAStyle(140)
  649.         ui.removeTAStyle(150)
  650.         ui.removeTextArea(160)
  651.         ui.removeTextArea(170)
  652.         end
  653.     end
  654.  
  655. --Welcome to the jungle
  656. function eventNewPlayer(name)
  657.     ui.addTAStyle(210, "<a href='event:help'> <font size='12'>?</font></a>", nil, 8, 30, 18, 18)
  658.     ui.addTAStyle(220, "<a href='event:controls'> <font size='12'>c</font></a>", nil, 40, 30, 18, 18)
  659.     ui.addTAStyle(230, "", nil, 72, 30, nil, 18)
  660.     tfm.exec.chatMessage("<VP>"..text.greet:format("<N>derby<VP>"), name)
  661.     tfm.exec.chatMessage("<T>"..text.greetSub:format("<N><b>!help</b><T>"), name)
  662.     if roomtype.random then
  663.         tfm.exec.chatMessage("<J>"..text.roomRandom, name)
  664.         end
  665.     if roomtype.advanced or tfm.get.room.playerList[name].inHardMode then
  666.         tfm.exec.chatMessage("<J>"..text.roomAdvanced:format("<b>", "</b>"), name)
  667.         end
  668.     for i, piece in ipairs(getLook(name)) do
  669.         if text.look["_"..i.."_"..piece] then
  670.             tfm.exec.chatMessage("<J>"..text.look["_"..i.."_"..piece], name)
  671.             break
  672.             end
  673.         end
  674.     if isAdmin(name) then
  675.         tfm.exec.chatMessage("<V>"..text.mgmtJoin:format(name))
  676.         end
  677.     players[name]={
  678.         keys={},
  679.         tokens={},
  680.         tokenImgs={}
  681.         }
  682.     setPlayer(name)
  683.     eventPlayerDied(name)
  684.     for i, token in ipairs(map.tokens) do
  685.         drawToken(i, name)
  686.         end
  687.     setTutorial(name)
  688.     system.bindMouse(name)
  689.     setKeys(name, defaultKeys)
  690.     end
  691.  
  692. --Rest with Elisah
  693. function eventPlayerDied(name)
  694.     setPlayer(name)
  695.     tfm.exec.chatMessage(text.respawn:format(3), name)
  696.     if tfm.get.room.playerList[name].score>0 then
  697.         tfm.exec.setPlayerScore(name, -1, true)
  698.         end
  699.     system.newTimer(function()
  700.         tfm.exec.respawnPlayer(name)
  701.         if name==topmouse then
  702.             tfm.exec.setNameColor(name, 0xFFFF00)
  703.             end
  704.         end, 3000)
  705.     end
  706.  
  707. --Welcome back
  708. function eventPlayerRespawn(name)
  709.     local player=players[name]
  710.     player.advanced=roomtype.advanced or tfm.get.room.playerList[name].inHardMode
  711.     for i, token in ipairs(map.tokens) do
  712.         drawToken(i, name, true)
  713.         drawToken(i, name, false)
  714.         end
  715.     player.tokens={}
  716.     if topmouse==name then
  717.         tfm.exec.addImage("5m7Rzyq.png", "$"..name, -15, -45, nil)
  718.         end
  719.     end
  720.  
  721. --Good job
  722. function eventPlayerWon(name)
  723.     setPlayer(name)
  724.     places=places+1
  725.     tfm.exec.setPlayerScore(name, math.max(1, 5-places)*5, true)
  726.     if places==1 then
  727.         tfm.exec.chatMessage("<J>"..text.wonRace:format(name))
  728.         end
  729.     end
  730.  
  731. --Arrowrider 2.0
  732. function eventMouse(name, x, y)
  733.     local player=players[name]
  734.     if player.arrows>0 then
  735.         player.arrows=player.arrows-1
  736.         updateInv(name)
  737.         if player.advanced then
  738.             tfm.exec.addShamanObject(24, x, y)
  739.         else
  740.             player=tfm.get.room.playerList[name]
  741.             local angle=math.atan2(y-player.y, x-player.x)
  742.             tfm.exec.addShamanObject(35, player.x, player.y-20, math.deg(angle), math.cos(angle)*arrowSpeed, math.sin(angle)*arrowSpeed)
  743.             end
  744.         end
  745.     end
  746.  
  747. --The things newbs don't learn in !help
  748. function eventKeyboard(name, key, down, x, y)
  749.     local player=players[name]
  750.     if player.tutorial==key then
  751.         ui.removeTextArea(-1, name)
  752.         end
  753.     if not player.keyset then
  754.         local timestamp=os.time()
  755.         if key==83 or key==40 then
  756.             if down then
  757.                 player.rocketjump=timestamp
  758.             else
  759.                 if timestamp-player.rocketjump>500 then
  760.                     tfm.exec.movePlayer(name, nil, nil, nil, nil, math.min(timestamp-player.rocketjump+250, 1500)/2, false)
  761.                     tfm.exec.displayParticle(3, x, y, -2, 0, 0.1, 0)
  762.                     tfm.exec.displayParticle(3, x, y, -2, 1, 0, 0)
  763.                     tfm.exec.displayParticle(3, x, y, 2, 0, -0.1, 0)
  764.                     tfm.exec.displayParticle(3, x, y, 2, 1, 0, 0)
  765.                     tfm.exec.displayParticle(4, x, y, 0, 0, 0, 0)
  766.                     end
  767.                 player.rocketjump=math.huge
  768.                 end
  769.         elseif key==81 or key==37 then
  770.             player.dashR=0
  771.             if timestamp-player.dashL<200 and player.airjumps>0 then
  772.                 player.airjumps=player.airjumps-1
  773.                 updateInv(name)
  774.                 if player.advanced then
  775.                     tfm.exec.movePlayer(name, -90, 0, true)
  776.                     tfm.exec.displayParticle(36, x-60, y, 0, 0, 0, 0)
  777.                 else
  778.                     tfm.exec.movePlayer(name, nil, nil, nil, -40, nil, true)
  779.                     tfm.exec.displayParticle(27, x, y, 0, 0, 0, 0)
  780.                     tfm.exec.displayParticle(35, x, y, 20, 0, 0, 0)
  781.                     end
  782.             else
  783.                 player.dashL=timestamp
  784.                 end
  785.         elseif key==68 or key==39 then
  786.             player.dashL=0
  787.             if timestamp-player.dashR<200  and player.airjumps>0 then
  788.                 player.airjumps=player.airjumps-1
  789.                 updateInv(name)
  790.                 if player.advanced then
  791.                     tfm.exec.movePlayer(name, 90, 0, true)
  792.                     tfm.exec.displayParticle(36, x+60, y, 0, 0, 0, 0)
  793.                 else
  794.                     tfm.exec.movePlayer(name, nil, nil, nil, 40, nil, true)
  795.                     tfm.exec.displayParticle(26, x, y, 0, 0, 0, 0)
  796.                     tfm.exec.displayParticle(35, x, y, -20, 0, 0, 0)
  797.                     end
  798.             else
  799.                 player.dashR=timestamp
  800.                 end
  801.         elseif key==player.keys.pickup then
  802.             for i, token in ipairs(map.tokens) do
  803.                 if math.abs(x-token.x)<20 and math.abs(y-token.y)<20 then
  804.                     if not player.tokens[i] then
  805.                         player.tokens[i]=true
  806.                         local item=({"airjumps", "arrows", "bombs"})[token.type]
  807.                         if item=="arrows" and player.advanced then
  808.                             player[item]=player[item]+math.floor(pickupCount/3)
  809.                         else
  810.                             player[item]=player[item]+pickupCount
  811.                             end
  812.                         updateInv(name)
  813.                         tfm.exec.displayParticle(15, token.x, token.y, 0, -1, 0, 0, name)
  814.                         drawToken(i, name, true)
  815.                         if player.tutorial==token then
  816.                             local key=({"I", "J", "K"})[token.type]
  817.                             ui.updateTextArea(-1, text.tutorialUse:format("<J>"..item.."<N>", "<J>"..key.."<N>"), name)
  818.                             item=item:sub(1, -2)
  819.                             if item=="arrow" then
  820.                                 item="arrowLeft"
  821.                                 end
  822.                             player.tutorial=player.keys[item]
  823.                             end
  824.                         end
  825.                     break
  826.                     end
  827.                 end
  828.         elseif key==player.keys.airjump then
  829.             if player.airjumps>0 then
  830.                 player.airjumps=player.airjumps-1
  831.                 updateInv(name)
  832.                 if player.advanced then
  833.                     local dist=math.min(90, y-30)
  834.                     tfm.exec.movePlayer(name, 0, -dist, true, 0, -1, false)
  835.                     tfm.exec.displayParticle(36, x, y-dist, 0, 0, 0, 0)
  836.                 else
  837.                     tfm.exec.movePlayer(name, nil, nil, nil, nil, -60, false)
  838.                     tfm.exec.displayParticle(4, x, y, -1, -1, 0, 0)
  839.                     tfm.exec.displayParticle(4, x, y, 0, -1, 0, 0)
  840.                     tfm.exec.displayParticle(4, x, y, 1, -1, 0, 0)
  841.                     end
  842.                 end
  843.         elseif key==player.keys.bomb and player.bombs>0 then
  844.             player.bombs=player.bombs-1
  845.             updateInv(name)
  846.             if player.advanced then
  847.                 ui.addTextArea(-3, "", name, x-2, y-2, 4, 4, 0xFF0000, 0xFFFFFF, 0.75)
  848.                 system.newTimer(function()
  849.                     ui.removeTextArea(-3, name)
  850.                     for i=1, mineBoom do
  851.                         tfm.exec.addShamanObject(24, x+math.random(-60, 60), y+math.random(-60, 60))
  852.                         end
  853.                     end, math.max(mineClock, 1000))
  854.             else
  855.                 local id=tfm.exec.addShamanObject(23, x, y+30)
  856.                 system.newTimer(function()
  857.                     tfm.exec.removeObject(id)
  858.                     tfm.exec.addShamanObject(24, x, y+30)
  859.                     tfm.exec.explosion(x, y+30, bombPower, bombRadius, true)
  860.                     end, math.max(bombClock, 1000))
  861.                 end
  862.             end
  863.     elseif down then
  864.         player.keys[player.keyset]=key
  865.         player.keyset=nil
  866.         for key=48, 57 do
  867.             tfm.exec.bindKeyboard(name, key, true, false)
  868.             end
  869.         for key=65, 90 do
  870.             tfm.exec.bindKeyboard(name, key, true, false)
  871.             end
  872.         setKeys(name, player.keys)
  873.         eventChatCommand(name, "help controls")
  874.         end
  875.     end
  876. function eventChatCommand(name, message)
  877.     local args={}
  878.     local admin=isAdmin(name)
  879.     local player=players[name]
  880.     for arg in message:gmatch("[^%s]+") do
  881.         table.insert(args, arg:lower())
  882.         end
  883.     message=message:match("%s(.*)") or ""
  884.     if args[1]=="tutorial" then
  885.         setTutorial(name)
  886.     elseif args[1]=="help" or args[1]=="credits" then
  887.         local content
  888.         if args[1]=="credits" then
  889.             content={
  890.                 text.helpCredits,
  891.                 text.helpCreditsCoding:format("Fxie"),
  892.                 text.helpCreditsTranslation:format(lang, text.author)
  893.                 }
  894.         elseif args[2]=="tokens" then
  895.             content={
  896.                 text.helpTokens,
  897.                 text.helpTokensGeneral,
  898.                 text.helpTokensHave:format("<VP>E<N>")
  899.                 }
  900.         elseif args[2]=="controls" then
  901.             content={
  902.                 text.helpControl,
  903.                 text.helpControlInstruct,
  904.                 "<font size='32' face='lucida sans unicode'> "..text.helpControlAirjump.."</font>",
  905.                 "<font size='32' face='lucida sans unicode'> "..text.helpControlBomb.."</font>"
  906.                 }
  907.         else
  908.             content={
  909.                 text.help,
  910.                 text.helpDash,
  911.                 text.helpRocketjump,
  912.                 text.helpArrows,
  913.                 text.helpAirjump:format(("<VP>%c<N>"):format(player.keys.airjump)),
  914.                 text.helpBombs:format(("<VP>%c<N>"):format(player.keys.bomb)),
  915.                 text.helpPickup:format(("<VP>%c<N>"):format(player.keys.pickup))
  916.                 }
  917.             end
  918.         content[1]="<font size='14'>"..content[1].."</font>"
  919.         ui.addTAStyle(110, table.concat(content, "\n\n"), name, 200, 80, 400, 200)
  920.         ui.addTAStyle(120, "<a href='event:help'>How to play</a>", name, 200, 296, 86, 16)
  921.         ui.addTAStyle(130, "<a href='event:controls'>Controls</a>", name, 300, 296, 86, 16)
  922.         ui.addTAStyle(140, "<a href='event:credits'>Credits</a>", name, 400, 296, 86, 16)
  923.         ui.addTAStyle(150, "<a href='event:close'>X</a>", name, 584, 296, 16, 16)
  924.         if args[2]=="controls" then
  925.             ui.addTextArea(160, ("<font size='32'><b><a href='event:set_airjump'>%c </a></b></font>"):format(player.keys.airjump), name, 500, 136, 40, 40, 0x040404, 0x040404, 0.1, true)
  926.             ui.addTextArea(170, ("<font size='32'><b><a href='event:set_bomb'>%c </a></b></font>"):format(player.keys.bomb), name, 500, 190, 40, 40, 0x040404, 0x040404, 0.1, true)
  927.         else
  928.             ui.removeTextArea(160)
  929.             ui.removeTextArea(170)
  930.             end
  931.     elseif args[1]=="get" then
  932.         if args[2]=="keys" then
  933.             local keys={}
  934.             for control, key in pairs(player.keys) do
  935.                 table.insert(keys, control)
  936.                 table.insert(keys, key)
  937.                 end
  938.             tfm.exec.chatMessage(text.getKeys:format(table.concat(keys)), name)
  939.         elseif args[2]=="maps" then
  940.             tfm.exec.chatMessage(text.getMaps:format(#maps, table.concat(maps, ", ")), name)
  941.             end
  942.     elseif args[1]=="set" then
  943.         if admin and args[3] then
  944.             local variable, value=message:match("(.+) (.+)")
  945.             value=tonumber(value) or tostring(value)
  946.             if type(value)==type(_G[variable]) then
  947.                 _G[variable]=value
  948.                 tfm.exec.chatMessage("<N>"..name.." : Set <VP>"..variable.."<N> = <VP>"..value)
  949.             else
  950.                 tfm.exec.chatMessage("<R>Invalid type", name)
  951.                 end
  952.             end
  953.     elseif args[1]=="map" then
  954.         if map.seed then
  955.             tfm.exec.chatMessage("<N>Now playing : map seed <VP>"..map.seed, name)
  956.         else
  957.             tfm.exec.chatMessage("<N>Now playing : <VP>"..map.code.."<N> by <VP>"..map.author, name)
  958.             end
  959.     elseif admin then
  960.         if args[1]=="skip" then
  961.             eventLoop(0, 0)
  962.         elseif args[1]=="addmap" then
  963.             table.insert(maps, args[2])
  964.         elseif args[1]=="shaman" then
  965.             tfm.exec.setShaman(name)
  966.         elseif args[1]=="play" then
  967.             eventLoop(0, 0, args[2], args[3]=="seed")
  968.         elseif args[1]=="mod" then
  969.             tfm.exec.chatMessage("<ROSE>[Room mod]<N> "..message)
  970.             end
  971.         end
  972.     end
  973.  
  974. --Hide spammands
  975. for i, command in ipairs({"help", "credits", "get", "set", "mod", "shaman"}) do
  976.     system.disableChatCommandDisplay(command)
  977.     end
  978.  
  979. --Disability check
  980. tfm.exec.disableAfkDeath(true)
  981. tfm.exec.disableAutoScore(true)
  982. tfm.exec.disableAutoShaman(true)
  983. tfm.exec.disableAutoNewGame(true)
  984. tfm.exec.disableAutoTimeLeft(true)
  985.  
  986. --Diversity incorporated
  987. lang=tfm.get.room.community
  988. if text[lang] then
  989.     text.look={}
  990.     for id, message in pairs(text[lang]) do
  991.         text[id]=message
  992.         end
  993. elseif lang~="EN" and lang~="EN2" and lang~="INT" then
  994.     tfm.exec.chatMessage("<R>There is no translation available for this community! ;_;\nIf you speak English and would like to translate, please contact Fxie.")
  995.     end
  996.  
  997. --Special rooms
  998. roomtype={}
  999. if tfm.get.room.name:match("%$random") then
  1000.     seedmod=1
  1001.     roomtype.random=true
  1002.     end
  1003. if tfm.get.room.name:match("%$advanced") then
  1004.     seedmod=0
  1005.     roomtype.advanced=true
  1006.     end
  1007.  
  1008. --Let's go!
  1009. eventLoop(0, 0)
  1010. for name, player in pairs(tfm.get.room.playerList) do
  1011.     eventNewPlayer(name)
  1012.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement