 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
tdr2012 Cheater
Reputation: 0
Joined: 02 Nov 2014 Posts: 26
|
Posted: Tue Feb 23, 2016 7:41 pm Post subject: Couple of questions about AOBScan |
|
|
1) Today, I was trying to use AOBScan to find an address that modifies the score value in the offline game srb2. This is the small script I am using in the Lua Engine to store and print the found address to the screen.
| Code: | aobList=AOBScan("8B 40 78 50 68")
address1=aobList[0]
print(address1) |
Running this gives me the right address that affects score, which is:
However, I would like to be able to subtract and add offsets from 0043CADB, like this:
| Code: | aobList=AOBScan("8B 40 78 50 68")
address1=aobList[0]
unregisterSymbol("address2")
registerSymbol("address2", address1-8)
unregisterSymbol("address3")
registerSymbol("address3", address1+1C)
print(address1)
print(address2)
print(address3)
|
However, when I have the script like that, I get the following error:
| Code: |
Script Error:[string "aobList=AOBScan("8B 40 78 50 68")..."]:8: malformed number near '1C' |
Is there a way to get the Lua Engine and Table scripts to accept offsets, such as 1C, to add to the found address1 and register a new symbol that's based on the address found by the math of address1+1C or address-8?
2) When I use many AOBScan operations, like 10 varying aob scan sets, sometimes it takes a while to locate all the addresses. I noticed there is an aobscanmodule function, but the addresses that hold the value I want to change do not exist in the game's module. In addition, sometimes the AOBScan operation uses a lot of CPU time when I run the script of 10 AOBScans.
Is there a faster way to be able to locate the aobs, if I can't use aobscanmodule? Also, how can I control the CPU usage from running a script with 10 AOBScan operations for different addresses?
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Feb 23, 2016 8:13 pm Post subject: |
|
|
The error you posted is because that number is not in hexadecimal notation.
| Code: | | registerSymbol("address3", address1+0x1C) |
After you fix that, you'll probably have an error about performing arithmetic on a string.
| Code: | | registerSymbol("address3", tonumber(address1,16)+0x1C) |
Personally, I would use AA scripts instead. AA should also help with performance.
| Code: | [ENABLE]
aobscan(address1,8B 40 78 50 68)
label(address2)
label(address3)
address1-8:
address2:
address1+1C:
address3:
registersymbol(address1)
registersymbol(address2)
registersymbol(address3)
[DISABLE]
unregistersymbol(address1)
unregistersymbol(address2)
unregistersymbol(address3) |
|
|
| 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
|
|