Guest User

Untitled

a guest
Aug 9th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function consoleCommandCheck(command)
  2. {
  3.     if (command)
  4.     {
  5.         command = command.toLowerCase();
  6.         commandExists = true;
  7.         var __reg3 = command.split(" ");
  8.         consoleCommand = __reg3[0];
  9.         consoleParam = __reg3[1];
  10.         if (0 != (consoleParam == undefined) | 0 != (consoleParam == ""))
  11.         {
  12.             consoleParam_isNum = false;
  13.         }
  14.         else
  15.         {
  16.             if (isNaN(consoleParam))
  17.             {
  18.                 consoleParam_isNum = false;
  19.             }
  20.             else
  21.             {
  22.                 consoleParam_isNum = true;
  23.                 consoleParam = new Number(consoleParam);
  24.             }
  25.         }
  26.         if (consoleCommand == "zing")
  27.         {
  28.             extraTxt = "zzzing!";
  29.         }
  30.         else
  31.         {
  32.             if (consoleCommand == "cake")
  33.             {
  34.                 extraTxt = "ZEH CAKE IZ A LIE";
  35.             }
  36.             else
  37.             {
  38.                 if (consoleCommand == "tralala")
  39.                 {
  40.                     extraTxt = "have you touched my tralala?";
  41.                 }
  42.                 else
  43.                 {
  44.                     if (consoleCommand == "lolcopter")
  45.                     {
  46.                         extraTxt = "that\'s my ride home.";
  47.                     }
  48.                     else
  49.                     {
  50.                         if (consoleCommand == "roflcopter")
  51.                         {
  52.                             extraTxt = "that\'s the father of lolcopter.";
  53.                         }
  54.                         else
  55.                         {
  56.                             if (consoleCommand == "zingcraft")
  57.                             {
  58.                                 extraTxt = "zzzzzzzzwish!~";
  59.                             }
  60.                             else
  61.                             {
  62.                                 if (consoleCommand == "hello")
  63.                                 {
  64.                                     extraTxt = "why hello.";
  65.                                 }
  66.                                 else
  67.                                 {
  68.                                     if (consoleCommand == "shoopdawoop")
  69.                                     {
  70.                                         extraTxt = "IMAH CARCHING MAH LAZAR";
  71.                                     }
  72.                                     else
  73.                                     {
  74.                                         if (consoleCommand == "awesome")
  75.                                         {
  76.                                             extraTxt = "awesome indeed.";
  77.                                         }
  78.                                         else
  79.                                         {
  80.                                             if (consoleCommand == "thanks")
  81.                                             {
  82.                                                 extraTxt = "anytime.";
  83.                                             }
  84.                                             else
  85.                                             {
  86.                                                 if (consoleCommand == "zomgowned")
  87.                                                 {
  88.                                                     extraTxt = "lol.";
  89.                                                 }
  90.                                                 else
  91.                                                 {
  92.                                                     if (consoleCommand == "zomg")
  93.                                                     {
  94.                                                         extraTxt = "ZEUS OWNED MY GEODUDE.";
  95.                                                     }
  96.                                                     else
  97.                                                     {
  98.                                                         if (consoleCommand == "lol")
  99.                                                         {
  100.                                                             extraTxt = "lots of laughs?";
  101.                                                         }
  102.                                                         else
  103.                                                         {
  104.                                                             if (consoleCommand == "nonsense")
  105.                                                             {
  106.                                                                 extraTxt = "exactly, it doesn\'t make any sense.";
  107.                                                             }
  108.                                                             else
  109.                                                             {
  110.                                                                 if (consoleCommand == "wassup")
  111.                                                                 {
  112.                                                                     extraTxt = "wassuuuuuuuuuuuppp?";
  113.                                                                 }
  114.                                                                 else
  115.                                                                 {
  116.                                                                     if (consoleCommand == "console")
  117.                                                                     {
  118.                                                                         extraTxt = "that\'s me!";
  119.                                                                     }
  120.                                                                     else
  121.                                                                     {
  122.                                                                         if (consoleCommand == "brain")
  123.                                                                         {
  124.                                                                             extraTxt = "that\'d be Ido\'s.";
  125.                                                                         }
  126.                                                                         else
  127.                                                                         {
  128.                                                                             if (consoleCommand == "bla")
  129.                                                                             {
  130.                                                                                 extraTxt = "try harder.";
  131.                                                                             }
  132.                                                                             else
  133.                                                                             {
  134.                                                                                 if (consoleCommand == "bye")
  135.                                                                                 {
  136.                                                                                     extraTxt = "oh please, don\'t leave.";
  137.                                                                                 }
  138.                                                                                 else
  139.                                                                                 {
  140.                                                                                     if (consoleCommand == "ok")
  141.                                                                                     {
  142.                                                                                         extraTxt = "okie dokie!";
  143.                                                                                     }
  144.                                                                                     else
  145.                                                                                     {
  146.                                                                                         if (consoleCommand == "flash")
  147.                                                                                         {
  148.                                                                                             extraTxt = "it crashes a lot. And does problems with Vista x64 ):";
  149.                                                                                         }
  150.                                                                                         else
  151.                                                                                         {
  152.                                                                                             if (consoleCommand == "zund")
  153.                                                                                             {
  154.                                                                                                 extraTxt = "זומג!";
  155.                                                                                             }
  156.                                                                                             else
  157.                                                                                             {
  158.                                                                                                 if (consoleCommand == "iphone")
  159.                                                                                                 {
  160.                                                                                                     extraTxt = "don\'t even start.";
  161.                                                                                                 }
  162.                                                                                                 else
  163.                                                                                                 {
  164.                                                                                                     if (consoleCommand == "wecreatestuff")
  165.                                                                                                     {
  166.                                                                                                         extraTxt = "oh, we totally do.";
  167.                                                                                                     }
  168.                                                                                                     else
  169.                                                                                                     {
  170.                                                                                                         if (consoleCommand == "aloligotcomplexcockitandpullit")
  171.                                                                                                         {
  172.                                                                                                             extraTxt = "It\'s \'A loaded god complex, cock it and pull it\' goddammit!.";
  173.                                                                                                         }
  174.                                                                                                         else
  175.                                                                                                         {
  176.                                                                                                             if (consoleCommand == "orly")
  177.                                                                                                             {
  178.                                                                                                                 extraTxt = "ya rly.";
  179.                                                                                                             }
  180.                                                                                                             else
  181.                                                                                                             {
  182.                                                                                                                 if (consoleCommand == "gosh")
  183.                                                                                                                 {
  184.                                                                                                                     extraTxt = "GOSH!!";
  185.                                                                                                                 }
  186.                                                                                                                 else
  187.                                                                                                                 {
  188.                                                                                                                     if (consoleCommand == "hitler")
  189.                                                                                                                     {
  190.                                                                                                                         extraTxt = "HITL0R!?";
  191.                                                                                                                     }
  192.                                                                                                                     else
  193.                                                                                                                     {
  194.                                                                                                                         if (consoleCommand == "easteregg")
  195.                                                                                                                         {
  196.                                                                                                                             extraTxt = "you found it.";
  197.                                                                                                                         }
  198.                                                                                                                         else
  199.                                                                                                                         {
  200.                                                                                                                             if (consoleCommand == "gman")
  201.                                                                                                                             {
  202.                                                                                                                                 extraTxt = "yes, you can find him, visualy, in this game...";
  203.                                                                                                                             }
  204.                                                                                                                             else
  205.                                                                                                                             {
  206.                                                                                                                                 if (consoleCommand == "xbox")
  207.                                                                                                                                 {
  208.                                                                                                                                     extraTxt = "X BAWX!";
  209.                                                                                                                                 }
  210.                                                                                                                                 else
  211.                                                                                                                                 {
  212.                                                                                                                                     if (consoleCommand == "portal")
  213.                                                                                                                                     {
  214.                                                                                                                                         extraTxt = "now you\'re thinking with portals. no, nothing was activated.";
  215.                                                                                                                                     }
  216.                                                                                                                                     else
  217.                                                                                                                                     {
  218.                                                                                                                                         if (consoleCommand == "retarded")
  219.                                                                                                                                         {
  220.                                                                                                                                             extraTxt = "movie!";
  221.                                                                                                                                         }
  222.                                                                                                                                         else
  223.                                                                                                                                         {
  224.                                                                                                                                             if (consoleCommand == "4815162342")
  225.                                                                                                                                             {
  226.                                                                                                                                                 extraTxt = "system failure system failure system failure system failure system failure system failure system failure";
  227.                                                                                                                                             }
  228.                                                                                                                                             else
  229.                                                                                                                                             {
  230.                                                                                                                                                 if (consoleCommand == "crash")
  231.                                                                                                                                                 {
  232.                                                                                                                                                     extraTxt = "we\'re trying, but we\'ll never be good as Source";
  233.                                                                                                                                                 }
  234.                                                                                                                                                 else
  235.                                                                                                                                                 {
  236.                                                                                                                                                     if (consoleCommand == "messenger")
  237.                                                                                                                                                     {
  238.                                                                                                                                                         extraTxt = "Ido - dragy2005@hotmail.com Hen - henmazolski@gmail.com ):";
  239.                                                                                                                                                     }
  240.                                                                                                                                                     else
  241.                                                                                                                                                     {
  242.                                                                                                                                                         if (consoleCommand == "website")
  243.                                                                                                                                                         {
  244.                                                                                                                                                             extraTxt = "wecreatestuff.com";
  245.                                                                                                                                                         }
  246.                                                                                                                                                         else
  247.                                                                                                                                                         {
  248.                                                                                                                                                             if (consoleCommand == "lost")
  249.                                                                                                                                                             {
  250.                                                                                                                                                                 extraTxt = "charlie\'s dead ):";
  251.                                                                                                                                                             }
  252.                                                                                                                                                             else
  253.                                                                                                                                                             {
  254.                                                                                                                                                                 if (consoleCommand == "sneeze")
  255.                                                                                                                                                                 {
  256.                                                                                                                                                                     extraTxt = "bless you.";
  257.                                                                                                                                                                 }
  258.                                                                                                                                                                 else
  259.                                                                                                                                                                 {
  260.                                                                                                                                                                     if (consoleCommand == "eon8")
  261.                                                                                                                                                                     {
  262.                                                                                                                                                                         extraTxt = "oh you\'re fucked now.";
  263.                                                                                                                                                                     }
  264.                                                                                                                                                                     else
  265.                                                                                                                                                                     {
  266.                                                                                                                                                                         if (consoleCommand == "gmod")
  267.                                                                                                                                                                         {
  268.                                                                                                                                                                             extraTxt = "GMAN APPROVES.";
  269.                                                                                                                                                                         }
  270.                                                                                                                                                                         else
  271.                                                                                                                                                                         {
  272.                                                                                                                                                                             if (consoleCommand == "iwanttoplayagame")
  273.                                                                                                                                                                             {
  274.                                                                                                                                                                                 extraTxt = "you are already.";
  275.                                                                                                                                                                             }
  276.                                                                                                                                                                             else
  277.                                                                                                                                                                             {
  278.                                                                                                                                                                                 if (consoleCommand == "time")
  279.                                                                                                                                                                                 {
  280.                                                                                                                                                                                     extraTxt = "what\'s the point? you know the time, you\'re just teasing me.";
  281.                                                                                                                                                                                 }
  282.                                                                                                                                                                                 else
  283.                                                                                                                                                                                 {
  284.                                                                                                                                                                                     if (consoleCommand == "thisismadness")
  285.                                                                                                                                                                                     {
  286.                                                                                                                                                                                         killPlayer("crash");
  287.                                                                                                                                                                                         extraTxt = "madness?..\n This\n   IS\n    SPARTAAA!!!\n subject was kicked to his death.";
  288.                                                                                                                                                                                     }
  289.                                                                                                                                                                                     else
  290.                                                                                                                                                                                     {
  291.                                                                                                                                                                                         if (consoleCommand == "hl2")
  292.                                                                                                                                                                                         {
  293.                                                                                                                                                                                             extraTxt = "is awesome.";
  294.                                                                                                                                                                                         }
  295.                                                                                                                                                                                         else
  296.                                                                                                                                                                                         {
  297.                                                                                                                                                                                             if (consoleCommand == "hl2ep1")
  298.                                                                                                                                                                                             {
  299.                                                                                                                                                                                                 extraTxt = "is truly awesome.";
  300.                                                                                                                                                                                             }
  301.                                                                                                                                                                                             else
  302.                                                                                                                                                                                             {
  303.                                                                                                                                                                                                 if (consoleCommand == "hl2ep2")
  304.                                                                                                                                                                                                 {
  305.                                                                                                                                                                                                     extraTxt = "is a great looking game which I have not yet played. but by the time you read this I probably already have.";
  306.                                                                                                                                                                                                 }
  307.                                                                                                                                                                                                 else
  308.                                                                                                                                                                                                 {
  309.                                                                                                                                                                                                     if (consoleCommand == "tf2")
  310.                                                                                                                                                                                                     {
  311.                                                                                                                                                                                                         extraTxt = "well I liked the first...";
  312.                                                                                                                                                                                                     }
  313.                                                                                                                                                                                                     else
  314.                                                                                                                                                                                                     {
  315.                                                                                                                                                                                                         if (consoleCommand == "overlord")
  316.                                                                                                                                                                                                         {
  317.                                                                                                                                                                                                             extraTxt = "I like controling these goblins.";
  318.                                                                                                                                                                                                         }
  319.                                                                                                                                                                                                         else
  320.                                                                                                                                                                                                         {
  321.                                                                                                                                                                                                             if (consoleCommand == "pie")
  322.                                                                                                                                                                                                             {
  323.                                                                                                                                                                                                                 extraTxt = "Not just a pie, me friends, an APPLE pie.";
  324.                                                                                                                                                                                                             }
  325.                                                                                                                                                                                                             else
  326.                                                                                                                                                                                                             {
  327.                                                                                                                                                                                                                 if (consoleCommand == "speak")
  328.                                                                                                                                                                                                                 {
  329.                                                                                                                                                                                                                     extraTxt = "I don\'t speak.";
  330.                                                                                                                                                                                                                 }
  331.                                                                                                                                                                                                                 else
  332.                                                                                                                                                                                                                 {
  333.                                                                                                                                                                                                                     if (consoleCommand == "eat")
  334.                                                                                                                                                                                                                     {
  335.                                                                                                                                                                                                                         extraTxt = "Die.";
  336.                                                                                                                                                                                                                     }
  337.                                                                                                                                                                                                                     else
  338.                                                                                                                                                                                                                     {
  339.                                                                                                                                                                                                                         if (consoleCommand == "stop")
  340.                                                                                                                                                                                                                         {
  341.                                                                                                                                                                                                                             extraTxt = "();";
  342.                                                                                                                                                                                                                         }
  343.                                                                                                                                                                                                                         else
  344.                                                                                                                                                                                                                         {
  345.                                                                                                                                                                                                                             if (consoleCommand == "nightmarehouse")
  346.                                                                                                                                                                                                                             {
  347.                                                                                                                                                                                                                                 extraTxt = "is an hl2 mod by us D:";
  348.                                                                                                                                                                                                                             }
  349.                                                                                                                                                                                                                             else
  350.                                                                                                                                                                                                                             {
  351.                                                                                                                                                                                                                                 if (0 != (0 != (0 != (0 != (consoleCommand == "help") | 0 != (consoleCommand == "commandlist")) | 0 != (consoleCommand == "showlist")) | 0 != (consoleCommand == "showcommands")) | 0 != (consoleCommand == "showcommand"))
  352.                                                                                                                                                                                                                                 {
  353.                                                                                                                                                                                                                                     extraTxt = "Partial command database below.";
  354.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\ninfo - Information.";
  355.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\nkill - suicide.";
  356.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\nhelp/commandlist/showlist/showcommand - partial command database.";
  357.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\nsound - enable/disable sounds.";
  358.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\naim/space - allow [SPACE] dummy portal.";
  359.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\nquality 0-3 - set quality level.";
  360.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\neffects 0-2 - set effect level.";
  361.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\ngravity [0>#] - set map gravity level.";
  362.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\nprevlevel - go to next level.";
  363.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\nnextlevel - go to previous level.";
  364.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\nshowfps - visible/invisible fps and level name.";
  365.                                                                                                                                                                                                                                     extraTxt = extraTxt + "\nOther commands (show<command>, create<command>, remove<command>, <command>) are hidden.";
  366.                                                                                                                                                                                                                                 }
  367.                                                                                                                                                                                                                                 else
  368.                                                                                                                                                                                                                                 {
  369.                                                                                                                                                                                                                                     if (0 != (consoleCommand == "kill") | 0 != (consoleCommand == "die"))
  370.                                                                                                                                                                                                                                     {
  371.                                                                                                                                                                                                                                         killPlayer("crash");
  372.                                                                                                                                                                                                                                         extraTxt = "subject commited suicide with an invisible crowbar.";
  373.                                                                                                                                                                                                                                     }
  374.                                                                                                                                                                                                                                     else
  375.                                                                                                                                                                                                                                     {
  376.                                                                                                                                                                                                                                         if (consoleCommand == "noclip")
  377.                                                                                                                                                                                                                                         {
  378.                                                                                                                                                                                                                                             if (_root.noclip == false)
  379.                                                                                                                                                                                                                                             {
  380.                                                                                                                                                                                                                                                 _root.noclip = true;
  381.                                                                                                                                                                                                                                                 extraTxt = "noclip enabled.";
  382.                                                                                                                                                                                                                                             }
  383.                                                                                                                                                                                                                                             else
  384.                                                                                                                                                                                                                                             {
  385.                                                                                                                                                                                                                                                 _root.noclip = false;
  386.                                                                                                                                                                                                                                                 extraTxt = "noclip disabled.";
  387.                                                                                                                                                                                                                                             }
  388.                                                                                                                                                                                                                                         }
  389.                                                                                                                                                                                                                                         else
  390.                                                                                                                                                                                                                                         {
  391.                                                                                                                                                                                                                                             if (consoleCommand == "god")
  392.                                                                                                                                                                                                                                             {
  393.                                                                                                                                                                                                                                                 if (_root.god == false)
  394.                                                                                                                                                                                                                                                 {
  395.                                                                                                                                                                                                                                                     _root.god = true;
  396.                                                                                                                                                                                                                                                     extraTxt = "god enabled.";
  397.                                                                                                                                                                                                                                                 }
  398.                                                                                                                                                                                                                                                 else
  399.                                                                                                                                                                                                                                                 {
  400.                                                                                                                                                                                                                                                     _root.god = false;
  401.                                                                                                                                                                                                                                                     extraTxt = "god disabled.";
  402.                                                                                                                                                                                                                                                 }
  403.                                                                                                                                                                                                                                             }
  404.                                                                                                                                                                                                                                             else
  405.                                                                                                                                                                                                                                             {
  406.                                                                                                                                                                                                                                                 if (0 != (consoleCommand == "portalproof") | 0 != (consoleCommand == "antiportal"))
  407.                                                                                                                                                                                                                                                 {
  408.                                                                                                                                                                                                                                                     if (_root.portalProof == false)
  409.                                                                                                                                                                                                                                                     {
  410.                                                                                                                                                                                                                                                         _root.portalProof = true;
  411.                                                                                                                                                                                                                                                         extraTxt = "Portal Proof enabled.";
  412.                                                                                                                                                                                                                                                     }
  413.                                                                                                                                                                                                                                                     else
  414.                                                                                                                                                                                                                                                     {
  415.                                                                                                                                                                                                                                                         _root.portalProof = false;
  416.                                                                                                                                                                                                                                                         extraTxt = "Portal Proof disabled.";
  417.                                                                                                                                                                                                                                                     }
  418.                                                                                                                                                                                                                                                 }
  419.                                                                                                                                                                                                                                                 else
  420.                                                                                                                                                                                                                                                 {
  421.                                                                                                                                                                                                                                                     if (0 != (consoleCommand == "dance") | 0 != (consoleCommand == "/dance"))
  422.                                                                                                                                                                                                                                                     {
  423.                                                                                                                                                                                                                                                         if (_root.dance_enabled == false)
  424.                                                                                                                                                                                                                                                         {
  425.                                                                                                                                                                                                                                                             _root.dance_enabled = true;
  426.                                                                                                                                                                                                                                                             extraTxt = "dance enabled.";
  427.                                                                                                                                                                                                                                                         }
  428.                                                                                                                                                                                                                                                         else
  429.                                                                                                                                                                                                                                                         {
  430.                                                                                                                                                                                                                                                             _root.dance_enabled = false;
  431.                                                                                                                                                                                                                                                             extraTxt = "dance disabled.";
  432.                                                                                                                                                                                                                                                         }
  433.                                                                                                                                                                                                                                                     }
  434.                                                                                                                                                                                                                                                     else
  435.                                                                                                                                                                                                                                                     {
  436.                                                                                                                                                                                                                                                         if (0 != (consoleCommand == "sounds") | 0 != (consoleCommand == "sound"))
  437.                                                                                                                                                                                                                                                         {
  438.                                                                                                                                                                                                                                                             if (sounds)
  439.                                                                                                                                                                                                                                                             {
  440.                                                                                                                                                                                                                                                                 allsound.setVolume(0);
  441.                                                                                                                                                                                                                                                                 sounds = false;
  442.                                                                                                                                                                                                                                                                 extraTxt = "sounds disabled.";
  443.                                                                                                                                                                                                                                                             }
  444.                                                                                                                                                                                                                                                             else
  445.                                                                                                                                                                                                                                                             {
  446.                                                                                                                                                                                                                                                                 allsound.setVolume(100);
  447.                                                                                                                                                                                                                                                                 sounds = true;
  448.                                                                                                                                                                                                                                                                 extraTxt = "sounds enabled.";
  449.                                                                                                                                                                                                                                                             }
  450.                                                                                                                                                                                                                                                         }
  451.                                                                                                                                                                                                                                                         else
  452.                                                                                                                                                                                                                                                         {
  453.                                                                                                                                                                                                                                                             if (consoleCommand == "crosshair")
  454.                                                                                                                                                                                                                                                             {
  455.                                                                                                                                                                                                                                                                 if (crosshair)
  456.                                                                                                                                                                                                                                                                 {
  457.                                                                                                                                                                                                                                                                     crosshair = false;
  458.                                                                                                                                                                                                                                                                     extraTxt = "crosshair disabled.";
  459.                                                                                                                                                                                                                                                                 }
  460.                                                                                                                                                                                                                                                                 else
  461.                                                                                                                                                                                                                                                                 {
  462.                                                                                                                                                                                                                                                                     crosshair = true;
  463.                                                                                                                                                                                                                                                                     extraTxt = "crosshair enabled.";
  464.                                                                                                                                                                                                                                                                 }
  465.                                                                                                                                                                                                                                                             }
  466.                                                                                                                                                                                                                                                             else
  467.                                                                                                                                                                                                                                                             {
  468.                                                                                                                                                                                                                                                                 if (0 != (0 != (consoleCommand == "space") | 0 != (consoleCommand == "aim")) | 0 != (consoleCommand == "detectshot"))
  469.                                                                                                                                                                                                                                                                 {
  470.                                                                                                                                                                                                                                                                     if (spaceDummy)
  471.                                                                                                                                                                                                                                                                     {
  472.                                                                                                                                                                                                                                                                         spaceDummy = false;
  473.                                                                                                                                                                                                                                                                         extraTxt = "Aim (space) disabled.";
  474.                                                                                                                                                                                                                                                                     }
  475.                                                                                                                                                                                                                                                                     else
  476.                                                                                                                                                                                                                                                                     {
  477.                                                                                                                                                                                                                                                                         spaceDummy = true;
  478.                                                                                                                                                                                                                                                                         extraTxt = "Aim (space) enabled.";
  479.                                                                                                                                                                                                                                                                     }
  480.                                                                                                                                                                                                                                                                 }
  481.                                                                                                                                                                                                                                                                 else
  482.                                                                                                                                                                                                                                                                 {
  483.                                                                                                                                                                                                                                                                     if (consoleCommand == "autoquality")
  484.                                                                                                                                                                                                                                                                     {
  485.                                                                                                                                                                                                                                                                         if (quality_auto)
  486.                                                                                                                                                                                                                                                                         {
  487.                                                                                                                                                                                                                                                                             quality_auto = false;
  488.                                                                                                                                                                                                                                                                             extraTxt = "sounds disabled.";
  489.                                                                                                                                                                                                                                                                         }
  490.                                                                                                                                                                                                                                                                         else
  491.                                                                                                                                                                                                                                                                         {
  492.                                                                                                                                                                                                                                                                             quality_auto = true;
  493.                                                                                                                                                                                                                                                                             extraTxt = "sounds enabled.";
  494.                                                                                                                                                                                                                                                                         }
  495.                                                                                                                                                                                                                                                                     }
  496.                                                                                                                                                                                                                                                                     else
  497.                                                                                                                                                                                                                                                                     {
  498.                                                                                                                                                                                                                                                                         if (0 != (consoleCommand == "dynamiccam") | 0 != (consoleCommand == "dynamicam"))
  499.                                                                                                                                                                                                                                                                         {
  500.                                                                                                                                                                                                                                                                             if (playerCam)
  501.                                                                                                                                                                                                                                                                             {
  502.                                                                                                                                                                                                                                                                                 playerCam = false;
  503.                                                                                                                                                                                                                                                                                 extraTxt = "playerCam disabled.";
  504.                                                                                                                                                                                                                                                                             }
  505.                                                                                                                                                                                                                                                                             else
  506.                                                                                                                                                                                                                                                                             {
  507.                                                                                                                                                                                                                                                                                 playerCam = true;
  508.                                                                                                                                                                                                                                                                                 extraTxt = "playerCam enabled.";
  509.                                                                                                                                                                                                                                                                             }
  510.                                                                                                                                                                                                                                                                         }
  511.                                                                                                                                                                                                                                                                         else
  512.                                                                                                                                                                                                                                                                         {
  513.                                                                                                                                                                                                                                                                             if (0 != (consoleCommand == "stopallsounds") | 0 != (consoleCommand == "stopsounds"))
  514.                                                                                                                                                                                                                                                                             {
  515.                                                                                                                                                                                                                                                                                 stopAllSounds();
  516.                                                                                                                                                                                                                                                                                 extraTxt = "all sounds currently running were stopped";
  517.                                                                                                                                                                                                                                                                             }
  518.                                                                                                                                                                                                                                                                             else
  519.                                                                                                                                                                                                                                                                             {
  520.                                                                                                                                                                                                                                                                                 if (consoleCommand == "info")
  521.                                                                                                                                                                                                                                                                                 {
  522.                                                                                                                                                                                                                                                                                     extraTxt = portalver;
  523.                                                                                                                                                                                                                                                                                 }
  524.                                                                                                                                                                                                                                                                                 else
  525.                                                                                                                                                                                                                                                                                 {
  526.                                                                                                                                                                                                                                                                                     if (consoleCommand == "showfps")
  527.                                                                                                                                                                                                                                                                                     {
  528.                                                                                                                                                                                                                                                                                         if (showfps == true)
  529.                                                                                                                                                                                                                                                                                         {
  530.                                                                                                                                                                                                                                                                                             showfps = false;
  531.                                                                                                                                                                                                                                                                                             extraTxt = "fps invisible.";
  532.                                                                                                                                                                                                                                                                                         }
  533.                                                                                                                                                                                                                                                                                         else
  534.                                                                                                                                                                                                                                                                                         {
  535.                                                                                                                                                                                                                                                                                             showfps = true;
  536.                                                                                                                                                                                                                                                                                             extraTxt = "fps visible.";
  537.                                                                                                                                                                                                                                                                                         }
  538.                                                                                                                                                                                                                                                                                     }
  539.                                                                                                                                                                                                                                                                                     else
  540.                                                                                                                                                                                                                                                                                     {
  541.                                                                                                                                                                                                                                                                                         if (consoleCommand == "showmapbox")
  542.                                                                                                                                                                                                                                                                                         {
  543.                                                                                                                                                                                                                                                                                             if (bg.ground._visible == true)
  544.                                                                                                                                                                                                                                                                                             {
  545.                                                                                                                                                                                                                                                                                                 bg.ground._visible = false;
  546.                                                                                                                                                                                                                                                                                                 bg.wall._visible = false;
  547.                                                                                                                                                                                                                                                                                                 bg.antiportal._visible = false;
  548.                                                                                                                                                                                                                                                                                                 bg.antiobject._visible = false;
  549.                                                                                                                                                                                                                                                                                                 bg.kill._visible = false;
  550.                                                                                                                                                                                                                                                                                                 bg.kill_ar2._visible = false;
  551.                                                                                                                                                                                                                                                                                                 extraTxt = "mapbox invisible.";
  552.                                                                                                                                                                                                                                                                                             }
  553.                                                                                                                                                                                                                                                                                             else
  554.                                                                                                                                                                                                                                                                                             {
  555.                                                                                                                                                                                                                                                                                                 bg.ground._visible = true;
  556.                                                                                                                                                                                                                                                                                                 bg.wall._visible = true;
  557.                                                                                                                                                                                                                                                                                                 bg.antiportal._visible = true;
  558.                                                                                                                                                                                                                                                                                                 bg.antiobject._visible = true;
  559.                                                                                                                                                                                                                                                                                                 bg.kill._visible = true;
  560.                                                                                                                                                                                                                                                                                                 bg.kill_ar2._visible = true;
  561.                                                                                                                                                                                                                                                                                                 extraTxt = "mapbox visible.";
  562.                                                                                                                                                                                                                                                                                             }
  563.                                                                                                                                                                                                                                                                                         }
  564.                                                                                                                                                                                                                                                                                         else
  565.                                                                                                                                                                                                                                                                                         {
  566.                                                                                                                                                                                                                                                                                             if (0 != (consoleCommand == "showdynamicbox") | 0 != (consoleCommand == "showdynamicboxes"))
  567.                                                                                                                                                                                                                                                                                             {
  568.                                                                                                                                                                                                                                                                                                 if (maxphys > 1)
  569.                                                                                                                                                                                                                                                                                                 {
  570.                                                                                                                                                                                                                                                                                                     if (phybox1._visible == true)
  571.                                                                                                                                                                                                                                                                                                     {
  572.                                                                                                                                                                                                                                                                                                         phy = 1;
  573.                                                                                                                                                                                                                                                                                                         while (phy < _root.maxphys)
  574.                                                                                                                                                                                                                                                                                                         {
  575.                                                                                                                                                                                                                                                                                                             _root["phybox" + phy]._visible = false;
  576.                                                                                                                                                                                                                                                                                                             ++phy;
  577.                                                                                                                                                                                                                                                                                                         }
  578.                                                                                                                                                                                                                                                                                                         extraTxt = "dynamic physicboxes invisible.";
  579.                                                                                                                                                                                                                                                                                                     }
  580.                                                                                                                                                                                                                                                                                                     else
  581.                                                                                                                                                                                                                                                                                                     {
  582.                                                                                                                                                                                                                                                                                                         phy = 1;
  583.                                                                                                                                                                                                                                                                                                         while (phy < _root.maxphys)
  584.                                                                                                                                                                                                                                                                                                         {
  585.                                                                                                                                                                                                                                                                                                             _root["phybox" + phy]._visible = true;
  586.                                                                                                                                                                                                                                                                                                             ++phy;
  587.                                                                                                                                                                                                                                                                                                         }
  588.                                                                                                                                                                                                                                                                                                         extraTxt = "dynamic physicboxes visible.";
  589.                                                                                                                                                                                                                                                                                                     }
  590.                                                                                                                                                                                                                                                                                                 }
  591.                                                                                                                                                                                                                                                                                                 else
  592.                                                                                                                                                                                                                                                                                                 {
  593.                                                                                                                                                                                                                                                                                                     extraTxt = "cannot show dynamic physicboxes.";
  594.                                                                                                                                                                                                                                                                                                 }
  595.                                                                                                                                                                                                                                                                                             }
  596.                                                                                                                                                                                                                                                                                             else
  597.                                                                                                                                                                                                                                                                                             {
  598.                                                                                                                                                                                                                                                                                                 if (consoleCommand == "showportalbox")
  599.                                                                                                                                                                                                                                                                                                 {
  600.                                                                                                                                                                                                                                                                                                     if (portal1._visible == true)
  601.                                                                                                                                                                                                                                                                                                     {
  602.                                                                                                                                                                                                                                                                                                         portal1._visible = false;
  603.                                                                                                                                                                                                                                                                                                         portal2._visible = false;
  604.                                                                                                                                                                                                                                                                                                         extraTxt = "portalbox invisible.";
  605.                                                                                                                                                                                                                                                                                                     }
  606.                                                                                                                                                                                                                                                                                                     else
  607.                                                                                                                                                                                                                                                                                                     {
  608.                                                                                                                                                                                                                                                                                                         portal1._visible = true;
  609.                                                                                                                                                                                                                                                                                                         portal2._visible = true;
  610.                                                                                                                                                                                                                                                                                                         extraTxt = "portalbox visible.";
  611.                                                                                                                                                                                                                                                                                                     }
  612.                                                                                                                                                                                                                                                                                                 }
  613.                                                                                                                                                                                                                                                                                                 else
  614.                                                                                                                                                                                                                                                                                                 {
  615.                                                                                                                                                                                                                                                                                                     if (consoleCommand == "showportalhitbox")
  616.                                                                                                                                                                                                                                                                                                     {
  617.                                                                                                                                                                                                                                                                                                         if (wt1._visible == true)
  618.                                                                                                                                                                                                                                                                                                         {
  619.                                                                                                                                                                                                                                                                                                             wt1._visible = false;
  620.                                                                                                                                                                                                                                                                                                             wt2._visible = false;
  621.                                                                                                                                                                                                                                                                                                             extraTxt = "portalhitbox invisible.";
  622.                                                                                                                                                                                                                                                                                                         }
  623.                                                                                                                                                                                                                                                                                                         else
  624.                                                                                                                                                                                                                                                                                                         {
  625.                                                                                                                                                                                                                                                                                                             wt1._visible = true;
  626.                                                                                                                                                                                                                                                                                                             wt2._visible = true;
  627.                                                                                                                                                                                                                                                                                                             extraTxt = "portalhitbox visible.";
  628.                                                                                                                                                                                                                                                                                                         }
  629.                                                                                                                                                                                                                                                                                                     }
  630.                                                                                                                                                                                                                                                                                                     else
  631.                                                                                                                                                                                                                                                                                                     {
  632.                                                                                                                                                                                                                                                                                                         if (consoleCommand == "showportalmask")
  633.                                                                                                                                                                                                                                                                                                         {
  634.                                                                                                                                                                                                                                                                                                             if (ht1._visible == true)
  635.                                                                                                                                                                                                                                                                                                             {
  636.                                                                                                                                                                                                                                                                                                                 ht1._visible = false;
  637.                                                                                                                                                                                                                                                                                                                 ht2._visible = false;
  638.                                                                                                                                                                                                                                                                                                                 extraTxt = "portalmask invisible.";
  639.                                                                                                                                                                                                                                                                                                             }
  640.                                                                                                                                                                                                                                                                                                             else
  641.                                                                                                                                                                                                                                                                                                             {
  642.                                                                                                                                                                                                                                                                                                                 ht1._visible = true;
  643.                                                                                                                                                                                                                                                                                                                 ht2._visible = true;
  644.                                                                                                                                                                                                                                                                                                                 extraTxt = "portalmask visible.";
  645.                                                                                                                                                                                                                                                                                                             }
  646.                                                                                                                                                                                                                                                                                                         }
  647.                                                                                                                                                                                                                                                                                                         else
  648.                                                                                                                                                                                                                                                                                                         {
  649.                                                                                                                                                                                                                                                                                                             if (0 != (consoleCommand == "showsteps") | 0 != (consoleCommand == "showstep"))
  650.                                                                                                                                                                                                                                                                                                             {
  651.                                                                                                                                                                                                                                                                                                                 if (step1._visible == true)
  652.                                                                                                                                                                                                                                                                                                                 {
  653.                                                                                                                                                                                                                                                                                                                     step1._visible = false;
  654.                                                                                                                                                                                                                                                                                                                     step2._visible = false;
  655.                                                                                                                                                                                                                                                                                                                     extraTxt = "steps invisible.";
  656.                                                                                                                                                                                                                                                                                                                 }
  657.                                                                                                                                                                                                                                                                                                                 else
  658.                                                                                                                                                                                                                                                                                                                 {
  659.                                                                                                                                                                                                                                                                                                                     step1._visible = true;
  660.                                                                                                                                                                                                                                                                                                                     step2._visible = true;
  661.                                                                                                                                                                                                                                                                                                                     extraTxt = "steps visible.";
  662.                                                                                                                                                                                                                                                                                                                 }
  663.                                                                                                                                                                                                                                                                                                             }
  664.                                                                                                                                                                                                                                                                                                             else
  665.                                                                                                                                                                                                                                                                                                             {
  666.                                                                                                                                                                                                                                                                                                                 if (0 != (consoleCommand == "showshot") | 0 != (consoleCommand == "showshots"))
  667.                                                                                                                                                                                                                                                                                                                 {
  668.                                                                                                                                                                                                                                                                                                                     if (Target._visible == true)
  669.                                                                                                                                                                                                                                                                                                                     {
  670.                                                                                                                                                                                                                                                                                                                         Target._visible = false;
  671.                                                                                                                                                                                                                                                                                                                         extraTxt = "shots invisible.";
  672.                                                                                                                                                                                                                                                                                                                     }
  673.                                                                                                                                                                                                                                                                                                                     else
  674.                                                                                                                                                                                                                                                                                                                     {
  675.                                                                                                                                                                                                                                                                                                                         Target._visible = true;
  676.                                                                                                                                                                                                                                                                                                                         extraTxt = "shots visible.";
  677.                                                                                                                                                                                                                                                                                                                     }
  678.                                                                                                                                                                                                                                                                                                                 }
  679.                                                                                                                                                                                                                                                                                                                 else
  680.                                                                                                                                                                                                                                                                                                                 {
  681.                                                                                                                                                                                                                                                                                                                     if (consoleCommand == "gravity")
  682.                                                                                                                                                                                                                                                                                                                     {
  683.                                                                                                                                                                                                                                                                                                                         if (consoleParam_isNum)
  684.                                                                                                                                                                                                                                                                                                                         {
  685.                                                                                                                                                                                                                                                                                                                             if (consoleParam <= 0)
  686.                                                                                                                                                                                                                                                                                                                             {
  687.                                                                                                                                                                                                                                                                                                                                 gravity = 0.05;
  688.                                                                                                                                                                                                                                                                                                                             }
  689.                                                                                                                                                                                                                                                                                                                             else
  690.                                                                                                                                                                                                                                                                                                                             {
  691.                                                                                                                                                                                                                                                                                                                                 gravity = consoleParam / 600;
  692.                                                                                                                                                                                                                                                                                                                             }
  693.                                                                                                                                                                                                                                                                                                                             extraTxt = "gravity is set to " + gravity * 600;
  694.                                                                                                                                                                                                                                                                                                                         }
  695.                                                                                                                                                                                                                                                                                                                         else
  696.                                                                                                                                                                                                                                                                                                                         {
  697.                                                                                                                                                                                                                                                                                                                             extraTxt = consoleError_notParam;
  698.                                                                                                                                                                                                                                                                                                                         }
  699.                                                                                                                                                                                                                                                                                                                     }
  700.                                                                                                                                                                                                                                                                                                                     else
  701.                                                                                                                                                                                                                                                                                                                     {
  702.                                                                                                                                                                                                                                                                                                                         if (0 != (consoleCommand == "quality") | 0 != (consoleCommand == "_quality"))
  703.                                                                                                                                                                                                                                                                                                                         {
  704.                                                                                                                                                                                                                                                                                                                             if (consoleParam_isNum)
  705.                                                                                                                                                                                                                                                                                                                             {
  706.                                                                                                                                                                                                                                                                                                                                 if (consoleParam == 0)
  707.                                                                                                                                                                                                                                                                                                                                 {
  708.                                                                                                                                                                                                                                                                                                                                     _quality = "LOW";
  709.                                                                                                                                                                                                                                                                                                                                 }
  710.                                                                                                                                                                                                                                                                                                                                 else
  711.                                                                                                                                                                                                                                                                                                                                 {
  712.                                                                                                                                                                                                                                                                                                                                     if (consoleParam == 1)
  713.                                                                                                                                                                                                                                                                                                                                     {
  714.                                                                                                                                                                                                                                                                                                                                         _quality = "MEDIUM";
  715.                                                                                                                                                                                                                                                                                                                                     }
  716.                                                                                                                                                                                                                                                                                                                                     else
  717.                                                                                                                                                                                                                                                                                                                                     {
  718.                                                                                                                                                                                                                                                                                                                                         if (consoleParam == 2)
  719.                                                                                                                                                                                                                                                                                                                                         {
  720.                                                                                                                                                                                                                                                                                                                                             _quality = "HIGH";
  721.                                                                                                                                                                                                                                                                                                                                         }
  722.                                                                                                                                                                                                                                                                                                                                         else
  723.                                                                                                                                                                                                                                                                                                                                         {
  724.                                                                                                                                                                                                                                                                                                                                             if (consoleParam == 3)
  725.                                                                                                                                                                                                                                                                                                                                             {
  726.                                                                                                                                                                                                                                                                                                                                                 _quality = "BEST";
  727.                                                                                                                                                                                                                                                                                                                                             }
  728.                                                                                                                                                                                                                                                                                                                                         }
  729.                                                                                                                                                                                                                                                                                                                                     }
  730.                                                                                                                                                                                                                                                                                                                                 }
  731.                                                                                                                                                                                                                                                                                                                                 extraTxt = "quality is set to " + _quality;
  732.                                                                                                                                                                                                                                                                                                                             }
  733.                                                                                                                                                                                                                                                                                                                             else
  734.                                                                                                                                                                                                                                                                                                                             {
  735.                                                                                                                                                                                                                                                                                                                                 extraTxt = consoleError_notParam;
  736.                                                                                                                                                                                                                                                                                                                             }
  737.                                                                                                                                                                                                                                                                                                                         }
  738.                                                                                                                                                                                                                                                                                                                         else
  739.                                                                                                                                                                                                                                                                                                                         {
  740.                                                                                                                                                                                                                                                                                                                             if (consoleCommand == "effects")
  741.                                                                                                                                                                                                                                                                                                                             {
  742.                                                                                                                                                                                                                                                                                                                                 if (consoleParam_isNum)
  743.                                                                                                                                                                                                                                                                                                                                 {
  744.                                                                                                                                                                                                                                                                                                                                     if (consoleParam == 0)
  745.                                                                                                                                                                                                                                                                                                                                     {
  746.                                                                                                                                                                                                                                                                                                                                         effects = 0;
  747.                                                                                                                                                                                                                                                                                                                                     }
  748.                                                                                                                                                                                                                                                                                                                                     else
  749.                                                                                                                                                                                                                                                                                                                                     {
  750.                                                                                                                                                                                                                                                                                                                                         if (consoleParam == 1)
  751.                                                                                                                                                                                                                                                                                                                                         {
  752.                                                                                                                                                                                                                                                                                                                                             effects = 1;
  753.                                                                                                                                                                                                                                                                                                                                         }
  754.                                                                                                                                                                                                                                                                                                                                         else
  755.                                                                                                                                                                                                                                                                                                                                         {
  756.                                                                                                                                                                                                                                                                                                                                             if (consoleParam == 2)
  757.                                                                                                                                                                                                                                                                                                                                             {
  758.                                                                                                                                                                                                                                                                                                                                                 effects = 2;
  759.                                                                                                                                                                                                                                                                                                                                             }
  760.                                                                                                                                                                                                                                                                                                                                         }
  761.                                                                                                                                                                                                                                                                                                                                     }
  762.                                                                                                                                                                                                                                                                                                                                     extraTxt = "effects is set to " + effects;
  763.                                                                                                                                                                                                                                                                                                                                 }
  764.                                                                                                                                                                                                                                                                                                                                 else
  765.                                                                                                                                                                                                                                                                                                                                 {
  766.                                                                                                                                                                                                                                                                                                                                     extraTxt = consoleError_notParam;
  767.                                                                                                                                                                                                                                                                                                                                 }
  768.                                                                                                                                                                                                                                                                                                                             }
  769.                                                                                                                                                                                                                                                                                                                             else
  770.                                                                                                                                                                                                                                                                                                                             {
  771.                                                                                                                                                                                                                                                                                                                                 if (consoleCommand == "createbox")
  772.                                                                                                                                                                                                                                                                                                                                 {
  773.                                                                                                                                                                                                                                                                                                                                     createBox(p1._x, p1._y - p1._height);
  774.                                                                                                                                                                                                                                                                                                                                     extraTxt = "object BOX has been spawned.";
  775.                                                                                                                                                                                                                                                                                                                                 }
  776.                                                                                                                                                                                                                                                                                                                                 else
  777.                                                                                                                                                                                                                                                                                                                                 {
  778.                                                                                                                                                                                                                                                                                                                                     if (0 != (0 != (0 != (consoleCommand == "companion") | 0 != (consoleCommand == "createcompanion")) | 0 != (consoleCommand == "createcompanioncube")) | 0 != (consoleCommand == "createcompanionbox"))
  779.                                                                                                                                                                                                                                                                                                                                     {
  780.                                                                                                                                                                                                                                                                                                                                         if (companionExists)
  781.                                                                                                                                                                                                                                                                                                                                         {
  782.                                                                                                                                                                                                                                                                                                                                             extraTxt = "object COMPANION BOX could not be deleted.";
  783.                                                                                                                                                                                                                                                                                                                                         }
  784.                                                                                                                                                                                                                                                                                                                                         else
  785.                                                                                                                                                                                                                                                                                                                                         {
  786.                                                                                                                                                                                                                                                                                                                                             createBox(p1._x, p1._y - p1._height, true);
  787.                                                                                                                                                                                                                                                                                                                                             extraTxt = "object COMPANION BOX has been spawned.";
  788.                                                                                                                                                                                                                                                                                                                                         }
  789.                                                                                                                                                                                                                                                                                                                                     }
  790.                                                                                                                                                                                                                                                                                                                                     else
  791.                                                                                                                                                                                                                                                                                                                                     {
  792.                                                                                                                                                                                                                                                                                                                                         if (consoleCommand == "removebox")
  793.                                                                                                                                                                                                                                                                                                                                         {
  794.                                                                                                                                                                                                                                                                                                                                             if (maxn > 2)
  795.                                                                                                                                                                                                                                                                                                                                             {
  796.                                                                                                                                                                                                                                                                                                                                                 removeBox();
  797.                                                                                                                                                                                                                                                                                                                                                 extraTxt = "object BOX has been deleted.";
  798.                                                                                                                                                                                                                                                                                                                                             }
  799.                                                                                                                                                                                                                                                                                                                                             else
  800.                                                                                                                                                                                                                                                                                                                                             {
  801.                                                                                                                                                                                                                                                                                                                                                 extraTxt = "object BOX could not be deleted.";
  802.                                                                                                                                                                                                                                                                                                                                             }
  803.                                                                                                                                                                                                                                                                                                                                         }
  804.                                                                                                                                                                                                                                                                                                                                         else
  805.                                                                                                                                                                                                                                                                                                                                         {
  806.                                                                                                                                                                                                                                                                                                                                             if (consoleCommand == "createcam")
  807.                                                                                                                                                                                                                                                                                                                                             {
  808.                                                                                                                                                                                                                                                                                                                                                 createCam(p1._x, p1._y);
  809.                                                                                                                                                                                                                                                                                                                                                 extraTxt = "object CAM has been spawned.";
  810.                                                                                                                                                                                                                                                                                                                                             }
  811.                                                                                                                                                                                                                                                                                                                                             else
  812.                                                                                                                                                                                                                                                                                                                                             {
  813.                                                                                                                                                                                                                                                                                                                                                 if (consoleCommand == "removecam")
  814.                                                                                                                                                                                                                                                                                                                                                 {
  815.                                                                                                                                                                                                                                                                                                                                                     if (maxc > 1)
  816.                                                                                                                                                                                                                                                                                                                                                     {
  817.                                                                                                                                                                                                                                                                                                                                                         removeCam();
  818.                                                                                                                                                                                                                                                                                                                                                         extraTxt = "object CAM has been deleted.";
  819.                                                                                                                                                                                                                                                                                                                                                     }
  820.                                                                                                                                                                                                                                                                                                                                                     else
  821.                                                                                                                                                                                                                                                                                                                                                     {
  822.                                                                                                                                                                                                                                                                                                                                                         extraTxt = "object CAM could not be deleted.";
  823.                                                                                                                                                                                                                                                                                                                                                     }
  824.                                                                                                                                                                                                                                                                                                                                                 }
  825.                                                                                                                                                                                                                                                                                                                                                 else
  826.                                                                                                                                                                                                                                                                                                                                                 {
  827.                                                                                                                                                                                                                                                                                                                                                     if (consoleCommand == "createball")
  828.                                                                                                                                                                                                                                                                                                                                                     {
  829.                                                                                                                                                                                                                                                                                                                                                         createBall(p1._x, p1._y - p1._height * 2, "up");
  830.                                                                                                                                                                                                                                                                                                                                                         extraTxt = "object BALL has been spawned.";
  831.                                                                                                                                                                                                                                                                                                                                                     }
  832.                                                                                                                                                                                                                                                                                                                                                     else
  833.                                                                                                                                                                                                                                                                                                                                                     {
  834.                                                                                                                                                                                                                                                                                                                                                         if (consoleCommand == "removeBall")
  835.                                                                                                                                                                                                                                                                                                                                                         {
  836.                                                                                                                                                                                                                                                                                                                                                             if (maxb > 1)
  837.                                                                                                                                                                                                                                                                                                                                                             {
  838.                                                                                                                                                                                                                                                                                                                                                                 removeLastBall();
  839.                                                                                                                                                                                                                                                                                                                                                                 extraTxt = "object BALL has been deleted.";
  840.                                                                                                                                                                                                                                                                                                                                                             }
  841.                                                                                                                                                                                                                                                                                                                                                             else
  842.                                                                                                                                                                                                                                                                                                                                                             {
  843.                                                                                                                                                                                                                                                                                                                                                                 extraTxt = "object BALL could not be deleted.";
  844.                                                                                                                                                                                                                                                                                                                                                             }
  845.                                                                                                                                                                                                                                                                                                                                                         }
  846.                                                                                                                                                                                                                                                                                                                                                         else
  847.                                                                                                                                                                                                                                                                                                                                                         {
  848.                                                                                                                                                                                                                                                                                                                                                             if (0 != (0 != (0 != (consoleCommand == "createturret") | 0 != (consoleCommand == "createturrent")) | 0 != (consoleCommand == "createturretr")) | 0 != (consoleCommand == "createturrentr"))
  849.                                                                                                                                                                                                                                                                                                                                                             {
  850.                                                                                                                                                                                                                                                                                                                                                                 createTurret(p1._x, p1._y, "right");
  851.                                                                                                                                                                                                                                                                                                                                                                 extraTxt = "object TURRENT has been spawned.";
  852.                                                                                                                                                                                                                                                                                                                                                             }
  853.                                                                                                                                                                                                                                                                                                                                                             else
  854.                                                                                                                                                                                                                                                                                                                                                             {
  855.                                                                                                                                                                                                                                                                                                                                                                 if (0 != (consoleCommand == "createturretl") | 0 != (consoleCommand == "createturrenl"))
  856.                                                                                                                                                                                                                                                                                                                                                                 {
  857.                                                                                                                                                                                                                                                                                                                                                                     createTurret(p1._x, p1._y, "left");
  858.                                                                                                                                                                                                                                                                                                                                                                     extraTxt = "object TURRENT has been spawned.";
  859.                                                                                                                                                                                                                                                                                                                                                                 }
  860.                                                                                                                                                                                                                                                                                                                                                                 else
  861.                                                                                                                                                                                                                                                                                                                                                                 {
  862.                                                                                                                                                                                                                                                                                                                                                                     if (consoleCommand == "removeturret")
  863.                                                                                                                                                                                                                                                                                                                                                                     {
  864.                                                                                                                                                                                                                                                                                                                                                                         if (maxt > 1)
  865.                                                                                                                                                                                                                                                                                                                                                                         {
  866.                                                                                                                                                                                                                                                                                                                                                                             removeTurret();
  867.                                                                                                                                                                                                                                                                                                                                                                             extraTxt = "object TURRET has been deleted.";
  868.                                                                                                                                                                                                                                                                                                                                                                         }
  869.                                                                                                                                                                                                                                                                                                                                                                         else
  870.                                                                                                                                                                                                                                                                                                                                                                         {
  871.                                                                                                                                                                                                                                                                                                                                                                             extraTxt = "object TURRET could not be deleted.";
  872.                                                                                                                                                                                                                                                                                                                                                                         }
  873.                                                                                                                                                                                                                                                                                                                                                                     }
  874.                                                                                                                                                                                                                                                                                                                                                                     else
  875.                                                                                                                                                                                                                                                                                                                                                                     {
  876.                                                                                                                                                                                                                                                                                                                                                                         if (0 != (consoleCommand == "restartlevel") | 0 != (consoleCommand == "restartmap"))
  877.                                                                                                                                                                                                                                                                                                                                                                         {
  878.                                                                                                                                                                                                                                                                                                                                                                             restartLevel();
  879.                                                                                                                                                                                                                                                                                                                                                                             extraTxt = "Level (" + nextMap + ") restarted.";
  880.                                                                                                                                                                                                                                                                                                                                                                         }
  881.                                                                                                                                                                                                                                                                                                                                                                         else
  882.                                                                                                                                                                                                                                                                                                                                                                         {
  883.                                                                                                                                                                                                                                                                                                                                                                             if (0 != (consoleCommand == "gotolevel") | 0 != (consoleCommand == "gotoandplay"))
  884.                                                                                                                                                                                                                                                                                                                                                                             {
  885.                                                                                                                                                                                                                                                                                                                                                                                 if (consoleParam_isNum)
  886.                                                                                                                                                                                                                                                                                                                                                                                 {
  887.                                                                                                                                                                                                                                                                                                                                                                                     if (consoleParam < 0)
  888.                                                                                                                                                                                                                                                                                                                                                                                     {
  889.                                                                                                                                                                                                                                                                                                                                                                                         restartLevel();
  890.                                                                                                                                                                                                                                                                                                                                                                                         extraTxt = "Level (" + nextMap + ") restarted.";
  891.                                                                                                                                                                                                                                                                                                                                                                                     }
  892.                                                                                                                                                                                                                                                                                                                                                                                     else
  893.                                                                                                                                                                                                                                                                                                                                                                                     {
  894.                                                                                                                                                                                                                                                                                                                                                                                         mapn = consoleParam;
  895.                                                                                                                                                                                                                                                                                                                                                                                         nextMap = ["level" + mapn];
  896.                                                                                                                                                                                                                                                                                                                                                                                         nextLevel = true;
  897.                                                                                                                                                                                                                                                                                                                                                                                         extraTxt = "level " + nextMap + " launched";
  898.                                                                                                                                                                                                                                                                                                                                                                                     }
  899.                                                                                                                                                                                                                                                                                                                                                                                 }
  900.                                                                                                                                                                                                                                                                                                                                                                                 else
  901.                                                                                                                                                                                                                                                                                                                                                                                 {
  902.                                                                                                                                                                                                                                                                                                                                                                                     extraTxt = consoleError_notParam;
  903.                                                                                                                                                                                                                                                                                                                                                                                 }
  904.                                                                                                                                                                                                                                                                                                                                                                             }
  905.                                                                                                                                                                                                                                                                                                                                                                             else
  906.                                                                                                                                                                                                                                                                                                                                                                             {
  907.                                                                                                                                                                                                                                                                                                                                                                                 if (0 != (consoleCommand == "nextlevel") | 0 != (consoleCommand == "followinglevel"))
  908.                                                                                                                                                                                                                                                                                                                                                                                 {
  909.                                                                                                                                                                                                                                                                                                                                                                                     ++mapn;
  910.                                                                                                                                                                                                                                                                                                                                                                                     nextMap = ["level" + mapn];
  911.                                                                                                                                                                                                                                                                                                                                                                                     nextLevel = true;
  912.                                                                                                                                                                                                                                                                                                                                                                                     extraTxt = "Next level (" + nextMap + ") launched.";
  913.                                                                                                                                                                                                                                                                                                                                                                                 }
  914.                                                                                                                                                                                                                                                                                                                                                                                 else
  915.                                                                                                                                                                                                                                                                                                                                                                                 {
  916.                                                                                                                                                                                                                                                                                                                                                                                     if (0 != (consoleCommand == "prevlevel") | 0 != (consoleCommand == "previouslevel"))
  917.                                                                                                                                                                                                                                                                                                                                                                                     {
  918.                                                                                                                                                                                                                                                                                                                                                                                         if (mapn >= 0)
  919.                                                                                                                                                                                                                                                                                                                                                                                         {
  920.                                                                                                                                                                                                                                                                                                                                                                                             --mapn;
  921.                                                                                                                                                                                                                                                                                                                                                                                             nextMap = ["level" + mapn];
  922.                                                                                                                                                                                                                                                                                                                                                                                             nextLevel = true;
  923.                                                                                                                                                                                                                                                                                                                                                                                             extraTxt = "Previous level (" + nextMap + ") launched.";
  924.                                                                                                                                                                                                                                                                                                                                                                                         }
  925.                                                                                                                                                                                                                                                                                                                                                                                         else
  926.                                                                                                                                                                                                                                                                                                                                                                                         {
  927.                                                                                                                                                                                                                                                                                                                                                                                             extraTxt = "Cannot play previous level.";
  928.                                                                                                                                                                                                                                                                                                                                                                                         }
  929.                                                                                                                                                                                                                                                                                                                                                                                     }
  930.                                                                                                                                                                                                                                                                                                                                                                                     else
  931.                                                                                                                                                                                                                                                                                                                                                                                     {
  932.                                                                                                                                                                                                                                                                                                                                                                                         extraTxt = "";
  933.                                                                                                                                                                                                                                                                                                                                                                                         commandExists = false;
  934.                                                                                                                                                                                                                                                                                                                                                                                     }
  935.                                                                                                                                                                                                                                                                                                                                                                                 }
  936.                                                                                                                                                                                                                                                                                                                                                                             }
  937.                                                                                                                                                                                                                                                                                                                                                                         }
  938.                                                                                                                                                                                                                                                                                                                                                                     }
  939.                                                                                                                                                                                                                                                                                                                                                                 }
  940.                                                                                                                                                                                                                                                                                                                                                             }
  941.                                                                                                                                                                                                                                                                                                                                                         }
  942.                                                                                                                                                                                                                                                                                                                                                     }
  943.                                                                                                                                                                                                                                                                                                                                                 }
  944.                                                                                                                                                                                                                                                                                                                                             }
  945.                                                                                                                                                                                                                                                                                                                                         }
  946.                                                                                                                                                                                                                                                                                                                                     }
  947.                                                                                                                                                                                                                                                                                                                                 }
  948.                                                                                                                                                                                                                                                                                                                             }
  949.                                                                                                                                                                                                                                                                                                                         }
  950.                                                                                                                                                                                                                                                                                                                     }
  951.                                                                                                                                                                                                                                                                                                                 }
  952.                                                                                                                                                                                                                                                                                                             }
  953.                                                                                                                                                                                                                                                                                                         }
  954.                                                                                                                                                                                                                                                                                                     }
  955.                                                                                                                                                                                                                                                                                                 }
  956.                                                                                                                                                                                                                                                                                             }
  957.                                                                                                                                                                                                                                                                                         }
  958.                                                                                                                                                                                                                                                                                     }
  959.                                                                                                                                                                                                                                                                                 }
  960.                                                                                                                                                                                                                                                                             }
  961.                                                                                                                                                                                                                                                                         }
  962.                                                                                                                                                                                                                                                                     }
  963.                                                                                                                                                                                                                                                                 }
  964.                                                                                                                                                                                                                                                             }
  965.                                                                                                                                                                                                                                                         }
  966.                                                                                                                                                                                                                                                     }
  967.                                                                                                                                                                                                                                                 }
  968.                                                                                                                                                                                                                                             }
  969.                                                                                                                                                                                                                                         }
  970.                                                                                                                                                                                                                                     }
  971.                                                                                                                                                                                                                                 }
  972.                                                                                                                                                                                                                             }
  973.                                                                                                                                                                                                                         }
  974.                                                                                                                                                                                                                     }
  975.                                                                                                                                                                                                                 }
  976.                                                                                                                                                                                                             }
  977.                                                                                                                                                                                                         }
  978.                                                                                                                                                                                                     }
  979.                                                                                                                                                                                                 }
  980.                                                                                                                                                                                             }
  981.                                                                                                                                                                                         }
  982.                                                                                                                                                                                     }
  983.                                                                                                                                                                                 }
  984.                                                                                                                                                                             }
  985.                                                                                                                                                                         }
  986.                                                                                                                                                                     }
  987.                                                                                                                                                                 }
  988.                                                                                                                                                             }
  989.                                                                                                                                                         }
  990.                                                                                                                                                     }
  991.                                                                                                                                                 }
  992.                                                                                                                                             }
  993.                                                                                                                                         }
  994.                                                                                                                                     }
  995.                                                                                                                                 }
  996.                                                                                                                             }
  997.                                                                                                                         }
  998.                                                                                                                     }
  999.                                                                                                                 }
  1000.                                                                                                             }
  1001.                                                                                                         }
  1002.                                                                                                     }
  1003.                                                                                                 }
  1004.                                                                                             }
  1005.                                                                                         }
  1006.                                                                                     }
  1007.                                                                                 }
  1008.                                                                             }
  1009.                                                                         }
  1010.                                                                     }
  1011.                                                                 }
  1012.                                                             }
  1013.                                                         }
  1014.                                                     }
  1015.                                                 }
  1016.                                             }
  1017.                                         }
  1018.                                     }
  1019.                                 }
  1020.                             }
  1021.                         }
  1022.                     }
  1023.                 }
  1024.             }
  1025.         }
  1026.         console.consoleTxt = console.consoleTxt + ("] " + command + "\n");
  1027.         if (commandExists)
  1028.         {
  1029.             console.consoleTxt = console.consoleTxt + (extraTxt + "\n");
  1030.         }
  1031.         else
  1032.         {
  1033.             console.consoleTxt = console.consoleTxt + ("command \'" + command + "\' does not exist." + "\n");
  1034.         }
  1035.         console.consoleTxt.scroll = console.consoleTxt.scroll + 50;
  1036.         tempInsertTxt = command;
  1037.         console.insertTxt = "";
  1038.     }
  1039. }
Add Comment
Please, Sign In to add comment