well, it's such a basic structure that I doubt it has been changed in any patches.
p_base0->p_base1->localplayer->dwHP
base : 0x00a5bfcc playerstruct base offset: 0x20 player HP: 0x474
typedef void __thiscall _DoAction(void *p_localplayer, void *p_dap);
_DoAction * DoAction = (_DoAction *)0x459910;
bool bFly = false;
__tagBase0 *base = (__tagBase0 *)0xa5bfcc;
int MainThread()
{
while(true)
{
if(GetAsyncKeyState(VK_F9) & 1)
{
DOACTIONPARAM dap;
dap.dwAction = (bFly) ? 0x60 : 0x61;
bFly = !bFly;
DoAction(base->Unknown0->p_localplayer,&dap);
}
}
return 0;
}
typedef struct __tagWORLDOBJLISTENTRY // check GetObjByIdFromObjList *** up to date ***
{
__tagWORLDOBJLISTENTRY *next; // 0x00
void *p_obj; // 0x04 pointer to OBJ (player, mob/npc/pet, item/resource)
DWORD dwId; // 0x08
} WORLDOBJLISTENTRY, *LPWORLDOBJLISTENTRY;
typedef struct __tagWORLDOBJLISTHEADER // check GetObjByIdFromObjList *** up to date ***
{
char uk0[0x14]; // 0x00
DWORD dwObjects; // 0x14 number of (valid) list entries (they are scattered over the entire list); invalid list entries == 0
WORLDOBJLISTENTRY **p_listentry; // 0x18 pointer to sequential list of WORLDOBJLISTENTRYs
void *lpEndOfList; // 0x1c either end of list or pointer to another structure
DWORD dwListEntries; // 0x20 the size of the list in number of entries
DWORD dwIdEntryConversion; // 0x24 Id / dwIdEntryConversion = List Entry to start
} WORLDOBJLISTHEADER, *LPWORLDOBJLISTHEADER;
You could see it as an array of pointers.Quote:
Wow, a big thx morpheus. I just need to solve this pointer actually. Well, wanna get the bot to attack, loot. Then I'll work on other functions. I'll take a look and see how you solve my problem. Credits goes to you m8.
I see your hooking endscene with a vtable hook. Nice. I used Azorbix D3Dstarterkit so I detour the whole CreateDevice so I have access to all member functions. But it's a bit too much code for a simple drawn menu.
Good job m8!
Thanks
Although I'm still curious about the void* thing and pointer to pointer (**p_listentry).
Thx morph. Might endup doing like you with my structures cause I just can't seem to make it work. But I liked the idea of a void* that can be casted as mobobj, itemobj or playerobj.Quote:
You could see it as an array of pointers.
**p_listentry == *p_listentry[]
WORLDOBJLISTENTRY **p_listentry; // 0x50 void *p_obj; // 0x04