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 


Help looping this script with a timer

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

Joined: 09 Dec 2022
Posts: 2

PostPosted: Wed Jan 11, 2023 6:34 am    Post subject: Help looping this script with a timer Reply with quote

I need to repeat this script continuosly

Code:
[code]getAddressList().getMemoryRecordByDescription("script").Active=true[/code]
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Wed Jan 11, 2023 7:04 am    Post subject: Reply with quote

Code:

if tmr1 then tmr1.Destroy() tmr1=nil end

tmr1 = createTimer()
tmr1.Interval = 50 -- 1000 = 1 second ..
tmr1.Enabled=false

tmr1.OnTimer=function()
getAddressList().getMemoryRecordByDescription("script").Active=true
end

-- timer start - stop opsiyon key:
function tmrOps()
 sleep(150)
  if tmr1.Enabled==false then
   tmr1.Enabled=true
  else
   tmr1.Enabled=false
  end
end

if tmrkey then tmrkey.Destroy() tmrkey=nil end

tmrkey = createHotkey(tmrOps, VK_F8)

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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