Question about readmem and je command

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
wannaknow
Novice Cheater
Novice Cheater
Posts: 16
Joined: Thu Mar 17, 2022 7:31 am
Reputation: 0

Question about readmem and je command

Post by wannaknow »

HELLO

lblPlayerGrabber:
readmem(aobPlayerGrabber,7)
je lblPlayerGrabberSkip
mov dword ptr [pPlayerCharacter],edi

Above is a part of the script of some game already written by someone and it works fine.

Im trying to learn CE through scripts already written like this.

the cmp command usually comes before je so that i could know what the je would compare at that situation.

But the command "readmem" is just before the command "je" at the above script.

Then what does je compare?

And one more thing, I wanna know why actually readmem is needed.

Could you please give me some or just one example to show the role of readmem command?

I know readmem copies bytes of the variable but I couldn't get why it is needed.

Sorry about such a elementary question but please consider that I have no source to get information about this language.

GreenHouse
Expert Cheater
Expert Cheater
Posts: 852
Joined: Fri Oct 12, 2018 10:25 pm
Reputation: 896

Re: Question about readmem and je command

Post by GreenHouse »

wannaknow wrote:
Mon Jul 04, 2022 2:43 am
Then what does je compare? And one more thing, I wanna know why actually readmem is needed.
Seeing that "aobPlayerGrabber" is the first thing there, I'd say that readmem is reading the bytes from the original AOB which includes a compare. Which is why the "je" is there. Also the readmem there is probably used to avoid update problems when the offsets change. So you add a wildcard to the offset part of the AOB, and then use readmem to read the original offset, and then also save it in an alloc to use it again when disabling, so the offset is correct again.

wannaknow
Novice Cheater
Novice Cheater
Posts: 16
Joined: Thu Mar 17, 2022 7:31 am
Reputation: 0

Re: Question about readmem and je command

Post by wannaknow »

Thanks. Finally understood the role of readmem. But I found that the je line was useless. I tried to remove the line and nothing different happened. Anyway thank you.

jgoemat
Table Makers
Table Makers
Posts: 73
Joined: Fri Jul 21, 2017 6:47 pm
Reputation: 77

Re: Question about readmem and je command

Post by jgoemat »

From looking at the code you supplied, you may find if you remove the je that pPlayerCharacter sometimes points to enemies :)

Post Reply

Who is online

Users browsing this forum: No registered users