 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
crumbleybumbley How do I cheat?
Reputation: 0
Joined: 28 Dec 2014 Posts: 8
|
Posted: Sun Dec 28, 2014 8:09 pm Post subject: Using script for multiple AoB results |
|
|
So I am scanning a game and using an AoB I find the beginning of the structure for all the actors in the game I want at once (let's say there are 10 results, one for each actor). I want to use all these results, and make a table of addresses for each one of them. Basically I know the offset from each beginning of the structure to each value's address I want, so I need a script to take each AoB result and populate the table with the given offsets.
I am very new to this, but I believe it should be possible with a Lua script. Any help would be appreciated. I also apologize in advance if I'm using the wrong terms for this stuff.
EDIT: In case it helps, I don't need any help in terms of modifying the values once I find them. All I want is to simply have an auto populated list of the addresses for each AoB result and the offsets I would apply to each.
To be more clear, here is what I am asking:
I scan for an AoB: AA BB CC ??. This gives me 10 results, like this:
AA BB CC 01
AA BB CC 02
AA BB CC 03
AA BB CC 04
AA BB CC 05
AA BB CC 06
AA BB CC 07
AA BB CC 08
AA BB CC 09
AA BB CC 10
(I know why this doesn't make complete sense in this example. It also is never as simple as this, the wildcards seem fairly random so I can't just add each one individually ahead of time. Long story short, I use my AoB with wildcards, I get the 10 results).
I want all 10 of those results. They are the 10 actors in the game I am concerned with. What I want to have happen is something like this in my table (14b and 4ac are offsets I have found from the 10 aobs I find to the addresses of values i actually care about):
AA BB CC 01
AA BB CC 01 + 14b
AA BB CC 01 + 4ac
AA BB CC 02
AA BB CC 02 + 14b
AA BB CC 02 + 4ac
...(all other AoB results 3-9)
AA BB CC 10
AA BB CC 10 + 14b
AA BB CC 10 + 4ac
(of course when I say AA BB CC ?? in that table I mean the addresses I found with that AoB)
So is there a way to have a script do this automatically after I search for the AoB? It would make sense that I should, given that I know the AoB I need to get 10 results and I know the offsets I want to add to each result once I get them.
Last edited by crumbleybumbley on Mon Dec 29, 2014 7:17 pm; edited 3 times in total |
|
Back to top |
|
 |
Gniarf Grandmaster Cheater Supreme
Reputation: 43
Joined: 12 Mar 2012 Posts: 1285
|
Posted: Mon Dec 29, 2014 2:36 am Post subject: |
|
|
Afaik the simplest way is to use the "grouped" value type. Convert your aob in decimal, and enter each byte value one by one in the "generate groupscan command" wizard, finish with skip nr of bytes and the value type for the data you want. Untick the "add" checkbox for all lines that correspond to your aob or the offset, and do a simple scan with that. Normally when you add results to your cheat table, only the useful data will be added to your table.
Example:
Let's say that my aob is 11 22 33 44 (in hex) = 17 34 51 68 (in decimal) and that I'm only interested in a float located 12 bytes after the beginning of this signature.
My group scan window will look like:
byte 17 [ ] Add
byte 34 [ ] Add
byte 51 [ ] Add
byte 68 [ ] Add
skip 08 [ ] Add <-8 here =12 (offset) - 4 (length of the aob in bytes)
float * [x] Add
_________________
DO NOT PM me if you want help on making/fixing/using a hack. |
|
Back to top |
|
 |
Mark Danielle Advanced Cheater
Reputation: 0
Joined: 22 Aug 2012 Posts: 97
|
Posted: Tue Dec 30, 2014 6:47 am Post subject: |
|
|
Nothing ever gets done automatically, you have to program it to do what you want.
That being said, I think something like this is what you want to do:
Code: | local addresses = {0x00000001, 0x00000002, 0x00000003} -- replace with aobscan results...
local function create_actor(address)
local actor = {}
actor.base_address = address
function actor:update()
self.hp = readInteger(self.base_address + 0x8) -- replace offsets
self.hp_max = readInteger(self.base_address + 0xc) -- replace offsets
end
return actor
end
-- populate actors table to contain all actor classes
local actors = {}
for i = 1, #addresses do
actors[#actors+1] = create_actor(addresses[i])
end
-- update the actors' values
for i = 1, #actors do
actors[i]:update()
end
print("Actor 1 has " .. actors[1].hp .. " health and " .. actors[1].hp_max .. " max health.") |
Change the update function to contain your real offsets and if everything is set up correctly, you can just call update and the variables will get updated.
I made a simplified example so it is easier to understand, but you would not want to access the hp and max_hp directly from the class (use getter/setter functions etc.).
If there are any syntax errors then you will have to fix them, it's untested code.
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|