SRL Archive - Help and Support

Cant get OGL interception to work on RS client


riwu

2014-09-03 12:11:53

When i try to run an OGL script (w/o using SMART) i get this error

I did not call 'SetupGLX()', and have the plugins in every folder of the official rs client. (http://puu.sh/bjNvU/7361342731.png - the 3 folders too)

Or interception can't work w.o SMART? Since i couldn't call GLXMapHooks()?

@Brandon

Brandon

2014-09-03 13:44:25

You only need ONE plugin in the RS bin folder and that is "opengl32.dll"

riwu

2014-09-03 18:49:27

From: Brandon
You only need ONE plugin in the RS bin folder and that is "opengl32.dll"

I have only 2 plugin in bin initially but when it didn't work i spam it everywhere to make sure it's not because i'm putting in the wrong place.

Deleted everything except OpenGL32.dll in jagexcache\jagexlauncher\bin. Still gives the same error.

Brandon

2014-09-03 18:53:42

From: riwu
I have only 2 plugin in bin initially but when it didn't work i spam it everywhere to make sure it's not because i'm putting in the wrong place.

Deleted everything except OpenGL32.dll in jagexcache\jagexlauncher\bin. Still gives the same error.



Well it makes no sense.. You have OpenGL32.dll in the bin folder. You got that right.

Now setupGLX with the processID of the RS client then and only then will it map the client's memory and allow you to call other functions.. Otherwise you're going to get an access violation trying to use a null memory pointer.


That plugin is really OLD compared to the current Colour plugin which allows you to just drag Simba's crosshairs and it automatically maps the memory to the specified client.. However, this is not the case for that plugin which requires the manual entering of the PID of the client.




Seems to show it working with the official client still.

riwu

2014-09-03 19:02:09

From: Brandon
manual entering of the PID of the client.

I guess this is the part that i missed out. I didn'tcall GLXMapHooks() since i don't know what argument to put. So how do i get the processID of the client/browser?

EDIT: nvm guess it's GetProcesses()

EDIT2: Got it working! Thanks Brandon! REP++
I guess i can automate getting processID by matching the title string, but can only have 1 RS open for it to work (which should be the case anyway since script would take control of mouse)

Brandon

2014-09-03 19:10:11

From: riwu
I guess this is the part that i missed out. I didn'tcall GLXMapHooks() since i don't know what argument to put. So how do i get the processID of the client/browser?

EDIT: nvm guess it's GetProcesses()




Huh? GetProcesses()? I forgot who wrote the Wurm include but they have a nice procedure in there that can target a window by process ID.. I don't really have plans to make that plugin on par with the colour plugin..


But, if you want to forget about pid's and make it compatible with the latest Simba's functions, you can map it by WindowID like the colour plugins do..

https://github.com/Brandon-T/GLX-Colour/blob/GLX/src/Exports.c#L25

and it'd allow you to do: GLXSetup(GetNativeWindow()); All you'd have to do is drag Simba's crosshairs to the browser window or client window or w/e window and it'd automatically setup everything..


But in the mean while, you can just ask foundry for some of his code from his wurm client which already had the ability to target processes before the recent update.


Is there a reason to not use SMART though?

riwu

2014-09-03 19:25:47

From: Brandon
Huh? GetProcesses()? I forgot who wrote the Wurm include but they have a nice procedure in there that can target a window by process ID.. I don't really have plans to make that plugin on par with the colour plugin..


But, if you want to forget about pid's and make it compatible with the latest Simba's functions, you can map it by WindowID like the colour plugins do..

https://github.com/Brandon-T/GLX-Colour/blob/GLX/src/Exports.c#L25

and it'd allow you to do: GLXSetup(GetNativeWindow()); All you'd have to do is drag Simba's crosshairs to the browser window or client window or w/e window and it'd automatically setup everything..


But in the mean while, you can just ask foundry for some of his code from his wurm client which already had the ability to target processes before the recent update.


Is there a reason to not use SMART though?

I guess i can just use something like this to auto pair:

Processes := GetProcesses();
for i := 0 to High(Processes) do
if (Pos('RuneScape - MMORPG - The No.1 Free Online Multiplayer Game', Processes[i].Title) > 0) then
begin
SetTarget(Processes[i]);
GLXSetup(Processes[i].PID);
GLXMapHooks(Processes[i].PID);
ActivateClient();
end;


Although just realize that even though there's no access violation error, i still couldn't get any texture (glgettextures() returns nothing). Both glxsetup() and GLXMapHooks() returned true.

I'm fine with using SMART, someone else is not so i'm trying to help him to get it working on browser.

EDIT: nvm it works on rs client. Think i put the plugin at the wrong place for the browser or i have some browser settings wrong. I put it in C:\Program Files (x86)\Google\Chrome\Application (same folder as chrome.exe).