Hardly.
Hooking D3D funcs is harrrrrd. Amirite?
Besides, hooking CreateDevice allows me to grab the window's handle in a generic way and set up input detection. Much easier than reversing out a static pointer in every game.
And anyway, even if I could be bothered to do it in a manner that doesn't require me to create and hook the process on startup it would be pointless, I've got stuff that needs to be done then anyway.
Silly jew. Trix are for kids.
Go infect yourself with more spyware.![]()
Hello.
Thank you all for the responses.
I have find a way, to hook EndScene without hooking any other function.
Its really simple, you need to create your own Direct3DDevice9 and then you can get easy the address of EndScene and hook it. This works great and now it dont crash anymore if i interact with all. ^^
This works only if WoW is running in windowed-mode, if its in fullscreen, i need to get the address of EndScene in my Injector and then pass it to my injected dll. If you create an additional Direct3DDevice9 in a fullscreen-application, weird things will happen. ^^
If someone is interested in the sourcecode, i will post it here.
Another question: If i would get Lua_DoString to work, do i need CastSpellById anymore? Currently Lua_DoString dont work, dont know why, nothing happens.
In WoWXBase it is defined as follows:
typedef void ( __cdecl * tLua_Dostring )( char * pszString, char * pszString2, void * pState );
FindPattern find this address:
Lua_DoString: 0077DEF0
i call the function like this:
Lua_DoString("/cast Throw\r\n", NULL, NULL);
NARF. I searched this and other forums for an example how to use Lua_DoString, but i found nothing.
Please, do post the code.
You can find examples on how to call DoString in the 3.0.2 Information thread btw.
I seem to remember seeing a post where someone (probably Cypher or Kynox) saying that you have to pass the same string as arguments one and two. Lua_DoString("/cast Throw", "/cast Throw", NULL);, or something. I may be wrong, so I suggest attempting to find the thread I'm thinking of, but you might give it a shot anyway.
That's what Cypher posted
Also i don't think that
would work i think it would have to be something likeCode:Lua_DoString("/cast Throw", "/cast Throw")
Not sure but.Code:Lua_DoString("CastSpell(1, \"spell\")", "CastSpell(1, \"spell\")");
EDIT:Would be better...Code:MyDoString("CastSpellByName(\"Fireball\")", "CastSpellByName(\"Fireball\")");
Last edited by jjaa; 12-02-2008 at 02:14 AM.
In the attachment is the code.
Thanks to you all. Now it works properly.
I thought i could use the text, i would paste into the WoW macro-managment (/macro), but this won´t work.
Lua_DoString("CastSpellByName(\"Throw\");", "CastSpellByName(\"Throw\");", NULL);
works great! Thanks to you all.
EDIT: Cant upload my file to the attachment, NARF.
Here it is: RapidShare: Easy Filehosting
Last edited by goderion; 12-02-2008 at 12:44 PM.