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 


A Quicky
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sun May 04, 2014 6:01 am    Post subject: A Quicky Reply with quote

is this possible?

if cmp [ebx],1E // compare to 30
jb +6 //if below 30 it should jump to line 18 where it "mov [ebx],1E"

it should only do it if ebx is below 30



Capture.PNG
 Description:
 Filesize:  10.42 KB
 Viewed:  6038 Time(s)

Capture.PNG


Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun May 04, 2014 11:16 am    Post subject: Reply with quote

Code:
cmp [ebx],2       /////////check if the value at ebx is less than 2
jb originalcode   /////////if the value at ebx is less than 2, jump to originalcode...otherwise...continue to sub [ebx],0
sub [ebx],0       /////////subtract 0 from the value at ebx??? what are you trying to accomplish here?
cmp [ebx],1E      /////////compare the value at ebx with 30
jb originalcode   /////////if the value at ebx is less than 30, jump to originalcode...otherwise...continue to mov [ebx],1E
mov [ebx],1E      /////////make the value at ebx become 30, then continue on to originalcode

originalcode:
//code
//code
//code


With this code, if the value at ebx is ≥ 2 and < 30, then it will be changed to 30.
Back to top
View user's profile Send private message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sun May 04, 2014 12:00 pm    Post subject: Reply with quote

++METHOS wrote:
Code:
cmp [ebx],2       /////////check if the value at ebx is less than 2
jb originalcode   /////////if the value at ebx is less than 2, jump to originalcode...otherwise...continue to sub [ebx],0
sub [ebx],0       /////////subtract 0 from the value at ebx??? what are you trying to accomplish here?
cmp [ebx],1E      /////////compare the value at ebx with 30
jb originalcode   /////////if the value at ebx is less than 30, jump to originalcode...otherwise...continue to mov [ebx],1E
mov [ebx],1E      /////////make the value at ebx become 30, then continue on to originalcode

originalcode:
//code
//code
//code


With this code, if the value at ebx is ≥ 2 and < 30, then it will be changed to 30.


Thanks man You are the best Very Happy

This code dec ammo and money and etc, its because if the value is 1 and u shoot and at the same time try to increase it, the game will crash Very Happy

i wanted to check if its higher then 1 then its able to increase and if lower then 30 then its probly ammo and i wanted to set it to 30 again Very Happy

This Newbie Thanks You Good Sir Very Happy
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun May 04, 2014 12:25 pm    Post subject: Reply with quote

Actually, I am wrong...sorry, it's still early. Based on what you wrote, you should just do this:

Code:
cmp [ebx],2
jg originalcode
mov [ebx],1E

originalcode:
//code
//code
//code


With this code, everything will run as normal until the value at ebx becomes 2 or less. If the value at ebx becomes 2 or less, it will be changed to 30.
Back to top
View user's profile Send private message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sun May 04, 2014 12:35 pm    Post subject: :D Reply with quote

++METHOS wrote:
Actually, I am wrong...sorry, it's still early. Based on what you wrote, you should just do this:

Code:
cmp [ebx],2
jg originalcode
mov [ebx],1E

originalcode:
//code
//code
//code


With this code, everything will run as normal until the value at ebx becomes 2 or less. If the value at ebx becomes 2 or less, it will be changed to 30.


Yeah heheh i see my mistak also sub [ebx],0 and then original code sub [ebx],1 ammo still decrease. im so stupid ahahhah

Thanks man Very Happy
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun May 04, 2014 1:13 pm    Post subject: Reply with quote

You realized your mistakes, so that is not stupid at all. Learning assembly is as easy as memorizing anything else, but understanding it takes time.

Regarding the sub routine...there are several ways to skin a cat, as the saying goes, and it can be fun being creative. Take, for example, your script...you could just do this:
Code:

newmem:

originalcode:
add [ebx],eax
mov ebx,[ebx]
mov ecx,[esp+14]


Very Happy
Back to top
View user's profile Send private message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sun May 04, 2014 2:30 pm    Post subject: Reply with quote

Yeah i tried nop it crashes the game but you last script works

cmp [ebx],2
jg originalcode
mov [ebx],1E

originalcode:
//code
//code
//code
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun May 04, 2014 2:58 pm    Post subject: Reply with quote

Actually, if you look close, I did not NOP the instruction. Very Happy

Either way, it probably crashes because the instruction that you are using for your injection point is accessing other addresses (in addition to your ammo and money addresses). You can dissect data structures to separate these two addresses from the rest and do even more with your script...or, use different instructions that are exclusive to your money/ammo addresses.

That being said, without changing anything, the script may work for now, but it might cause problems later.
Back to top
View user's profile Send private message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Mon May 05, 2014 8:01 am    Post subject: Fruit for thoughts Reply with quote

Yeah i see what you mean the game uses q and e to turn the camera and because of scipts camera can be rotated ahhahaha and also if i spam it e or q it make the game crash Very Happy

I would love to learn to do

Quote:
dissect data structures to separate these two addresses from the rest and do even more with your script...or, use different instructions that are exclusive to your money/ammo addresses.


if you know a good tutorial, Link it to me Very Happy

or just tell my what i should search for to find some tutorials Very Happy
Back to top
View user's profile Send private message
lamafao
Expert Cheater
Reputation: 1

Joined: 17 Apr 2013
Posts: 130

PostPosted: Mon May 05, 2014 10:07 am    Post subject: Reply with quote

this Dissect Data/Structures
or the same thing with pictures Dissect Data/Structures
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon May 05, 2014 12:18 pm    Post subject: Re: Fruit for thoughts Reply with quote

NanoByte wrote:
if you know a good tutorial, Link it to me Very Happy

or just tell my what i should search for to find some tutorials Very Happy
-Yes, follow Geri's guide above...you can use the CE tutorial that comes with Cheat Engine.
Back to top
View user's profile Send private message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Mon May 05, 2014 3:28 pm    Post subject: Reply with quote

So basically its used to find offsets Question

so i can use it to find offset of ammo and script to only target ammo?

just want to make sure i got it right Very Happy

And thanks alot Guys Very Happy



44719174.jpg
 Description:
 Filesize:  144.76 KB
 Viewed:  5887 Time(s)

44719174.jpg


Back to top
View user's profile Send private message
lamafao
Expert Cheater
Reputation: 1

Joined: 17 Apr 2013
Posts: 130

PostPosted: Mon May 05, 2014 3:47 pm    Post subject: Reply with quote

When you find something about your player like ammo/coordinates/health or anything like that, you can dissect data/structures and see if there is anything around it. Usually you can find max health and armor + other random crap near your health, or different ammo/weapons/burst fire near your ammo.

In some cases you will find everything close, like hp/armor/ammo/coordinates in the same place.
It's usually the first thing i use after i find an address..
Back to top
View user's profile Send private message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Mon May 05, 2014 3:57 pm    Post subject: Reply with quote

Ohh That makes more sense Thx Mate Very Happy
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon May 05, 2014 4:11 pm    Post subject: Reply with quote

Actually, in this case, you are not dissecting data structures to find nearby offsets for critical values. Instead, you are using it to compare against other structures (other addresses that the instruction is accessing) to find an 'ID' or value(s) to compare against...allowing you to filter out unwanted addresses.

For example:

Let's assume that your targeted instruction is accessing your money value, your ammo value and many other 'unwanted' values. If the instruction is this:

Code:
mov [ebx+08],edx


We know that the offset for your money and ammo inside their respective data structures is at +08. If we right-click on the instruction to see what addresses the instruction is accessing, we will see the money address, the ammo address and many other unwanted addresses. If we add the money address, the ammo address and a couple of unwanted addresses and compare their structures against each other, we might find that at offset +C (or something), there is a unique identifier that is exclusive to each value. For example, this value could be a string that actually says 'pistol_ammo' and 'cash' etc. With this unique 'ID', we can write a script that will only effect our ammo and money and nothing else (or whatever we want) by creating a conditional jump relative to our needs. Sometimes, finding a reliable offset to compare against can take time. Sometimes, we must dig deeper, inside pointer trees and/or compare against multiple values to narrow in on our targeted address.
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
Goto page 1, 2  Next
Page 1 of 2

 
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