Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


I need help with an Auto Assemble Script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Ejay1984
Newbie cheater
Reputation: 0

Joined: 16 Nov 2017
Posts: 24

PostPosted: Thu Nov 16, 2017 1:37 pm    Post subject: I need help with an Auto Assemble Script Reply with quote

Hi,

I'm new to Cheat Engine and I've been working my way through tutorials and the like. I am trying to create a cheat for infinite health on the latest version of Shovel Knight. I am currently in the process of creating the script but I'm not sure what command to use to effect the change.

The script is as follows;

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
fld dword ptr [edx]
fnstcw [esp+16]

exit:
jmp returnhere

"ShovelKnight.exe"+1D0C5B:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"ShovelKnight.exe"+1D0C5B:
fld dword ptr [edx]
fnstcw [esp+16]
//Alt: db D9 02 D9 7C 24 16


I would be extremely grateful for any help.

Cheers
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Thu Nov 16, 2017 4:44 pm    Post subject: Reply with quote

fld dword ptr [edx]
first make sure the above instruction does not access any other object except player health by right-clicking the instruction and choosing "find out what addresses this instruction accesses" then you can process.

_________________
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
View user's profile Send private message Visit poster's website
Ejay1984
Newbie cheater
Reputation: 0

Joined: 16 Nov 2017
Posts: 24

PostPosted: Fri Nov 17, 2017 12:58 am    Post subject: Reply with quote

OldCheatEngineUser wrote:
fld dword ptr [edx]
first make sure the above instruction does not access any other object except player health by right-clicking the instruction and choosing "find out what addresses this instruction accesses" then you can process.


Thanks a lot. Do I need to alter the existing instruction or replace it with a new instruction?

I had previously put the // symbol in front of the instruction but it drained my players energy whilst leaving the player alive. The instruction was one of three that only affected my player.

The others were;

fcom dword ptr [edx]

fcomp dword ptr [edx]
Back to top
View user's profile Send private message
Prehistoricman
Advanced Cheater
Reputation: 0

Joined: 02 Aug 2016
Posts: 80

PostPosted: Fri Nov 17, 2017 2:19 am    Post subject: Reply with quote

What instructions exist after the fcom and fcomp? They might be checking if you're supposed to be dead.

Try putting this before the fld in your AA script:

mov [eax], (float)100

Where 100 is the health you want to have.

_________________
Er, hi
Back to top
View user's profile Send private message
Ejay1984
Newbie cheater
Reputation: 0

Joined: 16 Nov 2017
Posts: 24

PostPosted: Fri Nov 17, 2017 2:36 am    Post subject: Reply with quote

Prehistoricman wrote:
What instructions exist after the fcom and fcomp? They might be checking if you're supposed to be dead.

Try putting this before the fld in your AA script:

mov [eax], (float)100

Where 100 is the health you want to have.


Hi,

They are;

fld dword ptr [edx]
fnstcw [esp+16]

fcom dword ptr [edx]
fnstsw ax

fcomp dword ptr [edx]
fnstsw ax
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Fri Nov 17, 2017 4:48 am    Post subject: Reply with quote

i can guess that you found:
Code:
fld dword ptr [edx]

by choosing "find out whats accesses this address" correct me im wrong.
which means this instruction is accessing your health address many time per second.

this might not be very effective as a health cheat or god mode, but you can do it this way:

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(maxhealth)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
fld dword ptr [maxhealth]
fstp dword ptr [edx]

originalcode:
fld dword ptr [edx]
fnstcw [esp+16]

maxhealth:
dd (float)100.00 // change this number to whatever your max health is

exit:
jmp returnhere

"ShovelKnight.exe"+1D0C5B:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"ShovelKnight.exe"+1D0C5B:
fld dword ptr [edx]
fnstcw [esp+16]
//Alt: db D9 02 D9 7C 24 16

_________________
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
View user's profile Send private message Visit poster's website
Ejay1984
Newbie cheater
Reputation: 0

Joined: 16 Nov 2017
Posts: 24

PostPosted: Fri Nov 17, 2017 5:56 am    Post subject: Reply with quote

OldCheatEngineUser wrote:
i can guess that you found:
Code:
fld dword ptr [edx]

by choosing "find out whats accesses this address" correct me im wrong.
which means this instruction is accessing your health address many time per second.

this might not be very effective as a health cheat or god mode, but you can do it this way:

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(maxhealth)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
fld dword ptr [maxhealth]
fstp dword ptr [edx]

originalcode:
fld dword ptr [edx]
fnstcw [esp+16]

maxhealth:
dd (float)100.00 // change this number to whatever your max health is

exit:
jmp returnhere

"ShovelKnight.exe"+1D0C5B:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"ShovelKnight.exe"+1D0C5B:
fld dword ptr [edx]
fnstcw [esp+16]
//Alt: db D9 02 D9 7C 24 16


Thanks a lot. I'll try it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites