Thread: Automatic Username Case formatting!

Results 1 to 10 of 10
  1. #1 Automatic Username Case formatting! 
    Registered Member

    Join Date
    May 2007
    Posts
    696
    Thanks given
    0
    Thanks received
    0
    Rep Power
    154
    Hate it when people login with names like 'zEzIMA'? this will automatically change it to 'Zezima'.

    Difficulty: 1/10

    Source: Pimpscape


    Search for:

    Code:
    playerName = inStream.readString();
    It should be in your run() void.

    Under it add:

    Code:
    playerName = playerName.toLowerCase(); //Converts the entire thing to lowercase 
    String firstLetter = playerName.substring(0,1).toUpperCase(); //Declare the first letter upper case
    String lastBit = playerName.substring(1); //Declare the rest of the username (without the first letter)
    playerName = firstLetter+""+lastBit; //Put it together!
    It is fully documented so you can understand what my code is doing!

    Credits: 100% to me!

    I do not have a moparscape account so if you see this anywhere else it has been leeched!
    Anybody remember me?
     

  2. #2  
    I'm unique


    Join Date
    Oct 2006
    Age
    32
    Posts
    708
    Thanks given
    0
    Thanks received
    1
    Rep Power
    82
    Whoa, thanks! This is awesome if it works Gonna test it.
    Sincerly yours,
    Simox.
     

  3. #3  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,871
    Thanks given
    1,854
    Thanks received
    4,745
    Rep Power
    5000
    Thanks I needed this for my new server
     

  4. #4  
    Registered Member

    Join Date
    May 2007
    Posts
    696
    Thanks given
    0
    Thanks received
    0
    Rep Power
    154
    No problem guys, i like helping the community. =D
    Anybody remember me?
     

  5. #5  
    slay_blad3
    Guest
    This has been around forever..
     

  6. #6  
    Registered Member

    Join Date
    May 2007
    Posts
    696
    Thanks given
    0
    Thanks received
    0
    Rep Power
    154
    Quote Originally Posted by slay_blad3 View Post
    This has been around forever..
    Not on all sources, common ones don't have this. I'm just showing people how to do this.
    Anybody remember me?
     

  7. #7  
    slay_blad3
    Guest
    Oh sorry, didn't know.
    Just every source I have had has had this in it., along with replacing illegal chars to "_".
     

  8. #8  
    0x2B | ~0x2B


    Impulser's Avatar
    Join Date
    Jul 2006
    Posts
    1,305
    Thanks given
    389
    Thanks received
    336
    Rep Power
    2751
    btw this wont exactly word unless you have the restofname.toLowerCase

    Becuse if i loged in like this "hElLo" it would come out as "HElLo"
     

  9. #9  
    JavaNerd
    Guest
    Nice this is great but I really dont care how people name their characters on my server unless they name it "Thisserversucks" or something like that
     

  10. #10  
    Registered Member

    Join Date
    May 2007
    Posts
    696
    Thanks given
    0
    Thanks received
    0
    Rep Power
    154
    Quote Originally Posted by Impulser View Post
    btw this wont exactly word unless you have the restofname.toLowerCase

    Becuse if i loged in like this "hElLo" it would come out as "HElLo"
    Didn't you notice the

    Code:
    playerName = playerName.toLowerCase(); //Converts the entire thing to lowercase
    Anybody remember me?
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •