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 Breakpoint issue

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

Joined: 23 Oct 2018
Posts: 4
Location: USA

PostPosted: Tue Oct 23, 2018 9:27 am    Post subject: LUA Breakpoint issue Reply with quote

hello i want to know something about lua breakpoint(complex)
i want to know how to set a breakpoint when there is a certain address in the register for example if edx==0x0000 then i don't want it to break and break if anything else is in the edx register..
thanks and waiting for your kind help
Back to top
View user's profile Send private message Yahoo Messenger
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Oct 23, 2018 9:34 am    Post subject: Reply with quote

is this a 32-bit or 64-bit target?

anyhow, in the breakpoint handler for that breakpoint do this code:
Code:

if EDX==0 then
  debug_continueFromBreakpoint(co_run)
  return 1 --continue
else
  return 0 --break
end


_________________
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
Shame
How do I cheat?
Reputation: 0

Joined: 23 Oct 2018
Posts: 4
Location: USA

PostPosted: Tue Oct 23, 2018 9:47 am    Post subject: Reply with quote

Dark Byte wrote:
is this a 32-bit or 64-bit target?

anyhow, in the breakpoint handler for that breakpoint do this code:
Code:

if EDX==0 then
  debug_continueFromBreakpoint(co_run)
  return 1 --continue
else
  return 0 --break
end



it's still breakking with the same register .. any help ?
Back to top
View user's profile Send private message Yahoo Messenger
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Oct 23, 2018 10:05 am    Post subject: Reply with quote

is your breakpoint function defined in the setBreakboint routine or in the global debugger_onBreakpoint ?
_________________
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
Shame
How do I cheat?
Reputation: 0

Joined: 23 Oct 2018
Posts: 4
Location: USA

PostPosted: Tue Oct 23, 2018 10:19 am    Post subject: Reply with quote

Dark Byte wrote:
is your breakpoint function defined in the setBreakboint routine or in the global debugger_onBreakpoint ?


umm how do i know that ? if i understand what you say then i first breakpoint the function then set the condition it if that's what you mean
Back to top
View user's profile Send private message Yahoo Messenger
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Oct 23, 2018 10:30 am    Post subject: Reply with quote

ah nvm, I misread your question. I thought you where using lua to set the breakpoint as well, but you're talking about the breakpoint condition

in that case

complex:
Code:

return EDX~=0


or easy:
Code:

EDX~=0


Is the target is 64-bit, then change it to RDX

_________________
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
Shame
How do I cheat?
Reputation: 0

Joined: 23 Oct 2018
Posts: 4
Location: USA

PostPosted: Tue Oct 23, 2018 10:32 am    Post subject: Reply with quote

Dark Byte wrote:
ah nvm, I misread your question. I thought you where using lua to set the breakpoint as well, but you're talking about the breakpoint condition

in that case

complex:
Code:

return EDX~=0


or easy:
Code:

EDX~=0


Is the target is 64-bit, then change it to RDX


thank you very much
Back to top
View user's profile Send private message Yahoo 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