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 


Get dynamic address from opcode by Lua, possible?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
happyreadygo
Advanced Cheater
Reputation: 1

Joined: 14 Sep 2011
Posts: 87

PostPosted: Wed Aug 21, 2013 10:36 pm    Post subject: Get dynamic address from opcode by Lua, possible? Reply with quote

In case I have gave up on finding static money address .
Neither pointer scan level 5 nor debug work in this case (both no result).


I can only rely on dynamic money address , but I have to scan everytime ,since It keep changing the address.

However, I find the opcode which it ll decrease money when building a road.

Code:
sub [eax],ecx

The 4 bytes in eax is what I want.
I can using "find out what addresses this instruction accesses manally.
The result is dynamic money address and only one.
That a little faster than scan from the begining.

The question is ...Can I using lua script to check if what's the money address , If I know the opcode is always connect to money one and only?
beside the money address is changed only when the game is restart.

How about this idea? build a road to get dynamic money adress and do whatever with it.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25794
Location: The netherlands

PostPosted: Thu Aug 22, 2013 3:05 am    Post subject: Reply with quote

Do a code injection and check the stack and the pointers around the address being affected.
There may be a pointer nearby that points to a block describing the address, including the name

E.g. i noticed in a lot of lua implementations that the 3th pointer after the value tends to point at a block that contains a string with the variable name. (It of course depends on the lua implementation)

Alternatively find where lua_loadstring and lua_gettop are located and execute your own code with that

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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