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 


How to auto-change a value the instant CE connects?

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

Joined: 03 May 2022
Posts: 23

PostPosted: Sat Jul 23, 2022 7:32 pm    Post subject: How to auto-change a value the instant CE connects? Reply with quote

Hi all, I usually use hotkeys and dropdowns for values but there's 1 i need to auto-set as soon as CE connects. Can't find anything on this subject or maybe using wrong search terms, idk.

Some specifics I need plz:

It's a 4 byte value needing set to 2147483647 the moment I connect.
It does not need to be frozen, just set once, and only once.
It should not re-apply the value more than once; should not be a timer that constant writes to a value more than once.
It should not be a timer that keeps checking/running at all after the first set. If it has to be a timer, it must disable itself as soon as it finds the newly set custom value the first time so it's not running/checking constantly.
If I disconnect or turn the game off, then as soon as I connect again it must know to do the step again one time without me reminding it.
Is it possible to do?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Sat Jul 23, 2022 9:35 pm    Post subject: Reply with quote

Code:
MainForm.OnProcessOpened = function(processid, processhandle, caption)
  writeInteger(address, 0x7FFFFFFF)
end

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Devon999
Newbie cheater
Reputation: 0

Joined: 03 May 2022
Posts: 23

PostPosted: Sat Jul 23, 2022 11:33 pm    Post subject: Reply with quote

Works brilliantly! Yes! Thank you!

1 question on it:

I added a 20 second sleep before the writeInteger, as the value was written slightly earlier than I anticipated. I notice it makes CE wait 20 seconds before the process name shows up at the top of CE gui. It works but it seems odd the sleep seems to delay the showing up of the process name at top of CE. Is this ok or should I modify something? It just seems concerning that the process name waits 20 seconds even tho the process opening is what makes the sleep timer begin, so why wouldn't the process name already show up at the start of the 20 second sleep instead of when the sleep concludes?

Code:
MainForm.OnProcessOpened = function(processid, processhandle, caption)
  sleep(20000)
  writeInteger("ScBc-1-c-Mod33b-Win64-Shipping.exe+2DAF3C0", 0x7FFFFFFF)
end
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Sun Jul 24, 2022 12:06 am    Post subject: This post has 1 review(s) Reply with quote

Do it asynchronously
Code:
local timer

MainForm.OnProcessOpened = function(processid, processhandle, caption)
  if timer then timer.destroy() end
  timer = createTimer(20000, function()
    timer = nil
    writeInteger(address, 0x7FFFFFFF)
  end)
end

_________________
I don't know where I'm going, but I'll figure it out when I get there.
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