debug_setBreakpoint with custom named function

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
User avatar
oLaudix
Cheater
Cheater
Posts: 33
Joined: Tue Dec 12, 2017 5:34 pm
Reputation: 20

debug_setBreakpoint with custom named function

Post by oLaudix »

I know you can do breakpoints with lua like this:

Code: Select all

debug_setBreakpoint(0x1412463C3)
but then i have to do

Code: Select all

function debugger_onBreakpoint()
and this only works with 1 active script. I know there is a way to do functions with custom names but i forgot how to do it. Also for some reason this doesnt work:

Code: Select all

debug_setBreakpoint(0x1412463C3, 1, bptExecute, function()
  print(RSI)
  if (RBX ~= 0) then
     return 1
  end
  print(RSI)
  debug_continueFromBreakpoint(co_run)
  return 0
end)

TimFun13
Expert Cheater
Expert Cheater
Posts: 1354
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 6

Re: debug_setBreakpoint with custom named function

Post by TimFun13 »

Check (R)(E)IP (instruction point) for the address of the breakpoint.

Code: Select all

function debugger_onBreakpoint()
  if RIP == 0x1412463C3 then
    -- Do stuff here
  end
  -- end breakpoint code here
end

Post Reply

Who is online

Users browsing this forum: No registered users