| View previous topic :: View next topic |
| Author |
Message |
louden How do I cheat?
Reputation: 0
Joined: 04 Sep 2013 Posts: 3
|
Posted: Wed Sep 04, 2013 1:59 am Post subject: Is this possible in cheat engine, maybe via scripting? |
|
|
I have been using cheat engine to find single values successfully but now I need to do a more complex search.
I'm trying to find enemy player coordinates in a game, they run around randomly, I can't pause the game and I can't use a friend to test things. The best way I've come up with is to do scan a range when I see an enemy in an area I know the coordinates to (for example I can see he's in an area I know to span 0 to 50 on the x axis) then rescan when they are in a different area.
(BTW if anyone knows a better way to pinpoint other players in a game please let me know!)
Anyway I need a more robust method so I'm wondering if cheat engine can do something like this: Is it possible to scan for a range but only keep results that have a second defined range thats stored 4 bytes from the original?
So we know XYZ coords are stored next to each other, I want to scan for 2 values at once but the second value has to be stored 4 bytes away from the first, so Instead of just searching one axis I can search two.
Pseudo Code Example:
| Code: |
xCoordinateRange = 0 to 50
zCoordinateRange = 200 to 450
results = ScanFor(xCoordinateRange)
for(all results found){
if(results.address + 4bytes == zCoordinateRange)
Bingo!
}
|
Thanks!
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Wed Sep 04, 2013 2:29 am Post subject: |
|
|
| It is much easier to search for your own coordinates. You will typically find that one or more instructions are accessing all coordinates; human and computer.
|
|
| Back to top |
|
 |
louden How do I cheat?
Reputation: 0
Joined: 04 Sep 2013 Posts: 3
|
Posted: Wed Sep 04, 2013 2:48 am Post subject: |
|
|
| I've found my own coordinates previously. They are written in memory in maybe 40 different locations. Should I try "find out what writes to this address" on some, then find the relevant instruction and then what? How to I go from the instruction to a possible enemy coordinate in mem? I also use ollydbg a little if that helps.
|
|
| Back to top |
|
 |
TsTg Master Cheater
Reputation: 5
Joined: 12 Dec 2012 Posts: 340 Location: Somewhere....
|
Posted: Wed Sep 04, 2013 4:06 am Post subject: |
|
|
| louden wrote: | | then find the relevant instruction and then what? How to I go from the instruction to a possible enemy coordinate in mem? |
when you get the assembly instruction accessing your addresses, go to the memory viewer and right click on that instruction and select 'find out what this instruction accesses', this should get you all addresses.
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Wed Sep 04, 2013 4:15 am Post subject: |
|
|
| Look for instructions that access one of your coordinate addresses. When you find a suitable instruction, right-click the instruction in memory viewer to see what addresses it accesses. At least one of the instructions should populate a list for you that will contain all X, Y or Z coordinates (depending on which one you're looking at), for all human/computer players. You can write a script to manipulate those coordinates without needing to know their addresses, simply by injecting code to manipulate that instruction etc.
|
|
| Back to top |
|
 |
louden How do I cheat?
Reputation: 0
Joined: 04 Sep 2013 Posts: 3
|
Posted: Wed Sep 04, 2013 9:26 am Post subject: |
|
|
| Ok, I've done this and thanks, I'm getting lots of values that look like coordinates, the bad news is I have no idea how to start making sense of them, which ones belong to which player and what axis they are. Any ideas what your next step would be with a list of random looking coordinates (about 20 to 30 of them for maybe 8 players)
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Wed Sep 04, 2013 9:57 am Post subject: |
|
|
That depends on what you're wanting to do.
If you searched for your Y axis, looked to see which instructions accessed that address, then looked to see which addresses that instruction accesses, then you can be sure that the values that you are seeing relate to the Y axis. This is true for most games...but not always. I usually find the coordinate that relates to elevation first, because it's usually the easiest to find. Once found, I manually add the other two coordinates by offsetting the address by 4 bytes, either way. You will have to use common sense here, and you may even have to test the results by freezing them. Once all of the coordinate addresses are found and verified, I always use the coordinate with the smallest address for my injection point. So, as an example, here are our 3 coordinate addresses (axis order may be different):
| Code: | Z AXIS - 002E41F0 //This is the address that I use when finding instructions that 'access'
X AXIS - 002E41F4
Y AXIS - 002E41F8 |
Typically, the instruction offsets will follow a similar, 4 byte pattern. This is important to know when you are writing your script.
You can dissect data structures to identify player ID, human vs. computer etc.
None of this matters right now unless you know what you are wanting to do. If this game is an online game, you may be wasting your time.
Decide what you want to do and I can give you a more definitive answer.
|
|
| Back to top |
|
 |
|