Results 1 to 5 of 5

Thread: GUID generator (sort of) for cracked server?

  1. #1
    Private
    Join Date
    Jun 2015
    Posts
    15
    Thanks
    5
    Thanked 3 Times in 3 Posts

    GUID generator (sort of) for cracked server?

    Hello,

    I'm running a cracked server on CoDUO: the result is player GUIDs are all 0.
    GUIDs serve a bunch in MySQL: easier to search due to its unicity.

    So I decide to make this function.

    PHP Code:
    mysql_get_guid(length)
    {
        
    /*
        Notes from ebusiangamers: 
        - It is a number that indentify players. Each GUID generated must be unique.
        - However, the player will have (50%)? chance that his GUID matches with another. 
        - You can change the amount of digits to your liking.
        */
        
    if(!isDefined(length))
            
    length 7;
        
        
    guid 0length 1;
        for(
    0lengthi++)
        {
            
    digit[i] = randomInt(9);
            while(
    digit[i] == 0)
                
    digit[i] = randomInt(9);
            
    guid += digit[i]*exp(10a);
            
    a--;
        }

        
    self.guid guid;
        return 
    guid;

    Tell me what you think.

  2. #2
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Why not start with GUID 1 and add 1 everytime a new player with GUID 0 connects? no duplicated guids

  3. The Following User Says Thank You to Ni3ls For This Useful Post:

    ebusiangamers (5th July 2015)

  4. #3
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Quote Originally Posted by Ni3ls View Post
    Why not start with GUID 1 and add 1 everytime a new player with GUID 0 connects? no duplicated guids
    lol? okok it's kinda fresh these days
    don't know if you can get the mac-adress of the players pc or something?

  5. #4
    Private
    Join Date
    Jun 2015
    Posts
    15
    Thanks
    5
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by Ni3ls View Post
    Why not start with GUID 1 and add 1 everytime a new player with GUID 0 connects? no duplicated guids
    Good point.

  6. #5
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Posting Permissions

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