Results 1 to 6 of 6

Thread: rs_DeleteUID and rs_DeleteUIDEx

  1. #1
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default rs_DeleteUID and rs_DeleteUIDEx

    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:
    SCAR Code:
    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:
    SCAR Code:
    function GetSystemRoot: string;  
    var
      Buffer: array[0..255] of Char;
      BufferSize: Cardinal;
    begin
      BufferSize := 255;
      GetWindowsDirectory(Buffer, BufferSize);
      Result := string(Buffer) + '\';
    end;

  2. #2
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice, thanks for releasing the depreciated functions Freddy
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  3. #3
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    just to tell u, it don't compile... deletefile. and the GetWindowsDirectory don't exist..

  4. #4
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thx for this! Keep up the good work :]

  5. #5
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Timer View Post
    just to tell u, it don't compile... deletefile. and the GetWindowsDirectory don't exist..
    Not in SCAR, in Delphi they do exist though.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  6. #6
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oo... -.- LoL

    I See....

    Stupid Me!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •