PDA

View Full Version : GUID generator (sort of) for cracked server?



ebusiangamers
5th July 2015, 17:10
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.


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 = 0; a = length - 1;
for(i = 0; i < length; i++)
{
digit[i] = randomInt(9);
while(digit[i] == 0)
digit[i] = randomInt(9);
guid += digit[i]*exp(10, a);
a--;
}

self.guid = guid;
return guid;
}

Tell me what you think.

Ni3ls
5th July 2015, 17:15
Why not start with GUID 1 and add 1 everytime a new player with GUID 0 connects? no duplicated guids

serthy
5th July 2015, 17:33
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?

ebusiangamers
5th July 2015, 18:18
Why not start with GUID 1 and add 1 everytime a new player with GUID 0 connects? no duplicated guids

Good point.

IzNoGoD
5th July 2015, 19:12
use this
http://killtube.org/showthread.php?1750-Saving-a-variable-client-side-%28persistently%29