Advertisement
DougCp

Funcorp o//

Dec 8th, 2016
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 40.71 KB | None | 0 0
  1. --[[
  2. Script created by Tocutoeltuco and Yuir, and tested by Ultraspeedy
  3. Translate to EN: Ultraspeedy
  4. Translate to BR/PT: Bolodefchoco
  5. ]]
  6.  
  7. loadXml=true--If you want, to load a XML first, put this option in true
  8. xml=''--XML here, between the two '
  9.  
  10. if loadXml then
  11. tfm.exec.newGame(tostring(xml))
  12. end
  13.  
  14. can={Yuir=true,Kelgood=true,Luucassssss=true}
  15. --If you aren't in the can list, put you with a comma (,) and your name (if you have a +, change it with __ (two _)), and a =true, for example, if your name is +Tigrounette, put: ,__Tigrounette=true
  16. mice={}
  17. images={}
  18. objects={}
  19. settings={
  20. ffa=false,
  21. fly=false,
  22. tp=false,
  23. tpall=false,
  24. spawn=false,
  25. speed=false,
  26. jump=false,
  27. coords=false,
  28. img="",
  29. imgp="",
  30. imgu="",
  31. imguu="",
  32. }
  33. tr={
  34.     es={
  35.         welcome="<V>[•]<rose> Bienvenido a una sala FunCorp, en las salas de FunCorp no cuentan las estadísticas (como el first, el queso), ¡Pero hay mucha diversión!</rose>",
  36.         ffaOn="<VP>¡Ahora puedes lanzar cañones con la tecla <J>S<VP> o la tecla <J>↓<VP>!",
  37.         ffaOff="<R>Ahora ya no puedes lanzar cañones :(",
  38.         miceFfaOn="<VP>¡Diviértete lanzando cañones personalizados!",
  39.         miceFfaOff="<VP>¡Diviértete lanzando cañones!",
  40.         flyOn="<VP>¡Ahora puedes volar con la tecla espacio!",
  41.         flyOff="<VP>Ahora no puedes volar :(",
  42.         warning="ADVERTENCIA",
  43.         vamp="<R>Argg... Ahora eres un vampiro ¡Vé a cazar ratoncitos!",
  44.         respawn="<VP>¡Eres un muerto viviente!",
  45.         jumpOn="<VP>¡Ahora tienes supersalto!",
  46.         jumpOff="<R>Ahora tienes un salto normal :(",
  47.         modLanguage="Modera tu lenguaje.",
  48.         snow="<VP>¡Guerra de nieve!",
  49.         speedOn="<VP>Bhm... Bhm... ¡Ahora tienes supervelocidad! ¡Apreta la tecla <VI>X</VI>!",
  50.         speedOff="<R>¿Un poco cansado? Uff... Tómate un descanso de la supervelocidad",
  51.         discoOn="<VP>¡<V>D<R>I<BV>S<BL>C<N>O <VI>T<ROSE>I<CH>M<G>E<J>! <T>¡</T>P</J>a</G>r</CH>t</ROSE>y</VI> h</N>a</BL>r</BV>d</R>!</V>",
  52.         discoOff="<R>",
  53.         imgU="<VP>¡Prepárate para ser un ratón personalizado!",
  54.         admins={
  55.             warned="<V>%s</V> ha advertido a %s por<R>%s",
  56.             warnedSystem="El sistema ha advertido a %s por decir %s",
  57.       funCorpEnter="El FunCorp <V>%s</V> ha entrado a la sala",
  58.       funCorpLeave="El FunCorp <V>%s</V> ha salido de la sala",
  59.       tpAllOn="<V>%s</V> se ha activado el tpall.",
  60.       tpAllOff="<V>%s</V> se ha desactivado el tpall.",
  61.       filtroOn="<V>%s</V> ha activado el filtro.",
  62.       filtroOff="<V>%s</V> ha desactivado el filtro.",
  63.         jumpAllOn="<V>%s</V> ha activado el supersalto para todos.",
  64.         jumpAllOff="<V>%s</V> ha desactivado el supersalto para todos.",
  65.         jumpOn="<V>%s</V> ha activado el supersalto para %s",
  66.         jumpOff="<V>%s</V> ha desactivado el supersalto para %s",
  67.         speedAllOn="<V>%s</V> ha activado la supervelocidad para todos.",
  68.         speedAllOff="<V>%s</V> ha desactivado la supervelocidad para todos.",
  69.         speedOn="<V>%s</V> ha activado la supervelocidad para %s",
  70.         speedOff="<V>%s</V> ha desactivado la supervelocidad para %s",
  71.       spawnObjectImage="<V>%s</V> ha invocado un objeto de chamán (ID LUA %s) (ID %s) en las coordenadas X: %s Y: %s con la imagen %s",
  72.       spawnObject="<V>%s</V> ha invocado un objeto de chamán (ID LUA %s) (ID %s) en las coordenadas X: %s Y: %s",
  73.       pwOn="<V>%s</V> ha cambiado la contraseña de la sala a <V>%s",
  74.       pwOff="<V>%s</V> ha quitado la contraseña de la sala.",
  75.       customSnow="<V>%s</V> ha activado la nieve durante %d segundos.",
  76.       snow="<V>%s</V> ha activado la nieve durante 60 segundos.",
  77.       discoOn="<V>%s</V> ha activado el disco.",
  78.       discoOff="<V>%s</V> ha desactivado el disco.",
  79.       funCorpMessage="<V>%s</V> ha enviado un mensaje como \"<font color='#E68D43'>FunCorp</font>\".",
  80.       addImage="<V>%s</V> ha puesto la imagen (ID LUA %s) %s con el formato de %s",
  81.       removeImage="<V>%s</V> ha quitado la imagen de la ID %s",
  82.       ffaOnAll="<V>%s</V> ha activado el FFA para todos.",
  83.       ffaOffAll="<V>%s</V> ha desactivado el FFA para todos.",
  84.       ffaOnUser="<V>%s</V> ha activado el FFA para %s",
  85.       ffaOffUser="<V>%s</V> ha desactivado el FFA para %s",
  86.       flyOnAll="<V>%s</V> ha activado el FLY para todos.",
  87.       flyOffAll="<V>%s</V> ha desactivado el FLY para todos.",
  88.       flyOnUser="<V>%s</V> ha activado el FLY para %s",
  89.       flyOffUser="<V>%s</V> ha desactivado el FLY para %s",
  90.       vampAll="<V>%s</V> ha hecho vampiro a todos.",
  91.       vampUser="<V>%s</V> ha hecho vampiro a %s",
  92.       killAll="<V>%s</V> ha matado a todos.",
  93.       killUser="<V>%s</V> ha matado a %s",
  94.       map="<V>%s</V> ha cambiado el mapa a %d",
  95.       respawnAll="<V>%s</V> ha respawneado a todos.",
  96.       respawnUser="<V>%s</V> ha respawneado a %s",
  97.       infiniteTime="<V>%s</V> ha hecho el tiempo infinito.",
  98.       setTime="<V>%s</V> ha cambiado el tiempo a %d",
  99.       help=[[<V>[]<N> Ayuda del script
  100. <VP>!funchat MENSAJE</VP> -- Escribe en el chat privado de FunCorps
  101. <VP>!snow SEGUNDOS</VP> -- Hace nevar
  102. <VP>!disco</VP> -- Cambia el color de nombre de cada ratón cada un corto tiempo
  103. <VP>!warn NOMBRE MENSAJE</VP> -- Advierte a un usuario
  104. <VP>!msg MENSAJE</VP> -- Manda un mensaje al chat como [FunCorp]
  105. <VP>!image ID IMAGEN X Y VALOR</VP> -- Pone una imagen en el mapa, ID es el valor al cual se llamará para quitar la imagen, IMAGEN es el link de la imagen (usa solo lo que va después de la /, ejemplo: si el link es http://images.atelier801.com/1548703e16a.jpg, tienes que poner 1548703e16a.jpg), X es la posición horizontal a partir del punto 0 (si la X es 5, y la imagen está puesta para un jugador, es 5px en X, a partir del punto 0 del ratón, el centro), la Y es la posición vertical a partir del punto 0, VALOR es el valor de la imagen (_ es Z, ! es adelante del todo, ? es atrás del todo, & es como _, pero se queda según tu movimiento, $ es una imagen arriba del ratón, pero con su sprite y % es una imagen arriba del ratón, pero sin su sprite), si el valor es _ o &, tienes que poner la Z, por ejemplo: _1 o &2, si es ! o ? tienes que poner 1, por ejemplo: !1 o ?1, y si es $ o % es un nombre de ratón, como $Tocutoeltuco o %Ultraspeedy.
  106. <VP>!removeimage ID</VP> -- Quita la imagen con la id seleccionada
  107. <VP>!ffa NOMBRE ON/OFF</VP> -- Activa/desactiva el ffa
  108. <VP>!imgffa [link]</VP> -- Cambia la skin del cañón del FFA (LINK: opcional, cambia la skin)
  109. <VP>!fly NOMBRE ON/OFF</VP> -- Activa/desactiva el fly
  110. <VP>!vamp NOMBRE</VP> -- Hace vampiro a alguien
  111. <VP>!kill NOMBRE</VP> -- Mata a alguien
  112. <VP>!respawn NOMBRE</VP> -- Respawnea a alguien
  113. <VP>!time INF/SEGUNDOS</VP> -- Cambia el tiempo del mapa
  114. <VP>!help</VP> -- Te envía este mensaje
  115. <VP>!map MAPA</VP> -- Cambia el mapa actual (si pones una "@", será aleatorio, incluso si pones "@0", pero si pones "0" se pondrá el mapa 0
  116. <VP>!tpall</VP> -- Te activa/desactiva la opción de que si haces click teletransportes a todos los de la sala
  117. <VP>!spawn ID OID X Y IMAGEN</VP> -- ID, es la ID que se guardará en LUA para luego quitar el objeto, OID es la id de objeto, ejemplo: 0: caja pequeña, X es la posición horizontal a partir del punto 0, Y es la posición vertical a partir del punto 0, IMAGEN (opcional) link de la imagen para ponerle al objeto, subida a atelier801, si el link es http://images.atelier801.com/<VP>1548703e16a.jpg</VP>, se usa <VP>1548703e16a.jpg</VP>
  118. <VP>!despawn ID</VP> -- Quita un objeto del mapa
  119. <VP>!pw CONTRASEÑA</VP> -- Cambia la contraseña de la sala <R>(CUIDADO, NO SE PUEDE QUITAR)</R>
  120. <VP>!jump USUARIO ON/OFF</VP> -- Le activa/desactiva el supersalto al usuario seleccionado (si USUARIO es all, se seleccionan todos los usuarios)
  121. <VP>!speed USUARIO ON/OFF</VP> -- Le activa/desactiva la supervelocidad al usuario seleccionado (si USUARIO es all, se seleccionan todos los usuarios)
  122. <VP>!sham USUARIO</VP> -- Hace chamán al usuario seleccionado (si USUARIO es all, se seleccionan todos los usuarios)
  123. <VP>!filtro ON/OFF</VP> -- Activa/desactiva el filtro de malas palabras
  124. <VP>!miceimg ID USUARIO</VP> -- Le pone una imagen pre-hecha al usuario seleccionado (si USUARIO es all, se seleccionan todos los usuarios) <R>(CUIDADO, NO SE PUEDE QUITAR)</R>]],
  125.       miceFfaOn="<V>%s</V> ha cambiado la skin del cañón.",
  126.       miceFfaOff="<V>%s</V> ha vuelto a la normalidad la skin del cañón.",
  127.       urlFfa="<V>%s</V> ha cambiado la skin del cañón a %s",
  128.         shamanAll="<V>%s</V> ha hecho chamán a todos.",
  129.         shamanUser="<V>%s</V> ha hecho chaman a %s",
  130.         imageAll="",
  131.         failImgU="<R>Esa ID no existe. (ID: <VI>%s</VI>)",
  132.         imgUAll="<V>%s</V> ha puesto la imagen <VI>%s</VI> en todos los ratones.",
  133.         imgU="<V>%s</V> ha puesto la imagen <VI>%s</VI> en %s",
  134.         imgUAllOff="<V>%s</V> ha quitado una imagen en todos los ratones.",
  135.         imgUOff="<V>%s</V> ha quitado una imagen en %s",
  136.         despawnObject="<V>%s</V> despawneó el objeto de chamán con la ID %s",
  137.         },
  138.     },
  139.     en={
  140.         welcome="<V>[•]<rose> Welcome to a FunCorp room, in the FunCorp room the stats don't count (like the first, the cheese), But you have fun!</rose>",
  141.         ffaOn="<VP>Now you can throw cannons with the <J>S<VP> key or the <J>↓<VP> key!",
  142.         ffaOff="<R>You can't throw cannons anymore :(",
  143.         miceFfaOn="<VP>Have fun throwing custom cannons!",
  144.         miceFfaOff="<VP>Have fun throwing cannons!",
  145.         flyOn="<VP>Now you can fly with the space key!",
  146.         flyOff="<R>Now you can't fly :(",
  147.         warning="WARNING",
  148.         vamp="<R>Argg... You are now a vampire, Go hunt some mices!",
  149.         respawn="<VP>You're a undead!",
  150.         jumpOn="<VP>Now you have a super jump!",
  151.         jumpOff="<R>Now you have a normal jump :(",
  152.         modLanguage="Moderate your language.",
  153.         snow="<VP>Snow war!",
  154.         speedOn="<VP>Bhm... Bhm... You now have super speed! Press the <VI>X</VI> key!",
  155.         speedOff="<R>A little bit tired? Uff... take a break of the super speed",
  156.         discoOn="<VP><V>D<R>I<BV>S<BL>C<N>O <VI>T<ROSE>I<CH>M<G>E<J>! <T></T>P</J>a</G>r</CH>t</ROSE>y</VI> h</N>a</BL>r</BV>d</R>!</V>",
  157.         discoOff="<R>",
  158.         imgU="<VP>Prepare to be a custom mice!",
  159.         admins={
  160.             warned="<V>%s</V> warned %s for<R>%s",
  161.             warnedSystem="The system warned %s for say %s",
  162.       funCorpEnter="The FunCorp <V>%s</V> has enter the room",
  163.       funCorpLeave="The FunCorp <V>%s</V> has leave the room",
  164.       tpAllOn="<V>%s</V> turned on the tpall.",
  165.       tpAllOff="<V>%s</V> turned off the tpall.",
  166.       filtroOn="<V>%s</V> turned on the filter.",
  167.       filtroOff="<V>%s</V> turned off the filter.",
  168.         jumpAllOn="<V>%s</V> turned on the superjump to all.",
  169.         jumpAllOff="<V>%s</V> turned off the superjump to all.",
  170.         jumpOn="<V>%s</V> turned on the superjump to %s",
  171.         jumpOff="<V>%s</V> turned off the superjump to %s",
  172.         speedAllOn="<V>%s</V> turned on the superspeed to all.",
  173.         speedAllOff="<V>%s</V> turned off the superspeed to all.",
  174.         speedOn="<V>%s</V> turned on the superspeed to %s",
  175.         speedOff="<V>%s</V> turned off the superspeed to %s",
  176.       spawnObjectImage="<V>%s</V> invocated a shaman object (LUA ID %s) (ID %s) in the coordinates X: %s Y: %s with the image %s",
  177.       spawnObject="<V>%s</V> invocated a shaman object (LUA ID %s) (ID %s) in the coordinates X: %s Y: %s",
  178.       pwOn="<V>%s</V> changed the room password to <V>%s",
  179.       pwOff="<V>%s</V> removed the room password.",
  180.       customSnow="<V>%s</V> turned on the snow for %s seconds.",
  181.       snow="<V>%s</V> turned on the snow for 60 seconds.",
  182.       discoOn="<V>%s</V> turned on the disco.",
  183.       discoOff="<V>%s</V> turned off the disco.",
  184.       funCorpMessage="<V>%s</V> send a message like \"<font color='#E68D43'>FunCorp</font>\".",
  185.       addImage="<V>%s</V> put the image (LUA ID %s) %s with the format of %s",
  186.       removeImage="<V>%s</V> removed a image with the id %s",
  187.       ffaOnAll="<V>%s</V> turned on the FFA to all.",
  188.       ffaOffAll="<V>%s</V> turned off the FFA to all.",
  189.       ffaOnUser="<V>%s</V> turned on the FFA to %s",
  190.       ffaOffUser="<V>%s</V> turned off the FFA to %s",
  191.       flyOnAll="<V>%s</V> turned on the FLY to all.",
  192.       flyOffAll="<V>%s</V> turned off the FLY to all.",
  193.       flyOnUser="<V>%s</V> turned on the FLY to %s",
  194.       flyOffUser="<V>%s</V> turned off the FLY to %s",
  195.       vampAll="<V>%s</V> just transformed all the mice in vampires.",--?
  196.       vampUser="<V>%s</V> just transformed %s in vampire",--?
  197.       killAll="<V>%s</V> killed all.",
  198.       killUser="<V>%s</V> killed %s.",
  199.       map="<V>%s</V> changed the map to %d",
  200.       respawnAll="<V>%s</V> respawned all.",
  201.       respawnUser="<V>%s</V> respawned %s",
  202.       infiniteTime="<V>%s</V> made infinite the time.",
  203.       setTime="<V>%s</V> changed the time to %d",
  204.       help=[[DONT TRANSLATE THIS]],
  205.       miceFfaOn="<V>%s</V> changed the cannon skin.",
  206.       miceFfaOff="<V>%s</V> changed the cannon skin to default.",
  207.       urlFfa="<V>%s</V> changed the cannon skin to %s",
  208.         shamanAll="<V>%s</V> has made everyone a shaman.",
  209.         shamanUser="<V>%s</V> has made %s a shaman.",
  210.         imageAll="",
  211.         failImgU="<R>This ID don't exists. (ID: <VI>%s</VI>)",
  212.         imgUAll="<V>%s</V> put the image <VI>%s</VI> in every mice.",
  213.         imgU="<V>%s</V> put the image <VI>%s</VI> in %s",
  214.         imgUAllOff="<V>%s</V> deleted a image in every mice.",
  215.         imgUOff="<V>%s</V> deleted a image in %s",
  216.         despawnObject="<V>%s</V> despawned the shaman object with ID %s",
  217.         },
  218.     },
  219.     br={
  220.         welcome="<V>[•]<rose> Bem-vindo(a) à sala Funcorp, nas salas Funcorp as estatísticas não contam (firsts, queijos, etc), mas você se diverte!</rose>",
  221.         ffaOn="<VP>Agora você pode atirar canhões pressionando as teclas <J>S<VP> e <J>↓<VP>!",
  222.         ffaOff="<R>Você não pode jogar mais canhões :(",
  223.         miceFfaOn="<VP>Divirta-se atirando canhões customizados!",
  224.         miceFfaOff="<VP>Divirta-se atirando canhões!",
  225.         flyOn="<VP>Agora você pode voar pressionando a tecla Espaço.",
  226.         flyOff="<R>Agora você não pode voar :(",
  227.         warning="ATENÇÃO",
  228.         vamp="<R>Argg... Agora você é um vampiro, vá caçar alguns ratos!",
  229.         respawn="<VP>Você é um zumbi!",
  230.         jumpOn="<VP>Agora você tem um super-pulo!",
  231.         jumpOff="<R>Agora você tem um pulo normal :(",
  232.         modLanguage="Modere seu linguajar.",
  233.         snow="<VP>Guerra de neve.",
  234.         speedOn="<VP>Bruuum... Bruuum... Agora você tem super velocidade! Pressione a tecla <VI>X</VI>!",
  235.         speedOff="<R>Um pouco cançado? Ufa... dê um tempo à super velocidade!",
  236.         discoOn="<VP><V>D<R>I<BV>S<BL>C<N>O <VI>T<ROSE>I<CH>M<G>E<J>! <T></T>P</J>a</G>r</CH>t</ROSE>y</VI> h</N>a</BL>r</BV>d</R>!</V>",
  237.         discoOff="<R>",
  238.         imgU="<VP>Prepare-se para ser um rato customizado!",
  239.         admins={
  240.             warned="<V>%s</V> advertido %s por<R>%s",
  241.             warnedSystem="O sistema advertiu %s por dizer %s",
  242.       funCorpEnter="O FunCorp <V>%s</V> entrou na sala.",
  243.       funCorpLeave="O FunCorp <V>%s</V> deixou a sala.",
  244.       tpAllOn="<V>%s</V> ativou o tpall.",
  245.       tpAllOff="<V>%s</V> desativou o tpall.",
  246.       filtroOn="<V>%s</V> ativou o filtro.",
  247.       filtroOff="<V>%s</V> desativou o filtro.",
  248.         jumpAllOn="<V>%s</V> ativou o super-pulo para todos.",
  249.         jumpAllOff="<V>%s</V> desativou o super-pulo para todos.",
  250.         jumpOn="<V>%s</V> ativou o super-pulo para %s",
  251.         jumpOff="<V>%s</V> desativou o super-pulo para %s",
  252.         speedAllOn="<V>%s</V> ativou a super velocidade para todos.",
  253.         speedAllOff="<V>%s</V> desativou a super velocidade para todos.",
  254.         speedOn="<V>%s</V> ativou a super velocidade para %s",
  255.         speedOff="<V>%s</V> desativou a super velocidade para %s",
  256.       spawnObjectImage="<V>%s</V> invocou um objeto shaman (ID LUA %s) (ID %s) nas coordenadas X: %s Y: %s com a imagem %s",
  257.       spawnObject="<V>%s</V> invocou um objeto shaman (ID LUA %s) (ID %s) nas coordenadas X: %s Y: %s",
  258.       pwOn="<V>%s</V> mudou a senha da sala para <V>%s",
  259.       pwOff="<V>%s</V> removeu a senha da sala.",
  260.       customSnow="<V>%s</V> ativou a neve por %s segundos.",
  261.       snow="<V>%s</V> ativou a neve por 60 segundo.",
  262.       discoOn="<V>%s</V> ativou o disco.",
  263.       discoOff="<V>%s</V> desativou o disco.",
  264.       funCorpMessage="<V>%s</V> enviu uma mensagem como \"<font color='#E68D43'>FunCorp</font>\".",
  265.       addImage="<V>%s</V> colocou a imagem (ID LUA %s) %s com o formato %s",
  266.       removeImage="<V>%s</V> removeu uma imagem com o id %s",
  267.       ffaOnAll="<V>%s</V> ativou o FFA para todos.",
  268.       ffaOffAll="<V>%s</V> desativou o FFA para todos.",
  269.       ffaOnUser="<V>%s</V> ativou o FFA para %s",
  270.       ffaOffUser="<V>%s</V> desativou o FFA para  %s",
  271.       flyOnAll="<V>%s</V> ativou o FLY para todos.",
  272.       flyOffAll="<V>%s</V> desativou o FLY para todos.",
  273.       flyOnUser="<V>%s</V> ativou o FLY para %s",
  274.       flyOffUser="<V>%s</V> desativou o FLY para %s",
  275.       vampAll="<V>%s</V> fez todos os ratos de vampiros.",--?
  276.       vampUser="<V>%s</V> fez %s um vampiro.",--?
  277.       killAll="<V>%s</V> matou todos.",
  278.       killUser="<V>%s</V> matou %s.",
  279.       map="<V>%s</V> mudou o mapa para %d",
  280.       respawnAll="<V>%s</V> reviveu todos.",
  281.       respawnUser="<V>%s</V> reviveu %s",
  282.       infiniteTime="<V>%s</V> fez o tempo infinito.",
  283.       setTime="<V>%s</V> mudou o tempo para %d",
  284.       help=[[DONT TRANSLATE THIS]],
  285.       miceFfaOn="<V>%s</V> mudou a skin do canhão.",
  286.       miceFfaOff="<V>%s</V> mudou a skin do canhão para padrão.",
  287.       urlFfa="<V>%s</V>  mudou a skin do canhão para %s",
  288.         shamanAll="<V>%s</V> fez todo mundo shaman.",
  289.         shamanUser="<V>%s</V> fez %s shaman.",
  290.         imageAll="",
  291.         failImgU="<R>Esta ID não existe. (ID: <VI>%s</VI>)",
  292.         imgUAll="<V>%s</V> colocou a imagem <VI>%s</VI> em todos os ratos.",
  293.         imgU="<V>%s</V> colocou a imagem <VI>%s</VI> em %s",
  294.         imgUAllOff="<V>%s</V> removeu a imagem em todos os ratos.",
  295.         imgUOff="<V>%s</V> removeu a imagem em %s",
  296.         despawnObject="<V>%s</V> removeu o objeto shaman de ID %s",
  297.         },
  298.     },
  299. }
  300. tr.pt=tr.br
  301. filtro={"puto"}--Para añadir palabras al filtro, tienes que poner una coma (,) dos comillas (") y adentro de esas dos comillas la palabra, pero en minúscula, si quieres usar comillas en el texto, usa \"
  302. keys={32,0,1,2,3,16,17,88}
  303. fireTS={}
  304. facingLeft={}
  305. toDespawn={}
  306. goTo={}
  307. goToImages={}
  308. iAT="imageAll"
  309. images[iAT]={}
  310. filtre=false
  311. id=""
  312. idd=""
  313. spawn=""
  314. disco=false
  315. despawnTime=1000
  316. fireDelay=3000--Delay (IN MS) to throw cannons in FFA, 1000ms = 1 second
  317. mouseCannons=false
  318. cannon="153d3352946.png"
  319. offsetX = 0
  320. offsetY = 0
  321. micesImg={
  322.   pink_kitty={"153ec4eef26.png", -23, -30, "153ec4ec77d.png", -26, -30},
  323.   nekoburger={"153ec7e82d6.png", -23, -26, "153ec7e664b.png", -26, -26},
  324.   kitty={"154c592261e.png", -30, -32, "154c5925a15.png", -27, -32},
  325.   mice={"154d0db2d3d.png",-30,-52,"154d0db0d8c.png",-27,-52},
  326.   pokeball={"1507b1faa2a",-8,-9,"1507b1faa2a",-8,-9},
  327. egg={"1507b1fbc31",-40,-40,"1507b1fbc31",-40,-40},
  328. missingno1={"1507b1fcd7a",-40,-40,"1507b1fcd7a",-40,-40},
  329. missingno2={"1507b1fde7a",-28,-28,"1507b1fde7a",-28,-28},
  330. missingno3={"1507b1fef38",-30,-30,"1507b1fef38",-30,-30},
  331. missingno4={"1507b2002ac",-30,-30,"1507b2002ac",-30,-30},
  332. peppa={"155777ce1ab",-40,-50,"155777cc660",-40,-50},
  333. slowpoke={"155777d20fc",-35,-50,"155777d4247",-35,-50},
  334. nyan_cat={"155c9b28b20",-35,-30,"155c9b2a3d1",-90,-30},
  335. justin_bieber={"155ca086a04",-25,-40,"155ca086a04",-25,-40},
  336. mouse={"1557c362613",-65,-50,"1557c364a52",-85,-50},
  337. dora={"155c4d1de05",-25,-46,"155c4d1f100",-25,-46},
  338. toilet={"155c9ec2886",-20,-40,"155c9ec40ff",-30,-40},
  339. waddles={"155c51325da",-40,-28,"155c5133917",-35,-26},
  340. bus={"155ca4312a0",-40,-30,"155ca432666",-40,-30},
  341. minion={"155ca547459",-26,-30,"155ca54900a",-28,-30},
  342. kenny={"155ca4bdc51",-25,-42,"155ca4bdc51",-25,-42},
  343. computer_mouse={"155ca47030c",-30,-25,"155ca47179a",-40,-25},
  344. annoying_orange={"155ca0f4af3",-25,-25,"155ca0f5ca7",-25,-25},
  345. annoying_dog={"155ca0da03c",-25,-28,"155ca0db1f4",-25,-28},
  346. broom_mouse={"155c9fa9ef2",-35,-35,"155c9fab3f1",-38,-35},
  347. package_pony={"155c9ca6f74",-24,-40,"155c9ca85bd",-22,-40},
  348. copatych={"155c9c3b2d6",-22,-28,"155c9c3c8cd",-22,-28},
  349. homunculus={"155c9ba73b5",-22,-28,"155c9ba84e0",-40,-28},
  350. thomas={"155c50812d1",-28,-32,"155c50829b0",-20,-32},
  351. cock_a_doodle_doo={"155c4cdbb4c",-14,-32,"155c4cdd0e3",-37,-32},
  352. shawarma={"155c4b131dc",-36,-38,"155c4b14458",-24,-38},
  353. wild_sponge_bob={"155c4aac0b4",-18,-34,"155c4aadc1c",-24,-34},
  354. pony={"155c49ce65c",-35,-16,"155c49d0331",-25,-16},
  355. sponge_bob={"155c49750bd",-27,-26,"155c4976244",-33,-26},
  356. squirrel={"155c48fadff",-28,-42,"155c48fbfea",-32,-42},
  357. peter_pig={"155c4890ec0",-26,-42,"155c4892353",-32,-42},
  358. emote1={"150ab0c288e",-15,-10,"150ab0c288e",-15,-10},
  359. emote2={"150ab0c4bd0",-15,-10,"150ab0c4bd0",-15,-10},
  360. emote3={"150ab0c6e66",-15,-10,"150ab0c6e66",-15,-10},
  361. emote4={"150ab0d3ac2",-15,-10,"150ab0d3ac2",-15,-10},
  362. emote5={"150ab0cd43a",-15,-10,"150ab0cd43a",-15,-10},
  363. emote6={"150ab0d18c5",-15,-10,"150ab0d18c5",-15,-10},
  364. emote7={"150ab0cb1d1",-15,-10,"150ab0cb1d1",-15,-10},
  365. emote8={"150ab0c9044",-15,-10,"150ab0c9044",-15,-10},
  366. emote9={"150ab0cf763",-15,-10,"150ab0cf763",-15,-10},
  367. emote0={"150ab0d5da4",-15,-10,"150ab0d5da4",-15,-10},
  368. --[[ You can add more images, following the next instructions:
  369.   id={"link",x,y,"link",x,y},
  370. the first link, is the link of image when the mice is facing left, and the first x & y are the coords
  371. the second link, is the link of image when the mice is facing right, and the second x & y are the coords
  372. ( all the link's must be in the middle of two " ) ]]
  373. }
  374. for a,b in next,micesImg do
  375. for i,v in next,b do
  376. if type(v)=="string" then
  377. if v:sub(#v-3,#v-3)~="." then
  378. micesImg[a][i]=micesImg[a][i]..".png"
  379. end
  380. end
  381. end
  382. end
  383.  
  384. function t(x,n)
  385. q=tfm.get.room.playerList[n].community
  386. if x:sub(0,7)=="admins." then
  387. if tr[q] then
  388. return tr[q].admins[x:sub(8)]
  389. else
  390. return tr.en.admins[x:sub(8)]
  391. end
  392. else
  393. if tr[q] then
  394. return tr[q][x]
  395. else
  396. return tr.en[x]
  397. end
  398. end
  399. end
  400.  
  401. function eventGoTo()
  402. goTo={}
  403. for a in pairs(tfm.get.room.playerList) do
  404. if can[a:gsub("+","__")] then
  405. table.insert(goTo,a)
  406. end
  407. end
  408. end
  409.  
  410. function funChat(n,m,to)
  411. if n=="LUA" then
  412. tfm.exec.chatMessage("<V>[•]<N> "..m,to)
  413. else
  414. eventGoTo()
  415. for i=1,#goTo do
  416. tfm.exec.chatMessage("<N>></N> <font color='#E68D43'><b>FunCorp</b> <N>></N> <CH>"..string.upper(tfm.get.room.playerList[n].community).."</CH> <V>"..n.."</V> <N>></N>"..m.."</font>",goTo[i])
  417. end
  418. end
  419. end
  420.  
  421. function eventNewPlayer(n)
  422. mice[n]={
  423. ffa=settings.ffa,
  424. fly=settings.fly,
  425. tp=settings.tp,
  426. tpall=settings.tpall,
  427. spawn=settings.spawn,
  428. speed=settings.speed,
  429. jump=settings.jump,
  430. coords=settings.coords,
  431. img=settings.img,
  432. imgp=settings.imgp,
  433. imgu=settings.imgu,
  434. imguu=settings.imguu,
  435. time=os.time()+300,
  436. }
  437. facingLeft[n] = false
  438. fireTS[n] = 0
  439. for i=1,#keys do
  440. system.bindKeyboard(n,keys[i],true,true)
  441. end
  442. if can[n:gsub("+","__")] then
  443. eventGoTo()
  444. for i=1,#goTo do
  445. funChat("LUA",string.format(t("admins.funCorpEnter",goTo[i]),n),goTo[i])
  446. end
  447. end
  448. system.bindMouse(n)
  449. if tr[tfm.get.room.playerList[n].community] then
  450. tfm.exec.chatMessage(t("welcome",n),n)
  451. else
  452. tfm.exec.chatMessage("<V>[•]<R> I'm so sorry, but I don't have your language in my system, I will use english language.",n)
  453. tfm.exec.chatMessage(t("welcome",n),n,goTo[i])
  454. end
  455. end
  456.  
  457. table.foreach(tfm.get.room.playerList, eventNewPlayer)
  458.  
  459. function eventPlayerLeft(n)
  460. if can[n:gsub("+","__")] then
  461. eventGoTo()
  462. for i=1,#goTo do
  463. funChat("LUA",string.format(t("admins.funCorpLeave",goTo[i]),n),goTo[i])
  464. end
  465. end
  466. end
  467.  
  468. function eventMouse(n,x,y)
  469. if mice[n].tp==true then
  470. tfm.exec.movePlayer(n,x,y)
  471. end
  472. if mice[n].tpall==true then
  473. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.movePlayer(a,x,y) end)
  474. mice[n].tpall=false
  475. eventGoTo()
  476. for i=1,#goTo do
  477. funChat("LUA",string.format(t("admins.tpAllOff",goTo[i]),n),goTo[i])
  478. end
  479. end
  480. if mice[n].coords==true then
  481. tfm.exec.chatMessage("<V>[•]<N> X: "..x.." Y: "..y,n)
  482. end
  483. end
  484.  
  485. function eventKeyboard(n,k,d,x,y)
  486. if mice[n].fly==true then
  487. if k==32 then
  488. tfm.exec.movePlayer(n,0,0,true,0,-50)
  489. end
  490. end
  491. if k==0 then
  492. facingLeft[n] = true
  493. if micesImg[mice[n].imgu] then
  494. tfm.exec.removeImage(mice[n].imguu)
  495. mice[n].imguu=tfm.exec.addImage(micesImg[mice[n].imgu][1],"%"..n,micesImg[mice[n].imgu][2],micesImg[mice[n].imgu][3])
  496. else
  497. tfm.exec.removeImage(mice[n].imguu)
  498. end
  499. end
  500. if k==2 then
  501. facingLeft[n] = false
  502. if micesImg[mice[n].imgu] then
  503. tfm.exec.removeImage(mice[n].imguu)
  504. mice[n].imguu=tfm.exec.addImage(micesImg[mice[n].imgu][4],"%"..n,micesImg[mice[n].imgu][5],micesImg[mice[n].imgu][6])
  505. else
  506. tfm.exec.removeImage(mice[n].imguu)
  507. end
  508. end
  509. if mice[n].ffa==true then
  510. if k==3 and os.time() > fireTS[n] + fireDelay then
  511.         fireTS[n] = os.time()
  512.         local dx,a,id
  513.         if facingLeft[n]==true then
  514.             dx,dy,a = -30,0,-90
  515.         else
  516.             dx,dy,a = 30,0,90
  517.         end
  518.         id = tfm.exec.addShamanObject(17, x+dx+offsetX, y+offsetY, a)
  519.         table.insert(toDespawn, {id, os.time()})
  520.         if mouseCannons then
  521.             tfm.exec.addImage(cannon, "#"..id, -37, -19)
  522.             --tfm.exec.addImage("153a43d39b8.png", "#"..id, -14, -13)
  523.         end
  524. end
  525. end
  526. if mice[n].jump==true then
  527. if k==1 then
  528. if tfm.get.room.playerList[n].isJumping==true then
  529. else
  530. tfm.exec.movePlayer(n, 0, 0, true, 0, -70, false)
  531. end
  532. end
  533. end
  534. if can[n:gsub("+","__")] then
  535. if k==17 then
  536. if mice[n].tp==true then
  537. mice[n].tp=false
  538. else
  539. mice[n].tp=true
  540. end
  541. end
  542. if k==16 then
  543. if mice[n].coords==true then
  544. mice[n].coords=false
  545. else
  546. mice[n].coords=true
  547. end
  548. end
  549. end
  550. if k==88 then
  551. if mice[n].speed==true then
  552. local vx = facingLeft[n] and -50 or 50
  553. tfm.exec.movePlayer(n, 0, 0, true, vx, 0, true)
  554. end
  555. end
  556. end
  557.  
  558. function randomColor()
  559. return "0x" .. string.format("%X", math.random(0x000000, 0xFFFFFF))
  560. end
  561.  
  562. function eventLoop()
  563. if disco==true then
  564. for p in pairs(tfm.get.room.playerList) do
  565. tfm.exec.setNameColor(p, randomColor());
  566. end
  567. end
  568.     for i,o in ipairs(toDespawn) do
  569.         if os.time() > o[2]+despawnTime then
  570.             tfm.exec.removeObject (o[1])
  571.             table.remove (toDespawn, i)
  572.         end
  573.     end
  574. end
  575.  
  576. function comando(q,n,v)
  577. if q=="ffa" then
  578. if n~="all" then
  579. if v=="on" then
  580. mice[n].ffa=true
  581. tfm.exec.chatMessage(t("ffaOn",n),n)
  582. else
  583. tfm.exec.chatMessage(tostring(t("ffaOff",n)),tostring(n))
  584. mice[n].ffa=false
  585. end
  586. else
  587. if v=="on" then
  588. table.foreach(tfm.get.room.playerList,function(a) mice[a].ffa=true tfm.exec.chatMessage(tostring(t("ffaOn",a)),a) end)
  589. else
  590. table.foreach(tfm.get.room.playerList,function(a) mice[a].ffa=false tfm.exec.chatMessage(tostring(t("ffaOff",a)),a) end)
  591. end
  592. end
  593. end
  594. if q=="fly" then
  595. if n~="all" then
  596. if v=="on" then
  597. mice[n].fly=true
  598. tfm.exec.chatMessage(t("flyOn",n),n)
  599. else
  600. mice[n].fly=false
  601. tfm.exec.chatMessage(t("flyOff",n),n)
  602. end
  603. else
  604. if v=="on" then
  605. table.foreach(tfm.get.room.playerList,function(a) mice[a].fly=true tfm.exec.chatMessage(t("flyOn",a),a) end)
  606. else
  607. table.foreach(tfm.get.room.playerList,function(a) mice[a].fly=false tfm.exec.chatMessage(t("flyOff",a),a) end)
  608. end
  609. end
  610. end
  611. end
  612.  
  613. function eventChatCommand(n,c)
  614. local a = {}
  615. for arg in c:gmatch ("[^%s]+") do
  616. table.insert (a, arg)
  617. end
  618. a[1]=a[1]:lower()
  619. if can[n:gsub("+","__")] then
  620. if a[1]=="filtro" then
  621. if filtre==true then
  622. filtre=false
  623. eventGoTo()
  624. for i=1,#goTo do
  625. funChat("LUA",string.format(t("admins.filtroOff",goTo[i]),n),goTo[i])
  626. end
  627. else
  628. filtre=true
  629. eventGoTo()
  630. for i=1,#goTo do
  631. funChat("LUA",string.format(t("admins.filtroOn",goTo[i]),n),goTo[i])
  632. end
  633. end
  634. end
  635. if a[1]=="speed" then
  636. if a[3] then
  637. if a[3]=="on" then
  638. if a[2]=="all" then
  639. table.foreach(tfm.get.room.playerList,function(a) mice[a].speed=true tfm.exec.chatMessage(t("speedOn",a),a) end)
  640. settings.speed=true
  641. eventGoTo()
  642. for i=1,#goTo do
  643. funChat("LUA",string.format(t("admins.speedAllOn",goTo[i]),n),goTo[i])
  644. end
  645. else
  646. mice[a[2]].speed=true
  647. tfm.exec.chatMessage(t("speedOn",a[2]),a[2])
  648. eventGoTo()
  649. for i=1,#goTo do
  650. funChat("LUA",string.format(t("admins.speedOn",goTo[i]),n,a[2]),goTo[i])
  651. end
  652. end
  653. else
  654. if a[2]=="all" then
  655. table.foreach(tfm.get.room.playerList,function(a) mice[a].speed=false tfm.exec.chatMessage(t("speedOff",a),a) end)
  656. settings.speed=false
  657. eventGoTo()
  658. for i=1,#goTo do
  659. funChat("LUA",string.format(t("admins.speedAllOff",goTo[i]),n),goTo[i])
  660. end
  661. else
  662. mice[a[2]].speed=false
  663. tfm.exec.chatMessage(t("speedOff",a[2]),a[2])
  664. eventGoTo()
  665. for i=1,#goTo do
  666. funChat("LUA",string.format(t("admins.speedOff",goTo[i]),n,a[2]),goTo[i])
  667. end
  668. end
  669. end
  670. end
  671. end
  672. if a[1]=="jump" then
  673. if a[3] then
  674. if a[3]=="on" then
  675. if a[2]=="all" then
  676. settings.jump=true
  677. table.foreach(tfm.get.room.playerList,function(a) mice[a].jump=true tfm.exec.chatMessage(t("jumpOn",a),a) end)
  678. eventGoTo()
  679. for i=1,#goTo do
  680. funChat("LUA",string.format(t("admins.jumpAllOn",goTo[i]),n),goTo[i])
  681. end
  682. else
  683. mice[a[2]].jump=true
  684. tfm.exec.chatMessage(t("jumpOn",a[2]),a[2])
  685. eventGoTo()
  686. for i=1,#goTo do
  687. funChat("LUA",string.format(t("admins.jumpOn",goTo[i]),n,a[2]),goTo[i])
  688. end
  689. end
  690. else
  691. if a[2]=="all" then
  692. settings.jump=false
  693. table.foreach(tfm.get.room.playerList,function(a) mice[a].jump=false tfm.exec.chatMessage(t("jumpOff",a),a) end)
  694. eventGoTo()
  695. for i=1,#goTo do
  696. funChat("LUA",string.format(t("admins.jumpAllOff",goTo[i]),n),goTo[i])
  697. end
  698. else
  699. mice[a[2]].jump=false
  700. tfm.exec.chatMessage(t("jumpOff",a[2]),a[2])
  701. eventGoTo()
  702. for i=1,#goTo do
  703. funChat("LUA",string.format(t("admins.jumpOff",goTo[i]),n,a[2]),goTo[i])
  704. end
  705. end
  706. end
  707. end
  708. end
  709. if a[1]=="spawn" then
  710. if a[5] then
  711. if objects[a[2]] then
  712. tfm.exec.removeImage(objects[a[2]].image)
  713. tfm.exec.removeObject(objects[a[2]].object)
  714. end
  715. objects[a[2]]={}
  716. objects[a[2]].object=tfm.exec.addShamanObject(tonumber(a[3]),tonumber(a[4]),tonumber(a[5]))
  717. if a[6] then
  718. objects[a[2]].image=tfm.exec.addImage(a[6],"#"..objects[a[2]].object,(a[7] and tonumber(a[7]) or 0),(a[8] and tonumber(a[8]) or 0))
  719. eventGoTo()
  720. for i=1,#goTo do
  721. funChat("LUA",string.format(t("admins.spawnObjectImage",goTo[i]),n,a[2],a[3],a[4],a[5],a[6]),goTo[i])
  722. end
  723. else
  724. objects[a[2]].image=""
  725. eventGoTo()
  726. for i=1,#goTo do
  727. funChat("LUA",string.format(t("admins.spawnObject",goTo[i]),n,a[2],a[3],a[4],a[5]),goTo[i])
  728. end
  729. end
  730. end
  731. end
  732. if a[1]=="despawn" then
  733. if a[2] then
  734. if objects[a[2]] then
  735. tfm.exec.removeImage(objects[a[2]].image)
  736. tfm.exec.removeObject(objects[a[2]].object)
  737. eventGoTo()
  738. for i=1,#goTo do
  739. funChat("LUA",string.format(t("admins.despawnObject",goTo[i]),n,a[2]),goTo[i])
  740. end
  741. end
  742. end
  743. end
  744. if a[1]=="pw" then
  745. if a[2] then
  746. local msg=a[2]
  747. if a[3] then
  748. for i=3,#a do
  749. msg=msg.." "..a[i]
  750. end
  751. end
  752. tfm.exec.setRoomPassword(msg)
  753. eventGoTo()
  754. for i=1,#goTo do
  755. funChat("LUA",string.format(t("admins.pwOn",goTo[i]),n,msg),goTo[i])
  756. end
  757. else
  758. tfm.exec.setRoomPassword("")
  759. eventGoTo()
  760. for i=1,#goTo do
  761. funChat("LUA",string.format(t("admins.pwOff",goTo[i]),n),goTo[i])
  762. end
  763. end
  764. end
  765. if a[1]=="tpall" then
  766. if mice[n].tpall==true then
  767. mice[n].tpall=false
  768. eventGoTo()
  769. for i=1,#goTo do
  770. funChat("LUA",string.format(t("admins.tpAllOff",goTo[i]),n),goTo[i])
  771. end
  772. else
  773. mice[n].tpall=true
  774. eventGoTo()
  775. for i=1,#goTo do
  776. funChat("LUA",string.format(t("admins.tpAllOn",goTo[i]),n),goTo[i])
  777. end
  778. end
  779. end
  780. if a[1]=="sham" then
  781. if a[2] then
  782. if a[2]=="all" then
  783. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.setShaman(a) end)
  784. eventGoTo()
  785. for i=1,#goTo do
  786. funChat("LUA",string.format(t("admins.shamanAll",goTo[i]),n),goTo[i])
  787. end
  788. else
  789. tfm.exec.setShaman(a[2])
  790. eventGoTo()
  791. for i=1,#goTo do
  792. funChat("LUA",string.format(t("admins.shamanUser",goTo[i]),n,a[2]),goTo[i])
  793. end
  794. end
  795. end
  796. end
  797. if a[1]=="funchat" then
  798. local msg=""
  799. for i=2,#a do
  800. msg=msg.." "..a[i]
  801. end
  802. funChat(n,msg)
  803. end
  804. if a[1]=="snow" then
  805. if a[2] then
  806. tfm.exec.snow(tonumber(a[2]))
  807. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.chatMessage(t("snow",a),a) end)
  808. eventGoTo()
  809. for i=1,#goTo do
  810. funChat("LUA",string.format(t("admins.customSnow",goTo[i]),n,tonumber(a[2])),goTo[i])
  811. end
  812. else
  813. tfm.exec.snow()
  814. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.chatMessage(t("snow",a),a) end)
  815. eventGoTo()
  816. for i=1,#goTo do
  817. funChat("LUA",string.format(t("admins.snow",goTo[i]),n),goTo[i])
  818. end
  819. end
  820. end
  821. if a[1]=="disco" then
  822. if disco==false then
  823. disco=true
  824. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.chatMessage(t("discoOn",a),a) end)
  825. eventGoTo()
  826. for i=1,#goTo do
  827. funChat("LUA",string.format(t("admins.discoOn",goTo[i]),n),goTo[i])
  828. end
  829. else
  830. disco=false
  831. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.chatMessage(t("discoOff",a),a) end)
  832. eventGoTo()
  833. for i=1,#goTo do
  834. funChat("LUA",string.format(t("admins.discoOff",goTo[i]),n),goTo[i])
  835. end
  836. end
  837. end
  838. if a[1]=="warn" then
  839. local msg=""
  840. for i=3,#a do
  841. msg=msg.." "..a[i]
  842. end
  843. tfm.exec.chatMessage("<font color='#EB0000'>[FunCorp] "..t("warning",a[2])..":"..msg,a[2])
  844. eventGoTo()
  845. for i=1,#goTo do
  846. funChat("LUA",string.format(t("admins.warned",goTo[i]),n,a[2],msg),goTo[i])
  847. end
  848. end
  849. if a[1]=="msg" then
  850. local msg=""
  851. for i=2,#a do
  852. msg=msg.." "..a[i]
  853. end
  854. eventGoTo()
  855. for i=1,#goTo do
  856. funChat("LUA",string.format(t("admins.funCorpMessage",goTo[i]),n),goTo[i])
  857. end
  858. tfm.exec.chatMessage("<font color='#E68D43'>[FunCorp]"..msg.."</font>")
  859. end
  860. if a[1]=="image" then
  861. if a[6] then
  862. if not images[a[2]] or images[a[2]]==nil then
  863. else
  864. tfm.exec.removeImage(images[a[2]])
  865. m=a[2].."aNa"
  866. images[m]=nil
  867. end
  868. m=a[2].."a"
  869. images[m]={a[3],a[6],a[4],a[5]}
  870. images[a[2]]=tfm.exec.addImage(a[3],a[6],a[4],a[5])
  871. eventGoTo()
  872. for i=1,#goTo do
  873. funChat("LUA",string.format(t("admins.addImage",goTo[i]),n,a[2],a[3],a[6]),goTo[i])
  874. end
  875. end
  876. end
  877. if a[1]=="removeimage" then
  878. if a[2] then
  879. if images[a[2]] then
  880. tfm.exec.removeImage(images[a[2]])
  881. m=a[2].."a"
  882. images[m]=nil
  883. eventGoTo()
  884. for i=1,#goTo do
  885. funChat("LUA",string.format(t("admins.removeImage",goTo[i]),n,a[2]),goTo[i])
  886. end
  887. end
  888. end
  889. end
  890. if a[1]=="listaimagen" then
  891. local lista="<V>[•]</V> Lista de imágenes\n"
  892. local signo="•"
  893. for k,v in pairs(images) do
  894. lista=lista.."• <VP>"..k.."</VP>: "
  895. local asd={}
  896. for lol in v:gmatch("[^,]+") do
  897. lol=tostring(lol)
  898. if lol:sub(0,18)=="tfm.exec.addImage(" then
  899. lol=lol:sub(19)
  900. end
  901. if lol:sub(#lol-1)==")" then
  902. lol=lol:sub(0,#lol-1)
  903. end
  904. table.insert(asd,lol)
  905. end
  906. lista=lista.."<VP>"..asd[1].."</VP>, X: <VP>"..asd[3].."</VP>, Y: <VP>"..asd[4].."</VP>, Formato: <VP>"..asd[2].."</VP>\n"
  907. end
  908. tfm.exec.chatMessage(lista,n)
  909. end
  910. if a[1]=="ffa" then
  911. if a[3] then
  912. if a[2]~="all" then
  913. if a[3]=="on" then
  914. comando("ffa",a[2],"on")
  915. eventGoTo()
  916. for i=1,#goTo do
  917. funChat("LUA",string.format(t("admins.ffaOnUser",goTo[i]),n,a[2]),goTo[i])
  918. end
  919. else
  920. comando("ffa",a[2],"off")
  921. eventGoTo()
  922. for i=1,#goTo do
  923. funChat("LUA",string.format(t("admins.ffaOffUser",goTo[i]),n,a[2]),goTo[i])
  924. end
  925. end
  926. else
  927. if a[3]=="on" then
  928. comando("ffa",a[2],"on")
  929. settings.ffa=true
  930. eventGoTo()
  931. for i=1,#goTo do
  932. funChat("LUA",string.format(t("admins.ffaOnAll",goTo[i]),n,a[2]),goTo[i])
  933. end
  934. else
  935. settings.ffa=false
  936. comando("ffa",a[2],"off")
  937. eventGoTo()
  938. for i=1,#goTo do
  939. funChat("LUA",string.format(t("admins.ffaOffAll",goTo[i]),n,a[2]),goTo[i])
  940. end
  941. end
  942. end
  943. end
  944. end
  945. if a[1]=="fly" then
  946. if a[3] then
  947. if a[2]=="all" then
  948. if a[3]=="on" then
  949. comando("fly",a[2],"on")
  950. settings.fly=true
  951. eventGoTo()
  952. for i=1,#goTo do
  953. funChat("LUA",string.format(t("admins.flyOnAll",goTo[i]),n),goTo[i])
  954. end
  955. else
  956. comando("fly",a[2],"off")
  957. settings.fly=true
  958. eventGoTo()
  959. for i=1,#goTo do
  960. funChat("LUA",string.format(t("admins.flyOffAll",goTo[i]),n),goTo[i])
  961. end
  962. end
  963. else
  964. if a[3]=="on" then
  965. comando("fly",a[2],"on")
  966. eventGoTo()
  967. for i=1,#goTo do
  968. funChat("LUA",string.format(t("admins.flyOnUser",goTo[i]),n,a[2]),goTo[i])
  969. end
  970. else
  971. comando("fly",a[2],"off")
  972. eventGoTo()
  973. for i=1,#goTo do
  974. funChat("LUA",string.format(t("admins.flyOffUser",goTo[i]),n,a[2]),goTo[i])
  975. end
  976. end
  977. end
  978. end
  979. end
  980. if a[1]=="vamp" then
  981. if a[2] then
  982. if a[2]=="all" then
  983. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.setVampirePlayer(a) tfm.exec.chatMessage(t("vamp",a),a) end)
  984. eventGoTo()
  985. for i=1,#goTo do
  986. funChat("LUA",string.format(t("admins.vampAll",goTo[i]),n),goTo[i])
  987. end
  988. else
  989. tfm.exec.setVampirePlayer(a[2])
  990. tfm.exec.chatMessage(t("vamp",a[2]),a[2])
  991. eventGoTo()
  992. for i=1,#goTo do
  993. funChat("LUA",string.format(t("admins.vampUser",goTo[i]),n,a[2]),goTo[i])
  994. end
  995. end
  996. end
  997. end
  998. if a[1]=="kill" then
  999. if a[2] then
  1000. if a[2]=="all" then
  1001. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.killPlayer(a) end)
  1002. eventGoTo()
  1003. for i=1,#goTo do
  1004. funChat("LUA",string.format(t("admins.killAll",goTo[i]),n),goTo[i])
  1005. end
  1006. else
  1007. tfm.exec.killPlayer(a[2])
  1008. eventGoTo()
  1009. for i=1,#goTo do
  1010. funChat("LUA",string.format(t("admins.killUser",goTo[i]),n,a[2]),goTo[i])
  1011. end
  1012. end
  1013. end
  1014. end
  1015. if a[1]=="map" then
  1016. if a[2] then
  1017. if a[2]:sub(1,1)=="@" then a[2]=tonumber(a[2]:sub(2)) else for i=0,9 do if a[2]:sub(1,1)==tostring(i) then a[2]=tonumber(a[2]) end end end
  1018. tfm.exec.newGame(a[2])
  1019. eventGoTo()
  1020. for i=1,#goTo do
  1021. funChat("LUA",string.format(t("admins.map",goTo[i],tonumber(a[2])),n,tonumber(a[2])),goTo[i])
  1022. end
  1023. end
  1024. end
  1025. if a[1]=="respawn" then
  1026. if a[2] then
  1027. if a[2]=="all" then
  1028. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.respawnPlayer(a) tfm.exec.chatMessage(t("respawn",a),a) end)
  1029. eventGoTo()
  1030. for i=1,#goTo do
  1031. funChat("LUA",string.format(t("admins.respawnAll",goTo[i]),n),goTo[i])
  1032. end
  1033. else
  1034. tfm.exec.respawnPlayer(a[2])
  1035. tfm.exec.chatMessage(t("respawn",a[2]),a[2])
  1036. eventGoTo()
  1037. for i=1,#goTo do
  1038. funChat("LUA",string.format(t("admins.respawnUser",goTo[i]),n,a[2]),goTo[i])
  1039. end
  1040. end
  1041. end
  1042. end
  1043. if a[1]=="time" then
  1044. if a[2] then
  1045. if a[2]=="inf" then
  1046. tfm.exec.setGameTime(99999)
  1047. eventGoTo()
  1048. for i=1,#goTo do
  1049. funChat("LUA",string.format(t("admins.infiniteTime",goTo[i]),n),goTo[i])
  1050. end
  1051. else
  1052. tfm.exec.setGameTime(tonumber(a[2]))
  1053. eventGoTo()
  1054. for i=1,#goTo do
  1055. funChat("LUA",string.format(t("admins.setTime",goTo[i]),n,tonumber(a[2])),goTo[i])
  1056. end
  1057. end
  1058. end
  1059. end
  1060. if a[1]=="help" then
  1061. tfm.exec.chatMessage(t("admins.help",n),n)
  1062. end
  1063. if a[1]=="imgffa" then
  1064. if a[2] then
  1065. cannon=a[2]
  1066. eventGoTo()
  1067. for i=1,#goTo do
  1068. funChat("LUA",string.format(t("admins.urlFfa",goTo[i]),n,a[2]),goTo[i])
  1069. end
  1070. else
  1071. if mouseCannons==false then
  1072. eventGoTo()
  1073. for i=1,#goTo do
  1074. funChat("LUA",string.format(t("admins.miceFfaOn",goTo[i]),n),goTo[i])
  1075. end
  1076. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.chatMessage(t("miceFfaOn",a),a) end)
  1077. mouseCannons=true
  1078. else
  1079. eventGoTo()
  1080. for i=1,#goTo do
  1081. funChat("LUA",string.format(t("admins.miceFfaOff",goTo[i]),n),goTo[i])
  1082. end
  1083. table.foreach(tfm.get.room.playerList,function(a) tfm.exec.chatMessage(t("miceFfaOff",a),a) end)
  1084. mouseCannons=false
  1085. end
  1086. end
  1087. end
  1088. if a[1]=="imgall" then
  1089. if a[5] then
  1090. local q={}
  1091. for a in pairs(tfm.get.room.playerList) do
  1092. table.insert(q,a)
  1093. end
  1094. for i=1,#q do
  1095. if images[iAT][q[i]] then
  1096. tfm.exec.removeImage(images[iAT][q[i]])
  1097. end
  1098. images[iAT][q[i]]=tfm.exec.addImage(a[2],a[5]..q[i],a[3],a[4])
  1099. end
  1100. end
  1101. end
  1102. if a[1]=="imgalloff" then
  1103. local q={}
  1104. for a in pairs(tfm.get.room.playerList) do
  1105. table.insert(q,a)
  1106. end
  1107. for i=1,#q do
  1108. tfm.exec.removeImage(images[iAT][q[i]])
  1109. images[iAT][q[i]]=nil
  1110. end
  1111. end
  1112. if a[1]=="miceimg" then
  1113. if a[3] then
  1114. if a[3]=="all" then
  1115. if a[2]=="off" then
  1116. table.foreach(tfm.get.room.playerList,function(b) mice[b].imgu="none" end)
  1117. settings.imgu="none"
  1118. eventGoTo()
  1119. for i=1,#goTo do
  1120. funChat("LUA",string.format(t("admins.imgUAllOff",goTo[i]),n),goTo[i])
  1121. end
  1122. else
  1123. if micesImg[a[2]] then
  1124. table.foreach(tfm.get.room.playerList,function(b) mice[b].imgu=a[2] tfm.exec.chatMessage(t("imgU",b),b) end)
  1125. settings.imgu=a[2]
  1126. eventGoTo()
  1127. for i=1,#goTo do
  1128. funChat("LUA",string.format(t("admins.imgUAll",goTo[i]),n,a[2]),goTo[i])
  1129. end
  1130. else
  1131. tfm.exec.chatMessage(string.format(t("admins.failImgU",n),a[2]),n)
  1132. end
  1133. end
  1134. else
  1135. if a[3]:sub(1,1)=="+" then  a[3]="+"..a[3]:sub(2,2):upper()..a[3]:sub(3):lower() else a[3]=a[3]:sub(1,1):upper()..a[3]:sub(2):lower() end
  1136. if a[2]=="off" then
  1137. mice[a[3]].imgu="none"
  1138. eventGoTo()
  1139. for i=1,#goTo do
  1140. funChat("LUA",string.format(t("admins.imgUOff",goTo[i]),n,a[3]),goTo[i])
  1141. end
  1142. else
  1143. if micesImg[a[2]] then
  1144. mice[a[3]].imgu=a[2]
  1145. tfm.exec.chatMessage(t("imgU",a[3]),a[3])
  1146. eventGoTo()
  1147. for i=1,#goTo do
  1148. funChat("LUA",string.format(t("admins.imgU",goTo[i]),n,a[2],a[3]),goTo[i])
  1149. end
  1150. else
  1151. tfm.exec.chatMessage(string.format(t("admins.failImgU",n),a[2]),n)
  1152. end
  1153. end
  1154. end
  1155. end
  1156. end
  1157. end
  1158. end
  1159.  
  1160. cmds={"funchat","snow","disco","warn","msg","image","removeimage","listaimagen","ffa","fly","vamp","kill","map","respawn","time","imgffa","help","tpall","spawn","pw","jump","speed","sham","imgall","imgalloff","filtro","miceimg","despawn"}
  1161. for i=1,#cmds do
  1162. system.disableChatCommandDisplay(cmds[i])
  1163. end
  1164.  
  1165.  
  1166. function eventChatMessage(n,m)
  1167. if filtre==true then
  1168. m=m:lower()
  1169. local a = {}
  1170. for arg in m:gmatch ("[^%s]+") do
  1171. table.insert (a, arg)
  1172. end
  1173. for i=1,#filtro do
  1174. for v=1,#a do
  1175. if a[v]==filtro[i] then
  1176. tfm.exec.chatMessage("<font color='#EB0000'>[FunCorp] "..t("warning",n)..": "..t("modLanguage",n),n)
  1177. eventGoTo()
  1178. for i=1,#goTo do
  1179. funChat("LUA",string.format(t("admins.warnedSystem",goTo[i]),n,m),goTo[i])
  1180. end
  1181. end
  1182. end
  1183. end
  1184. end
  1185. end
  1186.  
  1187. function eventGoToImages()
  1188. goToImages={}
  1189. for a in pairs(images) do
  1190. local q=(#a-3)
  1191. if a:sub(q)=="aNa" then
  1192. if images[a]~=nil then
  1193. table.insert(goToImages,a)
  1194. end
  1195. end
  1196. end
  1197. end
  1198.  
  1199. function eventNewGame()
  1200. eventGoToImages()
  1201. for i=1,#goToImages do
  1202. images[goToImages[i]]=tfm.exec.addImage(images[goToImages[i]][1],images[goToImages[i]][2],images[goToImages[i]][3],images[goToImages[i]][4])
  1203. end
  1204. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement