---
---
Last edited by Dave; 09-19-2013 at 09:49 AM.
http://villavu.com/forum/forumdisplay.php?f=491 would be the correct section.
Anyway, I don't fully understand what you want to do. You can use colour to bot, even on opengl games.
I don't understand what you want your script to do. But I'm happy to help.
Just for you to be aware, you should use the target crosshair (click and drag) to set the game as your target. This will use your mouse to bot. An alternative would be to use APPA, which if the game loads within, would allow you to bot the game without losing control of your mouse.
---
Last edited by Dave; 09-19-2013 at 09:50 AM.
err why do you want to get a bitmap? I'm still confused? If you want to pick a colour use Aca or the colour picker tool. They both freeze the screen or target so you can get them fast moving objects![]()
He can't get anything from it.. No bitmaps or colours. The colour picker only works because the colour picker freezes or take a screenshot before the swap whereas the built-in Simba functions won't work at all because it grabs colours directly from the Window DC after the swap or somehow inbetween. Actually not sure why the colour picker works lol. I'd go with it freezes it or takes a screenshot of the whole window and narrows down to your coordinates? :S
I got your PM and here's your explanation:
Ahh the magic of double buffer & DC changing. OpenGL & DirectX applications have two Device Contexts and an HGLRC. You can't just get colours from it because of the DC. Once you target the DC, it simply swaps to the back buffer and draws on that. Then it swaps back again and draws on the other one. Every "swap" is a frame. Every frame is the next DC. So by the time Simba captures the image from one, it has already swapped to the next DC 50x more or less. Thus you get a black image in Simba.
GPU is faster than CPU by a lot! Simba doesn't have enough time to see the changes and it can't either.
One way is to just hook WglSwapBuffers and write it's data to memory OR hook Winapi's SwapBuffers(HDC dc) function: http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx. Doing this before the swap gives Simba enough time to read it. However, now you impose a slight time delay on your application in the range of nano to milliseconds.
Both functions above do the same thing. It is just one hook so I don't mind doing it.. I have to write an colour only plugin for OpenGL anyway (requested). Which is going to be the same hook and should work for all games.
I wrote a hook generator if you don't want to wait you can just run it and it'll do all the work for you:
https://github.com/Brandon-T/GLX <-- Click and then click on HookGenerator. You can run that to generate a dll for you and just choose wglSwapBuffers and it'll hook it for you. Or just wait a couple hours until I get home so I can do it.
Last edited by Brandon; 07-05-2013 at 04:01 PM.
I am Ggzz..
Hackintosher
---
Last edited by Dave; 09-19-2013 at 09:50 AM.
Well easy I'm not sure because some guys already have problems getting "S.M.A.R.T." to load it. It should be easy for this Wurm game and really any game. It depends how you use it. There's injection and there's loading. For Wurm, you'd have to actually inject it into the browser unless you have a non-browser client that you can place the plugin in. It's a wrapper plugin so it can be used in both a browser and a client. I'm not sure how this "wurm" thing works. I'll download it and see..
I am Ggzz..
Hackintosher
---
Last edited by Dave; 09-19-2013 at 09:51 AM.
LOL that game! WHY?! Why does it have to be Java :S.. Why do developers insist on using Java. Especially for games. *sigh* Took so long to download and it's probably going to take forever to uninstall and clean up all traces.. I must say though.. That game's security is TIGHT! LOL was extra hard to figure out where to even start. No public debuggers work. glIntercept, gDebugger, etc.. all of them fail. If Runescape was like that oh man.. I'd have so much fun trying to break it lol. That being said, I still broke it![]()
Notes:
Injection is one of the best options for this game tbh. If you don't want to inject, you can still force the game to load the plugin. There is a downside though. It must be placed in your Java's bin folder which means that ANY game you run at the same time that is using OpenGL will also be hooked and use-able with Simba. Can obviously turn it off but meh.. Still.. Injecting into this specific game is a bit harder than it seems for the average user.. Also, if you didn't know, this game is actually just as easy to hack as runescape. You can reflect it or do byte-code re-assembling.. It's even easier than runescape because you can get all the game's camera angles and info and w/e else to write some hooks.
That might be a headache for you so it'd prob be easy to just stick it in the Java/bin folder.
I'll upload a plugin later after I clean up. It's the same plugin I have to upload for the colour only OpenGL plugin for SRL anyway. Let me know if you want the injection code/file or just going to use the Java/bin way.
P.S. I didn't know how to resize the game window without hacking it so I just left it and took a screenshot of what fit on my screen :l Iunno why the game is 1024x759 :l Anyway.. I gotta go. Got other things to do. You'll know when I post the plugin.
Last edited by Brandon; 07-05-2013 at 06:16 PM.
I am Ggzz..
Hackintosher
---
Last edited by Dave; 09-19-2013 at 09:51 AM.
Yes you just place it in java/bin.
Here is the code and binaries:
http://www.mediafire.com/download/ki...x2zdnj/GLX.zip
Documentation in case you want to know how it's made: http://brandon-t.github.io/GLColourHook/files.html
I placed the OpenGL32.dll plugin into C:/Program Files(x86)/Java/jre7/bin/
I placed the GLX.dll plugin into C:/Simba/Plugins/
I ran Wurm Online and in Simba I ran the following script:
Simba Code:{$DEFINE GLX}
{$loadlib GLX}
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
begin
if (Not GLHSetup(880)) Then //880 is the ProcessID
begin
writeln('Failed To Setup GLX');
TerminateScript;
end;
SetTargetArray(GLHGetImagePointer, 1200, 600); //Where 1200x600 is the game's resolution.
DebugBitmap(BitmapFromClient(0, 0, 1200, 600));
end.
Same plugin works for Smart as well.
I am Ggzz..
Hackintosher
There are currently 1 users browsing this thread. (0 members and 1 guests)