public static void GetBundleDiscount(Message Msg, Session Session) { fuseResponse.New(Opcodes.OpcodesOut.SendBundleDiscount); fuseResponse.Append<int>(100); fuseResponse.Append<int>(6); fuseResponse.Append<int>(1); fuseResponse.Append<int>(1); fuseResponse.Append<int>(2); fuseResponse.Append<int>(40); fuseResponse.Append<int>(99); fuseResponse.Send(Session); }
public void Handle(Message Msg, Session Session) { short Header = Msg.HeaderId; int Length = Msg.Length; if (!Packets.ContainsKey(Header)) { Engine.Logging.WriteErrorTagLine(Header.ToString(), "Unregistered! - {0}", Engine.ToReadableString(Encoding.Default.GetString(Msg.GetBytes))); return; } Packets[Header].Invoke(Msg, Session); }
public static void GetCampaignWinners(Message Message, Session Session) { string Cmpgn = Message.NextString(); fuseResponse.New(Opcodes.OpcodesOut.SendCampaignWinners); fuseResponse.Append<string>(Cmpgn); fuseResponse.Append<int>(1); fuseResponse.Append<int>(Session.User.ID); fuseResponse.Append<string>(Session.User.Username); fuseResponse.Append<string>(Session.User.Figure); fuseResponse.Append<int>(1); fuseResponse.Append<int>(1337); fuseResponse.Send(Session); }
public static void GetGiftWrapping(Message Msg, Session Session) { ServerMessage Packet = new ServerMessage(46); Packet.Append<bool>(true); Packet.Append<int>(1); Packet.Append<int>(10); Packet.Append<int>(3144); Packet.Append<int>(3145); Packet.Append<int>(3146); Packet.Append<int>(3147); Packet.Append<int>(3148); Packet.Append<int>(3149); Packet.Append<int>(3150); Packet.Append<int>(3151); Packet.Append<int>(3152); Packet.Append<int>(3153); Packet.Append<int>(7); Packet.Append<int>(0); Packet.Append<int>(1); Packet.Append<int>(2); Packet.Append<int>(3); Packet.Append<int>(4); Packet.Append<int>(5); Packet.Append<int>(6); Packet.Append<int>(11); Packet.Append<int>(0); Packet.Append<int>(1); Packet.Append<int>(2); Packet.Append<int>(3); Packet.Append<int>(4); Packet.Append<int>(5); Packet.Append<int>(6); Packet.Append<int>(7); Packet.Append<int>(8); Packet.Append<int>(9); Packet.Append<int>(10); Packet.Append<int>(7); Packet.Append<int>(187); Packet.Append<int>(188); Packet.Append<int>(189); Packet.Append<int>(190); Packet.Append<int>(191); Packet.Append<int>(192); Packet.Append<int>(193); Packet.Send(Session); }
public static void CatalogTabs(Message Msg, Session Session) { var Categories = (from i in Engine.GetHabboHotel.getCatalogueManager.Pages where i.Value.category_id == 0 select i.Value); var CategoryEnum = Categories.GetEnumerator(); fuseResponse.New(Opcodes.OpcodesOut.SendShopTabs); fuseResponse.Append<bool>(true); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<int>(-1); fuseResponse.Append<string>("root"); fuseResponse.Append<string>(""); fuseResponse.Append<int>(Categories.Count()); while (CategoryEnum.MoveNext()) { var Page = (catalogpages)CategoryEnum.Current; var SubPages = (from i in Engine.GetHabboHotel.getCatalogueManager.Pages where i.Value.category_id == Page.id select i.Value); var SubPageEnum = SubPages.GetEnumerator(); fuseResponse.Append<bool>(Page.is_visible); fuseResponse.Append<int>(Page.style_color); fuseResponse.Append<int>(Page.style_icon); fuseResponse.Append<int>(Page.id); fuseResponse.Append<string>(Page.name.Replace(' ', '_').ToUpper()); fuseResponse.Append<string>(Page.name); fuseResponse.Append<int>(SubPages.Count()); while (SubPageEnum.MoveNext()) { var mPage = (catalogpages)SubPageEnum.Current; fuseResponse.Append<bool>(mPage.is_visible); fuseResponse.Append<int>(mPage.style_color); fuseResponse.Append<int>(mPage.style_icon); fuseResponse.Append<int>(mPage.id); fuseResponse.Append<string>(mPage.name.Replace(' ', '_').ToUpper()); fuseResponse.Append<string>(mPage.name); fuseResponse.Append<int>(0); } } fuseResponse.Append<bool>(false); fuseResponse.Send(Session); }
public static void OwnRooms(Message Msg, Session Session) { var All = FluentRooms.GetByOwner(Session.User.Username); var RoomsEnum = All.GetEnumerator(); fuseResponse.New(Opcodes.OpcodesOut.SendRoomDataNavigator); fuseResponse.Append<int>(5); fuseResponse.Append<string>(""); fuseResponse.Append<int>(All.Count); while (RoomsEnum.MoveNext()) { var Room = (rooms)RoomsEnum.Current; FluentRooms.Serialize(fuseResponse, Room); } fuseResponse.Append<bool>(false); fuseResponse.Send(Session); }
public static void SearchedRooms(Message Msg, Session Session) { string Keywords = Msg.NextString(); var Rooms = FluentRooms.GetByQry(Keywords); var All = Rooms.GetEnumerator(); fuseResponse.New(Opcodes.OpcodesOut.SendRoomDataNavigator); fuseResponse.Append<int>(8); fuseResponse.Append<string>(Keywords); fuseResponse.Append<int>(Rooms.Count); while (All.MoveNext()) { rooms Row = (rooms)All.Current; FluentRooms.Serialize(fuseResponse, Row); } fuseResponse.Append<bool>(false); fuseResponse.Send(Session); }
public Pathfinder(Session Session) { AvaliablePoints = new Point[] { new Point(0, -1), new Point(0, 1), new Point(1, 0), new Point(-1, 0), new Point(1, -1), new Point(-1, 1), new Point(1, 1), new Point(-1, -1) }; this.Session = Session; MapSizeX = Session.Room.Model.MapSizeX; MapSizeY = Session.Room.Model.MapSizeY; Squares = Session.Room.Model.mTileState; }
public static void NavigatorFrontpage(Message Msg, Session Session) { fuseResponse.New(Opcodes.OpcodesOut.SendNavigatorFrontpage); fuseResponse.Append<int>(Engine.GetHabboHotel.getFrontpage.getCount()); foreach (var Item in Engine.GetHabboHotel.getFrontpage.getList().Values) { fuseResponse.Append<int>(Item.ID); fuseResponse.Append<string>(Item.Name); fuseResponse.Append<string>(Item.Description); fuseResponse.Append<int>(Item.BannerLength); fuseResponse.Append<string>(Item.Name); fuseResponse.Append<string>(Item.Image); fuseResponse.Append<int>(Item.Category_ID); fuseResponse.Append<int>(0); fuseResponse.Append<int>(Item.Type); switch (Item.Type) { case 1: { fuseResponse.Append<string>(Item.TypeExtraData); break; } case 2: { FluentRooms.Serialize(fuseResponse, FluentRooms.GetById(int.Parse(Item.TypeExtraData))[0]); break; } case 4: { fuseResponse.Append<bool>(false); break; } } } fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Send(Session); }
public static void Move(Message Msg, Session Session) { if (Session.User.RoomUser.IsWalking) { Session.MoveThread.Abort(); Session.MoveThread = null; Session.User.RoomUser.IsWalking = false; } int X = Msg.NextInt32(); int Y = Msg.NextInt32(); if (X == Session.Room.Model.DoorX && Y == Session.Room.Model.DoorY) { fuseResponse.New(Opcodes.OpcodesOut.SendUserOutofRoom); Session.Room.SendData(fuseResponse); Session.MoveThread.Abort(); Session.MoveThread = null; return; } Session.User.RoomUser.GoalX = X; Session.User.RoomUser.GoalY = Y; Session.MoveThread = new Thread(new ParameterizedThreadStart(OnWalk)); Session.MoveThread.Start(Session); }
public static void GetRoomUserTags(Message Message, Session Session) { int UserID = Message.NextInt32(); var user = (from i in Engine.RoomsLoaded[Session.Room.ID] where i.User.ID == UserID select i); var Ses = user.First(); //?? }
public static void GetRoomUserBadges(Message Message, Session Session) { int UserID = Message.NextInt32(); var user = (from i in Engine.RoomsLoaded[Session.Room.ID] where i.User.ID == UserID select i); var Ses = user.First(); var Wearing = (from i in Ses.User.Emblems.getEmblems() where i.Value.SlotID > 0 select i.Value); fuseResponse.New(Opcodes.OpcodesOut.SendRoomUserBadges); fuseResponse.Append<int>(UserID); fuseResponse.Append<int>(Wearing.Count()); foreach (var Wear in Wearing) { fuseResponse.Append<int>(Wear.SlotID); fuseResponse.Append<string>(Wear.Badge); } fuseResponse.Send(Session); }
public static void GetRoomModeldata(Message Msg, Session Session) { Session.Room.Model = Engine.GetHabboHotel.getRoomModels.Models[Session.Room.Model_Name]; fuseResponse.New(Opcodes.OpcodesOut.SendRoomModeldata); Session.Room.Model.SerializeFirst(fuseResponse); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendRoomRelativeModeldata); Session.Room.Model.SerializeSecond(fuseResponse); fuseResponse.Send(Session); }
public static void InitRC4(Message Msg, Session Session) { string Key = Msg.Read<string>(); if (!Session.Crypto.InitializeRC4(Key)) return; fuseResponse.New(Opcodes.OpcodesOut.SendPublicKey); fuseResponse.Append<string>(Session.Crypto.GetPublicKey.ToString()); Session.SendPacket(fuseResponse); }
public static void GetCitizenship(Message Message, Session Session) { fuseResponse.New(Opcodes.OpcodesOut.SendCitizenship); fuseResponse.Append<string>("citizenship"); fuseResponse.Append<int>(5); fuseResponse.Append<int>(0); fuseResponse.Append<int>(2); fuseResponse.Append<int>(1); fuseResponse.Append<int>(125); fuseResponse.Append<int>(1); fuseResponse.Append<string>("ACH_SafetyQuizGraduate1"); fuseResponse.Append<int>(2); fuseResponse.Append<int>(1); fuseResponse.Append<int>(1); fuseResponse.Append<int>(0); fuseResponse.Append<int>(1); fuseResponse.Append<string>("A1 KUMIANKKA"); fuseResponse.Append<int>(0); fuseResponse.Append<int>(1); fuseResponse.Append<int>(2); fuseResponse.Append<int>(4); fuseResponse.Append<int>(6); fuseResponse.Append<int>(1); fuseResponse.Append<string>("ACH_AvatarLooks1"); fuseResponse.Append<int>(2); fuseResponse.Append<int>(1); fuseResponse.Append<int>(1); fuseResponse.Append<int>(18); fuseResponse.Append<int>(1); fuseResponse.Append<string>("ACH_RespectGiven1"); fuseResponse.Append<int>(2); fuseResponse.Append<int>(2); fuseResponse.Append<int>(2); fuseResponse.Append<int>(19); fuseResponse.Append<int>(1); fuseResponse.Append<string>("ACH_AllTimeHotelPresence1"); fuseResponse.Append<int>(2); fuseResponse.Append<int>(30); fuseResponse.Append<int>(30); fuseResponse.Append<int>(8); fuseResponse.Append<int>(1); fuseResponse.Append<string>("ACH_RoomEntry1"); fuseResponse.Append<int>(2); fuseResponse.Append<int>(5); fuseResponse.Append<int>(5); fuseResponse.Append<int>(0); fuseResponse.Append<int>(1); fuseResponse.Append<string>("A1 KUMIANKKA"); fuseResponse.Append<int>(0); fuseResponse.Append<int>(2); fuseResponse.Append<int>(1); fuseResponse.Append<int>(4); fuseResponse.Append<int>(145); fuseResponse.Append<int>(1); fuseResponse.Append<string>("ACH_GuideAdvertisementReader1"); fuseResponse.Append<int>(1); fuseResponse.Append<int>(0); fuseResponse.Append<int>(1); fuseResponse.Append<int>(11); fuseResponse.Append<int>(1); fuseResponse.Append<string>("ACH_RegistrationDuration1"); fuseResponse.Append<int>(2); fuseResponse.Append<int>(1); fuseResponse.Append<int>(1); fuseResponse.Append<int>(19); fuseResponse.Append<int>(2); fuseResponse.Append<string>("ACH_AllTimeHotelPresence2"); fuseResponse.Append<int>(2); fuseResponse.Append<int>(60); fuseResponse.Append<int>(60); fuseResponse.Append<int>(8); fuseResponse.Append<int>(2); fuseResponse.Append<string>("ACH_RoomEntry2"); fuseResponse.Append<int>(2); fuseResponse.Append<int>(20); fuseResponse.Append<int>(20); fuseResponse.Append<int>(0); fuseResponse.Append<int>(1); fuseResponse.Append<string>("A1 KUMIANKKA"); fuseResponse.Append<int>(0); fuseResponse.Append<int>(3); fuseResponse.Append<int>(0); fuseResponse.Append<int>(4); fuseResponse.Append<int>(11); fuseResponse.Append<int>(2); fuseResponse.Append<string>("ACH_RegistrationDuration2"); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<int>(3); fuseResponse.Append<int>(94); fuseResponse.Append<int>(1); fuseResponse.Append<string>("ACH_HabboWayGraduate1"); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<int>(1); fuseResponse.Append<int>(19); fuseResponse.Append<int>(3); fuseResponse.Append<string>("ACH_AllTimeHotelPresence3"); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<int>(120); fuseResponse.Append<int>(142); fuseResponse.Append<int>(1); fuseResponse.Append<string>("ACH_FriendListSize1"); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<int>(2); fuseResponse.Append<int>(1); fuseResponse.Append<string>("TRADE"); fuseResponse.Append<int>(1); fuseResponse.Append<string>("A1 KUMIANKKA"); fuseResponse.Append<int>(0); fuseResponse.Append<int>(4); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<int>(1); fuseResponse.Append<string>("CITIZEN"); fuseResponse.Append<int>(2); fuseResponse.Append<string>("A1 KUMIANKKA"); fuseResponse.Append<int>(0); fuseResponse.Append<string>("HABBO_CLUB_CITIZENSHIP_VIP_REWARD"); fuseResponse.Append<int>(7); fuseResponse.Send(Session); }
public static void GetHotelview(Message Message, Session Session) { fuseResponse.New(Opcodes.OpcodesOut.SendHotelView); fuseResponse.Append<string>("2012-10-03 10:00,vipParties1;2012-10-08 10:00,vipParties2;2012-10-12 10:00,vipParties3;2012-10-14 10:00,"); fuseResponse.Append<string>("vipParties1"); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendHotelView); fuseResponse.Append<string>("2012-09-28 15:00,jetsetquest1;2012-10-03 10:00,;2012-10-03 18:00,jetsetquest2;2012-10-08 14:00,jetsetquest3;2012-10-11 10:00,"); fuseResponse.Append<string>("jetsetquest2"); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendHotelView); fuseResponse.Append<string>("2012-09-27 12:00,jetset0;2012-09-28 18:00,diamondpromo;2012-10-02 10:00,jetsetaccess;2012-10-12 10:00,"); fuseResponse.Append<string>("jetsetaccess"); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendHotelView); fuseResponse.Append<string>("2012-09-28 18:00,jetsetsubmit1;2012-10-01 13:00,jetsetvote1;2012-10-03 10:00,;2012-10-03 18:00,jetsetsubmit2;2012-10-05 10:00,jetsetvote2;2012-10-08 10:00,;2012-10-08 14:00,jetsetsubmit3;2012-10-10 10:00,jetsetvote3;2012-10-12 10:00,"); fuseResponse.Append<string>("jetsetvote2"); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendHotelView); fuseResponse.Append<string>("2012-09-28 15:00,jetsetvip;2012-10-12 10:00"); fuseResponse.Append<string>("jetsetvip"); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendWelcomeContainer); fuseResponse.Append<int>(0); fuseResponse.Send(Session); }
public static void GetEndEnterRoom(Message Msg, Session Session) { fuseResponse.New(537); fuseResponse.Append<int>(1); fuseResponse.Append<int>(1); fuseResponse.Append<string>("lol"); fuseResponse.Append<int>(1); fuseResponse.Append<bool>(true); fuseResponse.Send(Session); fuseResponse.New(632); fuseResponse.Append<int>(1); fuseResponse.Append<bool>(true); fuseResponse.Append<int>(1); fuseResponse.Append<string>("lol"); fuseResponse.Append<string>("uhaveshittyballs"); fuseResponse.Append<string>(""); fuseResponse.Append<int>(1); fuseResponse.Append<string>("lolroom"); fuseResponse.Append<int>(1); fuseResponse.Append<int>(1); fuseResponse.Append<bool>(false); fuseResponse.Append<string>("now"); fuseResponse.Append<bool>(true); fuseResponse.Append<bool>(true); fuseResponse.Append<string>("tehowner"); fuseResponse.Append<bool>(false); fuseResponse.Append<bool>(true); fuseResponse.Append<int>(0); fuseResponse.Send(Session); Session.User.RoomUser = new RoomUser() { CoordX = Session.Room.Model.DoorX, CoordY = Session.Room.Model.DoorY, CoordZ = Session.Room.Model.DoorZ, Dance = 0, Effect = 0, Idle = false, RotationBody = 2, RotationHead = 2 }; if (Engine.RoomsLoaded.ContainsKey(Session.Room.ID)) { Engine.RoomsLoaded[Session.Room.ID].Add(Session); } else { Engine.RoomsLoaded.Add(Session.Room.ID, new List<Session>()); Engine.RoomsLoaded[Session.Room.ID].Add(Session); } fuseResponse.New(Opcodes.OpcodesOut.SendRoomUser); fuseResponse.Append<int>(Engine.RoomsLoaded[Session.Room.ID].Count); foreach (var User in Engine.RoomsLoaded[Session.Room.ID]) { fuseResponse.Append<int>(User.User.ID); fuseResponse.Append<string>(User.User.Username); fuseResponse.Append<string>(User.User.Motto); fuseResponse.Append<string>(User.User.Figure); fuseResponse.Append<int>(User.User.ID); fuseResponse.Append<int>(User.User.RoomUser.CoordX); fuseResponse.Append<int>(User.User.RoomUser.CoordY); fuseResponse.Append<string>(User.User.RoomUser.CoordZ.ToString()); fuseResponse.Append<int>(2); fuseResponse.Append<int>(1); fuseResponse.Append<string>(User.User.Gender); fuseResponse.Append<int>(User.User.favouritegroup); fuseResponse.Append<int>(3); // ?? fuseResponse.Append<string>(Engine.GetHabboHotel.getGroups.Groups[User.User.favouritegroup].Name); fuseResponse.Append<string>(""); fuseResponse.Append<int>(0); } fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendRoomUser); fuseResponse.Append<int>(1); fuseResponse.Append<int>(Session.User.ID); fuseResponse.Append<string>(Session.User.Username); fuseResponse.Append<string>(Session.User.Motto); fuseResponse.Append<string>(Session.User.Figure); fuseResponse.Append<int>(Session.User.ID); fuseResponse.Append<int>(Session.User.RoomUser.CoordX); fuseResponse.Append<int>(Session.User.RoomUser.CoordY); fuseResponse.Append<string>(Session.User.RoomUser.CoordZ.ToString()); fuseResponse.Append<int>(2); fuseResponse.Append<int>(1); fuseResponse.Append<string>(Session.User.Gender); fuseResponse.Append<int>(Session.User.favouritegroup); fuseResponse.Append<int>(3); // ?? fuseResponse.Append<string>(Engine.GetHabboHotel.getGroups.Groups[Session.User.favouritegroup].Name); fuseResponse.Append<string>(""); fuseResponse.Append<int>(0); Session.Room.SendData(fuseResponse); fuseResponse.New(Opcodes.OpcodesOut.SendUserStatus); fuseResponse.Append<int>(Engine.RoomsLoaded[Session.Room.ID].Count); foreach (Session S in Engine.RoomsLoaded[Session.Room.ID]) { fuseResponse.Append<int>(S.User.ID); fuseResponse.Append<int>(S.User.RoomUser.CoordX); fuseResponse.Append<int>(S.User.RoomUser.CoordY); fuseResponse.Append<string>(S.User.RoomUser.CoordZ); fuseResponse.Append<int>(2); fuseResponse.Append<int>(2); fuseResponse.Append<string>("//"); } Session.Room.SendData(fuseResponse); fuseResponse.New(Opcodes.OpcodesOut.SendRoomStatus); fuseResponse.Append<bool>(true); fuseResponse.Append<uint>(Session.Room.ID); fuseResponse.Append<bool>(Session.Room.Owner == Session.User.Username); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendInRoomDetails); fuseResponse.Append<bool>(true); FluentRooms.Serialize(fuseResponse, Session.Room); fuseResponse.Append<bool>(false); fuseResponse.Append<bool>(false); fuseResponse.Append<bool>(false); fuseResponse.Send(Session); }
public static void GetShopPage(Message Msg, Session Session) { int ID = Msg.NextInt32(); var Page = Engine.GetHabboHotel.getCatalogueManager.Pages[ID]; if (!Page.has_content) return; fuseResponse.New(Opcodes.OpcodesOut.SendShopPage); fuseResponse.Append<int>(ID); fuseResponse.Append<string>(Page.layout); fuseResponse.Append<int>(Page.layout_images.Split(';').Count()); var ImgEnum = Page.layout_images.Split(';').GetEnumerator(); while (ImgEnum.MoveNext()) { fuseResponse.Append<string>(ImgEnum.Current.ToString()); } fuseResponse.Append<int>(Page.layout_texts.Split(';').Count()); var TxtEnum = Page.layout_texts.Split(';').GetEnumerator(); while (TxtEnum.MoveNext()) { fuseResponse.Append<string>(TxtEnum.Current.ToString()); } var Items = (from i in Engine.GetHabboHotel.getCatalogueManager.Items where i.Value.pageid == Page.id select i.Value); var ItemEnum = Items.GetEnumerator(); fuseResponse.Append<int>(Items.Count()); while (ItemEnum.MoveNext()) { ((catalogitems)ItemEnum.Current).Serialize(fuseResponse); } fuseResponse.Append<int>(-1); fuseResponse.Append<bool>(false); fuseResponse.Send(Session); }
public static void GetVIPBuyDialog(Message Message, Session Session) { fuseResponse.New(Opcodes.OpcodesOut.SendVIPBuyDialog); fuseResponse.Append<int>(2); fuseResponse.Append<int>(1); fuseResponse.Append<string>("HABBO_CLUB_VIP_1_MONTH"); fuseResponse.Append<int>(25); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<bool>(true); fuseResponse.Append<int>(1); fuseResponse.Append<int>(31); fuseResponse.Append<int>(31); fuseResponse.Append<int>(2012); fuseResponse.Append<int>(11); fuseResponse.Append<int>(7); fuseResponse.Append<int>(2); fuseResponse.Append<string>("HABBO_CLUB_VIP_3_MONTHS"); fuseResponse.Append<int>(25); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<bool>(true); fuseResponse.Append<int>(1); fuseResponse.Append<int>(31); fuseResponse.Append<int>(31); fuseResponse.Append<int>(2012); fuseResponse.Append<int>(11); fuseResponse.Append<int>(7); fuseResponse.Append<int>(Message.NextInt32()); fuseResponse.Send(Session); }
public static void AuthenticateUser(Message Msg, Session Session) { string SSO = Msg.Read<string>(); try { Session.User = FluentUsers.AuthenticateUser(SSO); fuseResponse.New(Opcodes.OpcodesOut.SendInterface); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendFriends); fuseResponse.Append<int>(300); fuseResponse.Append<int>(800); fuseResponse.Append<int>(1100); fuseResponse.Append<int>(1100); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<int>(100); fuseResponse.Append<int>(0); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendMinimailCount); fuseResponse.Append<int>(1); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendHomeRoom); fuseResponse.Append<int>(100); fuseResponse.Append<int>(0); fuseResponse.Send(Session); Session.SendAlert("Welcome to Ferri, " + Session.User.Username); fuseResponse.New(2367); fuseResponse.Append<int>(-1); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<bool>(true); fuseResponse.Append<bool>(true); fuseResponse.Append<bool>(true); fuseResponse.Append<bool>(true); fuseResponse.Append<bool>(true); fuseResponse.Append<bool>(true); fuseResponse.Append<bool>(true); fuseResponse.Append<int>(0); fuseResponse.Send(Session); fuseResponse.New(108); fuseResponse.Append<int>(9); // count? wtf? fuseResponse.Append<string>("CITIZEN"); fuseResponse.Append<bool>(true); fuseResponse.Append<string>(""); fuseResponse.Append<string>("VOTE_IN_COMPETITIONS"); fuseResponse.Append<bool>(true); fuseResponse.Append<string>(""); fuseResponse.Append<string>("JUDGE_CHAT_REVIEWS"); fuseResponse.Append<bool>(true); fuseResponse.Append<string>(""); fuseResponse.Append<string>("FULL_CHAT"); fuseResponse.Append<bool>(true); fuseResponse.Append<string>(""); fuseResponse.Append<string>("CALL_ON_HELPERS"); fuseResponse.Append<bool>(true); fuseResponse.Append<string>(""); fuseResponse.Append<string>("TRADE"); fuseResponse.Append<bool>(true); fuseResponse.Append<string>(""); fuseResponse.Append<string>("USE_GUIDE_TOOL"); fuseResponse.Append<bool>(true); fuseResponse.Append<string>(""); fuseResponse.Append<string>("SAFE_CHAT"); fuseResponse.Append<bool>(true); fuseResponse.Append<string>(""); fuseResponse.Append<string>("SAFE_CHAT"); fuseResponse.Append<bool>(true); fuseResponse.Append<string>(""); fuseResponse.Send(Session); Session.User.Emblems = new Habbo_Hotel.Users.Badges.EmblemsManager(); Session.User.Emblems.LoadBadges(Session.User.ID); Session.User.MessengerComponent = new Habbo_Hotel.Users.Messenger.MessengerComponent(Session.User.ID); fuseResponse.New(Opcodes.OpcodesOut.SendFuserights); fuseResponse.Append<int>(2); fuseResponse.Append<int>(7); fuseResponse.Send(Session); } catch { } }
public static void ReadRelease(Message Msg, Session Session) { }
public static void Talk(Message Msg, Session Session) { string Message = Msg.NextString(); int Type = Msg.NextInt32(); // Never knew you could do bot things int Color = Msg.NextInt32(); if (Message.StartsWith("b: ")) { Type = 2; Message = Message.Replace("b: ", ""); } else if (Message.StartsWith("n: ")) { Type = 1; Message = Message.Replace("n: ", ""); } //[0][0][0]v[0][0][0][0][0][3]hey[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0] fuseResponse.New(Opcodes.OpcodesOut.SendRoomChat); fuseResponse.Append<int>(Session.User.ID); fuseResponse.Append<string>(Message); fuseResponse.Append<int>(Chat.GetChatEmoticon(Message)); fuseResponse.Append<int>(Type); // Type (0 = normal, 1 = notification, 2 = BOT, 3 = colored) fuseResponse.Append<int>(0); fuseResponse.Append<int>(Color); // ? Session.Room.SendData(fuseResponse); }
public static void BeginEnterRoom(Message Msg, Session Session) { int ID = Msg.NextInt32(); var Rooms = FluentRooms.GetById(ID); var Room = Rooms[0]; string Password = Msg.NextString(); fuseResponse.New(Opcodes.OpcodesOut.SendRoomInitialize); fuseResponse.Send(Session); if (Room.State == 1) { fuseResponse.New(Opcodes.OpcodesOut.SendUserOutofRoom); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendDoorbellNoAnswer); fuseResponse.Send(Session); } if (Room.State == 2) { if (Password != Room.Password) { fuseResponse.New(Opcodes.OpcodesOut.SendUserOutofRoom); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendWrongPassword); fuseResponse.Append<int>(-100002); fuseResponse.Send(Session); } } Session.Room = Room; fuseResponse.New(Opcodes.OpcodesOut.SendRoomModelInfo); fuseResponse.Append<string>(Session.Room.Model_Name); fuseResponse.Append<uint>(Session.Room.ID); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendRoomDecoration); fuseResponse.Append<string>("landscape"); fuseResponse.Append<string>("0.0"); fuseResponse.Send(Session); if (Session.Room.Wallpaper != "0.0") { fuseResponse.New(Opcodes.OpcodesOut.SendRoomDecoration); fuseResponse.Append<string>("wallpaper"); fuseResponse.Append<string>(Session.Room.Wallpaper); fuseResponse.Send(Session); } if (Session.Room.Floor != "0.0") { fuseResponse.New(Opcodes.OpcodesOut.SendRoomDecoration); fuseResponse.Append<string>("floor"); fuseResponse.Append<string>(Session.Room.Floor); fuseResponse.Send(Session); } if (Session.Room.Owner == Session.User.Username) { fuseResponse.New(Opcodes.OpcodesOut.SendRoomUserRightLevel); fuseResponse.Append<int>(4); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendRoomOwnerShip); fuseResponse.Send(Session); } else { fuseResponse.New(Opcodes.OpcodesOut.SendRoomUserRightLevel); fuseResponse.Append<int>(0); fuseResponse.Send(Session); } fuseResponse.New(Opcodes.OpcodesOut.SendRoomScore); fuseResponse.Append<int>(Session.Room.Score); fuseResponse.Append<bool>((Session.Room.Owner == Session.User.Username) ? false : Session.User.RatedRooms.Contains(ID) ? false : true); fuseResponse.Send(Session); fuseResponse.New(Opcodes.OpcodesOut.SendRoomEventData); fuseResponse.Append<string>("-1"); fuseResponse.Send(Session); }
public static void GetShopData(Message Msg, Session Session) { fuseResponse.New(Opcodes.OpcodesOut.SendShopData); fuseResponse.Append<bool>(false); fuseResponse.Append<int>(1); fuseResponse.Append<int>(0); fuseResponse.Append<int>(0); fuseResponse.Append<int>(1); fuseResponse.Append<int>(10000); fuseResponse.Append<int>(48); fuseResponse.Append<int>(7); fuseResponse.Send(Session); }
public static void GetGroupData(Message Msg, Session Session) { fuseResponse.New(Opcodes.OpcodesOut.SendRoomGroupBadge); fuseResponse.Append<int>((Session.User.favouritegroup > 0) ? 1 : 0); if (Session.User.favouritegroup > 0) { var Group = Engine.GetHabboHotel.getGroups.Groups[Session.User.favouritegroup]; fuseResponse.Append<int>(Group.ID); fuseResponse.Append<string>(Group.Badges); } fuseResponse.Send(Session); }
public static void UNK1(Message Message, Session Session) { bool b = Message.NextBool(); int i = Message.NextInt32(); fuseResponse.New(3306); fuseResponse.Append<bool>(b); fuseResponse.Append<int>(i); //fuseResponse.Send(Session); fuseResponse.New(3713); fuseResponse.Append<string>("30-09-2012 16:17:34"); fuseResponse.Append<int>(78151); //fuseResponse.Send(Session); }
public static void GetInventoryBots(Message Msg, Session Session) { //66646 fuseResponse.New(1259); fuseResponse.Append<int>(1); fuseResponse.Append<int>(1); fuseResponse.Append<string>("hi"); fuseResponse.Append<string>("M"); fuseResponse.Append<string>(Session.User.Figure); fuseResponse.Send(Session); }
public static void GetRecyclerRewards(Message Msg, Session Session) { fuseResponse.New(Opcodes.OpcodesOut.SendRecyclerRewards); fuseResponse.Append<int>(3); fuseResponse.Append<int>(3); fuseResponse.Append<int>(10); fuseResponse.Append<int>(1); fuseResponse.Append<string>("matic_cont_duck"); fuseResponse.Append<int>(1); fuseResponse.Append<string>("s"); fuseResponse.Append<int>(4415); fuseResponse.Append<int>(2); fuseResponse.Append<int>(3); fuseResponse.Append<int>(1); fuseResponse.Append<string>("matic_walkway_green"); fuseResponse.Append<int>(1); fuseResponse.Append<string>("s"); fuseResponse.Append<int>(4415); fuseResponse.Append<int>(1); fuseResponse.Append<int>(1); fuseResponse.Append<int>(1); fuseResponse.Append<string>("matic_tree_green"); fuseResponse.Append<int>(1); fuseResponse.Append<string>("s"); fuseResponse.Append<int>(4415); fuseResponse.Send(Session); }
public static void InitCrypto(Message Msg, Session Session) { Session.Crypto = new HabboCrypto(Engine.N, Engine.E, Engine.D); String Token = new BigInteger(DiffieHellman.GenerateRandomHexString(15), 16).ToString(); Engine.BannerTokenValues.Add(Token, Session.Crypto.GetPrime.ToString() + ":" + Session.Crypto.GetGenerator.ToString()); fuseResponse.New(Opcodes.OpcodesOut.SendToken); fuseResponse.Append<string>(Token); fuseResponse.Append<bool>(false); Session.SendPacket(fuseResponse); }