What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » MSN ID calculator

MSN ID calculator
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: MSN ID calculator
My eyes hurt at the sight of "msnID - Math.floor(msnID / 4294967296)*4294967296" :P
Use the modular arithmetic function (modulo) instead:
js code:
function UserId(email) {
    email = email.toLowerCase();
    var x = 0;
    for(i=0; i < email.length; i++){
        x *= 101
        x += email.charCodeAt( i );
        x %= 4294967296;
    }
    return x;
}
or in a very short way:
js code:
function UserId(email) {
    email = email.toLowerCase();
    for(var x=0, i=0; i < email.length; i++) x = (x * 101 + email.charCodeAt( i )) % 4294967296;
    return x;
}




EDIT: Since this thread has been moved from the beta testing pages to the public pages, here are related links regarding calculating the MSN ID:

* First public publication ever of the method from the magic man who discovered it :p (incl. lots of discussions)
      msn6 user id thingy
      Equivalent thread on MSNFanatic forums:
        http://forums.fanatic.net.nz/index.php?showtopic=6910&st=20


* Small standalone program to calculate the MSN ID:
      Choli's reply to msn6 user id thingy

* Small online utility to calculate the MSN ID:
      http://messenger.jonathankay.com/msngrid.aspx

* Proper VB6 code to calculate the MSN ID (also lists some checks you can do to test your own code):
      CookieRevised's reply to msn6 user id thingy



This post was edited on 08-30-2010 at 11:05 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-06-2006 09:03 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
MSN ID calculator - by Eljay on 06-06-2006 at 08:56 AM
RE: MSN ID calculator - by CookieRevised on 06-06-2006 at 09:03 AM
RE: MSN ID calculator - by Eljay on 06-06-2006 at 09:05 AM
RE: MSN ID calculator - by Pai on 06-06-2006 at 09:54 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On