WoW Memory Editing WoW Memory Editing for learning purposes only.
This section is more advanced than others on MMOwned Read the section specific rules, infractions will be given out if u break them! That is including the expectations! - If you don't meet them then don't post
09-28-2009
New User
Join Date: Sep 2009
Posts: 15
Reputation: 1
Level up: 35%, 261 Points needed
AutoIt UNIT_FIELD_HEALTH reading
I am currently trying to get AutoIt to read my character's health, and I am getting a value of 0x00000000. I am using Robske's post here
[Only registered and activated users can see links. ] as a guideline.
Here is what I have:
Code:
$pBasePointer01 = mem_read(0x0103EDA8,$WoWProcess,'ptr')
$pBasePointer02 = mem_read($pBasePointer01 + 0x34,$WoWProcess,'ptr')
$pBasePointer = mem_read($pBasePointer02 + 0x24,$WoWProcess,'ptr')
$pStorage = mem_read($pBasePointer + 0x8,$WoWProcess,'ptr')
$Health = mem_read($pStorage + 0x17*4,$WoWProcess,'ptr')
I am sure that there is something incredibly simple that I am doing wrong...
Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx.
09-29-2009
Contributor
Join Date: Jan 2008
Posts: 758
Reputation: 146
Level up: 33%, 610 Points needed
you need the offsets for patch 3.2 not 3.1 =.=
__________________
1-80 Quest Bot Cheapest reseller
09-29-2009
New User
Join Date: Sep 2009
Posts: 15
Reputation: 1
Level up: 35%, 261 Points needed
I am using the offset from 3.2.2 for the first part and I was under the (perhaps false) impression, that the others were the same.
0x0103EDA8 is the correct address of struct sUnitFields.
09-29-2009
Contributor
Join Date: Jan 2008
Posts: 758
Reputation: 146
Level up: 33%, 610 Points needed
my bad xD
fillz
__________________
1-80 Quest Bot Cheapest reseller
09-29-2009
New User
Join Date: Sep 2009
Posts: 15
Reputation: 1
Level up: 35%, 261 Points needed
No worries, I understand the urge to correct nubs with the simplest answer, as it is often the correct one.
Edit:
Do I need to do something with the $Health pointer? I am not sure about that though, since the value of it is 0x00000000 (NULL I'm guessing). So, I am betting my offsets are wrong somewhere in there.
Last edited by telekenetix; 09-29-2009 at 12:32 AM .
Reason: Adding to question without new post.
09-29-2009
Contributor
Join Date: Sep 2006
Location: Jaedenar O.o
Posts: 569
Reputation: 162
Level up: 58%, 336 Points needed
The offset to sUnitFields is actually the offset where it's allocated (iirc).
You need the static playerBase offset.
I think FearAndLawyering posted it.
[Only registered and activated users can see links. ]
__________________
http://www.main-dev.com/
I was here. ~Dragon[Sky] I was here too. ~Kuiren
Last edited by MaiN; 09-29-2009 at 02:57 AM .
09-29-2009
New User
Join Date: Sep 2009
Posts: 15
Reputation: 1
Level up: 35%, 261 Points needed
Quote:
The offset to sUnitFields is actually the offset where it's allocated (iirc).
You need the static playerBase offset.
So, when I am doing my first read, I should use the offset for the playerBase?
That is, it would look like
Code:
$pBasePointer01 = mem_read(0x12D4EA8,$WoWProcess,'ptr') ; <----- Static Player offset
$pBasePointer02 = mem_read($pBasePointer01 + 0x34,$WoWProcess,'ptr')
$pBasePointer = mem_read($pBasePointer02 + 0x24,$WoWProcess,'ptr')
$pStorage = mem_read($pBasePointer + 0x8,$WoWProcess,'ptr')
$Health = mem_read($pStorage + 0x17*4,$WoWProcess,'ptr')
Is that right?
Last edited by telekenetix; 09-29-2009 at 03:01 PM .
09-29-2009
Contributor
Join Date: Sep 2006
Location: Jaedenar O.o
Posts: 569
Reputation: 162
Level up: 58%, 336 Points needed
That seems right.
__________________
http://www.main-dev.com/
I was here. ~Dragon[Sky] I was here too. ~Kuiren
09-29-2009
New User
Join Date: Sep 2009
Posts: 15
Reputation: 1
Level up: 35%, 261 Points needed
Thanks MaiN that worked fine.
10-08-2009
New User
Join Date: Aug 2009
Posts: 7
Reputation: 1
Level up: 11%, 359 Points needed
Port to c#
Code:
IntPtr pBasePointer01 = (IntPtr)SMemory.ReadUInt((IntPtr)WoWProcess.Handle, 0x12D4EA8);
IntPtr pBasePointer02 = (IntPtr)SMemory.ReadUInt((IntPtr)WoWProcess.Handle, ((uint)pBasePointer01 + 0x34));
IntPtr pBasePointer = (IntPtr)SMemory.ReadUInt((IntPtr)WoWProcess.Handle, ((uint)pBasePointer02 + 0x24));
IntPtr pStorage = (IntPtr)SMemory.ReadUInt((IntPtr)WoWProcess.Handle, ((uint)pBasePointer + 0x8));
int health = (int)SMemory.ReadInt((IntPtr)WoWProcess.Handle, ((uint)pStorage + 0x17 * 4));
Probably not the best code, but it works, using SMemory class from Blackmagic library
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -4. The time now is 09:17 PM .