OK, I got my program to start working. Instead of parsing through all of the objects through TLS in a thread, i only have it parse them upto my localGUID and my target. The only problem is i have no way to filter out if the target isnt a target, if i missclick, i get sent out into the middle of...nowhere. It sucks. Any ideas on how i could verify that its a valid GUID?
EDIT:
Here's my code for my function that gets executed when you hit 7........
Code:
void keyPressed(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
string buffer = tbKbdHook.Text;
char keyChar = buffer.ToCharArray()[0];
if(e.KeyChar == '7')
{
getObjects();
}
}
void getObjects()
{
curObj = ReadFourBytes(hWow, (long)(s_curMgr + 0xAC));
nextObj = curObj;
while(curObj != 0)
{
UInt64 cGUID = ReadEightBytes(hWow, (long)(curObj + 0x30));
if(cGUID == localGUID)
{
localObj = curObj;
objFieldPtr = ReadFourBytes(hWow, (long)(localObj + 0x8));
labelObjectFPtr.Text = objFieldPtr.ToString();
targetGUID = ReadEightBytes(hWow, (long)(objFieldPtr + 0x40));
labelTGUID.Text = targetGUID.ToString();
}
if(cGUID == targetGUID && localGUID != 0)
{
target.X = Memory.ReadFloat(hWow, (curObj + 0xBF0), false);
target.Y = Memory.ReadFloat(hWow, (curObj + 0xBF4), false);
target.Z = Memory.ReadFloat(hWow, (curObj + 0xBF8), false);
Memory.WriteMemory(hWow, (long)(localObj + 0xBF0), (float)(target.X));
Memory.WriteMemory(hWow, (long)(localObj + 0xBF4), (float)(target.Y));
Memory.WriteMemory(hWow, (long)(localObj + 0xBF8), (float)(target.Z + 5.0F));
return;
}
nextObj = ReadFourBytes(hWow, (long)(curObj + 0x3C));
if (nextObj == curObj)
break;
else
curObj = nextObj;
}
}