Steam ID Converter

Credits

Submitter
  • P1: Beggar
    Points: 78
  • C1: Member
  • A4: Graduate
    Account Age: 3 years
FatMonster (Creator/Co-creator)
Key Authors
FatMonster
Original Authors
Voogru
Formula

Rating

7.50/10
Based off 1 rating(s)

Additional Info

Genre
Other/Misc

Stats

Post Count
13
ViewCount
5,092
Downloads
914
Date Added
3 years ago
Date Modified
11 months ago

Convert SteamIDs to Steam Community Pages and vice-versa.

-What it does Convert SteamIDs (STEAM0:0:14958042) to Steam Community Pages (http://steamcommunity.com/profiles/76561197990181812). Convert Steam Community Pages (http://steamcommunity.com/profiles/76561197990181812) to SteamIDs (STEAM0:0:14958042).

-What's new -Now it converts Steam Community Pages to SteamIDs. -Now it checks for errors when parsing and if it finds one, it gives an exception.

Its programmed in C#. Uses a formula discovered by voogru.

If you have any questions, send me a message on my profile.

Download

  • You must be a member

Comments

    • P1: Beggar
      Points: 789
    • C1: Member
    • A5: Veteran
      Account Age: 6 years

    GrayTap:

    https://forums.alliedmods.net/showthread.php?t=79178

    Look at this page, grab info from steamfriends and you can see if someone is banned or not

    • P1: Beggar
      Points: 78
    • C1: Member
    • A4: Graduate
      Account Age: 3 years

    Here is the source: Function1 (Steam To Community):

    void SteamToCommunity(string authServer, string mainId, Int64 aus, Int64 mid) { try { if (tbSID1.Text != String.Empty) { Int64 b = 76561197960265728; Int64 b2 = b + aus; Int64 mid2 = mid * 2; Int64 final = b2 + mid2; tbCOM1.Text = "http://steamcommunity.com/profiles/" + final.ToString(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); } }

    Function2 (Community to Steam):

    void CommunityToSteam(Int64 communityId, int authServer) { try { if (tbprofile.Text != String.Empty) { Int64 p1 = communityId - 76561197960265728 - authServer; Int64 p2 = p1 / 2; string final = "STEAM0:" + authServer.ToString() + ":" + p2.ToString(); tb_ID2.Text = final; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); } }

    The rest is just textboxes and buttons, use: SteamToCommunity(string authServer, string mainId, Int64 aus, Int64 mid) and CommunityToSteam(Int64 communityId, int authServer)

    The additional stuff is checking if the numbers are even when converting community pages to steamids.

        private void b_Convert1_Click(object sender, EventArgs e)
        {
            try
            {
                String authServer = tb_SID1.Text.Substring(8, 1);
                String mainId = tb_SID1.Text.Substring(10);
                SteamToCommunity(tb_SID1.Text.Substring(8, 1), tb_SID1.Text.Substring(10), Int64.Parse(authServer), Int64.Parse(mainId));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    

    private void bConvert2Click(object sender, EventArgs e) { try { Int64 communityId = Int64.Parse(tbprofile.Text); string sub1 = tbprofile.Text.Substring(tb_profile.Text.Length - 1); int sub11 = int.Parse(sub1); if (sub11.Equals(0) || sub11.Equals(2) || sub11.Equals(4) || sub11.Equals(6) || sub11.Equals(8)) { int authServer = 0; CommunityToSteam(communityId, authServer); } else { int authServer = 1; CommunityToSteam(communityId, authServer); } } catch (Exception ex) { MessageBox.Show(ex.Message,"Error!",MessageBoxButtons.OK,MessageBoxIcon.Error); } }

    Thats it.

    Fat Monster
    • P1: Beggar
      Points: 276
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Greet job.

    After some work, I had decompile the most common fuction in this program becouse some people didn't understund how to make this conventions. It's really easy to use this code you just had to add some buttons and textboxes in your C# project and copy and past the code. In the begining I thought it was quite hard to make this convertions but it's actually very easy.

    Code snippers:

    First two button events...

    private void bConvert1Click(object sender, EventArgs e) { try { string s = this.tbSID1.Text.Substring(8, 1); string str2 = this.tbSID1.Text.Substring(10); this.SteamToCommunity(this.tbSID1.Text.Substring(8, 1), this.tbSID1.Text.Substring(10), long.Parse(s), long.Parse(str2)); } catch (Exception exception) { MessageBox.Show(exception.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Hand); } }

    ...and the second event...

    private void bConvert2Click(object sender, EventArgs e) { try { long communityId = long.Parse(this.tbprofile.Text); int num2 = int.Parse(this.tbprofile.Text.Substring(this.tb_profile.Text.Length - 1)); if ((num2.Equals(0) || num2.Equals(2)) || ((num2.Equals(4) || num2.Equals(6)) || num2.Equals(8))) { int authServer = 0; this.CommunityToSteam(communityId, authServer); } else { int num4 = 1; this.CommunityToSteam(communityId, num4); } } catch (Exception exception) { MessageBox.Show(exception.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Hand); } }

    ...then just add this two functions...

    private void SteamToCommunity(string authServer, string mainId, long aus, long mid) { try { if (this.tbSID1.Text != string.Empty) { long num = 0x110000100000000L; long num2 = num + aus; long num3 = mid * 2L; this.tbCOM1.Text = "http://steamcommunity.com/profiles/" + ((num2 + num3)).ToString(); } } catch (Exception exception) { MessageBox.Show(exception.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Hand); } }

    ...next func...

    private void CommunityToSteam(long communityId, int authServer) { try { if (this.tbprofile.Text != string.Empty) { long num = (communityId - 0x110000100000000L) - authServer; string str = "STEAM0:" + authServer.ToString() + ":" + ((num / 2L)).ToString(); this.tb_ID2.Text = str; } } catch (Exception exception) { MessageBox.Show(exception.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Hand); } }

    and thats it. Have fun but don't forget that the code actually belong to its author.

    Bananite
    • P1: Beggar
      Points: 562
    • E1: Helper
      EF: 1
    • C1: Member
    • A5: Veteran
      Account Age: 4 years

    You could always go to www.vacbanned.com even if it's not a banned id it will still give you the steam profile link!

    SinCity: Source
    • P1: Beggar
      Points: 78
    • C1: Member
    • A4: Graduate
      Account Age: 3 years

    Updated, now it can convert Community Pages to SteamIDs and catches exceptions during the parsing.

    Fat Monster
    • P1: Beggar
      Points: 105
    • C1: Member
    • A4: Graduate
      Account Age: 3 years
    Posted by RaBoX Nice and simple, but it will be much harder to get a steam id from a communtiy page. Do you have any ideas about how to do that?

    It is actually not that to find on the internet. I have programmed it in java and is posted on fpsbanana just in case you want to test it out.

    Bananite
    • P1: Beggar
      Points: 789
    • C1: Member
    • A5: Veteran
      Account Age: 6 years

    You can grab the steamid/Account from the steam.log too. But i don't now how often it's updating.

    To get the account name, Search for this strings

    'CreateSessions'

    Then ignore if 'suceeded' and 'failed: No steam' is in the line.

    To get the steamid, Search for this strings

    'ConnectionPool' and 'new connection'

    To get the latest used nickname

    Read this from the register: 'HKEYCURRENTUSER\Software\Valve\Steam' 'lastgamenameused'

    to get the steampath

    Read this from the register: 'HKEYCURRENTUSER\Software\Valve\Steam' 'SteamPath'

    Btw, the tool is really nice. I hope it's ok to the offtopic.

    • P1: Beggar
      Points: 276
    • C1: Member
    • A5: Veteran
      Account Age: 5 years
    Posted by Desajn When i created my own little tool that creates steamid to communityipage or communityipage to steamid i readed on this page. http://forums.alliedmods.net/showthread.php?t=60899

    This was really helpful, thank you very much.

    Bananite
    • P1: Beggar
      Points: 6
    • E1: Helper
      EF: 1
    • C1: Member
    • A4: Graduate
      Account Age: 4 years
    Posted by RaBoX Nice and simple, but it will be much harder to get a steam id from a communtiy page. Do you have any ideas about how to do that?

    There's a Python script written by theY4Kman for converting Steam ID -> Community and also for Community -> Steam ID.

    It was sent to the hlcoders mailing list, I might try to find it.

    dragon slayer
    • P3: Peasant
      Points: 13,209
    • E1: Helper
      EF: 5
    • C1: Member
    • A4: Graduate
      Account Age: 4 years

    Whats the algorithm for that?

    HQ is HQ
  • You must be a member