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 


Stop Lua Script

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

Joined: 20 Dec 2014
Posts: 103

PostPosted: Thu Sep 22, 2016 7:40 pm    Post subject: Stop Lua Script Reply with quote

I am creating breakpoint via debug_setBreakpoint(address), then processing it in the:

function debugger_onBreakpoint()

debug_removeBreakpoint(address)
return 1
end

The problem is that inserting any manual waypoint after this routine is called keeps popping up the LUA window.

How can I code this to break only once and then continue my manual work ?

Thanks
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Sep 22, 2016 8:44 pm    Post subject: Reply with quote

Code:
debug_setBreakpoint(address, 1, bptExecute, function()
  debug_removeBreakpoint(address)
  debug_continueFromBreakpoint(co_run)
  return 1
end)
Back to top
View user's profile Send private message
fred26
Expert Cheater
Reputation: 0

Joined: 20 Dec 2014
Posts: 103

PostPosted: Fri Sep 23, 2016 6:38 am    Post subject: Reply with quote

Thanks. This:

Zanzer wrote:
Code:
debug_setBreakpoint(address, 1, bptExecute, function()
  debug_removeBreakpoint(address)
  debug_continueFromBreakpoint(co_run)
  return 1
end)


does not work. If after hitting this function I try to manually add an Execute breakpoint the LUA window keeps popping up.

I also tried:

Code:

function debugger_onBreakpoint()

  print( string.format( '%x', readInteger(EAX)) );
  debug_removeBreakpoint(0x207A9B84)
  debug_continueFromBreakpoint(co_run)
    return 0

end


And same behaviour.

Any hints?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Fri Sep 23, 2016 6:49 am    Post subject: Reply with quote

the lua window only pops up when there is a message. What does the lua window say ?
_________________
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
fred26
Expert Cheater
Reputation: 0

Joined: 20 Dec 2014
Posts: 103

PostPosted: Fri Sep 23, 2016 7:24 am    Post subject: Reply with quote

Dark Byte wrote:
the lua window only pops up when there is a message. What does the lua window say ?


LUA pops up with the value of print( string.format( '%x', readInteger(EAX)) )

I am using CE 6.3

EDIT: I tried this code as well (returning 1) and I can't get the code to run only once, keep popping up the LUA with the print value


Quote:

function debugger_onBreakpoint()

print( string.format( '%x', readInteger(EAX)) );
debug_removeBreakpoint(0x207A9B84)
debug_continueFromBreakpoint(co_run)
return 1

end

debug_setBreakpoint(0x207A9B84)
Code:
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Fri Sep 23, 2016 10:00 am    Post subject: Reply with quote

6.3 doesn't support debug_setBreakpoint with a custom routine

you have to set your own filter (check if EIP is the address and if so, show, else ignore)

Also, if you disable it, just do debugger_onBreakpoint=nil

_________________
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
fred26
Expert Cheater
Reputation: 0

Joined: 20 Dec 2014
Posts: 103

PostPosted: Fri Sep 23, 2016 4:35 pm    Post subject: Reply with quote

Dark Byte wrote:
6.3 doesn't support debug_setBreakpoint with a custom routine

you have to set your own filter (check if EIP is the address and if so, show, else ignore)

Also, if you disable it, just do debugger_onBreakpoint=nil


Thanks, debugger_onBreakpoint=nil did the trick.

Thanks once again
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 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