View previous topic :: View next topic |
Author |
Message |
ASDFklausi How do I cheat? Reputation: 0
Joined: 15 Feb 2017 Posts: 9
|
Posted: Sun Nov 26, 2017 12:26 pm Post subject: Code wont work |
|
|
Hello dunno what i do wrong
but here is my code maybe u guys got an idea what i make wrong
aobscanmodule(INJECT,XXXX.exe,48 89 4B 10 48 3B C8 76 04)
alloc(newmem,$1000,"XXXX.exe"+2A054A)
label(code)
label(playercheck)
label(return)
newmem:
playercheck:
push rax
mov rax,[rbx+80] // in rbx+80 is the float that i want to cmp
cmp rax,(float)40 // 40 is the float value that cmp me to other
pop rax
jne code
jmp return
code:
mov [rbx+10],rcx (rbx+10 is my health) rcx is my new health
cmp rcx,rax
jmp return
INJECT:
jmp playercheck
nop
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 48 89 4B 10 48 3B C8
well if it isnt clear for you what i try to do
hopefully i did nothing wrong here xD
ty for any idea
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Sun Nov 26, 2017 1:39 pm Post subject: |
|
|
Code: | playercheck:
cmp dword ptr [rbx+80],(float)40.0
je return
code:
mov [rbx+10],rcx
cmp rcx,rax
jmp return |
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
ASDFklausi How do I cheat? Reputation: 0
Joined: 15 Feb 2017 Posts: 9
|
Posted: Sun Nov 26, 2017 2:28 pm Post subject: |
|
|
Code: | aobscanmodule(INJECT,XXXX.exe,48 89 4B 10 48 3B C8 76 04)
alloc(newmem,$1000,"XXXX.exe"+2A054A)
label(code)
label(playercheck)
label(return)
newmem:
playercheck:
push rax
mov rax,[rbx+80] // in rbx+80 is the float that i want to cmp // this is the offset to clearify that is me or the enemie
cmp rax,(float)40 // 40 is the float value that cmp me to other // 40 is the value that is my character
pop rax
jne code
jmp return
code:
mov [rbx+10],rcx (rbx+10 is my / enemie actual health ) rcx is my and enemie new health
cmp rcx,rax
jmp return
INJECT:
jmp playercheck
nop
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 48 89 4B 10 48 3B C8 |
well after i tried the code from OldCheatEngineUser its the same
its like he cant cmp me and the enemies
hopefully u guys got an idea ! ty for any help
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Sun Nov 26, 2017 4:30 pm Post subject: |
|
|
ASDFklausi wrote: | well after i tried the code from OldCheatEngineUser its the same
its like he cant cmp me and the enemies
hopefully u guys got an idea ! ty for any help |
are you sure float 40 remains the same when you are in different areas/levels or when you restart the game?
and you dont need to push/pop registers and move value from here to there to compare, just compare it directly.
the script looks pretty much clean, whether you are doing it wrong or there is extra requirements you didnt include.
extras:
make sure the aob isnt duplicated somewhere else, in other words if the same pattern exist somewhere before this instruction then you cant hook the instruction desired.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
ASDFklausi How do I cheat? Reputation: 0
Joined: 15 Feb 2017 Posts: 9
|
Posted: Sun Nov 26, 2017 5:51 pm Post subject: |
|
|
Quote: | are you sure float 40 remains the same when you are in different areas/levels or when you restart the game? |
but it should work for now or? . and yes its the same
Quote: | and you dont need to push/pop registers and move value from here to there to compare, just compare it directly. |
okay thank you
Quote: | the script looks pretty much clean, whether you are doing it wrong or there is extra requirements you didnt include. |
so u dont have an idea?
Quote: | make sure the aob isnt duplicated somewhere else |
nope its the one and only !
Last edited by ASDFklausi on Sun Nov 26, 2017 6:03 pm; edited 2 times in total |
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Sun Nov 26, 2017 5:57 pm Post subject: |
|
|
ASDFklausi wrote: | but it should work for now . and nope |
after your words and this quote, i would say try a different compare point.
you might wish to debug your code and see what mistakes you did.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sun Nov 26, 2017 6:19 pm Post subject: |
|
|
Code: | mov eax,[rbx+80]
cmp eax,(float)40 |
You probably also need to make sure you do the final CMP that the game is expecting before you JMP to return.
Try this
Code: | aobscanmodule(INJECT,XXXX.exe,48 89 4B 10 48 3B C8 76 04)
alloc(newmem,$1000,"XXXX.exe"+2A054A)
label(code)
label(playercheck)
label(return)
newmem:
playercheck:
push rax
mov eax,[rbx+80] // in rbx+80 is the float that i want to cmp // this is the offset to clearify that is me or the enemie
cmp eax,(float)40 // 40 is the float value that cmp me to other // 40 is the value that is my character
pop rax
je code
mov [rbx+10],rcx //(rbx+10 is my / enemie actual health ) rcx is my and enemie new health
code:
cmp rcx,rax
jmp return
INJECT:
jmp playercheck
nop
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 48 89 4B 10 48 3B C8 |
|
|
Back to top |
|
|
ASDFklausi How do I cheat? Reputation: 0
Joined: 15 Feb 2017 Posts: 9
|
Posted: Sun Nov 26, 2017 6:38 pm Post subject: |
|
|
Code: | aobscanmodule(INJECT,XXXX.exe,48 89 4B 10 48 3B C8 76 04)
alloc(newmem,$1000,"XXXX.exe"+2A054A)
label(code)
label(playercheck)
label(return)
newmem:
playercheck:
push rax
mov eax,[rbx+80] // in rbx+80 is the float that i want to cmp // this is the offset to clearify that is me or the enemie
cmp eax,(float)40 // 40 is the float value that cmp me to other // 40 is the value that is my character
pop rax
je code
mov [rbx+10],rcx //(rbx+10 is my / enemie actual health ) rcx is my and enemie new health
code:
cmp rcx,rax
jmp return
INJECT:
jmp playercheck
nop
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 48 89 4B 10 48 3B C8 |
still not working well .... i have no clue anymore haha xD
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 138
Joined: 06 Jul 2014 Posts: 4275
|
Posted: Sun Nov 26, 2017 7:07 pm Post subject: |
|
|
Set a breakpoint at the top of your code and see what's happening.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
ASDFklausi How do I cheat? Reputation: 0
Joined: 15 Feb 2017 Posts: 9
|
Posted: Sun Nov 26, 2017 7:37 pm Post subject: |
|
|
well im not very "experienced" with breakpoints i dont know where i should care of.
well i made a breakpoint on push rax and it stops the game 1ms before i take dmg ...
what does it mean to me?:X
im sorry
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Sun Nov 26, 2017 7:53 pm Post subject: |
|
|
why you dont provide screenshots from debugged instructions?
or if you have teamviewer i would connect to your PC.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
ASDFklausi How do I cheat? Reputation: 0
Joined: 15 Feb 2017 Posts: 9
|
Posted: Sun Nov 26, 2017 8:11 pm Post subject: |
|
|
++rep OldCheatEngineUser
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Sun Nov 26, 2017 9:54 pm Post subject: |
|
|
FIXED.
just remember that sometimes as you progress in the game values that you are comparing to/with get changed as well.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
|