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 


Just some noob code injection questions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
squall0833
Cheater
Reputation: 0

Joined: 20 Oct 2012
Posts: 35

PostPosted: Tue Mar 14, 2017 2:46 am    Post subject: Just some noob code injection questions Reply with quote

Hello, everyone

just a simple question, just to make sure how the code works by order in this case

my code


Quote:
newmem:
push edx
mov edx,[edi+A4] // move max score value into edx
cmp [edi+A0],edx // compare if current score reached max
je originalcode
inc [edi+A0] // increase current score by 1
pop edx
jmp return

originalcode:
pop edx
mov [edi+A0],eax //move new score value into current score
jmp return



questions:
1. does it mean the code only stops at end of newmem: if score isn't max?
2. is the "jmp return" necessary in newmem? or on both newmem/originalcode?
3. do I need a 2nd "pop edx" in originalcode for restore edx when the score is equal?

Just want to understand how these codes work as clear as possible
thank you all Smile

Currently playing HuniePop, practicing CE on this game for different ways to cheat, for learning purposes

-Max Munie
-Max Hunie
-Max Nutrition,Drink
-Instant Success in Date/Bonus Round with Maximum Munies Score
-Unlimited Moves, Sentiment
-Max Passion
-Bonus Round Only:
-Meter Fills slowly
-Instant Topless
Back to top
View user's profile Send private message
gameplayer
Advanced Cheater
Reputation: 2

Joined: 26 Jun 2011
Posts: 97
Location: Vietnam

PostPosted: Tue Mar 14, 2017 9:01 am    Post subject: Reply with quote

All the "jmp return" lines are necessary.
The 2nd "pop edx" must be present, otherwise the game crashes soon.
If the score doesn't reach max value, the code will end at the first "jmp return" line.
Back to top
View user's profile Send private message
squall0833
Cheater
Reputation: 0

Joined: 20 Oct 2012
Posts: 35

PostPosted: Tue Mar 14, 2017 10:23 am    Post subject: Reply with quote

gameplayer wrote:
All the "jmp return" lines are necessary.
The 2nd "pop edx" must be present, otherwise the game crashes soon.
If the score doesn't reach max value, the code will end at the first "jmp return" line.


Thanks!

So I'm doing it right. I might try to do something like increase XP or reward gain

is it possible?

like make it x10 or more

for example, kills an enemy gives u +55 xp, the use CE make it +550 by multiply 10 or something
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Mar 14, 2017 12:27 pm    Post subject: Reply with quote

Only one instance of pop edx is required if you structure it like this:

Code:
newmem:
push edx
mov edx,[edi+A4] // move max score value into edx
cmp [edi+A0],edx // compare if current score reached max
pop edx
je originalcode
inc [edi+A0] // increase current score by 1
jmp return

originalcode:
mov [edi+A0],eax //move new score value into current score
jmp return


Most of your script is unnecessary, however, depending on what you are trying to accomplish.

Just move max score in to current score:

Code:
newmem:
push edx
mov edx,[edi+A4]
mov [edi+A0],edx
pop edx
jmp return
Back to top
View user's profile Send private message
squall0833
Cheater
Reputation: 0

Joined: 20 Oct 2012
Posts: 35

PostPosted: Tue Mar 14, 2017 1:28 pm    Post subject: Reply with quote

++METHOS wrote:
Only one instance of pop edx is required if you structure it like this:

Code:
newmem:
push edx
mov edx,[edi+A4] // move max score value into edx
cmp [edi+A0],edx // compare if current score reached max
pop edx
je originalcode
inc [edi+A0] // increase current score by 1
jmp return

originalcode:
mov [edi+A0],eax //move new score value into current score
jmp return


Most of your script is unnecessary, however, depending on what you are trying to accomplish.

Just move max score in to current score:

Code:
newmem:
push edx
mov edx,[edi+A4]
mov [edi+A0],edx
pop edx
jmp return


Thanks for the info,
So it's okay to pop the register right after cmp? the cmp result will still jump? i didnt know that, thankx


and yeah, I didnt make it max score instantly, was trying to do something such as in some cases like,

when the Score in game decreasing constantly, the instruction is running many times every second, if set it as instant go max, the game will end immediately right after the game starts.

it was the game, HuniePop at Bonus Game where the score constantly dropping, instead, I make it increase slowly, so player can still play the game and scores until win the game.


Now I'm trying to make XP Gain in Shadow of Mordor, such as double XP or triple,

but couldn't understand how to use mul or any multiplication method
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