ServUO Version
Publish 58
Ultima Expansion
Endless Journey
Hello,
I updated my client to latest version , it's 7.0.91.15 now
My server need encrypted client to login in, but now the problem comes, I don't know the latest login key for this 7.0.91.15, does anyone know which login key I need use? Or is there a tool to calculate any version of client for the loginkey?
it should looks like below:
public static LoginKey[] LoginKeys = new LoginKey[]
{
new LoginKey("7.0.35", 0x283235CD, 0xA1345E7F),
new LoginKey("7.0.34", 0x28EAAFDD, 0xA157227F),
 
I don't know why we need to generate the login keys then manually add them to a table, the function to generate them can replace the entire table :p

C#:
        public static void CalculateLoginKeys(uint major, uint minor, uint revision, uint build, out uint key1, out uint key2)
        {
            key1 = (major << 23) | (minor << 14) | (revision << 4);
            key1 ^= (revision * revision) << 9;
            key1 ^= (minor * minor);
            key1 ^= (minor * 11) << 24;
            key1 ^= (revision * 7) << 19;
            key1 ^= 0x2C13A5FD;

            key2 = (major << 22) | (revision << 13) | (minor << 3);
            key2 ^= (revision * revision * 3) << 10;
            key2 ^= (minor * minor);
            key2 ^= (minor * 13) << 23;
            key2 ^= (revision * 7) << 18;
            key2 ^= 0xA31D527F;
        }
 
Because I use some old scripts.
The CalculateLoginKeys function looks very useful!
How to use this CalculateLoginKeys function ? It's powerful, but I don't know how to integrate it into my script, I guess I also need modify some other scripts?
 
Back