View previous topic :: View next topic |
Author |
Message |
zxuiji Advanced Cheater
Reputation: 1
Joined: 26 Sep 2016 Posts: 70
|
Posted: Sat Jan 06, 2018 12:54 pm Post subject: I'm a newb, help me turn a aobscan into a label ptr pls |
|
|
I managed to get as far as this:
aobscanmodule(zHPWrAOB,LRFF13.exe,8B 80 98 0C 00 00 E9)
Which is giving me errors of a malformed number for some reason, by
modifying a copy of some code from an existing table I downloaded, I'm fine with finding addresses for raw values but I wanna leave that amateur phase and enter the semi-expert phase (i.e. able to create/use pointers to auto fill inventory etc but not writing assembly stage)
_________________
Those who do not trust in christ to save them from their sins will only experience hell when their soul is released from it's earthly vessel. |
|
Back to top |
|
 |
TheyCallMeTim13 Wiki Contributor
Reputation: 51
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sat Jan 06, 2018 1:41 pm Post subject: |
|
|
If this is Auto Assembler code then this is fine, but if you are using this as Lua code then it's a little different. First off the assembler will read all numbers as hex by default, but Lua reads all numbers as a decimal. Second the Lua "AOBScan" scans the process and returns a "StringList" object containing all the results (not just the first). It takes a Lua sting object or bytes.
Code: | local results = AOBScan('4B 5F 68 12 FE 36') |
Code: | local results = AOBScan('4B 5F 68 12 FE 36', '+W-C') |
Code: | local results = AOBScan('E8 ** ** ** ** E8', '+X-C-W') |
Code: | local results = AOBScan(0x4B, 0x5F, 0x68, 0x12, 0xFE, 0x36) |
AOBScan
And if you wish to stay a way from assembler then the "celua.txt" file in your Cheat Engine folder is a good place to start.
Or the Wiki.
Lua
_________________
|
|
Back to top |
|
 |
zxuiji Advanced Cheater
Reputation: 1
Joined: 26 Sep 2016 Posts: 70
|
Posted: Sat Jan 06, 2018 3:32 pm Post subject: |
|
|
Wow didn't expect such a fast reply, anyways took what you said into account, did some searching to get other information I needed then hit another stumbling block which is the attached PNG, here's the entirety of my code:
[code]
function zAOBAddr( T, ADDSUB )
if ( (T == nil) or (T.Count == 0) ) then
return '[0]' ADDSUB
end
return '[' T[0] ']' ADDSUB
end
local zHP_AOB = AOBScan("8B 80 98 0C 00 00 E9")
local zFoes_AOB = AOBScan("A0 A0 00 00 A1 2F 00 00")
local zHP = zAOBAddr( zHP_AOB, '-4' )
local zFoes = zAOBAddr( zFoes_AOB, '' )
local pHP = readInteger(zHP)
local rHP = '[' pHP ']+9C8'
[/code]
Problem is in the function but I figured that I probably made mistakes further down the line as well and rather than make an extra post for them later I'd rather just get the help simultaneously if needed
[b]Edit:[/b] Popping down to KFC so don't feel rushed
[b]Edit 2:[/b] Realized it was missing the ..
[b]Edit 3:[/b] Google didn't help, how do I register named pointers? i.e. when I type the name into the address box it shows the address held by the name
Description: |
Cropped screenshot of error |
|
Filesize: |
14.12 KB |
Viewed: |
4674 Time(s) |

|
_________________
Those who do not trust in christ to save them from their sins will only experience hell when their soul is released from it's earthly vessel. |
|
Back to top |
|
 |
TheyCallMeTim13 Wiki Contributor
Reputation: 51
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sat Jan 06, 2018 4:46 pm Post subject: |
|
|
It's the parts after the returns, to concatenate strings in Lua use ".."
Code: | function zAOBAddr( T, ADDSUB )
if ( (T == nil) or (T.Count == 0) ) then
return '[0]' .. ADDSUB
end
return '['.. T[0].. ']'.. ADDSUB
end |
_________________
|
|
Back to top |
|
 |
zxuiji Advanced Cheater
Reputation: 1
Joined: 26 Sep 2016 Posts: 70
|
Posted: Sat Jan 06, 2018 4:51 pm Post subject: |
|
|
Whoops forgot to refresh the page, anyways thanks for the reply, just having trouble identifying how to add named pointers for the address box now.
_________________
Those who do not trust in christ to save them from their sins will only experience hell when their soul is released from it's earthly vessel. |
|
Back to top |
|
 |
TheyCallMeTim13 Wiki Contributor
Reputation: 51
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sat Jan 06, 2018 5:06 pm Post subject: |
|
|
registerSymbol
_________________
|
|
Back to top |
|
 |
zxuiji Advanced Cheater
Reputation: 1
Joined: 26 Sep 2016 Posts: 70
|
Posted: Sat Jan 06, 2018 6:51 pm Post subject: |
|
|
Guess I was on the right track after all, must be just how I'm passing the parameters, thanks for linking to the docs though, always had trouble finding documentation on the API which was why I delayed learning it ever since I started using cheat engine. I'll take another crack at it tomorrow after I get some sleep.
_________________
Those who do not trust in christ to save them from their sins will only experience hell when their soul is released from it's earthly vessel. |
|
Back to top |
|
 |
zxuiji Advanced Cheater
Reputation: 1
Joined: 26 Sep 2016 Posts: 70
|
|
Back to top |
|
 |
|