| | 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 |  | 
10-11-2009
| | Banned | | | Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post Reputation: 6 Level up: 39%, 307 Points needed |  | | | Im have troubles again! Here is what i have: Code: $ptr1 =_BMReadMemory($handle,0x12D4EA8,"ptr")
$ptr2 = _BMReadMemory($handle,$ptr1 + 0x34,"ptr")
$pBase = _BMReadMemory($handle,$ptr2 + 0x24,"ptr")
$hp = _BMReadMemory($handle,$pBase + 0x44,"float")
$name = _BMReadMemory($handle,0x12542D8,"ptr")
Its meant to return my HP and Name to me... but it/i fail.
If someone could point me in the right direction that would be good.
Please note: Im not after handouts. I just want to know whats going wrong so I can fix it. | Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx. 
10-11-2009
| | Site Donator | | | Join Date: Aug 2009
Posts: 32
Nominated 2 Times in 1 Post Reputation: 18 Level up: 91%, 38 Points needed |  | | | public static uint PlayerHealth = 0x17;
public static uint PlayerMaximumHealth = 0x1F;
$hp = _BMReadMemory($handle,$pBase + 0x17,"uint")
$maxhp = _BMReadMemory($handle,$pBase + 0x1F,"uint") | 
10-11-2009
|  | Master Sergeant | | | Join Date: Mar 2009 Location: /
Posts: 84
Reputation: 15 Level up: 51%, 247 Points needed |   | | | To get a units health you need to be looking at the descriptor fields.
hp = readmem((pbase + DescriptorOffset) + HealthOffset);
The DescriptorOffset i think is 0x8.
The HealthOffset is 0x17 * 4 (or just 0x5C if you preffer) | 
10-11-2009
| | Banned | | | Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post Reputation: 6 Level up: 39%, 307 Points needed |  | | Quote:
Originally Posted by nopz public static uint PlayerHealth = 0x17;
public static uint PlayerMaximumHealth = 0x1F;
$hp = _BMReadMemory($handle,$pBase + 0x17,"uint")
$maxhp = _BMReadMemory($handle,$pBase + 0x1F,"uint") | Maybe its just me... but $Hp reads 3300839936 :'( | 
10-11-2009
|  | Contributor | | | Join Date: Jan 2007 Location: Cardiff
Posts: 850
Reputation: 226 Level up: 16%, 933 Points needed |     | | | Remember to read the name as char[] if I'm not completely wrong...? | 
10-11-2009
| | Site Donator | | | Join Date: Aug 2009
Posts: 32
Nominated 2 Times in 1 Post Reputation: 18 Level up: 91%, 38 Points needed |  | | as FenixTX2 said you have to multiply offsets by 4 as you are reading a descriptor field.
so : Code: protected T GetKnownField<T>(object field) where T : struct
{
return (T)ReadObject(ReadUInt(ObjectPointer + 0x08) + (Convert.ToUInt32(field) * 4), typeof(T));
}
try :
_BMReadMemory($handle,_BMReadMemory($handle,$pBase + 0x08, "ptr") + (0x17 * 4), "uint")
if i'm not wrong.
I really prefer the C# syntax as it's more simple to read !
Last edited by nopz; 10-11-2009 at 08:22 PM.
| 
10-11-2009
|  | Knight-Lieutenant | | | Join Date: Apr 2009
Posts: 226
Reputation: 11 Level up: 12%, 442 Points needed |   | | | Its 0x17 * 4 . | 
10-11-2009
| | Banned | | | Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post Reputation: 6 Level up: 39%, 307 Points needed |  | | Quote:
Originally Posted by Thidan Remember to read the name as char[] if I'm not completely wrong...? |
Char[12] if i remember correctly?
but its returns "é | 
10-11-2009
| | Banned | | | Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post Reputation: 6 Level up: 39%, 307 Points needed |  | | Quote:
Originally Posted by nopz as FenixTX2 said you have to multiply offsets by 4 as you are reading a descriptor field.
so : Code: protected T GetKnownField<T>(object field) where T : struct
{
return (T)ReadObject(ReadUInt(ObjectPointer + 0x08) + (Convert.ToUInt32(field) * 4), typeof(T));
}
try :
_BMReadMemory($handle,_BMReadMemory($handle,$pBase + 0x08, "ptr") + (0x17 * 4), "uint")
if i'm not wrong.
I really prefer the C# syntax as it's more simple to read ! | that worked perfectly | 
10-11-2009
| | Site Donator | | | Join Date: Aug 2009
Posts: 32
Nominated 2 Times in 1 Post Reputation: 18 Level up: 91%, 38 Points needed |  | | | You're welcome.
Follow the other message to resolve your name problem ;=)
also do not forget to +rep the people who took the time to help you :=)
Last edited by nopz; 10-11-2009 at 08:31 PM.
| 
10-11-2009
| | Banned | | | Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post Reputation: 6 Level up: 39%, 307 Points needed |  | | Quote:
Originally Posted by nopz You're welcome.
Follow the other message to resolve your name problem ;=) | ill try | 
10-11-2009
| | Banned | | | Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post Reputation: 6 Level up: 39%, 307 Points needed |  | | | Will my name starting with É have anything to do with my name being returned as "é? | 
10-12-2009
| | Banned | | | Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post Reputation: 6 Level up: 39%, 307 Points needed |  | | | Can anyone help me again char[12] - I think thats correct, returns "é | 
10-12-2009
|  | Knight-Lieutenant | | | Join Date: Apr 2009
Posts: 226
Reputation: 11 Level up: 12%, 442 Points needed |   | | Quote:
Originally Posted by ashleyww Can anyone help me again char[12] - I think thats correct, returns "é | Oh come on....please...even if you copy&paste your stuff, think at least for one second. |  |
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 04:22 PM. |