View previous topic :: View next topic |
Author |
Message |
apemanzilla How do I cheat?
Reputation: 0
Joined: 24 Feb 2016 Posts: 8
|
Posted: Wed Feb 24, 2016 9:33 pm Post subject: Run specific function on different breakpoint? |
|
|
I'm working on a script that needs to add four different breakpoints in various places, and I'd like to run a different function for each one. Defining a debugger_onBreakpoint function works, but it runs that function for ALL breakpoints, and I'd like to use different functions for each breakpoint.
Alternatively, is there a variable/function with the address of the instruction being broken upon?
EDIT: I figured it out, I can use the EIP register for what I need. I'm still new to assembly  |
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Feb 24, 2016 11:02 pm Post subject: |
|
|
Also, debug_setBreakpoint() accepts a function as the last argument which is called on that breakpoint only. |
|
Back to top |
|
 |
apemanzilla How do I cheat?
Reputation: 0
Joined: 24 Feb 2016 Posts: 8
|
Posted: Thu Feb 25, 2016 4:10 pm Post subject: |
|
|
Zanzer wrote: | Also, debug_setBreakpoint() accepts a function as the last argument which is called on that breakpoint only. |
I can't seem to get this to work - I've tried it two ways.
Setting the 'functiontocall' argument as listed in the main.lua file:
Code: |
debug_setBreakpoint(address, function() print("breakpoint!") return 1 end)
|
Setting the 'breakpointmethod' argument as listed in the main.lua file:
Code: |
debug_setBreakpoint(address, nil, nil, function() print("breakpoint!") return 1 end, nil)
|
Neither seem to do anything at all - no printing, it doesn't even call the debugger_onBreakpoint function. |
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Thu Feb 25, 2016 4:26 pm Post subject: |
|
|
You have CE 6.5? |
|
Back to top |
|
 |
apemanzilla How do I cheat?
Reputation: 0
Joined: 24 Feb 2016 Posts: 8
|
Posted: Thu Feb 25, 2016 4:31 pm Post subject: |
|
|
Zanzer wrote: | You have CE 6.5? |
Yes. I downloaded it a couple days ago from the main page. |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 467
Joined: 09 May 2003 Posts: 25704 Location: The netherlands
|
Posted: Thu Feb 25, 2016 4:36 pm Post subject: |
|
|
try
debug_setBreakpoint(address, 1, bptExecute, function() print("breakpoint!") return 1 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 |
|
 |
apemanzilla How do I cheat?
Reputation: 0
Joined: 24 Feb 2016 Posts: 8
|
Posted: Thu Feb 25, 2016 5:10 pm Post subject: |
|
|
Dark Byte wrote: | try
debug_setBreakpoint(address, 1, bptExecute, function() print("breakpoint!") return 1 end) |
Working perfectly, thanks! |
|
Back to top |
|
 |
hemersonkla1 Cheater
Reputation: 0
Joined: 24 Jun 2015 Posts: 34
|
Posted: Mon Aug 22, 2016 10:26 am Post subject: |
|
|
Code: | function BUTTON1(sender)
if sender.Checked then debug_setBreakpoint (43 4c 49 43 4b 3e)
else debug_removeBreakpoint (43 4c 49 43 4b 3e)
end
end |
Hello. Please help. How i can do it for aob scan ?
Breapoint on aob |
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Aug 22, 2016 6:04 pm Post subject: |
|
|
Code: | aob = AOBScan("43 4c 49 43 4b 3e")
print(aob[0])
print(tonumber(aob[0],16)) |
|
|
Back to top |
|
 |
hemersonkla1 Cheater
Reputation: 0
Joined: 24 Jun 2015 Posts: 34
|
Posted: Tue Aug 23, 2016 8:05 am Post subject: |
|
|
Zanzer wrote: | Code: | aob = AOBScan("43 4c 49 43 4b 3e")
print(aob[0])
print(tonumber(aob[0],16)) |
|
thanks i will try. |
|
Back to top |
|
 |
|