Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Inside Messages > Requests > Users.cs add under the ChangeLook() void this:
- private void ChangeMotto()
- {
- string RequestMotto = Request.PopFixedString();
- string Motto = UberEnvironment.FilterInjectionChars(RequestMotto.Substring(35));
- if (Motto == Session.GetHabbo().Motto) // Prevents spam?
- {
- return;
- }
- Session.GetHabbo().Motto = Motto;
- using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
- {
- dbClient.AddParamWithValue("motto", Motto);
- dbClient.ExecuteQuery("UPDATE users SET motto = @motto WHERE id = '" + Session.GetHabbo().Id + "' LIMIT 1");
- }
- if (Session.GetHabbo().InRoom)
- {
- Room Room = Session.GetHabbo().CurrentRoom;
- if (Room == null)
- {
- return;
- }
- RoomUser User = Room.GetRoomUserByHabbo(Session.GetHabbo().Id);
- if (User == null)
- {
- return;
- }
- ServerMessage RoomUpdate = new ServerMessage(266);
- RoomUpdate.AppendInt32(User.VirtualId);
- RoomUpdate.AppendStringWithBreak(Session.GetHabbo().Look);
- RoomUpdate.AppendStringWithBreak(Session.GetHabbo().Gender.ToLower());
- RoomUpdate.AppendStringWithBreak(Session.GetHabbo().Motto);
- RoomUpdate.AppendInt32(Session.GetHabbo().GetAchievementScore());
- Room.SendMessage(RoomUpdate);
- }
- UberEnvironment.GetGame().GetAchievementManager().UnlockAchievement(Session, 5, 1);
- }
- Inside Messages > Requests > Users.cs add under "RequestHandlers[44] = new RequestHandler(ChangeLook);" this:
- RequestHandlers[484] = new RequestHandler(ChangeMotto);
- THANKS FOR ADDING, FINALLYYY!!! :D, I'm not sure if that substring thingie works fine, but should do the job..
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement