Dynamic AOB signature possible?

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
Sevael
Expert Cheater
Expert Cheater
Posts: 68
Joined: Sun Oct 15, 2017 6:12 am
Reputation: 38

Dynamic AOB signature possible?

Post by Sevael »

Is it possible to pull two bytes from a specific (static) address and input those into the middle of an AOB signature and then scan for that signature?

I am trying to make an inventory editor table work via AOB. The problem is that the only truly unique array of bytes in the entire inventory section of memory contains the individual character ID in the middle of it; if I use wildcards for the character ID, there will be six results (six characters) and the game regularly shuffles the order of the characters so the individual inventory the scan finds will be random. I want it to find the currently active character's inventory.

There is a static address that houses the two bytes that identify which character is currently active. Ideally, I would like to take those two bytes and input them into the AOB signature so that the AOB scan will land on the proper character's inventory every time no matter what random order they are in.

Is there any way to do this? LUA script, perhaps? Unfortunately, I know absolutely nothing about LUA. I'm still brand new to AOB scanning.

For reference, the static address that contains the current character ID is 281EF75C8, and the AOB signature I am using (the only array that is truly unique) is:

Code: Select all

63 8B 00 00 00 00 00 00 01 01 09 00 ?? ?? 00 00
...where the ?? ?? is the individual character ID from address 281EF75C8.

The following is my AA script (which only finds whichever inventory comes up first):

Code: Select all

[ENABLE]
aobscanregion(gearAOB,140000000,1D0000000,63 8B 00 00 00 00 00 00 01 01 09 00 ?? ?? 00 00)
label(_gearAOB)
registersymbol(_gearAOB)
label(_gearBase)
registersymbol(_gearBase)

gearAOB:
_gearAOB:

gearAOB+10:
_gearBase:

[DISABLE]
unregistersymbol(_gearAOB)
unregistersymbol(_gearBase)

User avatar
Cake-san
Table Makers
Table Makers
Posts: 433
Joined: Sun Mar 26, 2017 4:32 pm
Reputation: 799

Re: Dynamic AOB signature possible?

Post by Cake-san »

Code: Select all

{$lua}
return "aobscanregion(gearAOB,140000000,1D0000000,63 8B 00 00 00 00 00 00 01 01 09 00"..(" %X %X "):format(readBytes(0x281EF75C8,2)).."00 00)"
{$asm}

Sevael
Expert Cheater
Expert Cheater
Posts: 68
Joined: Sun Oct 15, 2017 6:12 am
Reputation: 38

Re: Dynamic AOB signature possible?

Post by Sevael »

That worked. Thanks very much!!

Post Reply

Who is online

Users browsing this forum: AhrefsBot