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 


How to Combine Two Scripts?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
The Only Sane Man
How do I cheat?
Reputation: 0

Joined: 05 Mar 2014
Posts: 1

PostPosted: Thu Mar 06, 2014 5:09 pm    Post subject: How to Combine Two Scripts? Reply with quote

Greetings, Comrades!

I am currently learning the way of Assembly. Recently I have come across a wall.

I have two scripts. One that forcibly modifies the money of the game to change to 999999 when I spend it, the other when I gain it.

How would I go about combining these scripts? Here they are, for reference:

Code:
//Overall money is modified to 999999 when it is lost
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere_lose)
label(no_lose)
label(exit_lose)

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


no_lose:
mov [ecx+10],f423f
mov al,01

exit_lose:
jmp returnhere_lose

"MajestyHD.exe"+1BE18F:
jmp newmem
returnhere_lose:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"MajestyHD.exe"+1BE18F:
mov [ecx+10],eax
mov al,01
//Alt: db 89 41 10 B0 01



Code:
//Overall money is modified to 999999 when gained
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere_gain)
label(no_gain)
label(exit_gain)

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

no_gain:
mov [ecx+10],f423f
pop ebp
mov al,01

exit_gain:
jmp returnhere_gain

"MajestyHD.exe"+F0447:
jmp newmem
nop
returnhere_gain:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"MajestyHD.exe"+F0447:
mov [ecx+10],eax
pop ebp
mov al,01
//Alt: db 89 41 10 5D B0 01


All help is appreciated.
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