Advertisement
Guest User

cmd

a guest
Oct 13th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package
  2. {
  3.    import flare.materials.filters.LightFilter;
  4.    import flare.system.Device3D;
  5.    import flash.geom.Point;
  6.    import flash.utils.ByteArray;
  7.    
  8.    public final class CMD
  9.    {
  10.      
  11.       public static var bytes:ByteArray = new ByteArray();
  12.        
  13.      
  14.       public function CMD()
  15.       {
  16.          super();
  17.       }
  18.      
  19.       public static function consoleInput(param1:String) : void
  20.       {
  21.          var _loc3_:Point = null;
  22.          var _loc4_:String = null;
  23.          var _loc5_:* = null;
  24.          var _loc6_:* = 0;
  25.          var _loc7_:Array = null;
  26.          var _loc8_:String = null;
  27.          var _loc9_:* = null;
  28.          var _loc10_:int = 0;
  29.          var _loc11_:String = null;
  30.          var _loc12_:* = null;
  31.          var _loc13_:int = 0;
  32.          var _loc2_:String = param1.toLowerCase();
  33.          if(_loc2_ == "/fps")
  34.          {
  35.             UI.printToConsole("rendersPerSecond: " + Main.scene.rendersPerSecond + " fps:" + sp.fps + " Merged",1);
  36.             return;
  37.          }
  38.          if(_loc2_ == "/loc")
  39.          {
  40.             _loc3_ = sp.getLoc(sp.model.playerGroup.world.position);
  41.             _loc4_ = "H" + _loc3_.x + " , " + "V" + _loc3_.y + " = " + String(Terrain.tMapL[_loc3_.y][_loc3_.x]);
  42.             UI.printToConsole(_loc4_,1);
  43.             UI.printToConsole(String(sp.model.playerGroup.world.position),1);
  44.             return;
  45.          }
  46.          if(_loc2_ == "/stats")
  47.          {
  48.             _loc5_ = "renderTime: " + Main.scene.renderTime;
  49.             _loc5_ = "renderTime: " + Main.scene.renderTime + "  objectsDrawn: " + String(Device3D.objectsDrawn);
  50.             _loc5_ = _loc5_ + "  trianglesDrawn: " + String(Device3D.trianglesDrawn);
  51.             UI.printToConsole(_loc5_,1);
  52.             return;
  53.          }
  54.          if(_loc2_.substr(0,10) == "/lightmode")
  55.          {
  56.             _loc6_ = int(int(_loc2_.substr(10,_loc2_.length)));
  57.             if(int(int(_loc2_.substr(10,_loc2_.length))) > 0 && _loc6_ < 5)
  58.             {
  59.                switch(_loc6_)
  60.                {
  61.                   case 1:
  62.                      Main.scene.lights.techniqueName = LightFilter.NO_LIGHTS;
  63.                      UI.printToConsole("Lightmode: NO_LIGHTS",1);
  64.                      break;
  65.                   case 2:
  66.                      Main.scene.lights.techniqueName = LightFilter.PER_VERTEX;
  67.                      UI.printToConsole("Lightmode: PER_VERTEX",1);
  68.                      break;
  69.                   case 3:
  70.                      Main.scene.lights.techniqueName = LightFilter.LINEAR;
  71.                      UI.printToConsole("Lightmode: LINEAR",1);
  72.                      break;
  73.                   case 4:
  74.                      Main.scene.lights.techniqueName = LightFilter.SAMPLED;
  75.                      UI.printToConsole("Lightmode: SAMPLED",1);
  76.                }
  77.             }
  78.             else
  79.             {
  80.                UI.printToConsole("Error: Invalid Lightmode",1);
  81.             }
  82.             return;
  83.          }
  84.          if(_loc2_ == "/benchmark")
  85.          {
  86.             UI.printToConsole("Benchmark: total=" + Main.benchmark.total,1);
  87.             return;
  88.          }
  89.          if(_loc2_ == "/konginfo")
  90.          {
  91.             kongregate.info();
  92.             return;
  93.          }
  94.          if(_loc2_ == "/kongitemlist")
  95.          {
  96.             kongregate.mtx.requestUserItemList(null,kongregateUI.onUserItems);
  97.             return;
  98.          }
  99.          if(_loc2_ == "/bye")
  100.          {
  101.             MU.sendNetMessage("system.user.delete","anySubject",String(MU.userID));
  102.             return;
  103.          }
  104.          if(_loc2_ == "/country")
  105.          {
  106.             UI.printToConsole("Country Code: " + Character.account.countryCode,1);
  107.             return;
  108.          }
  109.          if(_loc2_ == "/report")
  110.          {
  111.             Moderator.incidentReport();
  112.             return;
  113.          }
  114.          if(_loc2_ == "/disconnect")
  115.          {
  116.             MU.disconnect();
  117.             return;
  118.          }
  119.          if(_loc2_ == "/authenticate")
  120.          {
  121.             UI.printToConsole(String(kongregate.authenticated),2);
  122.             return;
  123.          }
  124.          if(_loc2_ == "/who")
  125.          {
  126.             if(stat.island < 100)
  127.             {
  128.                _loc7_ = ["The Dungeon","Sherwood Castle","Haunted Palm","Frost Bite","Lost Lagoon","Isle of Ancients","Isle of Heroes","Stone Circle","Battle Arena","Midnight Glade","Fortress of Fury"];
  129.                _loc8_ = _loc7_[stat.island];
  130.             }
  131.             else
  132.             {
  133.                _loc8_ = "Dungeon Level " + String(stat.island - 100);
  134.             }
  135.             if(MU.avatar.length == 0)
  136.             {
  137.                UI.printToConsole("There are no other players in Room " + MU.room + ". (" + _loc8_ + ")",1);
  138.                return;
  139.             }
  140.             UI.printToConsole("Players online in Room " + MU.room + " (" + _loc8_ + ")",1);
  141.             _loc9_ = "";
  142.             _loc9_ = _loc9_ + stat.playerName;
  143.             _loc10_ = 0;
  144.             while(_loc10_ < MU.avatar.length)
  145.             {
  146.                _loc9_ = _loc9_ + ", ";
  147.                _loc9_ = _loc9_ + MU.avatar[_loc10_].name;
  148.                _loc10_++;
  149.             }
  150.             UI.printToConsole(_loc9_,2);
  151.             return;
  152.          }
  153.          if(_loc2_.substr(0,5) == "/join")
  154.          {
  155.             _loc6_ = int(int(_loc2_.substr(5,_loc2_.length)));
  156.             if(MU.room == _loc6_)
  157.             {
  158.                UI.printToConsole("Error: Room " + _loc6_ + " is already current.",1);
  159.             }
  160.             else if(_loc6_ > 0 && _loc6_ < 301)
  161.             {
  162.                MU.changeRoom(_loc6_);
  163.                MU.deleteAllAvatars();
  164.                _loc10_ = 0;
  165.                while(_loc10_ < MOB.AI.lenth)
  166.                {
  167.                   if(MOB.AI[_loc10_].userID == MU.userID)
  168.                   {
  169.                      MOB.passTheBrain(_loc10_);
  170.                   }
  171.                   _loc10_++;
  172.                }
  173.                MOB.deleteAll();
  174.             }
  175.             else
  176.             {
  177.                UI.printToConsole("Error: Unknown room",1);
  178.             }
  179.             return;
  180.          }
  181.          if(_loc2_ == "/logout")
  182.          {
  183.             MU.logout();
  184.             return;
  185.          }
  186.          if(_loc2_.substr(0,2) == "/f")
  187.          {
  188.             if(_loc2_.substr(2,1) == " ")
  189.             {
  190.                _loc11_ = _loc2_.substr(3,_loc2_.length);
  191.             }
  192.             else
  193.             {
  194.                _loc11_ = _loc2_.substr(2,_loc2_.length);
  195.             }
  196.             Social.sendFriendChatMessage(_loc11_);
  197.             return;
  198.          }
  199.          if(_loc2_.substr(0,6) == "/level")
  200.          {
  201.             _loc6_ = int(int(_loc2_.substr(6,_loc2_.length)));
  202.             if(int(int(_loc2_.substr(6,_loc2_.length))) < 1)
  203.             {
  204.                Terrain.createIsland(1);
  205.             }
  206.             else if(_loc6_ <= stat.xpLevel * 1.2)
  207.             {
  208.                if(Dungeon.active && Dungeon.level == _loc6_)
  209.                {
  210.                   sp.spawnPlayer();
  211.                   return;
  212.                }
  213.                Dungeon.entryPoint = 1;
  214.                Dungeon.enter(_loc6_);
  215.             }
  216.             else
  217.             {
  218.                UI.printToConsole("Error: Your character is only at XP Level " + stat.xpLevel,1);
  219.                UI.printToConsole("You can teleport up to dungeon level " + int(stat.xpLevel * 1.2) + " maximum.",1);
  220.             }
  221.             UI.deselectConsole();
  222.             return;
  223.          }
  224.          if(_loc2_.substr(0,9) == "/teleport")
  225.          {
  226.             _loc6_ = int(int(_loc2_.substr(9,_loc2_.length)));
  227.             if(int(int(_loc2_.substr(9,_loc2_.length))) > -1 && _loc6_ < 11)
  228.             {
  229.                if(_loc6_ == 0)
  230.                {
  231.                   Dungeon.entryPoint = 1;
  232.                   Dungeon.enter(stat.xpLevel);
  233.                }
  234.                else
  235.                {
  236.                   Terrain.createIsland(_loc6_);
  237.                }
  238.             }
  239.             else
  240.             {
  241.                UI.printToConsole("Teleport error: Unknown location",1);
  242.             }
  243.             UI.deselectConsole();
  244.             return;
  245.          }
  246.          if(_loc2_ == "/camera")
  247.          {
  248.             Maya.begin(false);
  249.             return;
  250.          }
  251.          if(_loc2_ == "/design65000")
  252.          {
  253.             Maya.begin(true);
  254.             return;
  255.          }
  256.          if(MU.userID == 1516002 && Lock.sandbox && Moderator.enabled)
  257.          {
  258.             if(_loc2_.substr(0,8) == "/xplevel")
  259.             {
  260.                _loc12_ = _loc2_.split(" ");
  261.                if(_loc2_.split(" ")[1] != null)
  262.                {
  263.                   _loc13_ = int(_loc12_[1]);
  264.                   Character.toXPLevel(_loc13_);
  265.                   stat.oldxpLevel = _loc13_;
  266.                }
  267.                return;
  268.             }
  269.             if(_loc2_ == "/userlist")
  270.             {
  271.                MU.sendNetMessage("system.list.users","UL","");
  272.                return;
  273.             }
  274.             if(_loc2_ == "/banlist")
  275.             {
  276.                MU.sendNetMessage("system.list.banusers","BL","");
  277.                return;
  278.             }
  279.             if(_loc2_.substr(0,10) == "/revokeban")
  280.             {
  281.                _loc12_ = _loc2_.split(" ");
  282.                if(_loc12_[1] != null)
  283.                {
  284.                   MU.sendNetMessage("system.user.revokeban","RB",_loc12_[1]);
  285.                   return;
  286.                }
  287.             }
  288.             if(_loc2_.substr(0,4) == "/ban")
  289.             {
  290.                _loc12_ = _loc2_.split(" ");
  291.                Moderator.banIP(_loc12_[1]);
  292.                return;
  293.             }
  294.          }
  295.          if(_loc2_.substr(0,1) == "/")
  296.          {
  297.             UI.printToConsole("Unknown Command.",1);
  298.             return;
  299.          }
  300.          MU.sendChatMessage(param1);
  301.       }
  302.    }
  303. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement