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 


red alert 2 tanya health.

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

Joined: 28 Jun 2010
Posts: 662

PostPosted: Fri Jul 30, 2010 3:14 pm    Post subject: red alert 2 tanya health. Reply with quote

Game : red alert2
hack : Tanya's infinite life
genre: rts

i am trying to make Tanya's life infinite.
BUT MY CODE ALSO BENEFITS COMPUTER AI.
what is wrong with my code.

Code:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(playerhealth,4)
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
playerhealth:
dw 0
005D3D31:
jmp newmem
returnhere:

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
pushad
mov ebx,[esi+6c]
mov [playerhealth],ebx
popad

originalcode:
mov eax,[esi+6c]
test eax,eax

exit:
jmp returnhere

//*****************************************************
alloc(newmem2,2048) //2kb should be enough
label(returnhere2)
label(originalcode2)
label(exit2)

005D3E65:
jmp newmem2
nop
nop
nop
nop
returnhere2:

newmem2: //this is allocated memory, you have read,write,execute access
//place your code here
pushad
mov ebx,[esi+6c]
cmp ebx,[playerhealth]
jne originalcode2
mov [esi+6c],fa
popad
jg 005d3f39
jmp returnhere2
originalcode2:
mov [esi+6c],eax
jg 005d3f39

exit2:
jmp returnhere2
//*******************************************************
 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
005D3D31:
mov eax,[esi+6c]
test eax,eax

dealloc(newmem2)
005D3E65:
mov [esi+6c],eax
jg 005d3f39


Last edited by Freiza on Sat Jul 31, 2010 6:18 pm; edited 6 times in total
Back to top
View user's profile Send private message Send e-mail
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Fri Jul 30, 2010 4:12 pm    Post subject: Reply with quote

The function you're editing is a class method, e.g. setHealth(int value).
It's called both by your troops and by your enemy's. Inspect the class and you should find a field along the lines of playerNumber or isPlayerControlled. Just check that and make your code skip the godmode part if the caller is an enemy object.
Back to top
View user's profile Send private message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Fri Jul 30, 2010 4:37 pm    Post subject: Reply with quote

I already dissected the data. but found nothing useful.(i was unable to understand the data)
some more help needed.
How to find playerunit. any clue.
Back to top
View user's profile Send private message Send e-mail
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Fri Jul 30, 2010 6:12 pm    Post subject: Reply with quote

Just set a breakpoint in that function, write down esi and unpause the game. Get at least two values obviously and then dissect them in memory and check all the differences. Some patience and you'll find it.
Back to top
View user's profile Send private message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Sat Jul 31, 2010 7:54 am    Post subject: Reply with quote

setting breakpoint freezes the game. and there is way out.
and i dont have dual monitor support.
Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat Jul 31, 2010 8:10 am    Post subject: Reply with quote

set a break and trace at that location for a count of 1
or even better, use the function "Find out what addresses this code accesses"

_________________
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
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Sat Jul 31, 2010 1:59 pm    Post subject: solved Reply with quote

Thanx Dark Byte and XaLeX for reply.
Back to top
View user's profile Send private message Send e-mail
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