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 


Complex pointer math

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
File_xor
How do I cheat?
Reputation: 0

Joined: 08 Oct 2021
Posts: 3

PostPosted: Thu Oct 14, 2021 10:29 pm    Post subject: Complex pointer math Reply with quote

I'm need to input complex pointer like:
[[["REZ.exe"+9A9980]+3*418+1AD08]+4]&0xffffff+[["REZ.exe"+9A9980]+3*418+1AD08]
but I got an error.
Is there work around for that?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4699

PostPosted: Thu Oct 14, 2021 10:44 pm    Post subject: Reply with quote

Try Lua:
Code:
function myComplexPointerAddr()
  local addr = getAddressSafe'[["REZ.exe"+9A9980]+3*418+1AD08]'
  if not addr then return 0 end

  local offset = readInteger(addr+4)
  if not offset then return 0 end

  return addr + (offset & 0xffffff)
end
Edit: bitwise and (&) has lower precedence than addition (+)
Use "myComplexPointerAddr()" (no quotes) for the address field.

_________________
I don't know where I'm going, but I'll figure it out when I get there.


Last edited by ParkourPenguin on Thu Oct 14, 2021 11:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
File_xor
How do I cheat?
Reputation: 0

Joined: 08 Oct 2021
Posts: 3

PostPosted: Thu Oct 14, 2021 11:09 pm    Post subject: Reply with quote

Thanks a lot!
I'm needed to do miner fix though:
Code:
return addr + (offset & 0xffffff)

instead of
Code:
return addr + offset & 0xffffff


Now it's time to learn lua I think.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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