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 


instant build ra2 code problem.

 
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: Sat Jul 31, 2010 7:29 pm    Post subject: instant build ra2 code problem. Reply with quote

Is there any syntax mistake??
my game crashes.
GAME = RED ALERT 2 (SKIRMISH MODE)

Code:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
//**********************************************************************
alloc(instant,4)                // allocating variable to store pointer
alloc(newmem2,2048) //2kb should be enough
label(returnhere2)
label(originalcode2)
label(exit2)
instant:                         // Is this and next line necessary???
dd 0

004B98F0:
jmp newmem2
returnhere2:

newmem2: //this is allocated memory, you have read,write,execute access
//place your code here
pushfd                                // pushing flags
push ebx
lea ebx,[ecx+24]
mov [instant],ebx                   //saving my pointer for later use
pop ebx
popfd

originalcode2:
mov eax,[ecx+24]      //<---cheatengine break; here memory on access
ret
nop

exit2:
jmp returnhere2
//************************************************************
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

004B9367:
jmp newmem
nop
nop
nop
returnhere:

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
pushfd
push ebx
mov ebx,[esi+24]
cmp [instant],ebx                 //i think here is some problem not sure
jne originalcode
mov edx,36                      // value 54 completes the building       
pop ebx
popfd
mov [esi+24],edx           
mov eax,[00a40d2c]
jmp returnhere
originalcode:
mov [esi+24],edx         <----cheatengine break here; memory on write
mov eax,[00a40d2c]

exit:
jmp returnhere
 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
004B9367:
mov [esi+24],edx
mov eax,[00a40d2c]

dealloc(newmem2)
004B98F0:
mov eax,[ecx+24]
ret
nop
Back to top
View user's profile Send private message Send e-mail
Geri
Moderator
Reputation: 110

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Sat Jul 31, 2010 8:45 pm    Post subject: This post has 1 review(s) Reply with quote

instant: // Is this and next line necessary???
dd 0

It does not hurt. The script would most likely work without it, but it is better if You put it in.

pushfd
push ebx
mov ebx,[esi+24]
cmp [instant],ebx //i think here is some problem not sure
jne originalcode
mov edx,36 // value 54 completes the building
pop ebx
popfd
mov [esi+24],edx
mov eax,[00a40d2c]
jmp returnhere
originalcode:
mov [esi+24],edx <----cheatengine break here; memory on write
mov eax,[00a40d2c]


Just check it out what is happening if the conditional jump is not equal:
pushfd
push ebx
mov ebx,[esi+24]
cmp [instant],ebx //i think here is some problem not sure
jne originalcode //lets say it has jumped
originalcode:
mov [esi+24],edx <----cheatengine break here; memory on write
mov eax,[00a40d2c]

Now You have jumped over this part:
pop ebx
popfd

So Your ebx register and the flags has been changed "permanently". This a good reason to crash. I guess You should jump over this line only:
mov edx,36 // value 54 completes the building

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
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 9:37 pm    Post subject: Reply with quote

Great you are a true life saver.
thanx at last i made my first instant build player only.
Back to top
View user's profile Send private message Send e-mail
MTK
How do I cheat?
Reputation: 0

Joined: 23 Mar 2011
Posts: 2

PostPosted: Wed Mar 23, 2011 11:38 pm    Post subject: Reply with quote

Freiza wrote:
Great you are a true life saver.
thanx at last i made my first instant build player only.


That's great, can you please share a step by step tutorials for this, I know you have shared one before but everyone in this forum would love to see a more detailed tutorials on Red Alert 2 Instant Build tutorial, I have been trying your instant build tutorial but found myself lost in the middle.
Back to top
View user's profile Send private message Send e-mail
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Thu Mar 24, 2011 11:17 am    Post subject: Reply with quote

Sorry.. now I don't have that game... now.


And i don't think.. Geri too have that game..

Go here: http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles


it contains everything you need to know.
Back to top
View user's profile Send private message Send e-mail
MTK
How do I cheat?
Reputation: 0

Joined: 23 Mar 2011
Posts: 2

PostPosted: Thu Mar 24, 2011 7:55 pm    Post subject: Reply with quote

Freiza wrote:
Sorry.. now I don't have that game... now.


And i don't think.. Geri too have that game..



Thanx for reply, the problem faced by me is that somehow i made it but the instant build works for AI also.
Back to top
View user's profile Send private message Send e-mail
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Fri Mar 25, 2011 4:57 am    Post subject: Reply with quote

In that case you have to find player id

or staple intersection...


If you are unfamiliar with these words.. go to the link i gave you.. it explains all these stuffs...
Back to top
View user's profile Send private message Send e-mail
satanrules666
Advanced Cheater
Reputation: 0

Joined: 31 Oct 2010
Posts: 70
Location: New Zealand

PostPosted: Tue May 31, 2011 8:51 am    Post subject: Reply with quote

have been trying to do this for ages i cant even get down passed 97 ressults

could you please just post the working script if you have it

_________________
I know you're reading this, Jiehfeng. Smile


http://forum.cheatengine.org/viewtopic.php?t=533625
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 110

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Tue May 31, 2011 11:50 pm    Post subject: Reply with quote

Try this:

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
//**********************************************************************
alloc(instant,4)                // allocating variable to store pointer
alloc(newmem2,2048) //2kb should be enough
label(returnhere2)
label(originalcode2)
label(exit2)
instant:                         // Is this and next line necessary???
dd 0

004B98F0:
jmp newmem2
returnhere2:

newmem2: //this is allocated memory, you have read,write,execute access
//place your code here
pushfd                                // pushing flags
push ebx
lea ebx,[ecx+24]
mov [instant],ebx                   //saving my pointer for later use
pop ebx
popfd

originalcode2:
mov eax,[ecx+24]      //<---cheatengine break; here memory on access
ret
nop

exit2:
jmp returnhere2
//************************************************************
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

004B9367:
jmp newmem
nop
nop
nop
returnhere:

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
pushfd
push ebx
mov ebx,[esi+24]
cmp [instant],ebx                 //i think here is some problem not sure
jne originalcode
mov edx,36                      // value 54 completes the building       

originalcode:
pop ebx
popfd
mov [esi+24],edx         <----cheatengine break here; memory on write
mov eax,[00a40d2c]

exit:
jmp returnhere
 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
004B9367:
mov [esi+24],edx
mov eax,[00a40d2c]

dealloc(newmem2)
004B98F0:
mov eax,[ecx+24]
ret
nop

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
satanrules666
Advanced Cheater
Reputation: 0

Joined: 31 Oct 2010
Posts: 70
Location: New Zealand

PostPosted: Wed Jun 01, 2011 4:06 am    Post subject: Reply with quote

Nope doesnt work though thats most likely because i have version 1.006 and the version here is 1.0
_________________
I know you're reading this, Jiehfeng. Smile


http://forum.cheatengine.org/viewtopic.php?t=533625
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 110

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Wed Jun 01, 2011 6:01 am    Post subject: Reply with quote

Well, then it won't work for sure.
_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
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