| View previous topic :: View next topic |
| Author |
Message |
fenixx3 How do I cheat?
Reputation: 0
Joined: 24 Oct 2015 Posts: 3
|
Posted: Sat Oct 24, 2015 6:09 am Post subject: Cheat engine speedhack with timer. |
|
|
Hello!
I wanted to ask - Is there a script that allows cheatengine's speedhack to stop for a certain time and then start again?
I would be very thankful if someone could help me.
Thanks!
_________________
hype |
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 154
Joined: 06 Jul 2014 Posts: 4752
|
Posted: Sat Oct 24, 2015 11:03 am Post subject: |
|
|
You could use speedhack_setSpeed(value) and sleep(milliseconds).
i.e.:
| Code: | speedhack_setSpeed(1) --disables speedhack
sleep(1000) --waits for 1 second
speedhack_setSpeed(2) --enables speedhack |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
fenixx3 How do I cheat?
Reputation: 0
Joined: 24 Oct 2015 Posts: 3
|
Posted: Sat Oct 24, 2015 12:00 pm Post subject: |
|
|
| ParkourPenguin wrote: | You could use speedhack_setSpeed(value) and sleep(milliseconds).
i.e.:
| Code: | speedhack_setSpeed(1) --disables speedhack
sleep(1000) --waits for 1 second
speedhack_setSpeed(2) --enables speedhack |
| °
Looks good, thanks - but what about the timer?
For now it only works manually by pressing the execute button.
Is there a way to set start-stop-start (function)... after a certain time (like after 120 sec) ?
Sorry for stupid questions, only today started to check cheat engine for the first time :/
_________________
hype |
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 154
Joined: 06 Jul 2014 Posts: 4752
|
Posted: Sat Oct 24, 2015 12:37 pm Post subject: |
|
|
You can make a hotkey for it, like F1 for example:
| Code: | function pauseSpeedhack()
speedhack_setSpeed(1)
sleep(1000)
speedhack_setSpeed(2)
end
createHotkey(pauseSpeedhack, VK_F1) |
Other key codes can be found here.
If you'd like it to run periodically every 120 seconds, then:
| Code: | function pauseSpeedhack()
speedhack_setSpeed(1)
sleep(1000)
speedhack_setSpeed(2)
end
if t and t.destroy then t.destroy() end
t = nil
t = createTimer(nil,true)
t.setInterval(120000)
t.setOnTimer(pauseSpeedhack) |
Note that the timer's interval acts independent of any delays in the function it's running. AKA: It doesn't matter how long the delay is between stopping and starting the speedhack, the timer will run that function every 120 seconds.
To disable the timer, open up the Lua Engine (memory viewer, Tools -> Lua Engine), then call t.destroy() then set t=nil.
Edit: or you could just call t.setEnabled(false) if you want to re-enable it from there w/ t.setEnabled(true).
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
fenixx3 How do I cheat?
Reputation: 0
Joined: 24 Oct 2015 Posts: 3
|
|
| Back to top |
|
 |
|