Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class info.cppro.loader.loader
- {
- static var VERSION = "v1.0.2 RC0";
- static var VNUMBER = 20100725;
- static var AUTHOR = "Logan & Jasperi";
- var PLUGINS = new Array();
- var HOST = "127.0.0.1";
- var PENGUIN = "Not found yet";
- var REPLACES = new Array();
- var FAKE_LANG = {};
- var HANDLERS = {};
- var SHAREVARS = {};
- var HANDLERVARS = {};
- function loader(arg)
- {
- this.HANDLERS.SHELL = {};
- this.HANDLERS.AIRTOWER = {};
- this.HANDLERS.LOCAL_CRUMBS = {};
- this.HANDLERS.GLOBAL_CRUMBS = {};
- this.HANDLERS.ENGINE = {};
- this.HANDLERS.INTERFACE = {};
- this._addReplace(function(url)
- {
- return url;
- }
- );
- _global.baseURL = "http://localhost/play/";
- System.security.allowDomain("*");
- loadMovieNum("http://localhost/play/v2/client/load.swf?cp1556",1,"GET");
- _root.onEnterFrame = function()
- {
- for(var _loc11_ in _level1)
- {
- if(typeof _level1[_loc11_] == "movieclip")
- {
- _level1.bootLoader.messageFromAS3({type:"setEnvironmentData",data:{clientPath:"http://localhost/play/v2/client/",contentPath:"http://localhost/play/v2/content/",gamesPath:"http://localhost/play/v2/games/",connectionID:"1227.com",language:"en",basePath:"",affiliateID:"0"}});
- _root.onEnterFrame = function()
- {
- if(_level1.shellContainer.DEPENDENCIES_FILENAME)
- {
- _level1.bootLoader.messageFromAS3({type:"showLogin"});
- _level0.CLIENT.handleContainerFound(_level0.CLIENT.PENGUIN = _level1.shellContainer);
- }
- };
- }
- }
- };
- }
- function handlePluginLoaded(pluginFunction, inter)
- {
- if(this.PENGUIN.AIRTOWER && (!inter || this.PENGUIN.INTERFACE))
- {
- pluginFunction();
- }
- else
- {
- this.PLUGINS.push([pluginFunction,inter]);
- }
- }
- function handleContainerFound(container)
- {
- this.PLUGIN_HOLDER = this.PENGUIN.createEmptyMovieClip("pluginContainer_mc",65535);
- _global.PenguBackup = container;
- with(container)
- {
- _level2.debug_txt.text = "Shell Loaded :D"
- if(LOCAL_CRUMBS)
- {
- _level0.CLIENT._fireEvent("LOCAL_CRUMBS");
- }
- if(GLOBAL_CRUMBS)
- {
- _level0.CLIENT._fireEvent("GLOBAL_CRUMBS");
- }
- if(AIRTOWER)
- {
- _level0.CLIENT._fireEvent("AIRTOWER");
- }
- if(SHELL)
- {
- _level0.CLIENT._fireEvent("SHELL");
- }
- if(!LOCAL_CRUMBS)
- {
- return undefined;
- }
- for(var i in this.FAKE_LANG)
- {
- LOCAL_CRUMBS.lang[i] = this.FAKE_LANG[i];
- }
- if(!GLOBAL_CRUMBS || !AIRTOWER || !SHELL)
- {
- return undefined;
- }
- createEmptyMovieClip("addons_mc",_level1.getNextHighestDepth())
- SHELL.analytics = false
- SHELL.hideErrorPrompt()
- GLOBAL_CRUMBS.login_server.ip = [this.HOST]
- GLOBAL_CRUMBS.login_server.even_port = 6112
- GLOBAL_CRUMBS.login_server.odd_port = 6112
- GLOBAL_CRUMBS.redemption_server.ip = this.HOST
- GLOBAL_CRUMBS.redemption_server.port = 6113
- AIRTOWER.LOGIN_IP = this.HOST
- AIRTOWER.LOGIN_PORT_EVEN = 6112
- AIRTOWER.LOGIN_PORT_ODD = 6112
- AIRTOWER.PLUGIN_LOAD = "pl"
- AIRTOWER.SERVER_DATA = "sd"
- AIRTOWER.GET_VERSION = "gv"
- AIRTOWER.GET_SERVERS = "gs"
- AIRTOWER.MOD_REQUEST = "xy"
- AIRTOWER.SWF_COMMAND = "fc"
- AIRTOWER.UPDATE_MOOD = "umo"
- AIRTOWER.PRIVATE_MSG = "pmsg"
- AIRTOWER.GET_USERLOG = "glog"
- AIRTOWER.NEW_USERLOG = "nlog"
- AIRTOWER.TIMER_KICK = "tk"
- AIRTOWER.LOAD_MOVIE = "lm"
- SHELL.e_func[SHELL.KICK] = function()
- {
- trace("Kicked");
- }
- AIRTOWER.addListener(AIRTOWER.PLUGIN_LOAD,this.handlePluginLoad)
- AIRTOWER.addListener(AIRTOWER.SERVER_DATA,this.handleServerData)
- AIRTOWER.addListener(AIRTOWER.GET_VERSION,this.handleGetVersion)
- AIRTOWER.addListener(AIRTOWER.GET_SERVERS,this.handleServers)
- AIRTOWER.addListener(AIRTOWER.MOD_REQUEST,this.handleModRequest)
- AIRTOWER.addListener(AIRTOWER.SWF_COMMAND,this.handleSwfCommand)
- AIRTOWER.addListener(AIRTOWER.UPDATE_MOOD,this.handleUpdateMood)
- AIRTOWER.addListener(AIRTOWER.PRIVATE_MSG,this.handlePrivateMsg)
- AIRTOWER.addListener(AIRTOWER.TIMER_KICK,this.handleTimerKick)
- AIRTOWER.addListener(AIRTOWER.LOAD_MOVIE,this.handleLoadMovie)
- AIRTOWER.addListener(AIRTOWER.GET_USERLOG,this.bakeHandler(AIRTOWER.GET_USERLOG))
- AIRTOWER.addListener(AIRTOWER.NEW_USERLOG,this.bakeHandler(AIRTOWER.NEW_USERLOG))
- GLOBAL_CRUMBS.mascots_crumbs = new Object()
- GLOBAL_CRUMBS.mascots_crumbs[1] = {name:"Logan",gift_id:413}
- GLOBAL_CRUMBS.mascots_crumbs[2] = {name:"Nick",gift_id:413}
- GLOBAL_CRUMBS.mascots_crumbs[20] = {name:"Test",gift_id:413}
- SHELL.redemption_server.ip = this.HOST
- SHELL.redemption_server.port = 6113
- SHELL.createEmptyMovieClip("core_mc",SHELL.getNextHighestDepth())
- SHELL.loadSWFb = SHELL.loadSWF
- SHELL.loadSWF = function(a, b, c, d, e, f)
- {
- for(var _loc3_ in _level0.CLIENT.REPLACES)
- {
- b = _level0.CLIENT.REPLACES.register3(b);
- }
- return this.loadSWFb(a,b,c,d,e,f);
- }
- SHELL.makePlayerObjectFromStringB = SHELL.makePlayerObjectFromString
- SHELL.makePlayerObjectFromString = function(str)
- {
- var _loc1_ = SHELL.makePlayerObjectFromStringB(str);
- _loc1_.data = str.split("|");
- return _loc1_;
- }
- LOCAL_CRUMBS.lang.chat_restrict = "a-z A-Z z-A 0-9 !-} ?!.,;:`´-_/\\(){}=&$§\"=?@\'*+-ßäöüÄÖÜ#?<>\n\t"
- };
- System.security.allowDomain.call(_level1,"*");
- for(var i in this.PLUGINS)
- {
- if(!this.PLUGINS[i][1])
- {
- this.PLUGINS[i][0]();
- }
- }
- _root.onEnterFrame = this.waitForInterface;
- }
- function handleServers(obj)
- {
- trace("Handling Servers");
- for(var _loc3_ in _level0.CLIENT.PENGUIN.GLOBAL_CRUMBS.servers)
- {
- delete _level0.CLIENT.PENGUIN.GLOBAL_CRUMBS.servers.register3;
- delete _level0.CLIENT.PENGUIN.SHELL.world_crumbs.register3;
- }
- var _loc2_ = obj[1].split("|");
- for(var _loc3_ in _loc2_)
- {
- _loc3_ = _loc2_[_loc3_];
- var _loc1_ = _loc3_.split(":");
- _level0.CLIENT.addServer(_loc1_[2],_loc1_[0],_loc1_[1],_loc1_[3]);
- }
- }
- function addServer(name, ip, port, population)
- {
- var _loc1_ = 0;
- for(var _loc2_ in _level0.CLIENT.PENGUIN.GLOBAL_CRUMBS.servers)
- {
- _loc1_ = _loc1_ + 1;
- }
- _loc1_ = _loc1_ + 1;
- trace(_loc1_);
- _level0.CLIENT.PENGUIN.GLOBAL_CRUMBS.servers[_loc1_] = {name:name,ip:ip,port:port,population:population};
- _level0.CLIENT.PENGUIN.SHELL.world_crumbs[_loc1_] = {name:name,ip:ip,port:port,id:_loc1_,population:population};
- }
- function bakeHandler(handler)
- {
- if(!_level0.CLIENT.HANDLERS[handler])
- {
- _level0.CLIENT.HANDLERS[handler] = {};
- }
- return function(rObj)
- {
- _level0.CLIENT.HANDLERVARS = [];
- for(var _loc2_ in rObj)
- {
- _level0.CLIENT.HANDLERVARS[_loc2_] = rObj[_loc2_];
- }
- for(var _loc2_ in _level0.CLIENT.HANDLERS[handler])
- {
- _level0.CLIENT.HANDLERS[handler].register2(_level0.CLIENT.HANDLERVARS);
- }
- };
- }
- function handlePrivateMsg(obj)
- {
- obj.shift();
- var sender = obj.shift();
- var sendID = obj.shift();
- var msg = obj.shift();
- with(_level0.CLIENT.PENGUIN)
- {
- INTERFACE.openLog()
- addToChatLog({player_id:sendID,nickname:sender,message:msg,type:SEND_BLOCKED_MESSAGE})
- };
- }
- function handleTimerKick(obj)
- {
- var timeout = obj.shift();
- var from = obj.shift();
- with(_level0.CLIENT.PENGUIN)
- {
- INTERFACE.showPrompt("ok",from + "(Staff) has set your egg timer")
- SHELL.egg_timer_milliseconds_remaining = timeout * 60000
- SHELL.setIsEggTimerActive(true)
- };
- }
- function handleLoadMovie(obj)
- {
- trace("Loading Movie");
- obj.shift();
- loadMovieNum(obj.shift(),5);
- }
- function handleUpdateMood(obj)
- {
- var _loc1_ = obj.shift();
- var _loc2_ = obj.shift();
- _level0.CLIENT.PENGUIN.INTERFACE.getPlayerObject(_loc1_).data[19] = _loc2_;
- if(_level0.CLIENT.PENGUIN.INTERFACE.getActivePlayerId() == _loc1_)
- {
- }
- }
- function handleSwfCommand(obj)
- {
- obj.shift();
- var func = obj.shift();
- var returnValue = this[func].apply(this,obj);
- with(_level0.CLIENT.PENGUIN.AIRTOWER)
- {
- send(PLAY_EXT,ICP_HANDLER + "#" + SWF_COMMAND,[returnValue],"str",-1)
- };
- }
- function handleession(obj)
- {
- obj.shift();
- var _loc4_ = obj.shift();
- var _loc5_ = obj.shift();
- var _loc2_ = obj.shift();
- var _loc3_ = obj.shift();
- _level0.CLIENT.PENGUIN.SHELL.showErrorPrompt(_loc4_,_loc5_,_loc2_,undefined,_loc3_);
- }
- function waitForInterface()
- {
- with(_level0.CLIENT.PENGUIN)
- {
- if(INTERFACE)
- {
- _level0.CLIENT._fireEvent("INTERFACE");
- }
- if(ENGINE)
- {
- _level0.CLIENT._fireEvent("ENGINE");
- }
- if(!INTERFACE || !ENGINE)
- {
- return undefined;
- }
- INTERFACE.DOCK.chat_mc.chat_input.maxChars = 4096
- INTERFACE.convertToSafeCase = function(txt)
- {
- return txt;
- }
- INTERFACE.isClickableLogItem = function()
- {
- return true;
- }
- INTERFACE.updatePlayerWidgetB = function(a, b, c, d, e, f, g)
- {
- if(!g)
- {
- var _loc1_ = INTERFACE.updatePlayerWidgetB(a,b,c,d,e,f,g);
- }
- return _loc1_;
- }
- ENGINE.randomizeNearPosition = function(player, x, y, range)
- {
- player.x = x;
- player.y = y;
- return true;
- }
- };
- for(var i in this.CLIENT.PLUGINS)
- {
- if(this.CLIENT.PLUGINS[i][1])
- {
- this.CLIENT.PLUGINS[i][0]();
- }
- }
- delete this.onEnterFrame;
- delete _root.onEnterFrame;
- this.onEnterFrame = function()
- {
- this.CLIENT.PENGUIN.SHELL.setModerator(true);
- this.CLIENT.PENGUIN.INTERFACE.is_moderator = true;
- };
- }
- function doModeratorAction(action)
- {
- switch(action)
- {
- case "openChatlog":
- case "joinRoom":
- case "goInvisible":
- case "getPlayerInfos":
- case "leaveMeAlone":
- }
- }
- function handleModRequest(obj)
- {
- obj.shift();
- var _loc7_ = Number(obj.shift());
- var _loc5_ = String(obj.shift());
- var _loc6_ = String(obj.shift());
- var _loc3_ = Number(obj.shift());
- var _loc8_ = String(obj.shift());
- var _loc9_ = Number(obj.shift());
- var _loc4_ = "Mwha";
- this.PLUGIN_HOLDER.Core.modReport_mc.reason.text = _loc5_;
- this.PLUGIN_HOLDER.Core.modReport_mc.roomID.text = _loc7_;
- this.PLUGIN_HOLDER.Core.modReport_mc.roomName.text = _loc4_;
- this.PLUGIN_HOLDER.Core.modReport_mc.reporterPlayerName.text = _loc6_;
- this.PLUGIN_HOLDER.Core.modReport_mc.reporterPlayerID.text = _loc3_;
- this.PLUGIN_HOLDER.Core.modReport_mc.reportedPlayerName.text = _loc8_;
- this.PLUGIN_HOLDER.Core.modReport_mc.reportedPlayerID.text = _loc9_;
- _level2.debug_txt.text = "Received MOD REPORT!";
- _level0.modReport_mc._visible = false;
- }
- function handlePluginLoad(obj)
- {
- obj.shift();
- with(_level0.CLIENT)
- {
- PLUGIN_HOLDER.createEmptyMovieClip(obj[0],PLUGIN_HOLDER.getNextHighestDepth())
- PLUGIN_HOLDER[obj[0]].loadMovie(obj[1])
- };
- with(_level0.CLIENT.PENGUIN.AIRTOWER)
- {
- send(PLAY_EXT,ICP_HANDLER + "#" + PLUGIN_LOAD,["In Memoria Chris..."],"str",-1)
- };
- }
- function handleServerData(obj)
- {
- obj.shift();
- with(_level0.CLIENT.PENGUIN)
- {
- SHELL.world_crumbs = new Array()
- var servers = new Array()
- for(var index in obj)
- {
- var rawServer = obj[index].split("|");
- SHELL.world_crumbs[rawServer[0]] = {id:rawServer[0],name:rawServer[1],ip:rawServer[2],port:rawServer[3]};
- }
- };
- with(_level0.CLIENT.PENGUIN.AIRTOWER)
- {
- send(PLAY_EXT,ICP_HANDLER + "#" + SERVER_DATA,["Cake isn\'t good for your health!"],"str",-1)
- };
- }
- function handleGetVersion(obj)
- {
- with(_level0.CLIENT.PENGUIN.AIRTOWER)
- {
- send(PLAY_EXT,ICP_HANDLER + "#" + GET_VERSION,[org.iCPTeam.iCPThree.iCPLoader.VNUMBER],"str",-1)
- };
- }
- function _fireEvent(evtName)
- {
- for(var _loc2_ in _level0.CLIENT.HANDLERS[evtName])
- {
- _level0.CLIENT.HANDLERS[evtName].register2();
- }
- _level0.CLIENT.HANDLERS[evtName] = {};
- }
- function _airtowerHandler(handler)
- {
- return this.PENGUIN.AIRTOWER.addListener(handler,this.bakeHandler(handler));
- }
- function _setTextFormat(array, o)
- {
- var _loc5_ = this._getProperty(array);
- var _loc3_ = new TextFormat();
- for(var _loc4_ in o)
- {
- _loc3_[_loc4_] = o[_loc4_];
- }
- return _loc5_.setTextFormat(_loc3_);
- }
- function _getProperty(array)
- {
- var _loc3_ = this.PENGUIN;
- var _loc2_ = 0;
- while(_loc2_ < array.length)
- {
- _loc3_ = _loc3_[array[_loc2_]];
- _loc2_ = _loc2_ + 1;
- }
- return _loc3_;
- }
- function _setProperty(array, data)
- {
- var _loc4_ = this.PENGUIN;
- var _loc2_ = 0;
- while(_loc2_ < array.length)
- {
- if(array.length == _loc2_ + 1)
- {
- _loc4_[array[_loc2_]] = data;
- }
- _loc4_ = _loc4_[array[_loc2_]];
- _loc2_ = _loc2_ + 1;
- }
- }
- function _call(array, a, b, c, d, e, f, g, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z)
- {
- var _loc4_ = this.PENGUIN;
- i = 0;
- while(i < array.length)
- {
- if(array.length == i + 1)
- {
- return _loc4_[array[i]](a,b,c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z);
- }
- _loc4_ = _loc4_[array[i]];
- i = i + 1;
- }
- }
- function _makeCallback(shareVar)
- {
- var original = this.SHAREVARS[shareVar];
- this.SHAREVARS[shareVar] = function(a, b, c, d, e, f, g, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z)
- {
- return original(a,b,c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z);
- };
- }
- function _callWithShareVars(array, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z)
- {
- a = this.SHAREVARS[a];
- b = this.SHAREVARS[b];
- c = this.SHAREVARS[c];
- d = this.SHAREVARS[d];
- e = this.SHAREVARS[e];
- f = this.SHAREVARS[f];
- g = this.SHAREVARS[g];
- h = this.SHAREVARS[h];
- i = this.SHAREVARS[i];
- j = this.SHAREVARS[j];
- k = this.SHAREVARS[k];
- l = this.SHAREVARS[l];
- m = this.SHAREVARS[m];
- n = this.SHAREVARS[n];
- o = this.SHAREVARS[o];
- p = this.SHAREVARS[p];
- q = this.SHAREVARS[q];
- r = this.SHAREVARS[r];
- s = this.SHAREVARS[s];
- t = this.SHAREVARS[t];
- u = this.SHAREVARS[u];
- v = this.SHAREVARS[v];
- w = this.SHAREVARS[w];
- x = this.SHAREVARS[x];
- y = this.SHAREVARS[y];
- z = this.SHAREVARS[z];
- return this._call(array,a,b,c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z);
- }
- function _callBase(array, a, b, c, d, e, f, g, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z)
- {
- return this._useBase(this._call(array,a,b,c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z));
- }
- function _apply(array, base, args)
- {
- var _loc4_ = this.PENGUIN;
- var _loc2_ = 0;
- while(_loc2_ < array.length)
- {
- if(array.length == _loc2_ + 1)
- {
- return _loc4_[array[_loc2_]].apply(base,args);
- }
- _loc4_ = _loc4_[array[_loc2_]];
- _loc2_ = _loc2_ + 1;
- }
- }
- function _foreach(array)
- {
- var _loc2_ = this.PENGUIN;
- var _loc4_ = {};
- var _loc5_ = 0;
- while(_loc5_ < array.length)
- {
- _loc2_ = _loc2_[array[_loc5_]];
- _loc5_ = _loc5_ + 1;
- }
- for(var _loc5_ in _loc2_)
- {
- _loc4_[_loc5_] = _loc2_[_loc5_];
- }
- return _loc4_;
- }
- function _clone(array, level, a)
- {
- var _loc3_ = this.PENGUIN;
- var _loc5_ = {};
- var _loc2_ = 0;
- while(_loc2_ < array.length)
- {
- _loc3_ = _loc3_[array[_loc2_]];
- _loc2_ = _loc2_ + 1;
- }
- _loc5_ = this.secretForeach(_loc3_,level,a);
- return _loc5_;
- }
- function secretForeach(object, level, a)
- {
- var _loc3_ = {};
- for(var _loc6_ in object)
- {
- if((typeof object[_loc6_] == "object" || a) && level != 0)
- {
- _loc3_[_loc6_] = this.secretForeach(object[_loc6_],level - 1);
- }
- else
- {
- _loc3_[_loc6_] = object[_loc6_];
- }
- }
- return _loc3_;
- }
- function _delete(array)
- {
- var _loc4_ = this.PENGUIN;
- var _loc2_ = 0;
- while(_loc2_ < array.length)
- {
- if(array.length == _loc2_ + 1)
- {
- delete register4[array[_loc2_]];
- }
- _loc4_ = _loc4_[array[_loc2_]];
- _loc2_ = _loc2_ + 1;
- }
- }
- function _setTimeout(cmd, interval)
- {
- this.PENGUIN.setTimeout(cmd,interval);
- }
- function _useBase(base)
- {
- return this.PENGUIN = base;
- }
- function _restoreBase()
- {
- return this.PENGUIN = _global.PenguBackup;
- }
- function _glow(mcP, a, b, c, d, e, f, g, h)
- {
- var _loc3_ = this._getProperty(mcP);
- var _loc4_ = new flash.filters.GlowFilter(a,b,c,d,e,f,g,h);
- var _loc2_ = new Array();
- _loc2_.push(_loc4_);
- _loc3_.filters = _loc2_;
- }
- function _initLoader()
- {
- _level0.CLIENT.loader = new MovieClipLoader();
- _level0.CLIENT.loader.addListener({onLoadInit:this.dumbHandler,onLoadError:this.dumbHandler,onLoadProgress:this.dumbHandler,onLoadStart:this.dumbHandler,onLoadComplete:this.dumbHandler});
- return _level0.CLIENT.loader;
- }
- function _addReplace(func)
- {
- var _loc2_ = this.REPLACES.length;
- this.REPLACES[_loc2_] = func;
- return _loc2_;
- }
- function _removeReplace(id)
- {
- if(this.REPLACES[id])
- {
- delete this.REPLACES.id;
- }
- else
- {
- for(var _loc3_ in this.REPLACES)
- {
- if(this.REPLACES[_loc3_] == id)
- {
- delete this.REPLACES.register3;
- }
- }
- }
- }
- function dumbHandler(mc)
- {
- _level0.CLIENT.PENGUIN.LAST_EVENT_MC = mc;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement