|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
KalasDev Master Cheater Reputation: 1
Joined: 29 May 2016 Posts: 311
|
Posted: Mon Oct 02, 2017 3:26 pm Post subject: Issue with CMP |
|
|
Code: | { Game : FoL.exe
Version:
Date : 2017-10-02
Author : Kalas
This script does blah blah blah
}
[ENABLE]
aobscan(Health,89 47 4C 85 C0)
alloc(newmem,$100,Health)
alloc(PlayerHealth, 1)
registersymbol(PlayerHealth)
PlayerHealth:
db 0
alloc(EnemyHealth, 1)
registersymbol(EnemyHealth)
EnemyHealth:
db 0
label(code)
label(return)
label(PlayerCheck)
label(EnemyCheck)
newmem:
cmp [rdi+88], 1
je PlayerCheck
cmp [rdi+88], 0
je EnemyCheck
jmp code
PlayerCheck:
cmp byte ptr [PlayerCheck], 1
jne code
mov eax, #5
jmp code
EnemyCheck:
cmp byte ptr [EnemyCheck], 1
jne code
mov eax, #0
jmp code
code:
mov [rdi+4C],eax
test eax,eax
jmp return
Health:
jmp newmem
return:
registersymbol(Health)
[DISABLE]
Health:
db 89 47 4C 85 C0
unregistersymbol(Health)
unregistersymbol(PlayerHealth)
unregistersymbol(EnemyHealth)
dealloc(newmem)
dealloc(PlayerHealth)
dealloc(EnemyHealth) |
I'm trying to make this work as when I get hit It will write 5 or Max Health to me and 0 to enemies.
It won't work.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Mon Oct 02, 2017 3:54 pm Post subject: |
|
|
Code: |
cmp byte ptr [PlayerCheck], 1
|
Code: |
cmp byte ptr [EnemyCheck], 1
|
will never be true
you probably want to use PlayerHealth and EnemyHealth instead
_________________
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 |
|
|
KalasDev Master Cheater Reputation: 1
Joined: 29 May 2016 Posts: 311
|
Posted: Mon Oct 02, 2017 4:16 pm Post subject: |
|
|
Oh my god, I'm so embarrassed.
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|