Results 1 to 10 of 10

Thread: HOW TO: OpenGL without SMART

  1. #1
    Join Date
    Dec 2011
    Posts
    2,133
    Mentioned
    220 Post(s)
    Quoted
    1064 Post(s)

    Default HOW TO: OpenGL without SMART

    Hi all, here's a quick step-by-step on using ogLib/OpenGL scripts without SMART. Since using SMART was assumed by ogLib and Oria is on the way, for now I'm not officially adding this into ogLib. You can do it simply with these few steps.

    1. Place OpenGL32.dll inside C:\Users\<YourUsername>\jagexcache\jagexlauncher\b in\ - if your RS cache location is different, adapt accordingly.



    2. Place this function into your script:

    Simba Code:
    function getRuneScapeClient(): integer;
    var
      t: tSysProcArr;
      i: integer;
    begin
      t := getProcesses();
      for i := high(t) downto 0 do
      begin
        if (t[i].title = 'RuneScape') then
        begin
          exit(t[i].PID);
        end;
      end;
    end;

    Make sure you don't have any other folders or programs opened also titled 'RuneScape' or this function may not work.

    3. Remove ogl.setup() from your script and replace it with something like:

    Simba Code:
    var
      w, h: integer;
    {...}
    GLXMapHooks(getRuneScapeClient());
    ogl.getClientDimensions(w, h);
    GLXViewPort(w, h, w, h);
    activateClient();
    {...}

    Since you will be removing ogl.setup(), you will need to set OGL setting values yourself.

    4. Select the RuneScape game as your target with the Simba crosshairs, NOT including the title bar.

    Result:



    Enjoy an extra layer of avoiding detection (perhaps)!

  2. #2
    Join Date
    Oct 2012
    Posts
    1,241
    Mentioned
    40 Post(s)
    Quoted
    583 Post(s)

    Default

    thanks for this. just a shame http://i.imgur.com/ElhlsLQ.png

  3. #3
    Join Date
    Jun 2014
    Posts
    459
    Mentioned
    27 Post(s)
    Quoted
    227 Post(s)

    Default

    Nice tutorial now just one for nxt!
    Tsunami

  4. #4
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    I admire tutorial, very easy to find this info (as opposed to search 'Brandon' profile posts).

    also, OP -> @ogLib/Oria, might I suggest effort instead to further Brandon's work? In turn benefits your work too : )

    keep on keepin on good work!

  5. #5
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    Relying on window title irks me... So this happened.

    Simba Code:
    function GetProccessID(ImageName : string) : TIntegerArray;
    const Validation := [
      '[\\/:\*\?"<>\|]',                        { Forbidden characters  }
      '^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)', { Forbidden names       }
      '^\.'                                     { Cannot start with dot }
    ];
    var
      Index,
        Results : Integer;
      Output    : TStringArray;
      Process   : TProcess;
    begin
      for Index to High(Validation) do
        if ExecRegExpr(Validation[Index], ImageName) then
          Exit();
      Process.Init(nil);
      try
        Process.SetCommandLine('TASKLIST /FI "IMAGENAME EQ ' + ImageName + '.EXE" /FO LIST');
        Process.SetOptions([poUsePipes, poNoConsole]);
        Process.Execute();
        Output := Explode(#13#10, Trim(Process.GetOutput().ReadAnsiString()));
      finally
        Process.Free();
      end;
      SetLength(Result, Length(Output));
      for Index := 0 to High(Output) do
        if ExecRegExpr('PID:\s*(\d+)', Output[Index]) then
        begin
          Result[Results] := StrToIntDef(ReplaceRegExpr('PID:\s*(\d+)', Output[Index], '$1', True), -1);
          Results += 1;
        end;
      SetLength(Result, Results);
    end;

    function TInputPipeStream.ReadAnsiString() : string; override;
    var
      Buffer : string;
      Count : Integer;
      Index : Integer;
    begin
      repeat
        SetLength(Buffer, 1024);
        Count := Self.Read(Buffer[1], 1024);
        if Count <> 0 then
        begin
          SetLength(Buffer, Count);
          Result := Result + Buffer;
        end;
      until Count = 0;
    end;

    (*
      Credit to Andrew D. for validation
      http://stackoverflow.com/questions/11100821#answer-11101624
    *)



    Example use...
    Simba Code:
    function GetRuneScapeClient(): Integer;
    var Processes: TIntegerArray;
    begin
      Processes := GetProcessID('JagexLauncher');
      if Length(Processes) then
        Exit(Processes[0]);
    end;


    Or, since we're assuming they have ogLib...
    Simba Code:
    GLXMapHooks(GetProcessID('JagexLauncher').First());
    Last edited by Obscurity; 05-13-2016 at 06:12 PM.




    Skype: obscuritySRL@outlook.com

  6. #6
    Join Date
    Apr 2012
    Location
    Gielinor
    Posts
    231
    Mentioned
    4 Post(s)
    Quoted
    33 Post(s)

    Default

    Trying to pair openGL with the NXT client right now. Using:

    Simba Code:
    function getRuneScapeClient(): integer;
    var
      t: tSysProcArr;
      i: integer;
    begin
      t := getProcesses();
      for i := high(t) downto 0 do
      begin
        if (t[i].title = 'RuneScape') then
        begin
          exit(t[i].PID);
        end;
      end;
    end;

    {...}

    begin
      clearDebug();
      GLXMapHooks(getRuneScapeClient());
      ogl.getClientDimensions(w, h);
      GLXViewPort(w, h, w, h);
      activateClient();
      //ogl.setup([800, 600], [0, 0, 576, 388]);
      repeat
        //mainLoop();
        writeLn(intToStr(w)); //DEBUG
        writeLn(intToStr(h)); //DEBUG
      until false;
    end.

    I've moved the .dll file to the Jagex cache file. Though I keep getting values of 0 for w and h. I manually open the client and pair it to Simba with the green crosshairs. Any help would be greatly appreciated. Thank You @Clarity and @Obscurity & @Clarity.

  7. #7
    Join Date
    Jun 2014
    Posts
    459
    Mentioned
    27 Post(s)
    Quoted
    227 Post(s)

    Default

    Quote Originally Posted by MasterXehanort View Post
    Trying to pair openGL with the NXT client right now. Using:

    Simba Code:
    function getRuneScapeClient(): integer;
    var
      t: tSysProcArr;
      i: integer;
    begin
      t := getProcesses();
      for i := high(t) downto 0 do
      begin
        if (t[i].title = 'RuneScape') then
        begin
          exit(t[i].PID);
        end;
      end;
    end;

    {...}

    begin
      clearDebug();
      GLXMapHooks(getRuneScapeClient());
      ogl.getClientDimensions(w, h);
      GLXViewPort(w, h, w, h);
      activateClient();
      //ogl.setup([800, 600], [0, 0, 576, 388]);
      repeat
        //mainLoop();
        writeLn(intToStr(w)); //DEBUG
        writeLn(intToStr(h)); //DEBUG
      until false;
    end.

    I've moved the .dll file to the Jagex cache file. Though I keep getting values of 0 for w and h. I manually open the client and pair it to Simba with the green crosshairs. Any help would be greatly appreciated. Thank You @Clarity and @Obscurity & @Clarity.
    This is because there's a new DLL for nxt on opengl and obscurity hasn't released it. Probably won't ever.
    Tsunami

  8. #8
    Join Date
    Apr 2012
    Location
    Gielinor
    Posts
    231
    Mentioned
    4 Post(s)
    Quoted
    33 Post(s)

    Default

    @Lucidity A single tear drop just fell from my eye. Thank you for the heads up. I was looking into Oria, but wasn't sure if that was what I was looking for.

  9. #9
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Quote Originally Posted by Lucidity View Post
    This is because there's a new DLL for nxt on opengl and obscurity hasn't released it. Probably won't ever.
    I believe @Brandon; was working on something as well.

  10. #10
    Join Date
    Apr 2012
    Location
    Gielinor
    Posts
    231
    Mentioned
    4 Post(s)
    Quoted
    33 Post(s)

    Question Can't quite get this to run

    Hey everyone, so I've downloaded the old official java client to run my OGL scripts with. I've moved the .dll files to my Jagex Cache successfully, and select the RuneScape client without the title. When I run the script, everything compiles and the model numbers line up perfectly on the mainscreen with the actual models. However, the main loop does not execute. When in SMART, the script runs perfectly fine. Trying to debug the width and height of the client properly returns 800 and 600 respectively. I'm thinking I messed up something in the GLXViewPort function.

    Simba Code:
    var
      w, h, zero: integer;

    {. . .
    SCRIPT
    . . .}


    begin
      clearDebug();
      //ogl.setup([800, 600], [0, 0, 576, 388]);

      zero := 0;
      GLXMapHooks(getRuneScapeClient()); //Get the process ID for the RuneScape Client
      getClientDimensions(w, h); //Get the client dimensions
      writeLn(intToStr(w)); //Debug to output client width
      writeLn(intToStr(h)); //Debug to output client height
      GLXViewPort(zero, zero, zero+576, zero+388); //Setup the viewport to match the values in original ogl.setup
      activateClient();

      ogl.setDebugMode('models');
      //ogl.setDebugMode('none');
      //ogl.setDebugMode('textures');
      //ogl.setDebugMode('fonts');

      setModels();

      repeat
        mainLoop;
      until false;
    end.

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
  •