Hmmm, offset testing programme returns ZERO to player health :S menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    radarlove's Avatar Contributor
    Reputation
    158
    Join Date
    Jun 2012
    Posts
    205
    Thanks G/R
    2/11
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hmmm, offset testing programme returns ZERO to player health :S

    Hi Guys,

    I got myself a little offset-test programme in Delphi which I have used in the past.
    Today I started using it again, and I'm currently having the problem that player health returns a big 0.
    I'm using memory offsets straight in the code.

    I think the problem is either the descriptor offset (I used 0x4) or the player health offset (I used 0x12).

    Anyone see the problem? (Btw, latest WoW version)
    Known is that: PID/Baseaddress/CurMgrPre/CurMg/PlayerGuid/FirstObject/NextObject/ObjectGuid are correctly loaded from the process

    My simple code:
    Code:
      lPID := StrToInt(edtPID.Text);
      lBaseAddress := Integer(GetModuleBaseAddress(lPID,''));
      lCurMgrPre := ReadInt32(lPID, lBaseAddress + $EBF608);
      lCurMgr := ReadInt32(lPID, lCurMgrPre + $462C);
      lPlayerGUID := ReadUInt64(lPID, lCurMgr + $E8);
      lPlayerName := ReadString(lPID, lBaseAddress + $EBF648);
    
    //FIRST OBJECT CHECK
      lNextObject := ReadCardinal(lPid, lCurMgr + $CC); //$CC = First Object, $34 is Next Object
      lObjectType := ReadShort(lPid, lNextObject + $C);
      lObjectGUID := ReadUInt64(lPid, lNextObject + $28);
    //READ FIRST OBJECT, CHECK IF OBJECT IS PLAYER AND IF OBJECT HAS SAME GUID AS YOUR CHAR
      if (lObjectType = 4) and (lObjectGUID = lPlayerGUID) then  //TRUE = PLAYER FOUND
      begin
          lDescriptor := ReadInt32(lPid, lNextObject + $4);
          lObjectHealth := ReadInt32(lPid, lDescriptor + (($12 + $8)*4));
          Memo.Lines.Add('HEALTH: ' + IntToSTr(lObjectHealth));
      end;
    //END FIRST OBJECT CHECK
    
    //CHECK REST OF OBJECTS
      while (lObjectType <= 7) AND (lObjectType > 0)  do
      begin
        lNextObject := ReadCardinal(lPid, lNextObject + $34);
        lObjectType := ReadShort(lPid, lNextObject + $C);
        lObjectGUID := ReadUInt64(lPid, lNextObject + $28);
        if (lObjectType = 4) and (lObjectGUID = lPlayerGUID) then //TRUE = PLAYER FOUND
        begin
          lDescriptor := ReadInt32(lPid, lNextObject + $4);
          lObjectHealth := ReadInt32(lPid, lDescriptor + (($14 + $8)*4));
          Memo.Lines.Add('HEALTH: ' + IntToSTr(lObjectHealth));
        end;
      end;
    //END CHECK REST OF OBJECTS
    Last edited by radarlove; 01-16-2014 at 02:56 AM.

    Hmmm, offset testing programme returns ZERO to player health :S
  2. #2
    Mr.Sergey's Avatar Contributor
    Reputation
    117
    Join Date
    Apr 2009
    Posts
    201
    Thanks G/R
    6/23
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MyBase = Memory.process.ReadUInt(Memory.BaseAddress + 0xCFA4A4);
    MyHealth = Memory.process.ReadInt(Memory.process.ReadUInt(MyBase + 0x4) + 0x21* 4);

  3. #3
    radarlove's Avatar Contributor
    Reputation
    158
    Join Date
    Jun 2012
    Posts
    205
    Thanks G/R
    2/11
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Mr.Sergey View Post
    MyBase = Memory.process.ReadUInt(Memory.BaseAddress + 0xCFA4A4);
    MyHealth = Memory.process.ReadInt(Memory.process.ReadUInt(MyBase + 0x4) + 0x21* 4);
    Thanks a lot! I was actually going through all the objects, didn't know the playerobject could be accessed right away.
    Can you please tell me what the offsets are called for future use:
    - 0xCFA4A4
    - 0x4
    - 0x21

    Thanks RL

  4. #4
    radarlove's Avatar Contributor
    Reputation
    158
    Join Date
    Jun 2012
    Posts
    205
    Thanks G/R
    2/11
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind the last question, found it in the descriptors
    Health = 0x84,
    Power = 0x88,
    MaxHealth = 0x9C,
    MaxPower = 0xA0,

    Just wondering, why would you multiply 0x21 by 0x4 instead of using 0x84?

    Thanks
    RL

  5. #5
    Mr.Sergey's Avatar Contributor
    Reputation
    117
    Join Date
    Apr 2009
    Posts
    201
    Thanks G/R
    6/23
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    - 0xCFA4A4 - memory address with your player's base
    - 0x4 - descriptor
    - 0x21 - unit health offset

    For get mob health you must use MobBase instead MyBase.

  6. #6
    danwins's Avatar Contributor
    Reputation
    189
    Join Date
    Mar 2013
    Posts
    143
    Thanks G/R
    6/62
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by radarlove View Post
    Never mind the last question, found it in the descriptors
    Health = 0x84,
    Power = 0x88,
    MaxHealth = 0x9C,
    MaxPower = 0xA0,

    Just wondering, why would you multiply 0x21 by 0x4 instead of using 0x84?

    Thanks
    RL
    because theyre dumped from the game binary and all you get is an 'index', each index is of size 0x4 bytes. so youd need to convert each one into its appropriate offset, or you could leave it as-is and do the extra math once.

Similar Threads

  1. [C++][WOW 4.3.4 15595] Read player health
    By semar in forum WoW Memory Editing
    Replies: 3
    Last Post: 06-24-2013, 02:55 PM
  2. [Help Needed] Player Health + Energy
    By Nexilus in forum SWTOR Hacks
    Replies: 6
    Last Post: 08-06-2012, 11:03 PM
  3. [Bot] Getting wrong Value [ Player Health ]
    By Eviin in forum WoW Memory Editing
    Replies: 5
    Last Post: 06-30-2012, 08:09 AM
  4. AutoIt - Read Players Health help
    By D3ADLiN3 in forum WoW Memory Editing
    Replies: 2
    Last Post: 10-11-2011, 12:34 AM
  5. Player health problems
    By 0_00_0 in forum WoW Memory Editing
    Replies: 12
    Last Post: 08-08-2009, 02:30 AM
All times are GMT -5. The time now is 11:45 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search