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 


lua conditional breakpoint modification register?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
yazigegeda
Expert Cheater
Reputation: 0

Joined: 22 Jan 2019
Posts: 183

PostPosted: Sun May 19, 2024 12:00 am    Post subject: lua conditional breakpoint modification register? Reply with quote

Code:



--the register values like EAX and EBX can be read here.
--Changing them has no effect though
--Note: Keep in mind hexadecimal values start with 0x

if RCX == 1 then
   eax=0           -- Can I change the value of the register?
end

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

Joined: 06 Jul 2014
Posts: 4714

PostPosted: Sun May 19, 2024 12:22 am    Post subject: Reply with quote

Right click the instruction in the disassembler -> "Change register at this location"

Right click the instruction again -> "Set/change break condition"
You can also do this in Memory Viewer -> View -> Breakpointlist

Suspend the game beforehand using the "Advanced options" window if that code might be run between setting the breakpoint and setting the condition


For anything more advanced, you should probably just set a breakpoint using Lua:
Code:
debug_setBreakpoint('game.exe+1234', function()
  if RCX == 1 then
    RAX = 0
  end
end)

_________________
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
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