Freddy1990
2008-03-30 13:52:45
I will be removing rs_DeleteUID and rs_DeleteUIDEx in my constant quest to reduce the amount of RS specific function in SCAR and they really aren't that useful… In case they're really needed they can still be placed in a plugin.
As I'm removing these I decided just to post DeleteUID for anyone who'd want it:
Easy to add more paths/files
And the GetSystemRoot function:
As I'm removing these I decided just to post DeleteUID for anyone who'd want it:
procedure DeleteUID;
const
Locations: array[1..5] of string = (
'.file_store_32\',
'.file_store_33\',
'.jagex_cache_32\',
'.jagex_cache_34\',
'.general_store\'
);
Files: array[1..2] of string = (
'uid.dat',
'random.dat'
);
var
i, j: Integer;
SystemRoot, Loc, sFile: string;
begin
SystemRoot := GetSystemRoot;
for i := 1 to 5 do
begin
Loc := SystemRoot + Locations[i];
if DirectoryExists(Loc) then
for j := 1 to 2 do
begin
sFile := Loc + Files[j];
if FileExists(sFile) then
DeleteFile(PChar(sFile));
end;
end;
end;Easy to add more paths/files
And the GetSystemRoot function:
function GetSystemRoot: string;
var
Buffer: array[0..255] of Char;
BufferSize: Cardinal;
begin
BufferSize := 255;
GetWindowsDirectory(Buffer, BufferSize);
Result := string(Buffer) + '\';
end;