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 


Auto enable Cheats when starting

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Kackboon
How do I cheat?
Reputation: 0

Joined: 28 May 2018
Posts: 2

PostPosted: Mon May 28, 2018 5:10 am    Post subject: Auto enable Cheats when starting Reply with quote

Hello,

my code in the auto-assembler looks like this:

[ENABLE]
Manager11.CheckForKitColorClashing+C7B2:
nop
nop
Manager11.CheckForKitColorClashing+C7CB:
nop
nop
[DISABLE]
Manager11.CheckForKitColorClashing+C7B2:
je Manager11.CheckForKitColorClashing+C7C7
Manager11.CheckForKitColorClashing+C7CB:
jl Manager11.CheckForKitColorClashing+C762

I save it as a EXE with a shortcut (alt+t) to switch between enable and disable.
Works without any problems.

I would like to know if it is possible to auto-enable the entries after starting the trainer.exe?

regards
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Mon May 28, 2018 6:06 am    Post subject: Reply with quote

in the lua script section of your trainer add some code that either watches for the openprocess event, and then start a timer, or just start a timer anyhow, and in there check if the Active property of the memoryrecord with that code is true or not.
if it's not the case, set it to true. If activating fails because the process hasn't been attached yet, the next time the timer runs it sees it's false, and then tries again till it works

to get the memoryrecord use
Code:

memrec=AddressList.GetMemoryRecordByDescription('No description')


to create a timer do something like:
Code:

t=createTimer()
t.Interval=1000
t.OnTimer=function(t)
  --check if memrec.Active is false and if so set it to true
end
t.Enabled=true

_________________
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
Kackboon
How do I cheat?
Reputation: 0

Joined: 28 May 2018
Posts: 2

PostPosted: Tue May 29, 2018 1:38 am    Post subject: Reply with quote

Thank you, I will test this later.

Just a short question: What does the intervall (1000) stand for? Minutes, seconds or miliseconds?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue May 29, 2018 2:43 am    Post subject: Reply with quote

millseconds (1000=1 second)
_________________
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
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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