Blue Eye Macro
http://blueeye-macro.com/

How to locate base pointers in memory using Cheat Engine
http://blueeye-macro.com/viewtopic.php?f=123&t=743
Page 1 of 7

Author:  Gigus [ Sun Nov 21, 2010 10:53 am ]
Post subject:  How to locate base pointers in memory using Cheat Engine

In this tutorial Ill go through the process of locating base pointers in memory to get the MP and HP of my character in a game, to use inside Blue Eye.

Why would you want to read values from memory?
Well, lets say you want to create a macro that will keep an eye on your HP to either give you a warning, or perhaps trigger a spell to heal yourself while your AFK, or perhaps your creating a complete hunting bot, which will obviously need a way of knowing whats going on inside the game.

In these cases it makes sense to read the information directly from memory, as an alternative to analyzing the colors / patterns of pixels on the screen.

Whats the benefits from reading it from memory instead of using color operations to detect whats going on?
Reading from memory is a lot faster than analyzing screen colors, also it will still work even if the game is minimized or behind other windows.

What does "base pointer" mean, and why do I need it?
When you locate a memory address using cheat engine, e.g. for your HP, then the address of this value will most likely change every time you restart the game. This is caused by the way windows allocates memory to every process that is started.

A base pointer is the pointer in the process, which points to the correct address in memory always, meaning instead of saving the address in memory, we need to find and save the pointer, which holds a value pointing to the correct address, even after the game is restarted.

Some pointers point to other pointers, which then point to the actual address.
In cheat engine base pointers are displayed in Green text.

Please see the following video, where I show and describe every step of the process.

YouTube: http://www.youtube.com/watch?v=ZZw9CrGUXAE

After watching the movie, in case you still wonder how I knew the offsets for the Max MP and Max HP addresses, it was simply a matter of calculating them, since browsing the memory region showed that these addresses was located just a few blocks away, all I had to do was add 4 hexadecimals per block.

Hexadecimals: 1 2 3 4 5 6 7 8 9 A B C D E F

So for instance knowing that my HP is stored at the address: 1A405F78, I can can tell from browsing the memory region that my MP is stored in the very next block, since the sizes of each of these blocks are set to 4, I only need to add 4 to the offset.

Now the offset of my HP was 278, and 278 + 4 = 27C.
(278 + 1 = 279, +1 = 27A, +1 = 27B, +1 = 27C)

Good luck searching your memory for useful information!

And enjoy :)

Author:  bentaso [ Sun Nov 21, 2010 11:59 am ]
Post subject:  Re: How to locate base pointers in memory using Cheat Engine

Thank you very much for creating this walk through video.

I was watching other's video in youtube and sufferred a 2 days headache on searching the base pointer :lol:

Your video show it in great detail.

Time to play BE with CE now on the MMOs out there LOL :lol:

Author:  Gigus [ Sun Nov 21, 2010 12:08 pm ]
Post subject:  Re: How to locate base pointers in memory using Cheat Engine

Your welcome :)

I'm glad you found it useful.

And good luck with the MMO bots ;)

Author:  Martin [ Mon Nov 22, 2010 1:14 pm ]
Post subject:  Re: How to locate base pointers in memory using Cheat Engine

wow that is an amazing tutorial! It is really useful and it will help me a lot in the future.

Thank you very much!

Author:  Syrifina [ Wed Nov 24, 2010 12:22 am ]
Post subject:  Re: How to locate base pointers in memory using Cheat Engine

How could I find something like a buff (that's on a 10 minute timer)? I noticed when looking for the HP you started in CE with a value, so would something like a buff have a value? What's a good starting place for something like that?

Author:  Gigus [ Wed Nov 24, 2010 8:42 am ]
Post subject:  Re: How to locate base pointers in memory using Cheat Engine

You can probably locate the countdown value in memory,
First activate the buf, and do the initial search in cheat engine, specifying "unknown initial value".
afters its done, select "decreased value" and search again, and again and again etc. as the value should keep decreasing in the game, as the count down gets closer to 0.

Now reactivate the buff to reset the countdown back to full, and now search for "value has increased".

This should slowly but surely narrow down the results, until your left with just the address holding the value of the count down of remaining milliseconds or seconds of the current buf.

Hope this helps?
Good luck!

Author:  Syrifina [ Wed Nov 24, 2010 9:46 pm ]
Post subject:  Re: How to locate base pointers in memory using Cheat Engine

Well, it sorta worked but left me more confused now than before, lol. I found that buffs use an independant countdown clock and found the memory address for that. I was able to find the address for one buff, but later found out that that memory address changes to monitor the last buff applied. I thought that it would be easy to find the rest after that, but the actual status of the other buffs don't seem to be stored in the memory; it must be some formula attached to other values in memory. For example:
1. Apply buff1 which lasts for 10 min; everythings fine and can watch it countdown in memory as minutes go by (say it's at 9min now)
2. Apply buff2 which lasts for 15 min; now same (green) memory address monitors this buff and counts down with it...doesn't seem to be tracking buff1 now
3. Let's say buff1 is now at 8min, narrowing down memory search for this value no longer appears in CE; nothing seems to match it
4. If you reapply buff1, same green memory address switches to monitor this one now
Anyway, I looked to see which other memory addresses were accessing that green one, but the only thing useful it pulls up is one that has a value that changes back and forth between two 4 digit numbers (the same 2 tho, not like a timer/countdown); CE doesn't show anything else accessing the green memory address other than the last buff applied or the current values of the other buffs.

Any ideas on what is happening and/or how to find the other buffs? Hopefully I'm just confused and there's a really easy explaination for this. I don't have a programming background so (as you can tell) I don't know a lot of what is happening behind the scenes here.

*on a side note concerning the other post about waypoints, I was able to find the address for the Y cordinates in game and make a macro to monitor where you were and move to specific Y coordinates as waypoints...but ran into the same problem above with the X coordinate. Can't find any memory addresses for the X coordinate; I must be missing something.

Author:  Gigus [ Wed Nov 24, 2010 10:19 pm ]
Post subject:  Re: How to locate base pointers in memory using Cheat Engine

For the x coordinate, just go with the Y coordinate, and then browse that memory region, it will probably also contain the X coordinate.

For the buffs, did you try to see if there was a value switching between 0 and 1 depending on whether or not a given buff is on or off?

Author:  junecomia30 [ Wed Mar 30, 2011 11:54 am ]
Post subject:  Re: How to locate base pointers in memory using Cheat Engine

Can I also use this in ragnarok?

Author:  Gigus [ Wed Mar 30, 2011 12:01 pm ]
Post subject:  Re: How to locate base pointers in memory using Cheat Engine

junecomia30 wrote:
Can I also use this in ragnarok?



This approach can be used in pretty much any game / application.

Edit: Some games using GameGuard might detect Cheat Engine though, making it hard to find the pointers in memory without being detected.

Page 1 of 7 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/