[UBEREMU] Change Name 99%

Page 1 of 2 12 LastLast
Results 1 to 25 of 43
  1. #1
    Account Upgraded | Title Enabled! =dj.matias= is offline
    MemberRank
    Apr 2008 Join Date
    FinlandLocation
    381Posts

    [UBEREMU] Change Name 99%

    This code change name, but name not refresh in-game
    Find:
    Code:
     private void GetPetsInventory()
            {
                if (Session.GetHabbo().GetInventoryComponent() == null)
                {
                    return;
                }
    
                Session.SendMessage(Session.GetHabbo().GetInventoryComponent().SerializePetInventory());
            }
    Add after:
    Code:
       public ServerMessage SerializeNameTaken(string Username)
            {
    
    
                DataTable Data = null;
    
                using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                {
                    Data = dbClient.ReadDataTable("SELECT SQL_NO_CACHE * FROM user_tags ORDER BY rand() LIMIT 6");
    
                }
    
                ServerMessage Message = new ServerMessage(571);
                Message.AppendInt32(5);
                
                foreach (DataRow Row in Data.Rows)
                {
                    Message.AppendInt32(Data.Rows.Count);
                    Message.AppendStringWithBreak(Username + (string)Row["tag"]);
    
                }
                return Message;
            }
            private void CheckName()
            {
    
                string username = Request.PopFixedString();
                using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                {
                    if (dbClient.ReadDataRow("SELECT username FROM users WHERE username='" + username + "' LIMIT 1") != null)
                    {
                        Session.SendMessage(SerializeNameTaken(username));
    
                    }
                    else
                    {
                        ServerMessage Message = new ServerMessage(571);
                        Message.AppendInt32(0);
                        Message.AppendStringWithBreak(username);
                        Message.AppendInt32(0);
                        Session.SendMessage(Message);
                        dbClient.ExecuteQuery("UPDATE rooms SET owner='" + username + "' WHERE owner='" + Session.GetHabbo().Username + "'");
                        dbClient.ExecuteQuery("UPDATE users SET username='" + username + "' WHERE id='" + Session.GetHabbo().Id + "'");
                        Session.GetHabbo().Username = username;
                        ServerMessage ChangeName1 = new ServerMessage(570);
                        ChangeName1.AppendInt32(0);
                        ChangeName1.AppendStringWithBreak(username);
                        ChangeName1.AppendInt32(0);
                        Session.SendMessage(ChangeName1);
                        UberEnvironment.GetGame().GetAchievementManager().UnlockAchievement(Session, 20, 1);
    
                    }
                }
    Find:
    Code:
    RequestHandlers[404] = new RequestHandler(GetInventory);
    Add after:

    Code:
    RequestHandlers[471] = new RequestHandler(CheckName);
    Find:
    Code:
     foreach (RoomUser Usr in UserList)
                        {
                            if (!Usr.IsBot)
                            {
                                continue;
                            }
    
                            Usr.BotAI.OnUserEnterRoom(User);
                        }
    Add After:
    Code:
     if (Owner == Session.GetHabbo().Username)
                        {
                            ServerMessage Welcome = new ServerMessage(575);
                            Welcome.AppendInt32(1);
                            Welcome.AppendInt32(0);
                            Welcome.AppendInt32(0);
                            SendMessage(Welcome);
                        }
    SQL:
    Code:
    INSERT INTO achievements VALUES ('20', '1', '1', 'ACH_Name', '100', '1.25');
    Last edited by =dj.matias=; 05-12-10 at 10:06 AM.


  2. #2
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: [UBEREMU] Change Name 99%

    Finally! Uber is getting more updates every day :D

  3. #3
    Enthusiast Klopser is offline
    MemberRank
    Dec 2008 Join Date
    47Posts

    Re: [UBEREMU] Change Name 99%

    How you can change name in the client? :S

  4. #4
    Account Upgraded | Title Enabled! =dj.matias= is offline
    MemberRank
    Apr 2008 Join Date
    FinlandLocation
    381Posts

    Re: [UBEREMU] Change Name 99%

    The Code change name, New name requires client reload

  5. #5
    Enthusiast Klopser is offline
    MemberRank
    Dec 2008 Join Date
    47Posts

    Re: [UBEREMU] Change Name 99%

    with a command? or how?

  6. #6
    Account Upgraded | Title Enabled! Ubercheese is offline
    MemberRank
    Mar 2009 Join Date
    238Posts

    Re: [UBEREMU] Change Name 99%

    How would it be triggered?

  7. #7
    凸(ಠ益ಠ)凸 Omnija is offline
    MemberRank
    Jun 2008 Join Date
    QuebecLocation
    2,233Posts

    Re: [UBEREMU] Change Name 99%

    seems like something that would end up causing issues to the database

  8. #8
    TheJacob was here. TheJacob is offline
    MemberRank
    Jun 2010 Join Date
    Toronto, CanadaLocation
    326Posts

    Re: [UBEREMU] Change Name 99%

    Looks good, I think just for "ease" reasons make it so that it limits how many times one user can change their name. Or add a table in db which will log their change name time stamp and make it so they need to stick with that name for at least 7 days. None the less, looks neat.

  9. #9
    I use to love it more! Jmandupree is offline
    MemberRank
    Oct 2009 Join Date
    /ragezone/homeLocation
    996Posts

    Re: [UBEREMU] Change Name 99%

    some screenies would be nice and were do i find code at.....

  10. #10
    Enthusiast Haxxo is offline
    MemberRank
    Dec 2010 Join Date
    40Posts

    Re: [UBEREMU] Change Name 99%

    omg very nice *_*

  11. #11
    Alpha Member Moogly is offline
    MemberRank
    Feb 2008 Join Date
    Pool LidoLocation
    2,322Posts

    Re: [UBEREMU] Change Name 99%

    Quote Originally Posted by TheJacob View Post
    Looks good, I think just for "ease" reasons make it so that it limits how many times one user can change their name. Or add a table in db which will log their change name time stamp and make it so they need to stick with that name for at least 7 days. None the less, looks neat.
    Or just if their user ID has changed their name once not to allow the option again, because we're emulating habbo... :)

    Honestly, you could always just do it in PHP and tell the user to log off the hotel, send a disconnect packet to server to disconnect the user if they're connected. :)

    There's many ways to do one thing really.

    ttfn

  12. #12
    Member LIVE is offline
    MemberRank
    Nov 2010 Join Date
    in the middleLocation
    87Posts

    Re: [UBEREMU] Change Name 99%

    it's nice how does it works :)

  13. #13
    Apprentice ignaciosh is offline
    MemberRank
    May 2010 Join Date
    6Posts

    Re: [UBEREMU] Change Name 99%

    A photo:


  14. #14
    Apprentice dari0 is offline
    MemberRank
    Apr 2010 Join Date
    8Posts

    Re: [UBEREMU] Change Name 99%

    Nice release ;D
    But if I enter to the client this appears again D:

    PD: Sorry for my English, I'm Spanish

  15. #15
    C# / Java Programmer scottstamp851 is offline
    MemberRank
    Jan 2007 Join Date
    EverywhereLocation
    504Posts

    Re: [UBEREMU] Change Name 99%

    Why not continue on with this and add a handler for the Guide Bot button? Also; this should only be triggered until the user changes his name or turns off the alert, not every single fucking time they go into their own room. An interesting idea, but shitty implementation. I'll rewrite this later when I get backups from my dedicated server (which just went down from a datacenter fire. :|)

  16. #16
    Valued Member Maintenance is offline
    MemberRank
    Jun 2009 Join Date
    137Posts

    Re: [UBEREMU] Change Name 99%

    I added this, but aint adding the full name changing part. I dont think they should beable to change their names more then once.

  17. #17
    Novice imJay is offline
    MemberRank
    Dec 2010 Join Date
    Admin.PHPLocation
    4Posts

    Re: [UBEREMU] Change Name 99%

    Nice ! but tell me were to add this

  18. #18
    C# | C++ Emerica is offline
    MemberRank
    Oct 2010 Join Date
    GermanyLocation
    437Posts

    Re: [UBEREMU] Change Name 99%

    Quote Originally Posted by imJay View Post
    Nice ! but tell me were to add this
    Yes, tell it me too :)

  19. #19
    Proficient Member TheRook is offline
    MemberRank
    Dec 2009 Join Date
    USALocation
    191Posts

    Re: [UBEREMU] Change Name 99%

    Looks nice. Good work!

  20. #20
    C# | C++ Emerica is offline
    MemberRank
    Oct 2010 Join Date
    GermanyLocation
    437Posts

    Re: [UBEREMU] Change Name 99%

    Wer to add this ??

    Please tell me :D

    ---------- Post added at 08:35 PM ---------- Previous post was at 07:08 PM ----------

    *push*

    Wer to add this ??

    Please tell me :D

  21. #21
    C# | C++ Emerica is offline
    MemberRank
    Oct 2010 Join Date
    GermanyLocation
    437Posts

    Re: [UBEREMU] Change Name 99%

    :S Were ???

  22. #22
    凸(ಠ益ಠ)凸 Omnija is offline
    MemberRank
    Jun 2008 Join Date
    QuebecLocation
    2,233Posts

    Re: [UBEREMU] Change Name 99%

    Quote Originally Posted by scottstamp851 View Post
    Why not continue on with this and add a handler for the Guide Bot button? Also; this should only be triggered until the user changes his name or turns off the alert, not every single fucking time they go into their own room. An interesting idea, but shitty implementation. I'll rewrite this later when I get backups from my dedicated server (which just went down from a datacenter fire. :|)

    how is the rewrite coming along?

  23. #23
    C# | C++ Emerica is offline
    MemberRank
    Oct 2010 Join Date
    GermanyLocation
    437Posts

    Re: [UBEREMU] Change Name 99%

    Where to add this :O ??????

  24. #24
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: [UBEREMU] Change Name 99%

    read the thread? and you need a c# editor.. visual basic C# i recomand for you

  25. #25
    C# | C++ Emerica is offline
    MemberRank
    Oct 2010 Join Date
    GermanyLocation
    437Posts

    Re: [UBEREMU] Change Name 99%

    I know..
    But I mean...


    HabboHotel/GameClient etc...
    Last edited by Emerica; 26-12-10 at 07:17 PM.



Page 1 of 2 12 LastLast

Advertisement