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]How to toggle a 2 level pointer's value in AAscript?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Alice0725
Expert Cheater
Reputation: 11

Joined: 24 Jul 2012
Posts: 145

PostPosted: Sat Jul 28, 2012 7:57 am    Post subject: [solved]How to toggle a 2 level pointer's value in AAscript? Reply with quote

Example:
Infinite Ammo(byte):[[[0116F1CC]+48]+18]=? // 1:Enable, 0:Disable

I know, we can use CE'S Hotkey Action to toggle freeze, but can't toggle Value!

So I try to change the value in AAScript , then we use the toggleScript Action.

I write the codes, It doesn't work
Code:

[ENABLE]
globalalloc(cheater,2048)
cheater:
pushad
pushfd
mov eax,[0116F1CC]
mov ebx,[eax+48]
mov byte [ebx+18],01
popfd
popad


[DISABLE]
globalalloc(cheater,2048)

cheater:
pushad
pushfd
mov eax,[0116F1CC]
mov ebx,[eax+48]
mov byte [ebx+18],00
popfd
popad

dealloc(cheater)



then , I use this :
Code:

[ENABLE]
globalalloc(cheater,2048)
label(returnhere)

004F915A:
jmp cheater
nop
nop
returnhere:

cheater:
mov byte ptr [eax+000015D4],01 //enable Infinite Ammo
cmp byte ptr [eax+000015D4],00 //original code
jmp returnhere //always return


[DISABLE]
globalalloc(cheater,2048)
label(returnhere)

004F915A:
jmp cheater
nop
nop
returnhere:

cheater:
mov byte ptr [eax+000015D4],00 //disable Infinite Ammo
cmp byte ptr [eax+000015D4],00 //original code
jmp returnhere //always return

This time, It worked, but not so good! Even disable the cheat, It also change the game's code! How to fix this? Help?????


Last edited by Alice0725 on Sat Jul 28, 2012 8:50 am; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25831
Location: The netherlands

PostPosted: Sat Jul 28, 2012 8:38 am    Post subject: Reply with quote

Try something like this:
Code:

[Enable]
[[0116F1CC]+48]+18:
dd 1

[Disable]
[[0116F1CC]+48]+18
dd 0


_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Alice0725
Expert Cheater
Reputation: 11

Joined: 24 Jul 2012
Posts: 145

PostPosted: Sat Jul 28, 2012 8:49 am    Post subject: Reply with quote

Dark Byte wrote:
Try something like this:
Code:

[Enable]
[[0116F1CC]+48]+18:
dd 1

[Disable]
[[0116F1CC]+48]+18:
dd 0


Thanks! Very Nice! Laughing
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