Created
June 24, 2011 13:33
-
-
Save kimoto/1044767 to your computer and use it in GitHub Desktop.
Convert Steam Profile ID to Friend ID by Ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def steamid_to_friendid(steamid) | |
| parts = steamid.split(":") | |
| raw_id = parts.last.to_i | |
| second_id = parts[1].to_i | |
| raw_id * 2 + 76561197960265728 + second_id | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment