Jump to content

Adding Hexidecimal Value's together


Archman
 Share

Recommended Posts

Right i have been writing a bot that reads a memory location of the program bot is for to get t he health value of the mob you are attacking, so that when the mob is dead it automatically gets next mob.

Now the Memory Address that the mob health is stored changes from PC to PC but i have discovered a static pointer thats value when added to, gives the correct location of the Mob health Address.

So the address i want to read is 0x2273207C, say the value it returns is 0CB40E54 if i add 0000177C to this i get 0CB425D0 which is the address that when read gives me the Mobs health.

So how do i read the location and add 000177C to its Value in AutoIt?

$Process = 'test.exe'
$PID = ProcessExists($Process)
$Address = 0x2273207C
$OpenProcess = _MemOpen(0x38, False, $PID)
$moblocation = _MemRead($OpenProcess, $Address, 4) ; So this would return 0CB40E54
Link to comment
Share on other sites

  • Moderators

$moblocation = "0CB40E54"
$Address2 = Int('0x' & $moblocation) + 0x000177C
MsgBox(0, '', '0x' & Hex($Address2, 8))

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...