Lua:debugger onBreakpoint

From Cheat Engine
Revision as of 13:14, 19 March 2017 by TheyCallMeTim13 (talk | contribs)
Jump to navigation Jump to search

function debugger_onBreakpoint()

 When a breaking breakpoint hits (that includes single stepping) and the lua function debugger_onBreakpoint() is defined it will be called and the global variables EAX, EBX, .... will be filled in
 Return 0 if you want the userinterface to be updated and anything else if not (e.g You continued from the breakpoint in your script)
Example:

function debugger_onBreakpoint()

  local value=EAX
  if (value ==0x0C93E004 ) then  -- break condition
    return 0                     --break
  else
    return 1                     -- continue without breaking
  end
end

debug_setBreakpoint(0x0040CEA6)  -- called if the above condition is true. And it will set breakpoint at 0x0040CEA6