| View previous topic :: View next topic |
| Author |
Message |
HyberCode Cheater
Reputation: 0
Joined: 17 Feb 2016 Posts: 40
|
Posted: Sun Mar 27, 2016 2:01 pm Post subject: how to save address or addresses from debugger |
|
|
how to save address or addresses from the debugger
function debugger_onBreakpoint()
money=EDI + 0x35
SavedAddress =readDouble(money)
return 1
end
debug_removeBreakpoint()
if (isKeyPressed(VK_F2)) then
writeDouble(SavedAddress,9999)
end
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sun Mar 27, 2016 6:50 pm Post subject: |
|
|
| Code: | function debugger_onBreakpoint()
SavedAddress = EDI
return 1
end |
| Code: | if (isKeyPressed(VK_F2)) then
writeDouble(SavedAddress + 0x35, 9999)
end |
|
|
| Back to top |
|
 |
HyberCode Cheater
Reputation: 0
Joined: 17 Feb 2016 Posts: 40
|
Posted: Tue Mar 29, 2016 3:07 am Post subject: |
|
|
| Zanzer wrote: | | Code: | function debugger_onBreakpoint()
SavedAddress = EDI
return 1
end |
| Code: | if (isKeyPressed(VK_F2)) then
writeDouble(SavedAddress + 0x35, 9999)
end |
|
are you sure this working ? cuz if i remove the breakpoint and press F2 nothing happen
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4719
|
Posted: Tue Mar 29, 2016 8:36 am Post subject: |
|
|
Do you have that if statement in a timer? If you're only running it once, then it's only going to check the f2 key once.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Mar 29, 2016 5:31 pm Post subject: |
|
|
Don't keep executing the function.
| Code: | createHotkey(function()
writeDouble(SavedAddress + 0x35, 9999)
end, VK_F2) |
|
|
| Back to top |
|
 |
HyberCode Cheater
Reputation: 0
Joined: 17 Feb 2016 Posts: 40
|
Posted: Tue Mar 29, 2016 5:58 pm Post subject: |
|
|
| Zanzer wrote: | Don't keep executing the function.
| Code: | createHotkey(function()
writeDouble(SavedAddress + 0x35, 9999)
end, VK_F2) |
|
how to make SavedAddress local ?
for example
writeDouble(local = SavedAddress + 0x35, 9999)
ps : not working
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Mar 29, 2016 6:20 pm Post subject: |
|
|
Sounds like you're using the wrong address/offset. My code's perfect.
Your 0x35 offset sounds completely wrong.
|
|
| Back to top |
|
 |
HyberCode Cheater
Reputation: 0
Joined: 17 Feb 2016 Posts: 40
|
Posted: Tue Mar 29, 2016 6:37 pm Post subject: |
|
|
| Zanzer wrote: | Sounds like you're using the wrong address/offset. My code's perfect.
Your 0x35 offset sounds completely wrong. |
yep it works fine ... the problem is it always choose the first address and save it to "SavedAddress" ... if i changed "SavedAddress" to local variable ... it will take all the addresses and save it to "SavedAddress" and changing them together
i need way to change global variable to local variable ... do you know how to do that ?
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Mar 29, 2016 6:52 pm Post subject: |
|
|
Not sure I understand what you want.
That breakpoint will keep overwriting SavedAddress every time its code is executed.
So when you press the hokey, it will update the LAST address touched by the breakpoint.
Do you only want SavedAddress to use the very first address it touches?
| Code: | SavedAddress = 0
function debugger_onBreakpoint()
if SavedAddress == 0 then
SavedAddress = EDI
end
return 1
end |
Do you want your hotkey to update all addresses that the instruction has ever touched?
| Code: | SavedAddress = {}
function debugger_onBreakpoint()
SavedAddress[EDI] = true
return 1
end |
| Code: | createHotkey(function()
for i in pairs(SavedAddress) do
writeDouble(i + 0x35, 9999)
end
end, VK_F2) |
|
|
| Back to top |
|
 |
HyberCode Cheater
Reputation: 0
Joined: 17 Feb 2016 Posts: 40
|
Posted: Tue Mar 29, 2016 7:04 pm Post subject: |
|
|
| Zanzer wrote: | Not sure I understand what you want.
That breakpoint will keep overwriting SavedAddress every time its code is executed.
So when you press the hokey, it will update the LAST address touched by the breakpoint.
Do you only want SavedAddress to use the very first address it touches?
| Code: | SavedAddress = 0
function debugger_onBreakpoint()
if SavedAddress == 0 then
SavedAddress = EDI
end
return 1
end |
Do you want your hotkey to update all addresses that the instruction has ever touched?
| Code: | SavedAddress = {}
function debugger_onBreakpoint()
SavedAddress[EDI] = true
return 1
end |
| Code: | createHotkey(function()
for i in pairs(SavedAddress) do
writeDouble(i + 0x35, 9999)
end
end, VK_F2) |
|
thanks for helping mate )
|
|
| Back to top |
|
 |
|