 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
sir-gunny Advanced Cheater
Reputation: 0
Joined: 15 Mar 2012 Posts: 81
|
Posted: Fri Dec 08, 2023 2:50 am Post subject: How can I use the the global "process" with Autoas |
|
|
Hi.
I'm trying to use the global "process" on AA, but it's not working. Does anyone have any ideas?
| Code: | {$lua}
AutoAssemble([[define(GameName, ]]..string.sub(process,0,-5)..[[)]])
{$asm}
aobScanRegion(AOB_GetObject,GameName.Map,GameName.Map+3000, aob)
aobScanRegion(AOB_GetPlayer,GameName.GetPlayer,GameName.GetPlayer+FF, aob)
alloc(ccGetBasePointer,0x200,GameName.Map)
...
...
GameName+0x53264:
db 90 90 90 |
|
|
| Back to top |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Fri Dec 08, 2023 8:50 am Post subject: |
|
|
In AA it's
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4709
|
Posted: Fri Dec 08, 2023 12:00 pm Post subject: |
|
|
{$lua} blocks return a string that gets substituted back into the script
string.sub is either wrong or unnecessary. Including ".exe" in "game.exe" is ok
You could forego the {$lua} block and use `$process` to read the Lua variable `process` and substitute its value into the script
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
sir-gunny Advanced Cheater
Reputation: 0
Joined: 15 Mar 2012 Posts: 81
|
Posted: Thu Dec 14, 2023 4:25 am Post subject: |
|
|
Hello.
Thank you for your help. Unfortunately it does not work. I think that aobScanRegion can not handle $process or that $process does not allow symbols like $process.GetPlayer or $process.Map+3000.
EDIT:
Here is my workaround:
| Code: | {$LUA}
local Process = string.sub(process,0,-5)
local SymbolName, StartAddress, StopAddress, AOBString
local tAAscript = {}
SymbolName = "AOB_GetObject"
StartAddress = Process..".Map"
StopAddress = Process..".Map+3000"
AOBString = "AA BB CC DD EE FF"
tAAscript[#tAAscript+1] = "aobScanRegion("..SymbolName..","..StartAddress..","..StopAddress..","..AOBString..")"
SymbolName = "AOB_GetPlayer"
StartAddress = Process..".GetPlayer"
StopAddress = Process..".GetPlayer+FF"
AOBString = "AA BB CC DD EE FF"
tAAscript[#tAAscript+1] = "aobScanRegion("..SymbolName..","..StartAddress..","..StopAddress..","..AOBString..")"
return table.concat(tAAscript,'\r\n')
{$ASM} |
|
|
| 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
|
|