Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package
- {
- import flare.materials.filters.LightFilter;
- import flare.system.Device3D;
- import flash.geom.Point;
- import flash.utils.ByteArray;
- public final class CMD
- {
- public static var bytes:ByteArray = new ByteArray();
- public function CMD()
- {
- super();
- }
- public static function consoleInput(param1:String) : void
- {
- var _loc3_:Point = null;
- var _loc4_:String = null;
- var _loc5_:* = null;
- var _loc6_:* = 0;
- var _loc7_:Array = null;
- var _loc8_:String = null;
- var _loc9_:* = null;
- var _loc10_:int = 0;
- var _loc11_:String = null;
- var _loc12_:* = null;
- var _loc13_:int = 0;
- var _loc2_:String = param1.toLowerCase();
- if(_loc2_ == "/fps")
- {
- UI.printToConsole("rendersPerSecond: " + Main.scene.rendersPerSecond + " fps:" + sp.fps + " Merged",1);
- return;
- }
- if(_loc2_ == "/loc")
- {
- _loc3_ = sp.getLoc(sp.model.playerGroup.world.position);
- _loc4_ = "H" + _loc3_.x + " , " + "V" + _loc3_.y + " = " + String(Terrain.tMapL[_loc3_.y][_loc3_.x]);
- UI.printToConsole(_loc4_,1);
- UI.printToConsole(String(sp.model.playerGroup.world.position),1);
- return;
- }
- if(_loc2_ == "/stats")
- {
- _loc5_ = "renderTime: " + Main.scene.renderTime;
- _loc5_ = "renderTime: " + Main.scene.renderTime + " objectsDrawn: " + String(Device3D.objectsDrawn);
- _loc5_ = _loc5_ + " trianglesDrawn: " + String(Device3D.trianglesDrawn);
- UI.printToConsole(_loc5_,1);
- return;
- }
- if(_loc2_.substr(0,10) == "/lightmode")
- {
- _loc6_ = int(int(_loc2_.substr(10,_loc2_.length)));
- if(int(int(_loc2_.substr(10,_loc2_.length))) > 0 && _loc6_ < 5)
- {
- switch(_loc6_)
- {
- case 1:
- Main.scene.lights.techniqueName = LightFilter.NO_LIGHTS;
- UI.printToConsole("Lightmode: NO_LIGHTS",1);
- break;
- case 2:
- Main.scene.lights.techniqueName = LightFilter.PER_VERTEX;
- UI.printToConsole("Lightmode: PER_VERTEX",1);
- break;
- case 3:
- Main.scene.lights.techniqueName = LightFilter.LINEAR;
- UI.printToConsole("Lightmode: LINEAR",1);
- break;
- case 4:
- Main.scene.lights.techniqueName = LightFilter.SAMPLED;
- UI.printToConsole("Lightmode: SAMPLED",1);
- }
- }
- else
- {
- UI.printToConsole("Error: Invalid Lightmode",1);
- }
- return;
- }
- if(_loc2_ == "/benchmark")
- {
- UI.printToConsole("Benchmark: total=" + Main.benchmark.total,1);
- return;
- }
- if(_loc2_ == "/konginfo")
- {
- kongregate.info();
- return;
- }
- if(_loc2_ == "/kongitemlist")
- {
- kongregate.mtx.requestUserItemList(null,kongregateUI.onUserItems);
- return;
- }
- if(_loc2_ == "/bye")
- {
- MU.sendNetMessage("system.user.delete","anySubject",String(MU.userID));
- return;
- }
- if(_loc2_ == "/country")
- {
- UI.printToConsole("Country Code: " + Character.account.countryCode,1);
- return;
- }
- if(_loc2_ == "/report")
- {
- Moderator.incidentReport();
- return;
- }
- if(_loc2_ == "/disconnect")
- {
- MU.disconnect();
- return;
- }
- if(_loc2_ == "/authenticate")
- {
- UI.printToConsole(String(kongregate.authenticated),2);
- return;
- }
- if(_loc2_ == "/who")
- {
- if(stat.island < 100)
- {
- _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"];
- _loc8_ = _loc7_[stat.island];
- }
- else
- {
- _loc8_ = "Dungeon Level " + String(stat.island - 100);
- }
- if(MU.avatar.length == 0)
- {
- UI.printToConsole("There are no other players in Room " + MU.room + ". (" + _loc8_ + ")",1);
- return;
- }
- UI.printToConsole("Players online in Room " + MU.room + " (" + _loc8_ + ")",1);
- _loc9_ = "";
- _loc9_ = _loc9_ + stat.playerName;
- _loc10_ = 0;
- while(_loc10_ < MU.avatar.length)
- {
- _loc9_ = _loc9_ + ", ";
- _loc9_ = _loc9_ + MU.avatar[_loc10_].name;
- _loc10_++;
- }
- UI.printToConsole(_loc9_,2);
- return;
- }
- if(_loc2_.substr(0,5) == "/join")
- {
- _loc6_ = int(int(_loc2_.substr(5,_loc2_.length)));
- if(MU.room == _loc6_)
- {
- UI.printToConsole("Error: Room " + _loc6_ + " is already current.",1);
- }
- else if(_loc6_ > 0 && _loc6_ < 301)
- {
- MU.changeRoom(_loc6_);
- MU.deleteAllAvatars();
- _loc10_ = 0;
- while(_loc10_ < MOB.AI.lenth)
- {
- if(MOB.AI[_loc10_].userID == MU.userID)
- {
- MOB.passTheBrain(_loc10_);
- }
- _loc10_++;
- }
- MOB.deleteAll();
- }
- else
- {
- UI.printToConsole("Error: Unknown room",1);
- }
- return;
- }
- if(_loc2_ == "/logout")
- {
- MU.logout();
- return;
- }
- if(_loc2_.substr(0,2) == "/f")
- {
- if(_loc2_.substr(2,1) == " ")
- {
- _loc11_ = _loc2_.substr(3,_loc2_.length);
- }
- else
- {
- _loc11_ = _loc2_.substr(2,_loc2_.length);
- }
- Social.sendFriendChatMessage(_loc11_);
- return;
- }
- if(_loc2_.substr(0,6) == "/level")
- {
- _loc6_ = int(int(_loc2_.substr(6,_loc2_.length)));
- if(int(int(_loc2_.substr(6,_loc2_.length))) < 1)
- {
- Terrain.createIsland(1);
- }
- else if(_loc6_ <= stat.xpLevel * 1.2)
- {
- if(Dungeon.active && Dungeon.level == _loc6_)
- {
- sp.spawnPlayer();
- return;
- }
- Dungeon.entryPoint = 1;
- Dungeon.enter(_loc6_);
- }
- else
- {
- UI.printToConsole("Error: Your character is only at XP Level " + stat.xpLevel,1);
- UI.printToConsole("You can teleport up to dungeon level " + int(stat.xpLevel * 1.2) + " maximum.",1);
- }
- UI.deselectConsole();
- return;
- }
- if(_loc2_.substr(0,9) == "/teleport")
- {
- _loc6_ = int(int(_loc2_.substr(9,_loc2_.length)));
- if(int(int(_loc2_.substr(9,_loc2_.length))) > -1 && _loc6_ < 11)
- {
- if(_loc6_ == 0)
- {
- Dungeon.entryPoint = 1;
- Dungeon.enter(stat.xpLevel);
- }
- else
- {
- Terrain.createIsland(_loc6_);
- }
- }
- else
- {
- UI.printToConsole("Teleport error: Unknown location",1);
- }
- UI.deselectConsole();
- return;
- }
- if(_loc2_ == "/camera")
- {
- Maya.begin(false);
- return;
- }
- if(_loc2_ == "/design65000")
- {
- Maya.begin(true);
- return;
- }
- if(MU.userID == 1516002 && Lock.sandbox && Moderator.enabled)
- {
- if(_loc2_.substr(0,8) == "/xplevel")
- {
- _loc12_ = _loc2_.split(" ");
- if(_loc2_.split(" ")[1] != null)
- {
- _loc13_ = int(_loc12_[1]);
- Character.toXPLevel(_loc13_);
- stat.oldxpLevel = _loc13_;
- }
- return;
- }
- if(_loc2_ == "/userlist")
- {
- MU.sendNetMessage("system.list.users","UL","");
- return;
- }
- if(_loc2_ == "/banlist")
- {
- MU.sendNetMessage("system.list.banusers","BL","");
- return;
- }
- if(_loc2_.substr(0,10) == "/revokeban")
- {
- _loc12_ = _loc2_.split(" ");
- if(_loc12_[1] != null)
- {
- MU.sendNetMessage("system.user.revokeban","RB",_loc12_[1]);
- return;
- }
- }
- if(_loc2_.substr(0,4) == "/ban")
- {
- _loc12_ = _loc2_.split(" ");
- Moderator.banIP(_loc12_[1]);
- return;
- }
- }
- if(_loc2_.substr(0,1) == "/")
- {
- UI.printToConsole("Unknown Command.",1);
- return;
- }
- MU.sendChatMessage(param1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement