So... after 2 days... I figured out how to get the starting address... and here's how:
Code:
const unsigned int MaxItems = 7441; //from 100 to 7540, there are 7441 items
const unsigned int structSize = sizeof(TibiaObj); // size of the structure, right now its 0x4C
const unsigned int* HeapHandlePointer = (const unsigned int*)0x772500; //pointer to the heap handle handle
PROCESS_HEAP_ENTRY phe;
phe.lpData = NULL;
unsigned int HeapEntryStartAddress=0;
while (HeapWalk((HANDLE)*HeapHandlePointer, &phe)) {
if ((unsigned int)phe.cbData == MaxItems*structSize) {
HeapEntryStartAddress = (unsigned int)phe.lpData;
break;
}
}
HeapEntryStartAddress is the starting address we've wanted. :P ENJOY
EDIT: Btw, there are 7441 objects in tibia.dat, not 7951, those other ones they are monsters, effects and distance effects. 7441 objects yes, but they start at 100 and end at 7540. So 7540-100+1=7441. You can find that 7541 in the Tibia.dat, offset 0x4.