View previous topic :: View next topic |
Author |
Message |
weisbrot Newbie cheater
Reputation: 0
Joined: 06 Feb 2017 Posts: 19
|
Posted: Mon Feb 06, 2017 2:03 am Post subject: tried to change virtual key, does not work |
|
|
Hell! just found a piece of code that I want to change:
Code: | isenabled:
//mouse trigger
push rcx
push rdx
xor rdx,rdx
cmp [LeftTrigger],1
jne isnext
mov rcx,1 //left mouse
call getasynckeystate
or rdx,rax
isnext:
cmp [RightTrigger],1
jne isnext1
mov rcx,2 //right mouse
call getasynckeystate
or rdx,rax
isnext1:
cmp [WhileTrigger],1
jne isnext2
mov rcx,4 //middle mouse
call getasynckeystate
isnext2:
or rdx,rax
xor rax,rax
and rdx,8000
test rdx,rdx
pop rdx
pop rcx
je disabled
inc rax
disabled:
ret |
i tried to change mov rcx,4 to mov rcx,69 so that I can press the E button instead of the middle mouse button, but that does not work. Can anyone help me? Thanks
|
|
Back to top |
|
 |
SunBeam I post too much
Reputation: 65
Joined: 25 Feb 2005 Posts: 4023 Location: Romania
|
Posted: Mon Feb 06, 2017 4:09 am Post subject: |
|
|
According to MSDN, the virtual keycode for 'E' is 0x45. 0x69 is VK_NUMPAD9.
|
|
Back to top |
|
 |
weisbrot Newbie cheater
Reputation: 0
Joined: 06 Feb 2017 Posts: 19
|
Posted: Mon Feb 06, 2017 5:04 am Post subject: |
|
|
SunBeam wrote: | According to MSDN, the virtual keycode for 'E' is 0x45. 0x69 is VK_NUMPAD9. |
thanks for your answer, but this does not work either, the program does not give out an error, but it also does not work anymore.
|
|
Back to top |
|
 |
SunBeam I post too much
Reputation: 65
Joined: 25 Feb 2005 Posts: 4023 Location: Romania
|
Posted: Mon Feb 06, 2017 6:26 am Post subject: |
|
|
Alright, let's do it this way:
- is the code working as intended with the Mouse keys?
- can you share the program? (if uncertain, do PM me)
Bottom line is I'm using a similar handler in some x64 scripts for various games and the combination of GetAsyncKeyState with wanted key hexa does work.
Example:
Code: | KeyHandlerThread:
sub rsp,28
KeyHandlerThread_loop:
mov rcx,A
call Sleep
cmp [KeyHandlerOff],1
je ExitKeyHandler
mov rcx,6F // NUM_DIVIDE
call GetAsyncKeyState
test ax,ax
jne short ToggleText
jmp short KeyHandlerThread_loop
ToggleText:
xor r9d,r9d // MB_OK
mov r8,szCaption
mov rdx,szText
xor rcx,rcx // hWnd
call MessageBoxA
mov rcx,C8
call Sleep
jmp KeyHandlerThread_loop
ExitKeyHandler:
add rsp,28
mov [KeyHandlerOff],2
ret |
Might as well want to try applying some Sleep in your code, as it's probably looping too fast?
BR,
Sun
|
|
Back to top |
|
 |
weisbrot Newbie cheater
Reputation: 0
Joined: 06 Feb 2017 Posts: 19
|
Posted: Mon Feb 06, 2017 6:38 am Post subject: |
|
|
SunBeam wrote: | Alright, let's do it this way:
- is the code working as intended with the Mouse keys?
- can you share the program? (if uncertain, do PM me)
Bottom line is I'm using a similar handler in some x64 scripts for various games and the combination of GetAsyncKeyState with wanted key hexa does work.
Example:
Code: | KeyHandlerThread:
sub rsp,28
KeyHandlerThread_loop:
mov rcx,A
call Sleep
cmp [KeyHandlerOff],1
je ExitKeyHandler
mov rcx,6F // NUM_DIVIDE
call GetAsyncKeyState
test ax,ax
jne short ToggleText
jmp short KeyHandlerThread_loop
ToggleText:
xor r9d,r9d // MB_OK
mov r8,szCaption
mov rdx,szText
xor rcx,rcx // hWnd
call MessageBoxA
mov rcx,C8
call Sleep
jmp KeyHandlerThread_loop
ExitKeyHandler:
add rsp,28
mov [KeyHandlerOff],2
ret |
Might as well want to try applying some Sleep in your code, as it's probably looping too fast?
BR,
Sun |
soll replace the code from isenabledh: (the first line) on?
so ill keep the first line?
|
|
Back to top |
|
 |
SunBeam I post too much
Reputation: 65
Joined: 25 Feb 2005 Posts: 4023 Location: Romania
|
Posted: Mon Feb 06, 2017 6:45 am Post subject: |
|
|
As you seem not to know what you're doing, please post the whole code or mention the app's name and the hook you want to apply integrally.
|
|
Back to top |
|
 |
weisbrot Newbie cheater
Reputation: 0
Joined: 06 Feb 2017 Posts: 19
|
Posted: Mon Feb 06, 2017 7:43 am Post subject: |
|
|
SunBeam wrote: | As you seem not to know what you're doing, please post the whole code or mention the app's name and the hook you want to apply integrally. |
pmed you
|
|
Back to top |
|
 |
SunBeam I post too much
Reputation: 65
Joined: 25 Feb 2005 Posts: 4023 Location: Romania
|
Posted: Mon Feb 06, 2017 8:04 am Post subject: |
|
|
Haven't received any PMs. Not sure you're allowed till a higher post count?
|
|
Back to top |
|
 |
weisbrot Newbie cheater
Reputation: 0
Joined: 06 Feb 2017 Posts: 19
|
Posted: Mon Feb 06, 2017 8:09 am Post subject: |
|
|
SunBeam wrote: | Haven't received any PMs. Not sure you're allowed till a higher post count? |
do you have skype or discord?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25794 Location: The netherlands
|
Posted: Mon Feb 06, 2017 9:20 am Post subject: |
|
|
SunBeam wrote: | Haven't received any PMs. Not sure you're allowed till a higher post count? |
he can't pm you unless you PM him first
_________________
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 |
|
 |
weisbrot Newbie cheater
Reputation: 0
Joined: 06 Feb 2017 Posts: 19
|
Posted: Mon Feb 06, 2017 10:11 am Post subject: |
|
|
Dark Byte wrote: | SunBeam wrote: | Haven't received any PMs. Not sure you're allowed till a higher post count? |
he can't pm you unless you PM him first |
thanks
|
|
Back to top |
|
 |
|