How would you go about obtaining the name, class, and race of a mob/npc object or player object strictly through memory reading? I have searched the stickies and have not found a solution, unless I'm overlooking something.
How would you go about obtaining the name, class, and race of a mob/npc object or player object strictly through memory reading? I have searched the stickies and have not found a solution, unless I'm overlooking something.
A somewhat old post, where Shynd explains:
From thread: http://www.mmowned.com/forums/wow-me...ut-process.htm
edit: this is just for name.
Yawn. All of this has already been covered. Learn to search.
Thanks, Gamer.
Also, I noticed the offsets in the example were for WoW 2.4.3. I was looking through Cypher's sticky and wasn't sure if the offsets for 3.0.2 were included in his list or not, but I couldn't find them.
Last edited by RawrSnarl; 01-02-2009 at 11:30 AM.
Thanks Cypher.
Getting the name without injection is abit trickier but still doable, there are enough threads on the subject but here's some old AutoIt code (NoMorePasting.com) Credits go to whoever I ripped this code from.
For class and race go check Cypher's sticky... I'm using these values:
Another great source is Bobbysings WoWHack(Base) on GD : WoW Hack(base) - Game Deception - ForumsCode:Factions: 1: Human [Player] 2: Orc [Player] 3: Dwarf [Player] 4: Night Elf [Player] 5: Undead [Player] 6: Tauren [Player] 115: Gnome [Player] 116: Troll [Player] 1610: Blood Elf [Player] 1629: Squidface [Player]
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
Thank you very much!
RawrSnarl, did you ever find the proper offsets for an NPC/game object name?
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
he meant:
Units: [[objectBase + 0x9b0] + 0x03c]
GO's: [[objectBase + 0x1f4] + 0x078]
players: unknown (get through linked lists at 0x011AE3D0 + 0x
but some GO have invalid names:
they're always the same and its reproducable. so i think the address of the name is notCode:OBJECT: 0x21 0xf11002eee900035f [Träger] OBJECT: 0x21 0xf11002f5ca00060b [�a@] OBJECT: 0x0b 0xf120024635000001 [Gerüstwagen] OBJECT: 0x0b 0xf120024636000004 [Gerüstwagen] OBJECT: 0x0b 0xf120024636000002 [Gerüstwagen] OBJECT: 0x0b 0xf120024635000003 [Gerüstwagen] OBJECT: 0x21 0xf11002f13400065e [�a@]
a constant for all GO, but depends on some flags. but i'm not that deep enough into that
stuff to verify that.
Last edited by g3gg0; 01-07-2009 at 10:27 AM.
i now also made a radar view that shows game objects and units etc.
e.g. flares in icecrown (81,69) dont have an name.
but they still are game objects of type 0x05.
Well then I must be doing something wrong. Those are the offsets I had been using.
Perhaps someone can point out my issue? I'll try and include the relevant code below.
Inside loop while reading objects in:
This seems to work for other attributes. For example if I do:Code:DWORD iAddr, infop, nextp; infop = t->info; nextp = (DWORD)t->next; ReadProcessMemory(toWin, (LPVOID)curObj, t, sizeof(object), NULL); iAddr = t->info; t->info = infop; t->next = (object *)nextp; t->wowAddr = curObj; if (t->type == UNIT_TYPE_UNIT) ReadProcessMemory(toWin, (LPVOID)iAddr, (LPVOID)infop, sizeof(unit_info), NULL); else if (t->type == UNIT_TYPE_PLAYER) ReadProcessMemory(toWin, (LPVOID)iAddr, (LPVOID)infop, sizeof(player_info), NULL);
I get the correct health. Now, to display a unit's name, I call the following function:Code:cout << "Unit health: " << dec << ((unit_info *)(t->info))->health << "." << endl;
But the name I get is bogus. I can only assume that the wowAddr var has the wrong address, but I cannot see how.Code:void DisplayUnitName(object *unit) { DWORD nAddr; char name[40]; ReadProcessMemory(toWin, (LPVOID)(unit->wowAddr + 0x9B0), &nAddr, sizeof(nAddr), NULL); ReadProcessMemory(toWin, (LPVOID)(nAddr + 0x03C), &name, sizeof(name), NULL); cout << endl << "Unit 0x" << hex << uppercase << unit->guid << " name: " << name << dec << endl; }
sure you do that on OT_UNIT types and not on OT_PLAYER ?