Пример #1
0
        public void ParsePacket(Session session, Message message)
        {
            /*
             * ItemCount Int32
             * UserId Int32
             * Score Int32
             * Position Int32
             * Username String
             * Figure String
             * Gender String
             * Int32(1)
             * Int32(1)
             */

            //TODO: USE DISTRIBUTOR TO JUST GET USER FROM CACHE.
            int userid = message.NextInt32();

            HabboController user = new HabboController(userid);

            var response = new Message(2048);
            response.WriteInt32(1); // User Count
            response.WriteInt32(userid);
            response.WriteInt32(0); // TODO: Make column for  SCORE
            response.WriteInt32(1); // TODO: Make a void that filters the scores and sets the rank.
            response.WriteString(user.username);
            response.WriteString(user.figure);
            response.WriteString(user.gender);
            response.WriteInt32(1);
            response.WriteInt32(1);
            session.SendPacket(response);
        }
Пример #2
0
        /// <summary>
        /// Handels the purchase for an object from the catalog.
        /// </summary>
        public void Purchase(Session session, Message message)
        {
            // Get pageId from Client.
            int pageId = message.NextInt32();

            // Get itemId from Client.
            int itemId = message.NextInt32();

            // Create a instance of CatalogItemController using the purchased item Id.
            CatalogItemController purchasedItem = new CatalogItemController(itemId);

            // Simple check.
            if (purchasedItem.pageId != pageId) // If Page id do not match
                return;

            // Remove credits based on Item cost.
            session.Habbo.credits -= purchasedItem.credits;

            message = new Message(11); // Change to CreditUpdate id.

            // Updates users credits.
            message.WriteString("" + session.Habbo.credits + ".0");

            session.SendPacket(message);

            session.Habbo.SaveOrUpdate(session.Habbo);
        }
Пример #3
0
 public void ParsePacket(Session session, Message message)
 {
     var response = new Message(544);
     response.WriteString("Team Rev|");
     response.WriteString("");
     session.SendPacket(response);
 }
Пример #4
0
        /// <summary>
        /// Handles Packet, for current user, and message event.
        /// </summary>
        /// <param name="gameclient">User of Packet</param>
        /// <param name="Message">Message for User</param>
        public void ParsePacket(Session session, Message message)
        {
            var Response = new Message(2121);
            session.SendPacket(Response);

            Response = new Message(294);
            Response.WriteString("model_f"); // Room Model
            Response.WriteInt32(1); // id ?
            session.SendPacket(Response);

            Response = new Message(3248);
            Response.WriteString("floor");
            Response.WriteInt32(0);
            session.SendPacket(Response);

            Response = new Message(3248);
            Response.WriteString("landscape");
            Response.WriteString("0.0");
            session.SendPacket(Response);

            Response = new Message(3323);
            Response.WriteInt32(4);
            session.SendPacket(Response);

            Response = new Message(3840);
            session.SendPacket(Response);

            Response = new Message(1794);
            Response.WriteInt32(0);
            session.SendPacket(Response);

            Response = new Message(369);
            Response.WriteInt32(142641);
            session.SendPacket(Response);
        }
Пример #5
0
        public void ParsePacket(Session session, Message message)
        {
            var Response = new Message(2888);
            Response.WriteInt32(3);
            session.SendPacket(Response);

            Response = new Message(1401);
            Response.WriteInt32(3);
            Response.WriteString("1344031458870");
            Response.WriteString("http://habbo.hs.llnwd.net/basejump/693/BaseJump.swf");
            Response.WriteString("best");
            Response.WriteString("showAll");
            Response.WriteInt32(60);
            Response.WriteInt32(10);
            Response.WriteInt32(0);
            Response.WriteInt32(4);
            Response.WriteString("accessToken");
            Response.WriteString(session.Habbo.username + "-" + session.Habbo.figure);
            Response.WriteString("gameServerHost");
            Response.WriteString("ff-am.habbo.com");
            Response.WriteString("gameServerPort");
            Response.WriteString("30000");
            Response.WriteString("socketPolicyPort");
            Response.WriteString("30843");
            session.SendPacket(Response);
        }
Пример #6
0
        public void ParsePacket(Session session, Message message)
        {
            string releaseBuild = message.NextString();
            Application.Application.Logging.WriteLine(string.Format("Client release: {0}", releaseBuild), Logging.Status.Debug);
            Console.Title += string.Format(" | Invoked on Revision: {0}, Loading Packets...", releaseBuild);

            session.ReleaseBuild = releaseBuild;
        }
Пример #7
0
 /// <summary>
 /// Handles Packet, for current user, and message event.
 /// </summary>
 /// <param name="Session">User of Packet</param>
 /// <param name="Message">Message for User</param>
 public void ParsePacket(Session session, Message message)
 {
     var Response = new Message(3298);
     Response.WriteInt32(session.Habbo.id);
     Response.WriteString(message.NextString());
     Response.WriteInt32(0);
     Response.WriteInt32(0);
     Response.WriteInt32(-1);
     session.SendPacket(Response);
 }
Пример #8
0
        public void ParsePacket(Session session, Message message)
        {
            string sso = message.NextString();
            //Application.Logging.WriteLine(string.Format("SSO Ticket: {0}", sso));

            var loadMyHabbo = new HabboDistributor().GetHabbo(sso);

            session.Habbo = loadMyHabbo;

            var response = new Message(SendHeaders.InitHotelView);
            session.SendPacket(response);
        }
Пример #9
0
        public void ParsePacket(Session session, Message message)
        {
            int id = message.NextInt32();
            var flashbase = message.NextString();
            var variables = message.NextString();

            //Console.WriteLine("Flashbase {0}, Variables {1} loaded.", flashbase, variables);

            /*Application.Application.Logging.WriteLine(string.Format("ID {0}", id));
            Application.Application.Logging.WriteLine(string.Format("Flashbase {0}", flashbase));
            Application.Application.Logging.WriteLine(string.Format("Variables {0}", variables));*/
        }
Пример #10
0
        public void ParsePacket(Session session, Message message)
        {
            int FriendId = message.NextInt32();

            string theMessage = message.NextString();

            Console.WriteLine(FriendId);
            var Response = new Message(2582);
            Response.WriteInt32(FriendId);
            Response.WriteString(theMessage);
            Response.WriteString(string.Empty);
            session.SendPacket(Response);
        }
Пример #11
0
 public void ParsePacket(Session session, Message Message)
 {
     var Response = new Message(SendHeaders.InitClubStatus);
     Response.WriteString(Message.NextString());
     Response.WriteInt32(10);
     Response.WriteInt32(0);
     Response.WriteInt32(0);
     Response.WriteInt32(0);
     Response.WriteInt32(1);
     Response.WriteBool(false);
     Response.WriteBool(true);
     Response.WriteInt32(0);
     Response.WriteInt32(0);
     Response.WriteInt32(0);
     session.SendPacket(Response);
 }
Пример #12
0
        public void ParsePacket(Session session, Message message)
        {
            /*
             * [LOG][CLIENT] > 2574: [0][0][0]D[10][0][0][0][1][0][0]^^[0]8b12104s05013s05014s05015b629b628442e26e378b9f8f18818bbaa
             * [LOG][CLIENT] > 3163: [0][0][0][6][12][[0][0][0][0]
             */

            var Response = new Message(2574);
            Response.WriteInt32(1);
            Response.WriteInt32(24158);
            Response.WriteString("b12104s05013s05014s05015b629b628442e26e378b9f8f18818bbaa");
            session.SendPacket(Response);

            Response = new Message(3163);
            Response.WriteInt32(0);
            session.SendPacket(Response);
        }
Пример #13
0
        public void ParsePacket(Session session, Message message)
        {
            //[LOG] > CLIENT ID: '785': [0][0][0][3] [0][0][0][0] [0][0][0][0] [0][0][0][1] [0][0][0][10]
            //[LOG] > CLIENT ID: '3721': [0][0][0]‰[0][0]*6[0]GET_SNOWWAR_TOKENS[0][0][0][1]

            var response = new Message(785);
            response.WriteInt32(0);
            response.WriteInt32(0);
            response.WriteInt32(1);
            response.WriteInt32(10);
            session.SendPacket(response);

            response = new Message(3721);
            response.WriteInt32(1);
            response.WriteString("GET_SNOWWAR_TOKENS");
            response.WriteInt32(1);
            session.SendPacket(response);
        }
Пример #14
0
 public void ParsePacket(Session session, Message message)
 {
     var Uinfo = new Message(3744);
     Uinfo.WriteInt32(session.Habbo.id); // id perhaps
     Uinfo.WriteString(session.Habbo.username); // names
     Uinfo.WriteInt32(4); // registered minutes ago
     Uinfo.WriteInt32(8); // last login minutes ago
     Uinfo.WriteBool(true); // is online, NO doubt
     Uinfo.WriteInt32(1); // cfhs
     Uinfo.WriteInt32(2); // abusive cfhs
     Uinfo.WriteInt32(3); // cautions
     Uinfo.WriteInt32(4); // bans
     Uinfo.WriteString("3"); // purchase shit?
     Uinfo.WriteInt32(3); // no idea yet
     Uinfo.WriteInt32(5); // amount banned accounts lol
     Uinfo.WriteString("666"); // some shit above banned accounts
     session.SendPacket(Uinfo);
 }
Пример #15
0
        public void ParsePacket(Session session, Message message)
        {
            message = new Message(619);

            message.WriteInt32(0);
            message.WriteInt32(1);
            int id = message.NextInt32(); // UserId?
            Console.WriteLine(id);

            //var result = new HabboSqlData(id);

               // message.WriteString(result.username);
            message.WriteBool(false);
            //message.WriteString(result.motto);
            message.WriteInt32(0);
            message.WriteInt32(1);
            message.WriteInt32(0);
        }
Пример #16
0
        public static void Execute(Session session, Message message)
        {
            if (!Messages.ContainsKey((uint) message.HeaderId))
            {
                Application.Logging.WriteLine(string.Format("Not found: {0}", message.HeaderId), Logging.Status.Warning);
                return;
            }

            var handler = Messages[(uint)message.HeaderId] as IPacketEvent;

            if (handler != null)
            {
                Application.Logging.WriteLine(string.Format("Invoked: {0} -> {1}", handler.EventId, GetName(handler.EventId),
                                              Logging.Status.Invoker));

                DelHandle delHandle = handler.ParsePacket;

                delHandle.Invoke(session, message);
            }
        }
Пример #17
0
        /// <summary>
        /// Handles Packet, for current user, and message event.
        /// </summary>
        /// <param name="gameclient">User of Packet</param>
        /// <param name="Message">Message for User</param>
        public void ParsePacket(Session session, Message message)
        {
            var Response = new Message(2348);
            session.SendPacket(Response);

            Response = new Message(1399);
            Response.WriteString("model_f"); // Room Model
            Response.WriteInt32(1); // id ?
            session.SendPacket(Response);

            Response = new Message(2771);
            Response.WriteString("wallpaper"); // Wallpaper
            Response.WriteString("110"); // Height / Width
            session.SendPacket(Response);

            Response = new Message(2771);
            Response.WriteString("floor"); // Floor
            Response.WriteString("110"); // Height / Width
            session.SendPacket(Response);

            Response = new Message(3998);
            Response.WriteInt32(4);
            session.SendPacket(Response);

            Response = new Message(3083);
            Response.WriteInt32(2);
            Response.WriteBool(false);
            session.SendPacket(Response);

            Response = new Message(831);
            session.SendPacket(Response);

            Response = new Message(2771);
            Response.WriteString("landscape"); // Landscape
            Response.WriteString("10.0"); // Height / Width
            session.SendPacket(Response);

            Response = new Message(2101);
            Response.WriteString("-1");
            session.SendPacket(Response);
        }
Пример #18
0
        public void ParsePacket(Session session, Message message)
        {
            var response = new Message(1263);
            response.WriteInt32(326494);
            response.WriteString("[µ] Train Station [µ] NYC [µ]");
            response.WriteInt32(55701607);
            response.WriteString("b22234s9723416fe55795537635b44781e732427990d");
            response.WriteInt32(14);
            response.WriteInt32(1);
            response.WriteInt32(0);
            response.WriteInt32(1);
            response.WriteString("JakeSS");
            response.WriteString(
                "hr-3163-61.hd-3091-6.ch-255-64.lg-3023-110.sh-3068-64-64.ha-1022-110.ea-3226-110.fa-1205-110.ca-3176-93-93.cc-3075-110.cp-3204");
            response.WriteString("Mar 17, 2012");

            response.WriteInt32(0);
            response.WriteInt32(0);
            response.WriteString(string.Empty);
            session.SendPacket(response);
        }
Пример #19
0
        public void Walk(Session session, Message Response)
        {
            int X = Response.NextInt32();
            int Y = Response.NextInt32();

            session.habboRoomObject.GoalX = X;
            session.habboRoomObject.GoalY = Y;

            WalkThread walkthread = new WalkThread(session, new Pathfinder(this.map, session.habboRoomObject));

            Thread thread = new Thread(new ThreadStart(walkthread.run));

            // Send Packet here
            /*Response = new Message(1887);
            Response.WriteInt32(1);
            Response.WriteInt32(session.Habbo.Getid);
            Response.WriteInt32(X);
            Response.WriteInt32(Y);
            Response.WriteString("0.0");
            Response.WriteInt32(0);
            Response.WriteInt32(0);
            Response.WriteString("/mv " + X + "," + Y + ",0.0//");
            session.SendPacket(Response);*/
        }
Пример #20
0
 public void ParsePacket(Session session, Message Message)
 {
     //Message Response = new Message();
 }
Пример #21
0
        public void ParsePacket(Session session, Message message)
        {
            // This is totally wrong, needs to be redone

            int targetId = message.NextInt32();
        }
Пример #22
0
 public void ParsePacket(Session session, Message message)
 {
 }
Пример #23
0
        public void ParsePacket(Session session, Message message)
        {
            string MachineID = message.NextString();

            session.MachineID = MachineID;
        }
Пример #24
0
        public void ParsePacket(Session session, Message message)
        {
            message = new Message(2403);

            message.WriteInt32(6);
        }
Пример #25
0
 public void ParsePacket(Session session, Message message)
 {
     var Response = new Message(SendHeaders.FriendBarInit);
 }
Пример #26
0
        public void ParsePacket(Session session, Message message)
        {
            int userId = message.NextInt32();

            //var profile = new HabboSqlData(userId);
            var profile = new HabboController(userId);
            var Response = new Message(SendHeaders.WatchProfile);
            Response.WriteInt32(profile.id);
            Response.WriteString(profile.username);
            Response.WriteString(profile.figure);
            Response.WriteString(profile.motto);
            Response.WriteString("22-07-2012");
            Response.WriteInt32(10);
            Response.WriteInt32(1);
            Response.WriteBool(false);
            Response.WriteBool(false);
            Response.WriteBool(false);
            Response.WriteInt32(0);
            Response.WriteInt32(60000);
            Response.WriteBool(true);
            session.SendPacket(Response);
            //[LOG] > CLIENT ID: '462': [0][0][1]d[1]Î[0][4]û^[1][0][0][0][0][0] [µ] Train Station [µ] NYC [µ][0]?This is a famous New York City station known as 'Grand Central'                                     One of the best modes of transportation![0]>b06134s02134s97114t50013t50015b62a5d12f09ff0d1a5365a20ad7301af[3]Qðg[0]>µ T R A I N   S T A T I O N µ New York µ  armypolicedatefbi[0][0][0][1][0][0][3]Ý[1][0][10]17-03-2012[0][0][0][6]JakeSS[0][0][0][0][0][0]
            //var Response = new Message(SendHeaders.WatchProfile);
            //Response.WriteInt32(profile.Getid);
            //Response.WriteString(profile.username);
            //Response.WriteString(profile.GetLook());
            //Response.WriteString(profile.motto);
            //Response.WriteString(profile.GetCreationDate());
            //Response.WriteInt32(1337);
            //Response.WriteInt32(2);
            //Response.WriteBool(false); // online?
            //Response.WriteBool(false);
            //Response.WriteBool(profile.GetStatus());
            //Response.WriteInt32(5);
            //Response.WriteInt32(1); //GroupId
            //Response.WriteString("Team Rev");
            //Response.WriteString("b22114s97114b8aaa7c5101e6bcb6eff94df1b669f0f");
            //Response.WriteString("242424");
            //Response.WriteString("242424");
            //Response.WriteBool(false); //Favorite?
            //Response.WriteInt32(2); //GroupId
            //Response.WriteString("PacketEmu Is Gay.");
            //Response.WriteString("b22114s97114b8aaa7c5101e6bcb6eff94df1b669f0f");
            //Response.WriteString("242424");
            //Response.WriteString("242424");
            //Response.WriteBool(false); //Favorite?
            //Response.WriteInt32(3); //GroupId
            //Response.WriteString("Some Noob");
            //Response.WriteString("b22114s97114b8aaa7c5101e6bcb6eff94df1b669f0f");
            //Response.WriteString("242424");
            //Response.WriteString("242424");
            //Response.WriteBool(false); //Favorite?
            //Response.WriteInt32(4); //GroupId
            //Response.WriteString("Bored, eh'");
            //Response.WriteString("b22114s97114b8aaa7c5101e6bcb6eff94df1b669f0f");
            //Response.WriteString("242424");
            //Response.WriteString("242424");
            //Response.WriteBool(false); //Favorite?
            //Response.WriteInt32(5); //GroupId
            //Response.WriteString("Hail Kryptos!");
            //Response.WriteString("b22114s97114b8aaa7c5101e6bcb6eff94df1b669f0f");
            //Response.WriteString("242424");
            //Response.WriteString("242424");
            //Response.WriteBool(true); //Favorite?
            //Response.WriteInt32(((int) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds -
            //                     profile.GetLastAccess()));
            //    //((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds - (int)User.HabboUser.UserRow["lastaccess"])
            //Response.WriteBool(true);
            //session.SendPacket(Response);
        }
Пример #27
0
 public void ParsePacket(Session session, Message message)
 {
     Console.WriteLine("> " + message.NextString() + " > " + message.NextString() + " > " + message.NextString() +
                       " > " + message.NextInt32());
 }
Пример #28
0
 public void ParsePacket(Session session, Message message)
 {
     //NextInt may be ID.
     int Id = message.NextInt32();
     switch (Id)
     {
         case 1:
             var response = new Message(462);
             response.WriteInt32(1);
             response.WriteBool(true);
             response.WriteInt32(0); //state 0:Unlocked; 1: Locked; 2: Closed.
             response.WriteString("Team Rev");
             response.WriteString("The Epic Emulator.");
             response.WriteString("b22114s97114b8aaa7c5101e6bcb6eff94df1b669f0f");
             response.WriteInt32(12);
             response.WriteString("Roomname?");
             response.WriteInt32(1); //Member?
             response.WriteInt32(1);
             response.WriteBool(true);
             response.WriteString("17-03-2012");
             response.WriteString(string.Empty);
             response.WriteString("wizcsharp");
             response.WriteString(string.Empty);
             response.WriteInt32(0);
             session.SendPacket(response);
             break;
         case 2:
             response = new Message(462);
             response.WriteInt32(2);
             response.WriteBool(true);
             response.WriteInt32(0); //state 0:Unlocked; 1: Locked; 2: Closed.
             response.WriteString("PacketEmu is gay");
             response.WriteString("Freaking gay!");
             response.WriteString("b22114s97114b8aaa7c5101e6bcb6eff94df1b669f0f");
             response.WriteInt32(12);
             response.WriteString("Roomname?");
             response.WriteInt32(1); //Member?
             response.WriteInt32(1);
             response.WriteBool(true);
             response.WriteString("17-03-2012");
             response.WriteString(string.Empty);
             response.WriteString("wizcsharp");
             response.WriteString(string.Empty);
             response.WriteInt32(0);
             session.SendPacket(response);
             break;
         case 3:
             response = new Message(462);
             response.WriteInt32(3);
             response.WriteBool(true);
             response.WriteInt32(0); //state 0:Unlocked; 1: Locked; 2: Closed.
             response.WriteString("Some Noob");
             response.WriteString("F**k yeah");
             response.WriteString("b22114s97114b8aaa7c5101e6bcb6eff94df1b669f0f");
             response.WriteInt32(12);
             response.WriteString("Roomname?");
             response.WriteInt32(1); //Member?
             response.WriteInt32(1);
             response.WriteBool(true);
             response.WriteString("17-03-2012");
             response.WriteString(string.Empty);
             response.WriteString("wizcsharp");
             response.WriteString(string.Empty);
             response.WriteInt32(0);
             session.SendPacket(response);
             break;
         case 4:
             response = new Message(462);
             response.WriteInt32(4);
             response.WriteBool(true);
             response.WriteInt32(0); //state 0:Unlocked; 1: Locked; 2: Closed.
             response.WriteString("Bored, eh'");
             response.WriteString("Bite me! |");
             response.WriteString("b22114s97114b8aaa7c5101e6bcb6eff94df1b669f0f");
             response.WriteInt32(12);
             response.WriteString("Roomname?");
             response.WriteInt32(1); //Member?
             response.WriteInt32(1);
             response.WriteBool(true);
             response.WriteString("17-03-2012");
             response.WriteString(string.Empty);
             response.WriteString("wizcsharp");
             response.WriteString(string.Empty);
             response.WriteInt32(0);
             session.SendPacket(response);
             break;
         case 5:
             response = new Message(462);
             response.WriteInt32(5);
             response.WriteBool(true);
             response.WriteInt32(0); //state 0:Unlocked; 1: Locked; 2: Closed.
             response.WriteString("Hail Kryptos!");
             response.WriteString("F*****G DO IT!! |");
             response.WriteString("b22114s97114b8aaa7c5101e6bcb6eff94df1b669f0f");
             response.WriteInt32(12);
             response.WriteString("Roomname?");
             response.WriteInt32(1); //Member?
             response.WriteInt32(1);
             response.WriteBool(true);
             response.WriteString("17-03-2012");
             response.WriteString(string.Empty);
             response.WriteString("Kryptos");
             response.WriteString(string.Empty);
             response.WriteInt32(0);
             session.SendPacket(response);
             break;
     }
 }
Пример #29
0
 // INCOMING ID: 3102
 public void Handle(Session client, ClientMessage parser)
 {
     throw new NotImplementedException();
 }
Пример #30
0
 public WalkThread(Session session, Pathfinder pathfind)
 {
     this.pathfinder = pathfind;
     this.session = session;
 }