Thread: Automatic generate usernames?

Results 1 to 2 of 2
  1. #1 Automatic generate usernames? 
    Registered Member
    Join Date
    Aug 2016
    Posts
    150
    Thanks given
    63
    Thanks received
    14
    Rep Power
    22
    Does anyone have a good snippet for automatically generating usernames that are suitable for runescape?

    Current code I got, but it just generates random letters.

    public static String makeRandomUserName() {
    String name = "";
    for (int i = 0; i < 6; i++) {
    userloginame += chrs[random.nextInt(chrs.length - 1)];
    }

    return userloginame;

    }
    Attached image
    Reply With Quote  
     

  2. #2  
    Bossman

    ISAI's Avatar
    Join Date
    Sep 2012
    Posts
    1,916
    Thanks given
    655
    Thanks received
    1,366
    Rep Power
    5000
    Really quickly wrote this up:
    Code:
    public static String[] makeRandomUserName() {
        String name = "";
         int count = 6;
    
       Random random = new Random();
       String[] prefixes = {"Leet", "RoT", "Boss", "God"};
       String[] endings = {"Pker", "Dave", "Another one"};
       String[] names = new String[count];
    
        for (int i = 0; i < count; i++) {
            name = prefixes[random.nextInt(prefixes.length - 1)] + endings[random.nextInt(endings.length - 1)] + random.nextInt(1338);
            names[i] = name;
        }
        return names;
    }
    Reply With Quote  
     

  3. Thankful user:



Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Replies: 1
    Last Post: 05-04-2015, 10:22 PM
  2. How to stop Eclipse / WindowBuilder from automatically generating comments
    By Four Nations in forum Application Development
    Replies: 1
    Last Post: 07-09-2014, 12:47 PM
  3. [Bug/Glitch] UserName generator not working
    By 6ix9ine in forum Defects
    Replies: 5
    Last Post: 01-06-2013, 11:32 PM
  4. Automatic mapdata dumper generator tool
    By Graham in forum Show-off
    Replies: 32
    Last Post: 07-22-2009, 05:09 PM
  5. Automatic Username Case formatting!
    By Pkitten in forum Tutorials
    Replies: 9
    Last Post: 12-05-2007, 09:22 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •