Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SF Coders] Converting between SteamID's and Friend Profile ID's
#1
[Image: YzwzC.png]

Welcome to another tutorial, brought to you by SF Coders. Today I'm going to teach you how to convert a Steam ID into a Profile ID (Similar to this) in Visual Basic .NET - Also easily modified for C# .NET.

Let's begin! First you will need either the persons Steam ID or Friend ID, I'm going to be using my own Friend ID (http://steamcommunity.com/id/TheMilopeach/) Although, as this only works with the original ID of the account, we will need to look into the source code and find the 17 digit version of 'TheMilopeach'.

Open the community page (i.e. http://steam..../TheMilopeach/) and view the source code (As all are basically a modified web page.) and find the string var invitee = " - Make sure it is invitee, not inviter as the inviter is your current account you are using to view the page with and will always be the same.

Now that we have the 17 digit number we can convert it to the Steam ID of that user. (Mine is 76561197960775000).

First - the GUI, Let's start with 2 Labels, 2 Textboxes and a Button. Arrange it like so, or if you have a previous project, throw it in the mix somewhere.

[Image: ?h=aca52eafde95355893df032bd9f0fdd1]

Credits for these functions go to Lake393 from Alliedmods. Thread: http://forums.alliedmods.net/showthread.php?p=784611

Don't forget to Imports System.Text.... Big Grin

The first function will be the GetSteamID function. This will use our 17 digit number to convert to a STEAM_X:X:XXX...

[Image: ?h=9d0b1074a89d2010c34d41b46bc10ceb]

The second will be he GetCommunityID function. This will use our Steam ID and convert it into a community ID.

[Image: ?h=28025a3a2e842df63a4adf4f85fac493]

Once we have that, We'll edit our code to do a little mutation once our button is clicked.

[Image: ?h=889cf81b4406e8caeda45f1071c924cd]


That should do it, Fiddle around with the If statement or make it automatically change and edit when you type in the textbox. There are a few bugs when converting, you must only have 1 textbox with text at any one time.

Hope it helped,
Milopeach.
Reply
#2
It's really good to see that SF coders are doing well and keeping the forum active Smile although I'm not a coder , I appreciate it personally Big Grin
[Image: Z95Xp.png]
Reply
#3
Another nice tutorial, well done Milo.
Reply
#4
Looks nice, and i see you use images so you can't copy paste the codes well done Smile
Reply
#5
Yet ANOTHER Great tutorial from milopeach, You are like the most active in this section on this whole forum!
Reply
#6
Wow, this is really helpful but the images are dead D:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SF Coders - Icon Changer - Project 1 Arron XR 14 4,531 09-11-2012, 08:20 PM
Last Post: malis2007
  [SF Coders]Imageshack.Us Image Scraper ★Cooldude★ 7 3,210 08-28-2012, 01:47 AM
Last Post: ★Cooldude★
  [SF Coders] Grabbing an Icon from a File and Saving! [TUT] milopeach 13 3,821 05-15-2012, 06:22 PM
Last Post: OnyxDev
  [SF Coders] Password Generator ★Cooldude★ 23 11,915 03-19-2012, 06:40 PM
Last Post: AceInfinity
  [SF Coders] Get Steam Creation Date using Regex milopeach 5 1,819 02-04-2012, 04:17 PM
Last Post: Denny Crane

Forum Jump:


Users browsing this thread: 1 Guest(s)