SCAR Code:
program Steam_Account_Checker_By_TurboBk;
Var
Time, TTime, H, M, S: Integer; // Timer Vars
GID, TID, SteamID, Steam, CheatyG, VAC: String; // Page Vars
Alias, Member, Location, Games, Friends, Status, PStatus: String; // Steam Vars
GInt: Integer; // Games Var
CGList, CGInfo, CGName, CGStatus: String; // CheatyG Vars
Function SteamID_CommunityID(SteamID: String): String;
Var
raw: String;
y, z: Integer;
Begin
raw := Replace(SteamID, 'STEAM', '');
raw := Replace(raw, ':', '');
y := StrToInt(StrGet(raw, 3));
z := StrToInt(Copy(raw, 4, Length(raw)));
Result := Int64ToStr((( z * 2 ) + 76561197960265728 + y));
End;
Function CommunityID_SteamID(CommunityID: Integer): String;
Var
ID: Integer;
IDD: Extended;
a, b: String;
Begin
ID := (CommunityID - 76561197960265728);
IDD := (ID / 2);
a := GetOthers(FloatToStr(IDD));
b := Replace(FloatToStr(IDD), '.5', '');
Case a Of
'.': Result := ('STEAM_0:1:' + b);
Else Result := ('STEAM_0:0:' + b);
End;
End;
Function GetID(S: String): String;
Begin
Result := '';
If (Pos('STEAM_0:', S) <> 0) Then
If InRange(Length(S), 11, 18) Then
Result := 'SteamID';
If Not (Result = '') Then Exit;
If (Length(S) = 17) Then
Result := 'CommunityID';
If Not (Result = '') Then Exit;
Result := 'Error';
End;
Procedure WriteToCfg(S: String);
Var
FNum: Integer;
Begin
FNum := RewriteFile('C:\Program Files\Steam\steamapps\' + S + '\counter-strike\cstrike\CheckID.cfg', False);
If WriteFileString(FNum, GetDebugText) Then
Begin
ClearDebug;
WriteLn('Information saved to CheckID.cfg');
End Else
Begin
ClearDebug;
WriteLn('Failed to save Information to CheckID.cfg');
End;
CloseFile(FNum);
End;
Procedure GetAccountInfo(ID: String; LoginName: String; InGame: Boolean);
Begin
WriteLn('Gathering Information for ID...');
WriteLn('Please wait.');
WriteLn('');
Time := GetSystemTime;
GID := GetID(ID);
Case GID Of
'SteamID': Begin
SteamID := ID;
TID := SteamID_CommunityID(ID);
End;
'CommunityID': Begin
TID := ID;
SteamID := CommunityID_SteamID(StrToInt64(ID));
End;
'Error': Begin
WriteLn('** Error: Invalid SteamID or CommunityID **');
WriteLn('');
TerminateScript;
End;
End;
WriteLn('Gathering Information from Steam.');
Steam := '';
Steam := GetPage('http://steamcommunity.com/profiles/' + TID);
If (Steam = '') Then
Begin
WriteLn('** Error: Could not retrieve info from Steam **');
Alias := 'N/A';
Games := 'N/A';
Friends := 'N/A';
Status := 'N/A';
PStatus := 'N/A';
End Else
Begin
Alias := Between('<title>Steam Community :: ID :: ', '</title>', Steam); // Current Alias
Member := Between('Member since:', '<div class', Steam);
Member := Replace(Member, '</div>', '');
Member := Copy(Member, 4, (Length(Member) - 12));
Member := Replace(Member, ' ', '');
If (Pos('September', Member) <> 0) And (Pos('2003', Member) <> 0) Then
Member := 'Unknown (Earlier than 2003)';
//Location := Between('<h1></h1>', '; <img style="m', Steam);
//Location := Between('<h2>', 'bsp', Location);
//Location := Between('<h2>', '&n', Location);
Location := Between('<!-- profile section -->', '<!-- /profile section -->', Steam);
If (Pos('inform', Location) <> 0) Then
Begin
Location := 'N/A';
End Else
Begin
Location := Between('<h1>', '<img style="m', Location);
Location := Between('<h2>', ';', Location);
Location := Between('<h2>', ' ', Location);
End;
If (Location = '') Then Location := 'N/A';
Friends := Between('friends">View all ', ' friends</a></p>', Steam); // Number of Friends
If Not InRange(StrToInt(Friends), 0, 100000) Then Friends := 'N/A';
Status := Between('<div id="inCommon">', '</div>', Steam); // Get Online / Offline
If (Pos('Offline', Status) <> 0) Then Status := 'No' Else Status := 'Yes'; // Status Online / Offline
If (Pos('class="errorPrivate">', Steam) <> 0) Then
PStatus := Between('<p class="errorPrivate">', '</p>', Steam); // Profile Status
If (Pos('private.', PStatus) <> 0) Then PStatus := 'Private';
If (PStatus = 'Private') Then
Begin
Member := 'N/A';
Location := 'N/A';
Games := 'N/A';
Friends := 'N/A';
Status := 'N/A';
End;
If (Pos('set', PStatus) <> 0) Then PStatus := 'Not Set Up';
If (PStatus = 'Not Set Up') Then
Begin
Alias := 'N/A';
Member := 'N/A';
Location := 'N/A';
Status := 'N/A';
Games := 'N/A';
Friends := 'N/A';
End;
If Not (PStatus = 'Private') And Not (PStatus = 'Not Set Up') Then PStatus := 'Normal';
If (PStatus = 'Normal') Then
Begin
Games := Between('">View all ', ' games</a></p>', Steam); // Number of Games
GInt := StrToInt(Games);
If Not (GInt > 0) Then Games := 'N/A';
If (GInt >= 500) Then PStatus := 'Valve Staff';
End;
End;
WriteLn('Gathering Information from CheatyG.');
CheatyG := '';
CheatyG := GetPage('http://cheatyg.net/database.php');
If (CheatyG = '') Then
Begin
WriteLn('** Error: Could not retrieve info from CheatyG **');
CGInfo := 'N/A';
CGName := 'N/A';
CGStatus := 'N/A';
CGList := 'N/A';
End Else
Begin
If (Pos(SteamID + '</a>', CheatyG) <> 0) Then CGList := 'Yes' Else CGList := 'No'; // Listed on CheatyG
If (CGList = 'Yes') Then
Begin
CGInfo := Between(SteamID + '</a>', '</font></td>', CheatyG);
CGName := Between('target=''_blank''>', '<font', CGInfo);
CGName := Between('<td>', '</td>', CGName);
CGStatus := Between('<font color=''', '''>', CGInfo);
If (CGStatus = 'red') Then CGStatus := 'Cheat' Else CGStatus := 'Legit';
End;
End;
WriteLn('Gathering Information from VAC.');
VAC := '';
VAC := GetPage('http://www.vacbanned.com/vacbanned.php?var=' + SteamID);
If (VAC = '') Then
Begin
WriteLn('** Error: Could not retrieve info from VAC **');
VAC := 'N/A';
End Else If (Pos('not', VAC) <> 0) Then VAC := 'No' Else VAC := 'Yes';
TTime := (GetSystemTime - Time);
ConvertTime(TTime, H, M, S);
If InGame Then
Begin
ClearDebug;
WriteLn('alias w5 "wait; wait; wait; wait; wait"');
WriteLn('alias w10 "w5; w5"');
WriteLn('alias w25 "w10; w10; w5"');
WriteLn('alias w100 "w25; w25; w25; w25"');
WriteLn('say "** ID Checker - by iCaL* Executed **');
WriteLn('w100');
WriteLn('w100');
WriteLn('say "* Account Status: ' +PStatus);
WriteLn('w100');
WriteLn('say "* Profile Alias: ' + Alias);
WriteLn('w100');
WriteLn('say "* Currently Online: ' + Status);
WriteLn('w100');
WriteLn('say "* Member Since: ' + Member);
WriteLn('w100');
WriteLn('say "* Location: ' + Location);
WriteLn('w100');
WriteLn('say "* Steam ID: ' + SteamID);
WriteLn('w100');
WriteLn('say "* Steam Games: ' + Games);
WriteLn('w100');
WriteLn('say "* Steam Friends: ' + Friends);
WriteLn('w100');
WriteLn('say "* Listed on CheatyG: ' + CGList);
WriteLn('w100');
If (CGList = 'Yes') Then
Begin
WriteLn('say "* Listed Name: ' + CGName);
WriteLn('w100');
WriteLn('say "* Listed Status: ' + CGStatus);
WriteLn('w100');
End;
WriteLn('say "* VAC Banned: ' + VAC);
WriteLn('w100');
WriteLn('say "* CommunityID: [url]http://steamcommunity.com/profiles/[/url]' + TID);
WriteLn('w100');
If (M <> 0) Then
WriteLn('say "* Took ' + IntToStr(M) + ' Minute[s] and ' + IntToStr(S) + ' Second[s] to gather Information.')
Else WriteLn('say "* Took ' + IntToStr(S) + ' Seconds to gather Information.');
WriteToCfg(LoginName);
End Else
Begin
WriteLn('');
WriteLn('* Account Status: ' + PStatus);
WriteLn('* Profile Alias: ' + Alias);
WriteLn('* Currently Online: ' + Status);
WriteLn('* Member Since: ' + Member);
WriteLn('* Location: ' + Location);
WriteLn('* Steam ID: ' + SteamID);
WriteLn('* Steam Games: ' + Games);
WriteLn('* Steam Friends: ' + Friends);
WriteLn('* Listed on CheatyG: ' + CGList);
If (CGList = 'Yes') Then
Begin
WriteLn('* Listed Name: ' + CGName);
WriteLn('* Listed Status: ' + CGStatus);
End;
WriteLn('* VAC Banned: ' + VAC);
WriteLn('* CommunityID: [url]http://steamcommunity.com/profiles/[/url]' + TID);
If (M <> 0) Then
WriteLn('* Took ' + IntToStr(M) + ' Minute[s] and ' + IntToStr(S) + ' Second[s] to gather Information.')
Else WriteLn('* Took ' + IntToStr(S) + ' Seconds to gather Information.');
End;
End;
begin
ClearDebug;
GetAccountInfo('STEAM_X:Y:ZZZZ', '', False);
// GetAccountInfo: Used to retrieve info on a STEAMID or CommunityID.
// Use: ID - 'Input either a STEAMID or a CommunityID'.
// Use: LoginName - 'If "InGame" is set to 'True' you must enter your steam account login name so we can save the CheckID.cfg to the right folder'. *Not Needed*
// Use: InGame - 'False' to display info in debug box, 'True' to save info in your cstrike folder to display info In-Game.
// Use: ** If you want to display info In-Game then you must then do these simple steps **
// Use: 1. Navigate to your 'cstrike' folder. Common Path: C:\Program Files\Steam\steamapps\**LoginName**\counter-strike\cstrike.
// Use: 2. Once in the 'cstrike' folder create a file in there called 'CheckID.cfg' make sure its a CFG File.
// Use: 3. Then double click on a file called 'config.cfg' to edit it, scroll all the way down to the bottom under '+jlook' type this command: bind "\" "exec CheckID.cfg" Then Save!
// Use: 4. Now to the good bit, open CS and connect to a server, find a SteamID or get a friends CommunityID copy it and alt+tab out of CS and input it into SCAR and click 'Run Script'.
// Use: 5. Once you see the message, "Information saved to CheckID.cfg" maximize CS and press your bind key [\] while in a server and WAH LAH! =]
end.