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 


Idk where I'm wrong

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

Joined: 23 Jan 2016
Posts: 39

PostPosted: Sun Nov 06, 2016 9:57 am    Post subject: Idk where I'm wrong Reply with quote

Hey there,
I've some trouble making a godmode.
I've found the address and disabled it but the new units are created with the lowest health and the buindings explode... How can I fix this?

this is the code:
Code:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
push edi
mov edi,[esi+1c8]
mov edi,[edi+8]
cmp edi,6D616574
pop edi
jne originalcode
mov eax,[esi+000000F8]

originalcode:
mov [esi+000000F8],eax

exit:
jmp returnhere

"dr2.exe"+45851:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"dr2.exe"+45851:
mov [esi+000000F8],eax
//Alt: db 89 86 F8 00 00 00



file3.png
 Description:
 Filesize:  65.84 KB
 Viewed:  5980 Time(s)

file3.png



file2.png
 Description:
 Filesize:  67.36 KB
 Viewed:  5980 Time(s)

file2.png



file1.png
 Description:
 Filesize:  66.01 KB
 Viewed:  5980 Time(s)

file1.png



file.jpg
 Description:
 Filesize:  76.73 KB
 Viewed:  5980 Time(s)

file.jpg




Last edited by brisingr on Thu Nov 10, 2016 8:02 am; edited 1 time in total
Back to top
View user's profile Send private message
Gavin
Moderator
Reputation: 114

Joined: 30 Apr 2007
Posts: 1069

PostPosted: Sun Nov 06, 2016 2:42 pm    Post subject: Reply with quote

Have you tried finding the health value and freezing it at full?

Also which game is this for?
Back to top
View user's profile Send private message
brisingr
Cheater
Reputation: 0

Joined: 23 Jan 2016
Posts: 39

PostPosted: Sun Nov 06, 2016 5:23 pm    Post subject: Reply with quote

It's Dark Reign 2, an old war strategy game.
I've tryied to freeze it, but it affects friendly and enemy units at the health they have...
New units are created with the lowest health and the buildings construction never starts, they explode at the beginning.
Back to top
View user's profile Send private message
rog9001
Expert Cheater
Reputation: 2

Joined: 22 Dec 2015
Posts: 214
Location: Jupiter

PostPosted: Tue Nov 08, 2016 12:12 pm    Post subject: Reply with quote

lol. In your data structure you had to do "-F8" for all the addresses.
Try changing [esi+1C8] to [esi+D0]
Back to top
View user's profile Send private message
brisingr
Cheater
Reputation: 0

Joined: 23 Jan 2016
Posts: 39

PostPosted: Thu Nov 10, 2016 6:47 am    Post subject: Reply with quote

Ty rog9001 for the reply.
Unfortunately I got the same problem of building exploding, is it because the hp of the buildings is given by the process time?
Maybe I should find the address that gives the final hp for the buildings and the script should applies it at the beginning of the building process or maybe the address used when the building process start, but I have no idea how to do this... Any suggestions?

update:
I've tryied using again the code, and I've noticed that I've the problem playing with one faction, with the otherone everything works fine, also, sometimes, the game crashes.
I'm not sure if I did any mistake in the in the assemble script.
here is the code:
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
cmp [esi+1c],0
jne originalcode
mov eax,[esi+000000F8]

originalcode:
mov [esi+000000F8],eax

exit:
jmp returnhere

"dr2.exe"+45851:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"dr2.exe"+45851:
mov [esi+000000F8],eax
//Alt: db 89 86 F8 00 00 00


Here is the link for the structure:
http://www.filedropper.com/1_384

P.S. I've tryied to upload directly but appears an error message
Back to top
View user's profile Send private message
brisingr
Cheater
Reputation: 0

Joined: 23 Jan 2016
Posts: 39

PostPosted: Wed Dec 07, 2016 10:24 am    Post subject: Reply with quote

Hey again,
I still have the same trouble, I've tryied other script but nothing has changed.
I suppose the script is right, it works, but randomly the game stops, and I don't understand where is the problem.
There is a log on the screen when the game crashes:

ERR |Debug | debug:747 |16:21:59|259611 |[ E X C E P T I O N ]
ERR |Debug | debug:932 |16:21:59|259611 |Type: ACCESS VIOLATION
ERR |Debug | debug:933 |16:21:59|259612 |Info: READING from 00000010h
ERR |Debug | debug:349 |16:21:59|259612 |CallStack:
ERR |Debug | debug:599 |16:21:59|259654 |00442365 dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259654 |0043FC68 dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259655 |00724126 dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259656 |006B76EA dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259656 |006B72D6 dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259657 |006C07AA dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259657 |00561ACE dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259658 |00561ACE dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259658 |0055EA8C dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259658 |00499AAD dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259658 |00401F44 dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259659 |005DCB52 dr2 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259688 |7758338A kernel32 unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259692 |77B89902 ntdll unknown [0000] unknown(0) [0000]
ERR |Debug | debug:599 |16:21:59|259692 |77B898D5 ntdll unknown [0000] unknown(0) [0000]
ERR |Debug | debug:372 |16:21:59|259693 |Registers:
ERR |Debug | debug:373 |16:21:59|259693 |EAX: 00000010h CS: 00000023h DS: 0000002Bh
ERR |Debug | debug:374 |16:21:59|259693 |EBX: 00000004h EIP: 00442365h ES: 0000002Bh
ERR |Debug | debug:375 |16:21:59|259694 |ECX: 00000014h SS: 0000002Bh FS: 00000053h
ERR |Debug | debug:376 |16:21:59|259694 |EDX: 00000004h EBP: 0018FAF4h GS: 0000002Bh
ERR |Debug | debug:377 |16:21:59|259694 |ESI: 0C415784h ESP: 0018FAF0h
ERR |Debug | debug:378 |16:21:59|259695 |EDI: 00000014h
ERR |Debug | debug:387 |16:21:59|259695 | CF: 00210206h PF:0 AF:1 ZF:0 SF:0 OF:0
ERR |Debug | debug:953 |16:21:59|259695 |Stack: 4
ERR |Utils | utils:963 |16:21:59|259695 | 000000 FC D2 88 0B - üÒˆ.
DIAG|Debug | debug:266 |16:21:59|259696 |entering AtExit::Execute
DIAG|GLOBAL | maininit:1247 |16:21:59|259696 |Entering Main::CriticalShutdown
DIAG|GLOBAL | sound:121 |16:21:59|259721 |Entering Sound::CriticalShutdown
DIAG|GLOBAL | sound:129 |16:21:59|259733 |Leaving Sound::CriticalShutdown
DIAG|Input | input:774 |16:21:59|259734 |Entering Input::Done
DIAG|Input | input:807 |16:21:59|259734 |Leaving Input::Done
DIAG|GLOBAL | maininit:1267 |16:21:59|259736 |Leaving Main::CriticalShutdown
DIAG|Debug | debug:281 |16:21:59|259736 |leaving AtExit::Execute
DIAG|Debug | debug:968 |16:21:59|259737 |Exception::Filter: post shutdown
DIAG|Debug | debug:985 |16:21:59|259737 |Exception::Filter: pre DialogBox
Back to top
View user's profile Send private message
Kavvman
Master Cheater
Reputation: 2

Joined: 17 Apr 2004
Posts: 316

PostPosted: Wed Dec 07, 2016 12:10 pm    Post subject: Reply with quote

Maybe your pointer becomes invalid at some points or it could be the game is just buggy (that happens sometimes).
_________________
...
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Dec 07, 2016 1:51 pm    Post subject: Reply with quote

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
cmp [esi+1c],0
jne originalcode
cmp [esi+000000F8],eax
jl originalcode
mov eax,[esi+000000F8]

originalcode:
mov [esi+000000F8],eax

exit:
jmp returnhere

"dr2.exe"+45851:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"dr2.exe"+45851:
mov [esi+000000F8],eax
//Alt: db 89 86 F8 00 00 00
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