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 


Help with comparing

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

Joined: 25 Sep 2016
Posts: 6

PostPosted: Sun Oct 02, 2016 5:07 pm    Post subject: Help with comparing Reply with quote

Hello guys,
I hope somebody can help me...
I would like to compare the Value that is stored in the Offset "0019"
with the Value 1280 but for me it is not working Sad (To explain what I want to do: In my game there are bunch of stats like ATT power, DEF Power and if I directly modify my code Everything is going UP so the ATK Power + the DEF Power but what I want is, that I can edit the ATT power and the DEF Power seperately)

At the screenshot you can look at the data structure and my code:

prnt.sc/cp27vw // I cant post Urls ...

My code is the following :

Code:
newmem:
cmp [rsi+19],#1280
jmp originalcode
sub al,30

originalcode:
mov [rsi-01],al
cmp edi,1A
Back to top
View user's profile Send private message
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Sun Oct 02, 2016 6:02 pm    Post subject: Reply with quote

Please show the rest of your code. It doesn't look quite right. It looks like "sub al,30" would never get executed. I think you may want to use a conditional jump like "jne originalcode " which will allow the following instruction to run if the value was 1280.
Back to top
View user's profile Send private message
JolofM
How do I cheat?
Reputation: 0

Joined: 25 Sep 2016
Posts: 6

PostPosted: Sun Oct 02, 2016 6:25 pm    Post subject: Reply with quote

sbryzl wrote:
Please show the rest of your code. It doesn't look quite right. It looks like "sub al,30" would never get executed. I think you may want to use a conditional jump like "jne originalcode " which will allow the following instruction to run if the value was 1280.


Yes thats exactly what I Want!
So if the value is 1280 the instruction should be executed.

//EDIT

Never Give up!
I did it now Smile

I had a mistake in the Datatype because RSI was +1 I had to add it to the Data structure. Iam fairly new to this and iam impressed what you can do with all those stuff and iam happy that you can always ask for help here Smile

Code:
cmp [rsi+19],#5
jne originalcode
add al,29


My mistake was a datatype... I THINK Razz
do you have to add something to cmp if you have different datatypes?

Anyways TY!







/////////////////// EDIT ///////////////////////////////////////

I got a new problem Razz
Now it is working .. I get the specific Value only for ATK BUT
If I also want to edit the specific Value for DEF now it will not change because the function jumps back again Razz


My "NEW" code is looking like this for ATK
Code:
newmem:
cmp byte [rsi+10],21
jne originalcode
add al,19



And for the DEF

Code:
newmem:
cmp byte [rsi+10],18
jne originalcode
add al,16


They are both working fine if I execute them seperately but I want to execute them both not just one.

I hope someone can help me.








///////////////////////////LAST EDIT !!!! Wink //////////////////////////////////////
I got it working Smile
but I dont know if the solution is that good I would like if someone take a look at my code and says if there are better methods.

Code:
newmem: ///ATK///
cmp byte [rsi+10],21 // Hexa
jne test //jump to my new function not to the originalcode yet.
add al,19 // How much I want to add.

test:  ///DEF///
cmp byte [rsi+10],18 // Hexa
jne test2//jump to my new function not to the originalcode yet.
add al,16 // How much I want to add.

test2: ///STAMINA///
cmp byte [rsi+10],1C // Hexa
jne originalcode //jump to original because I dont need more
add al,16 // How much I want to add.
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