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 


Saving files stored in extra files of trainer to disk.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
pozzum
Newbie cheater
Reputation: 0

Joined: 19 Jun 2015
Posts: 22

PostPosted: Thu Feb 11, 2016 10:13 am    Post subject: Saving files stored in extra files of trainer to disk. Reply with quote

Hi there.

Is it possible to include extra files inside a trainer exe and save them to disk when the trainer is run?

my preference would be to do this through lua but if it's only possible through other means I'd work on it that way.

The idea is to have a user run the trainer from the game folder and have the trainer replace / update / add a few new files.

Any help / advice would be appreciated.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Thu Feb 11, 2016 10:50 am    Post subject: Reply with quote

findTableFile('name').Stream.saveToFile('filepath')

for trainers the global var TrainerOrigin contains the path to the trainer

_________________
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
pozzum
Newbie cheater
Reputation: 0

Joined: 19 Jun 2015
Posts: 22

PostPosted: Thu Feb 11, 2016 11:35 am    Post subject: Reply with quote

Ok awesome so I looked at the main.lua from there and the getData() command outputs a memory stream object. Is there some conversion I'd have to do to turn that memory stream into a table to use for a write bytes command?

Edit would read(count) be what I'm looking for, it seems that way.

Would

Data = findTableFile('name').Stream.read(count)

And then write data to the location required

The file sizes for the ones I'm using this for are pretty small and have a fixed size.

I'm just not sure if my syntax would work.
Back to top
View user's profile Send private message
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