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 


Is this auto assembler script incorrect??

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

Joined: 21 May 2014
Posts: 82
Location: India

PostPosted: Wed Jun 04, 2014 1:05 pm    Post subject: Is this auto assembler script incorrect?? Reply with quote

In "James Cameron's Avatar-The Game", while trying to make the number of missiles of RDA choppers infinite, I used the following auto assembler script.
--------------------------------
[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(exit)

newmem:
push edi
mov edi,0
mov [eax],edi
pop edi

mov [esi+000002E0],eax
//originalcode:
//mov [esi+000002E0],eax

exit:
jmp returnhere

"Dunia.dll"+6921A6:
jmp newmem
nop
returnhere:


[DISABLE]
dealloc(newmem)
"Dunia.dll"+6921A6:
mov [esi+000002E0],eax
//Alt: db 89 86 E0 02 00 00
--------------------------------
However on enabling the script, the game freezes after firing 1 missile. Is there anything wrong in this script??

_________________
Don't underestimate the power of a common code.
Laughing
Back to top
View user's profile Send private message Visit poster's website
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Wed Jun 04, 2014 1:22 pm    Post subject: Reply with quote

Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(exit)

newmem:

// all you need to do is this
mov [eax],#100 //replace 100 with the amount u want it to freeze at
 
 // if that dosent work try this "mov eax,#100" put eax without []
//originalcode:
//mov [esi+000002E0],eax
Back to top
View user's profile Send private message
Daijobu
Master Cheater
Reputation: 13

Joined: 05 Feb 2013
Posts: 301
Location: the Netherlands

PostPosted: Wed Jun 04, 2014 1:52 pm    Post subject: Reply with quote

If [esi+000002E0] holds the value, mov [esi+000002E0],64 {100 as example}.

In your script you're moving a value into the address eax holds.

Read this: http://forum.cheatengine.org/viewtopic.php?p=5535663#5535663

I suck at explaining things, so I hope that put the point across.

_________________
Scripts/tables from scratch. Relation to other scripts is coincidental. Use of posted code is credited properly.
Euro Truck Simulator 2 Backwards Compatible Cheat
American Truck Simulator Backwards Compatible Cheat
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Wed Jun 04, 2014 3:23 pm    Post subject: Reply with quote

Maybe better to xor eax or mov eax,0 since the code could be using eax later, for example to set the display. Whatever the case, the issue is that you're currently writing a zero into the address that eax holds (which is likely small enough to be in kernel memory) instead of into eax itself - remove the brackets around the eax and you're golden.
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
Sohail__Saha
Advanced Cheater
Reputation: 0

Joined: 21 May 2014
Posts: 82
Location: India

PostPosted: Thu Jun 05, 2014 3:58 am    Post subject: Reply with quote

Hey thanks justa_dude, it works!! Very Happy
_________________
Don't underestimate the power of a common code.
Laughing
Back to top
View user's profile Send private message Visit poster's website
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