Hey all,
Just thought id post this code that WORKS (*looks shocked and amazed*)
Thanks to everyone who helped me get to this point!
first of all the code: (sorry if its a bit poorly coded.. but iv only been programming for a few weeks)
Uses BlackMagic DLL by Shynd also used his example off his site for going though all the objects. So special thanks there!
Also thanks to: Robske007a who gave me alot of help!
Code:
BlackMagic wow = new BlackMagic();
if (wow.OpenProcessAndThread(SProcess.GetProcessFromProcessName("Wow")))
{
uint playerBase = wow.ReadUInt(wow.ReadUInt(wow.ReadUInt(0x0127F13C) + 0x30) + 0x28); // Your toon
uint s_curMgr = wow.ReadUInt(wow.ReadUInt(0x11CB310) + 0x28A4); // The object manager
uint curObj = wow.ReadUInt(s_curMgr + 0xAC); // The first object in the object manager
uint nextObj = 0;
while (curObj != 0 && (curObj & 1) == 0)
{
UInt64 type = wow.ReadUInt(curObj + 0x14);
string oName = wow.ReadASCIIString(wow.ReadUInt(wow.ReadUInt(curObj+0x1F4) +0x078), 30);
float oX = wow.ReadFloat(wow.ReadUInt(curObj + 0x08) + 0x40); //
float oY = wow.ReadFloat(wow.ReadUInt(curObj + 0x08) + 0x44); // } OBJECT LOCATION
float oZ = wow.ReadFloat(wow.ReadUInt(curObj + 0x08) + 0x48); //
float myX = wow.ReadFloat(playerBase + 0x7D0); //
float myY = wow.ReadFloat(playerBase + 0x7D4); // } YOUR LOCATION
float myZ = wow.ReadFloat(playerBase + 0x7D8); //
if (type == 5 && oName.IndexOf("Vein") > 0)
{
Console.WriteLine("Object Name: {0}", oName);
Console.WriteLine("Item Location: X=({0}) Y=({1}) Z=({2})",oX ,oY ,oZ);
Console.WriteLine("Your Location: X=({0}) Y=({1}) Z=({2})", myX, myY, myZ);
}
nextObj = wow.ReadUInt(curObj + 0x3C); // Sets nextObj to the next object in the manager.
if (nextObj == curObj) break;
else curObj = nextObj;
}
}
else
{
Console.WriteLine("World of Warcraft could not be opened for read/write.");
}
Console.ReadLine();
}
What it does.. Prints out all game objects with the word "Vein" in them with there x, y, z's... Also prints out your own location
any questions please ask!
I did have a question tho......
AT the moment it only lists items that are already showing up in my mini map.... I thought i read somewhere that the "bubble" (the objects loaded around your toon) was bigger than the mini map size.... Is there any way to see a larger area?