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 


Merge auto assembler scripts into one allocated memory?

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

Joined: 07 Nov 2010
Posts: 600

PostPosted: Wed Feb 15, 2012 9:06 am    Post subject: Merge auto assembler scripts into one allocated memory? Reply with quote

I write a script and alloc some memory to "newmem"
Now in "newmem" I write:

mov [eax+C2],100
jmp "game.exe"+1230FF

Now since i have allocated 2048 bytes in "newmem"
I don't want to allocate more memory for another script.

Is there a possibility to have 2 different scripts but both use the same allocated space ?

i mean let "script1" use from newmem+00 to newmem+50
and "script2" use from newmem+50 to newmem+CF

Is this possible ?

... And of course have newmem deallocated only when both scripts are disabled ?

_________________
... Fresco
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Feb 15, 2012 10:41 am    Post subject: Reply with quote

No, only if you put both scripts in the same script

You could try globalalloc instead which is allocated once

Globalalloc does not support automated dealloc though, you will have to free it manually by deleting the userdefined symbol


Also, don't be afraid to waste megabytes of ram, every single process has 2000 mb ram available, and most games only use up to 1400 mb, so you can still throw away 600 mb ram for fun. Even if your system doesn't have enough ram the unused memory will be paged out of memory to the pagefile leaving only the pages that are actually used

_________________
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
Fresco
Grandmaster Cheater
Reputation: 4

Joined: 07 Nov 2010
Posts: 600

PostPosted: Wed Feb 15, 2012 2:10 pm    Post subject: Reply with quote

Thank You.

What about "subscripts".
I put both scripts in one script.

For example:

start newmem

script one:

line1 jmp on/off
line2 //on:
line3 //on code
line4 //off:
line5 //offcode

script two:

line 6 jmp on/off
line 7 //on:
line 8 //on code
line 9 //off:
line 10 //offcode

end newmem

and in the table have:
[X] main script
|---[X] subscript1 // if "on" then line 1=jmp on if "off" then line1=jmp off
|---[X] subscript2 // if "on" then line 6=jmp on if "off" then line6=jmp off

if main script off dealloc newmem

is that possible ... if yes how to do so ?

_________________
... Fresco
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