Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How can I use the the global "process" with Autoas

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
sir-gunny
Advanced Cheater
Reputation: 0

Joined: 15 Mar 2012
Posts: 81

PostPosted: Fri Dec 08, 2023 2:50 am    Post subject: How can I use the the global "process" with Autoas Reply with quote

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
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Fri Dec 08, 2023 8:50 am    Post subject: Reply with quote

In AA it's
Code:

$process
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4709

PostPosted: Fri Dec 08, 2023 12:00 pm    Post subject: Reply with quote

{$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
View user's profile Send private message
sir-gunny
Advanced Cheater
Reputation: 0

Joined: 15 Mar 2012
Posts: 81

PostPosted: Thu Dec 14, 2023 4:25 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites