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 


I want to make AA script to be one-click

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

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Fri May 11, 2012 5:45 am    Post subject: I want to make AA script to be one-click Reply with quote

The script works fine but it uses ENABLE which enables the cheat and DISABLE to disable. The problem with that is that if it's enabled for too long it just crashes the game, so for convenience I want that when I enable the cheat it would disable itself (basically I would want one click to enable the cheat by setting 999 ammo and instantly disable it).

Code:
alloc(newmem,256)
[ENABLE]
RE5DX10.exe+81527F:
mov [ecx+9],eax

[DISABLE]
RE5DX10.exe+81527F:
mov [ecx+8],eax



I tried this but it didn't work either:

Code:
alloc(newmem,256)
[ENABLE]
label(Back)
RE5DX10.exe+81527F:
mov [ecx+9],eax

Back:
[DISABLE]
RE5DX10.exe+81527F:
mov [ecx+8],eax


I thought that back = disable, so that means that ENABLE disables AA script at the end.

Any ideas? Keep in mind that I will be using it in trainer maker (CE) and I think I need ENABLE and DISABLE parts.
Back to top
View user's profile Send private message
igor
Expert Cheater
Reputation: 1

Joined: 04 Apr 2012
Posts: 145

PostPosted: Fri May 11, 2012 6:21 am    Post subject: Reply with quote

post a screen shot of memory viewer of that address. I want to see its bytes

Last edited by igor on Fri May 11, 2012 6:40 am; edited 2 times in total
Back to top
View user's profile Send private message
OmegaCES
Cheater
Reputation: 1

Joined: 02 Jul 2011
Posts: 44

PostPosted: Fri May 11, 2012 6:33 am    Post subject: Reply with quote

You could inject the code with a cmp added.

Then when you want it enabled change the memory address that the cmp checks to 1 with a hotkey or button click or w.e. then make it set that address to 0 after its changed the hp to 999.
otherwise just do the normal.

Also I don't have the game installed, but you are moving EAX into +9 then eax into + 8 on disable, this could be why its crashing, when ammo reaches too high?
I haven't seen the code block and haven't done much GH lately.
But this is what I would start with.

I'd just mov 999 into the + 9 or +8 whichever the right address is.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Fri May 11, 2012 6:55 am    Post subject: Reply with quote

I hope this script is just an example and not the actual script (if not, I can guess why it crashes)

There are multiple solutions.
1: Do a full code injection instead of a simple byte change
In there restore the code to it's original once it has been executed

2: A lua timer. In a lua script execute the AutoAssemble([[yourenablescript]]) and then spawn a timer, that after a second or two calls AutoAssemble([[yourdisablescript]])

_________________
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
igor
Expert Cheater
Reputation: 1

Joined: 04 Apr 2012
Posts: 145

PostPosted: Fri May 11, 2012 7:08 am    Post subject: This post has 1 review(s) Reply with quote

SvcHost wrote:
post a screen shot of memory viewer of that address. I want to see its bytes
Ok Sorry I have the game Resident Evil 5 DX10 version

I made this for you. I tested it, works fine. It set ammo to 999 then restore the original bytes.

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
alloc(originalcode,7)
originalcode:
db 2B 44 24 08 89 41 08

fullaccess("RE5DX10.EXE"+81527B,7)
"RE5DX10.EXE"+81527B:
jmp newmem
nop
nop
returnhere:

newmem:
sub eax,[esp+08]
mov [ecx+08],(int)999 //change health to 999

//restore with original bytes
pushad //can't be bothered
pushfd
cld
mov ecx,7  //nr of bytes
mov esi, originalcode
mov edi, "RE5DX10.EXE"+81527B
rep movsb
popfd
popad
jmp returnhere

[DISABLE]


You don't need any code for disable section because it restore original code automatically.



RE5DX10.CT
 Description:

Download
 Filename:  RE5DX10.CT
 Filesize:  1007 Bytes
 Downloaded:  989 Time(s)


_________________
r--._,---------------.
"-, .c-.-----------""
/ i--'
C__J
Back to top
View user's profile Send private message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Fri May 11, 2012 5:18 pm    Post subject: Reply with quote

Thanks SvcHost, worked like a charm! I've tried reading the code but I could't understand like half of it. I guess I'll stick to pointer scanning/nopping.

And yes Dark Byte that was an actual script and I was proud of it lol.
Back to top
View user's profile Send private message
igor
Expert Cheater
Reputation: 1

Joined: 04 Apr 2012
Posts: 145

PostPosted: Fri May 11, 2012 7:46 pm    Post subject: Reply with quote

Eraser wrote:
Thanks SvcHost, worked like a charm! I've tried reading the code but I could't understand like half of it. I guess I'll stick to pointer scanning/nopping.

And yes Dark Byte that was an actual script and I was proud of it lol.
I Learned this from Geri, 5 months ago.
http://forum.cheatengine.org/viewtopic.php?t=545001

Thank You, Geri
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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