duki Posted August 15 Posted August 15 (edited) Following my previous D3D9-Base setup, here's an example using it for a simple DIP (DrawIndexedPrimitive) hook. Wireframe example code targeting pheasants: typedef HRESULT(WINAPI* tDrawIndexedPrimitive)(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT); tDrawIndexedPrimitive oDrawIndexedPrimitive = nullptr; HRESULT APIENTRY hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 device, D3DPRIMITIVETYPE dType, INT baseVertexIndex, UINT minVertexIndex, UINT numVertices, UINT startIndex, UINT primCount) { //targeting pheasants models (mainly 6609 clients) if (numVertices == 420 && primCount == 544) { DWORD dwOldFillMode; device->GetRenderState(D3DRS_FILLMODE, &dwOldFillMode); device->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); //here you could return directly, to make it more noticeable oDrawIndexedPrimitive(device, dType, baseVertexIndex, minVertexIndex, numVertices, startIndex, primCount); device->SetRenderState(D3DRS_FILLMODE, dwOldFillMode); } return oDrawIndexedPrimitive(device, dType, baseVertexIndex, minVertexIndex, numVertices, startIndex, primCount); } This example code has only wireframe "effect" for the texture targeted (pheasants), but you can change the colors of the texture too (know as Chams), gather realtime w2s positions, adding effects/shaders, etc. Some preview of how it could work (chams & w2s from texture): Edited August 18 by duki Quote
Spirited Posted August 16 Posted August 16 Huh! That's cool! I wonder if there's a higher level function that would allow you to target a role by their mesh ID or role ID... and then perform this detour for it. Would be pretty cool being able to apply some special modifier to a specific mob, like blinding someone / something tints them black or something (like they're in magical darkness). What are your current plans for using something like this? Quote
duki Posted August 18 Author Posted August 18 (edited) On 8/16/2025 at 2:46 PM, Spirited said: Huh! That's cool! I wonder if there's a higher level function that would allow you to target a role by their mesh ID or role ID... and then perform this detour for it. Would be pretty cool being able to apply some special modifier to a specific mob, like blinding someone / something tints them black or something (like they're in magical darkness). What are your current plans for using something like this? Yeah, that would be cool thing to do without fully getting into reverse-engineering the game, and it could even be almost "universal" across all DX9 versions of the game. I tested a few things with this hook, like rotating them or making them bigger by multiplying their matrix. goofy ah pheasant rotating with wrong axis xD: Edited August 18 by duki Quote
ChiperXsS Posted September 28 Posted September 28 Hey guys, I added imgui too, but in a better version I also made a frame for items and changed the text color for items. I added a new button for Auto-Hunt! I mention that the client version is 5165 ! Quote
kennylovecode Posted Thursday at 11:32 AM Posted Thursday at 11:32 AM On 8/15/2025 at 3:53 PM, duki said: Following my previous D3D9-Base setup, here's an example using it for a simple DIP (DrawIndexedPrimitive) hook. Wireframe example code targeting pheasants: typedef HRESULT(WINAPI* tDrawIndexedPrimitive)(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT); tDrawIndexedPrimitive oDrawIndexedPrimitive = nullptr; HRESULT APIENTRY hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 device, D3DPRIMITIVETYPE dType, INT baseVertexIndex, UINT minVertexIndex, UINT numVertices, UINT startIndex, UINT primCount) { //targeting pheasants models (mainly 6609 clients) if (numVertices == 420 && primCount == 544) { DWORD dwOldFillMode; device->GetRenderState(D3DRS_FILLMODE, &dwOldFillMode); device->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); //here you could return directly, to make it more noticeable oDrawIndexedPrimitive(device, dType, baseVertexIndex, minVertexIndex, numVertices, startIndex, primCount); device->SetRenderState(D3DRS_FILLMODE, dwOldFillMode); } return oDrawIndexedPrimitive(device, dType, baseVertexIndex, minVertexIndex, numVertices, startIndex, primCount); } This example code has only wireframe "effect" for the texture targeted (pheasants), but you can change the colors of the texture too (know as Chams), gather realtime w2s positions, adding effects/shaders, etc. Some preview of how it could work (chams & w2s from texture): I tried to do the same thing in version 5517, but it doesn't seem to have much effect. Is it because the wild chicken's model ID is different? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.