Raised This Month: $12 Target: $400
 3% 

[TF2] Decoding "Gifts" IDs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Swixel
Senior Member
Join Date: Jul 2010
Location: Sydney, Australia
Old 10-13-2010 , 21:53   [TF2] Decoding "Gifts" IDs
Reply With Quote #1

As it's been asked a few times in my presence (and people appear to hate using the backpack to check ), I thought I'd post this up here.

If you're lucky enough to receive a gift, it will say "Gift from: <int>" on tf2items.com (or similar sites). People sometimes want to know who it was that blessed them with an additional equaliser (insert complaints prior to the "can craft"/"can trade" move by Valve). The answer is simple: we're half way through conversion.

Assume the SteamID is formatted like this: STEAM_X:Y:Z. We only care about Y and Z (X should be 0). Now, the gift ID will be something like 33805851 (a real gift that [-aRcTiC-] got has this ID). So we take this ID and look at it the same way voogru looks at the full ID.

If the last digit of the ID is odd, Y is 1. If the last digit of the ID is even it is 0. In this case, it is odd, so we now have:

STEAM_0:1:Z.

We subtract Y from Z then divide by 2, yielding Z = 16902925.

This means our anonymous gifter (not annonymous if you use the backpack ...) is STEAM_0:1:16902925.

You then use voogru's method to get the profile ID and you can thank/abuse them as you so choose.

Have fun backpack viewers!

PHP (from asherkin):
Code:
return "STEAM_0:" . $account % 2 . ":" . (int)($account / 2);

Last edited by Swixel; 10-14-2010 at 04:45.
Swixel is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode