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 


[Solved] Use Value as Address in AA

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

Joined: 27 Dec 2020
Posts: 25

PostPosted: Sun Jan 31, 2021 11:13 am    Post subject: [Solved] Use Value as Address in AA Reply with quote

Already tryed to find the solution in wiki, here, google...

I have a GlobalAlloc "_textSpeedAdd". The value of my "_textSpeedAdd" var is the Address where I want to write from another AA.

But, if I make
mov [_textSpeedAdd], 1
then I'm changing the Address, not the value inside that address.

The thing is that I want to do all this inside AA, not the Table.

Thanks!!



ExampleAddressValue.png
 Description:
 Filesize:  22.11 KB
 Viewed:  1174 Time(s)

ExampleAddressValue.png




Last edited by Xenocritus on Sun Jan 31, 2021 4:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Sun Jan 31, 2021 11:28 am    Post subject: Reply with quote

In the address list, add it as a pointer and use _textSpeedAdd as the base address and 1 offset of 0.

In an AA script, treat it as a pointer:
Code:
mov eax,[_textSpeedAdd]
test eax,eax
jz notInitializedYet
// [eax] is now the value you want, do whatever with it

notInitializedYet:
// original code?
jmp return

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Xenocritus
Cheater
Reputation: 0

Joined: 27 Dec 2020
Posts: 25

PostPosted: Sun Jan 31, 2021 2:50 pm    Post subject: Reply with quote

Witchcraft!! It worked lol Very Happy

Thanks also for the "test" tip, new intruction learned!

The only problem is that, as the vars are busy, I temporary used "ecx". However, I get a glith on a specific game places

Code:
cmp ecx, A0FC
jne originalcode

mov ecx, [textSpeedAdd]
mov [ecx],4
mov ecx, A0FC

originalcode:
....

So, as I know I want to write when this value is A0FC, I just overwrite it temporary and then restored it... but, due to the glitch, seems this is not correclty implemented... Smile
Back to top
View user's profile Send private message
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Sun Jan 31, 2021 2:59 pm    Post subject: Reply with quote

That should be ok since ecx must be the same exiting the custom code as it was when it entered. The glitch is more likely caused by whatever addresses mov [ecx],4 is writing to.
Back to top
View user's profile Send private message
Xenocritus
Cheater
Reputation: 0

Joined: 27 Dec 2020
Posts: 25

PostPosted: Sun Jan 31, 2021 4:19 pm    Post subject: Reply with quote

Oh thanks!!

Yep, I missed a single instruction read while entering worldmap.

Thanks both!!!
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