 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
rajada1 Newbie cheater
Reputation: 0
Joined: 02 Jan 2017 Posts: 12
|
Posted: Thu Jan 26, 2017 5:54 am Post subject: Help, Unable to activate script 2 |
|
|
Hello, I have the following problem, I have some script, I can activate them and they work fine, but I can not activate more than one, they are in the same address of memory, can someone help correct it?
See below hp and mp full, I can not use the 2 remains only the last one to be activated
HP
| Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(hp)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
originalcode:
fld dword ptr [esi+04]
fucompp
cmp [esi] CC
je hp
jmp returnhere
hp:
mov [esi+04], (float)254
exit:
jmp returnhere
"epic.exe"+15222:
jmp newmem
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"epic.exe"+15222:
fld dword ptr [esi+04]
fucompp
//Alt: db D9 46 04 DA E9 |
MP
| Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(mphack)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
originalcode:
fld dword ptr [esi+04]
fucompp
cmp [esi], 40800000000009A7
je mphack
jmp returnhere
mphack:
mov [esi+04] (float)4.0
exit:
jmp returnhere
"epic.exe"+15222:
jmp newmem
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"epic.exe"+15222:
fld dword ptr [esi+04]
fucompp
//Alt: db D9 46 04 DA E9 |
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Jan 26, 2017 9:46 am Post subject: |
|
|
Use one injection for both manipulations.
For example:
| Code: | [ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(mphack)
label(hp)
newmem:
cmp [esi], 40800000000009A7
je mphack
cmp [esi], CC
je hp
jmp originalcode
mphack:
mov [esi+04], (float)4.0
jmp originalcode
hp:
mov [esi+04], (float)254
jmp originalcode
originalcode:
fld dword ptr [esi+04]
fucompp
jmp returnhere
"epic.exe"+15222:
jmp newmem
returnhere:
[DISABLE]
dealloc(newmem)
"epic.exe"+15222:
fld dword ptr [esi+04]
fucompp
//Alt: db D9 46 04 DA E9 |
|
|
| Back to top |
|
 |
rajada1 Newbie cheater
Reputation: 0
Joined: 02 Jan 2017 Posts: 12
|
Posted: Thu Jan 26, 2017 10:00 am Post subject: |
|
|
Thanks for the answer.
But I figured it out but on some occasion I wanted to use only hphack or just mp hack. Or how to disable only one of them?
it's possible ?
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Jan 26, 2017 10:19 am Post subject: |
|
|
Yes, it's possible. Set up a trigger using custom labels/symbols (see script below). Then, in your cheat table, create entries for those symbols after the script is activated (add address manually and use mp_enabled and hp_enabled as the address values) and assign hotkeys to them (1 for on, 0 for off).
| Code: | [ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(hp)
label(mp)
label(hp_enabled)
label(mp_enabled)
registersymbol(hp_enabled)
registersymbol(mp_enabled)
newmem:
cmp [esi], 40800000000009A7
je mp
cmp [esi], CC
je hp
jmp originalcode
mp:
cmp byte ptr [mp_enabled],1
jne originalcode
mov [esi+04], (float)4.0
jmp originalcode
hp:
cmp byte ptr [hp_enabled],1
jne originalcode
mov [esi+04], (float)254
jmp originalcode
originalcode:
fld dword ptr [esi+04]
fucompp
jmp returnhere
hp_enabled:
db 0
mp_enabled:
db 0
"epic.exe"+15222:
jmp newmem
returnhere:
[DISABLE]
dealloc(newmem)
"epic.exe"+15222:
fld dword ptr [esi+04]
fucompp
//Alt: db D9 46 04 DA E9
unregistersymbol(hp_enabled)
unregistersymbol(mp_enabled) |
|
|
| Back to top |
|
 |
rajada1 Newbie cheater
Reputation: 0
Joined: 02 Jan 2017 Posts: 12
|
Posted: Thu Jan 26, 2017 12:02 pm Post subject: |
|
|
| Thanks, this was very useful, my idea is to make a Trainer a little more automated, I need now learn to leave this automatic manual change, and in the end put increment check box to do this
|
|
| 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
|
|