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 do I stop a script that uses sleep plus while true do en

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Stacktrace
Expert Cheater
Reputation: 1

Joined: 04 Jul 2015
Posts: 105

PostPosted: Wed Sep 09, 2015 12:58 pm    Post subject: How do I stop a script that uses sleep plus while true do en Reply with quote

Hi, I made an exploit that requires me to use the while true do end function plus a few sleep(number)'s.

The problem is, because of the sleep feature Cheat Engine pauses itself meaning I won't be able to use it because it'll just freeze and crash. The script in the background from cheat table is still running fine and everything's working fine. But I need a way to disable this script. Because if I close my game, it'll freeze in my Task Manager and no matter what I do, no programs or anything will be able to close that process. Not even if I close Cheat Engine. So I'd like to know a way I can stop that while true do end script from running? I was thinking maybe a hotkey script would do the job, but then again, how would I stop a running script from a hotkey? as I can't do anything in CE due to it being frozen plus I have to use while true do end in the script otherwise this won't work the way I want it to.

Thanks!
-Tender
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Sep 09, 2015 4:41 pm    Post subject: Reply with quote

Code:
[ENABLE]
{$lua}
if mytimer == nil then
  mytimer=createTimer(nil)
  mytimer.Interval=1000
  mytimer.OnTimer=function(t)
    while true do
      sleep(100)
    end
  end
end
mytimer.Enabled=true
{$asm}
[DISABLE]
{$lua}
mytimer.Enabled=false
{$asm}
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Wed Sep 09, 2015 4:55 pm    Post subject: Reply with quote

that script should freeze cheat engine completely
_________________
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
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Sep 09, 2015 6:08 pm    Post subject: Reply with quote

Duh... his while loop speak threw me off Smile
Code:
[ENABLE]
{$lua}
if mytimer == nil then
  mytimer=createTimer(nil)
  mytimer.Interval=1000
  mytimer.OnTimer=function(t)
    --do whatever
  end
end
mytimer.Enabled=true
{$asm}
[DISABLE]
{$lua}
mytimer.Enabled=false
{$asm}
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 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