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.