Advertisement
Guest User

logs.as

a guest
Feb 26th, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Action script...
  2.  
  3. // [Initial MovieClip Action of sprite 20591]
  4. #initclip 112
  5. if (!com.ankamagames.tools.Logger)
  6. {
  7.     if (!com)
  8.     {
  9.         _global.com = new Object();
  10.     } // end if
  11.     if (!com.ankamagames)
  12.     {
  13.         _global.com.ankamagames = new Object();
  14.     } // end if
  15.     if (!com.ankamagames.tools)
  16.     {
  17.         _global.com.ankamagames.tools = new Object();
  18.     } // end if
  19.     var _loc1 = (_global.com.ankamagames.tools.Logger = function ()
  20.     {
  21.         this._buffer = new Array();
  22.         this.connect();
  23.     }).prototype;
  24.     (_global.com.ankamagames.tools.Logger = function ()
  25.     {
  26.         this._buffer = new Array();
  27.         this.connect();
  28.     }).initialize = function ()
  29.     {
  30.         com.ankamagames.tools.Logger.instance = new com.ankamagames.tools.Logger();
  31.     };
  32.     (_global.com.ankamagames.tools.Logger = function ()
  33.     {
  34.         this._buffer = new Array();
  35.         this.connect();
  36.     }).out = function ()
  37.     {
  38.         var _loc2 = arguments[0];
  39.         var _loc3 = arguments[arguments.length - 3];
  40.         var _loc4 = arguments[arguments.length - 2];
  41.         var _loc5 = arguments[arguments.length - 1];
  42.         var _loc6 = arguments.length > 4 ? (arguments[1]) : (undefined);
  43.         if (_loc6 == 666)
  44.         {
  45.             _loc6 = com.ankamagames.tools.Logger.LEVEL_FUNCTION_CALL;
  46.         } // end if
  47.         var _loc7 = new String(_loc2);
  48.         if (_loc7.toUpperCase().indexOf("[EXCEPTION]") == 0)
  49.         {
  50.             _loc7 = _loc7.substr(12);
  51.             _loc6 = com.ankamagames.tools.Logger.LEVEL_EXCEPTION;
  52.         }
  53.         else if (_loc7.toUpperCase().indexOf("[WTF]") == 0)
  54.         {
  55.             _loc7 = _loc7.substr(5);
  56.             _loc6 = com.ankamagames.tools.Logger.LEVEL_WIP;
  57.         }
  58.         else if (_loc7.indexOf("[?!!]") == 0)
  59.         {
  60.             _loc7 = _loc7.substr(5);
  61.             _loc6 = com.ankamagames.tools.Logger.LEVEL_WHAT_TEH_FKCU;
  62.         } // end else if
  63.         com.ankamagames.tools.Logger.instance.trace(_loc7, _loc6);
  64.     };
  65.     _loc1.connect = function ()
  66.     {
  67.         this._socket = new XMLSocket();
  68.         this._connected = false;
  69.         this._socket.onConnect = function (success)
  70.         {
  71.             var _loc3 = arguments.callee.tracer;
  72.             _loc3.onConnected(success);
  73.         };
  74.         this._socket.onClose = function ()
  75.         {
  76.             var _loc2 = arguments.callee.tracer;
  77.             _loc2.onSocketClose();
  78.         };
  79.         this._socket.onConnect.tracer = this;
  80.         this._socket.connect(com.ankamagames.tools.Logger.SERVER_HOST, com.ankamagames.tools.Logger.SERVER_PORT);
  81.     };
  82.     _loc1.trace = function (message, color)
  83.     {
  84.         if (this._connected)
  85.         {
  86.             this._socket.send("!SOS<showMessage key=\"KeyColor" + color + "\"><![CDATA[" + message + "]]></showMessage>");
  87.         }
  88.         else
  89.         {
  90.             var _loc4 = new Array();
  91.             _loc4[0] = color;
  92.             _loc4[1] = message;
  93.             this._buffer.push(_loc4);
  94.         } // end else if
  95.     };
  96.     _loc1.onSocketClose = function ()
  97.     {
  98.         if (this._nCurrentReconnection < com.ankamagames.tools.Logger.MAX_RECONNECTION_COUNT)
  99.         {
  100.             this.connect();
  101.             ++this._nCurrentReconnection;
  102.         } // end if
  103.     };
  104.     _loc1.onConnected = function (success)
  105.     {
  106.         var _loc3 = 0;
  107.        
  108.         while (++_loc3, _loc3 < com.ankamagames.tools.Logger.LEVELS_LIST.length)
  109.         {
  110.             this._socket.send("!SOS<setKey><name>KeyColor" + com.ankamagames.tools.Logger.LEVELS_LIST[_loc3] + "</name><color>" + com.ankamagames.tools.Logger.LEVELS_LIST[_loc3] + "</color></setKey>");
  111.         } // end while
  112.         var _loc4 = 0;
  113.        
  114.         while (++_loc4, _loc4 < this._buffer.length)
  115.         {
  116.             this._socket.send("!SOS<showMessage key=\"KeyColor" + this._buffer[_loc4][0] + "\"><![CDATA[" + this._buffer[_loc4][1] + "]]></showMessage>");
  117.         } // end while
  118.         this._connected = true;
  119.         this._nCurrentReconnection = 0;
  120.     };
  121.     ASSetPropFlags(_loc1, null, 1);
  122.     (_global.com.ankamagames.tools.Logger = function ()
  123.     {
  124.         this._buffer = new Array();
  125.         this.connect();
  126.     }).SERVER_HOST = "localhost";
  127.     (_global.com.ankamagames.tools.Logger = function ()
  128.     {
  129.         this._buffer = new Array();
  130.         this.connect();
  131.     }).SERVER_PORT = 4444;
  132.     (_global.com.ankamagames.tools.Logger = function ()
  133.     {
  134.         this._buffer = new Array();
  135.         this.connect();
  136.     }).LEVEL_STANDARD = 16777215;
  137.     (_global.com.ankamagames.tools.Logger = function ()
  138.     {
  139.         this._buffer = new Array();
  140.         this.connect();
  141.     }).LEVEL_NETWORK = 13421772;
  142.     (_global.com.ankamagames.tools.Logger = function ()
  143.     {
  144.         this._buffer = new Array();
  145.         this.connect();
  146.     }).LEVEL_GOOD = 39219;
  147.     (_global.com.ankamagames.tools.Logger = function ()
  148.     {
  149.         this._buffer = new Array();
  150.         this.connect();
  151.     }).LEVEL_MEDIUM = 16750848;
  152.     (_global.com.ankamagames.tools.Logger = function ()
  153.     {
  154.         this._buffer = new Array();
  155.         this.connect();
  156.     }).LEVEL_EXCEPTION = 16711680;
  157.     (_global.com.ankamagames.tools.Logger = function ()
  158.     {
  159.         this._buffer = new Array();
  160.         this.connect();
  161.     }).LEVEL_WIP = 6723993;
  162.     (_global.com.ankamagames.tools.Logger = function ()
  163.     {
  164.         this._buffer = new Array();
  165.         this.connect();
  166.     }).LEVEL_WHAT_TEH_FKCU = 16711935;
  167.     (_global.com.ankamagames.tools.Logger = function ()
  168.     {
  169.         this._buffer = new Array();
  170.         this.connect();
  171.     }).LEVEL_FUNCTION_CALL = 11190271;
  172.     (_global.com.ankamagames.tools.Logger = function ()
  173.     {
  174.         this._buffer = new Array();
  175.         this.connect();
  176.     }).LEVELS_LIST = [com.ankamagames.tools.Logger.LEVEL_STANDARD, com.ankamagames.tools.Logger.LEVEL_NETWORK, com.ankamagames.tools.Logger.LEVEL_GOOD, com.ankamagames.tools.Logger.LEVEL_MEDIUM, com.ankamagames.tools.Logger.LEVEL_EXCEPTION, com.ankamagames.tools.Logger.LEVEL_WIP, com.ankamagames.tools.Logger.LEVEL_WHAT_TEH_FKCU, com.ankamagames.tools.Logger.LEVEL_FUNCTION_CALL];
  177.     (_global.com.ankamagames.tools.Logger = function ()
  178.     {
  179.         this._buffer = new Array();
  180.         this.connect();
  181.     }).MAX_RECONNECTION_COUNT = 10;
  182.     _loc1._nCurrentReconnection = 0;
  183. } // end if
  184. #endinitclip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement