[Lua] Timer

Section's for general approaches on hacking various options in games. No online-related discussions/posts OR warez!
Post Reply
UltimatePoto42
Expert Cheater
Expert Cheater
Posts: 125
Joined: Tue May 02, 2017 6:00 am
Reputation: 15

[Lua] Timer

Post by UltimatePoto42 »

Code: Select all

--------
-------- Timer
--------
local aTimer = nil
local aTimerInterval = 100
local function aTimer_tick(timer)
    timer.destroy()
    -- body
end
aTimer = createTimer(MainForm)
aTimer.Interval = aTimerInterval
aTimer.OnTimer = aTimer_tick

Code: Select all

--------
-------- Timer
--------
local aTimer = nil
local aTimerInterval = 100
local aTimerTickMax = 5000
local aTimerTicks = 0
local function aTimer_tick(timer)
    if aTimerTickMax > 0 and aTimerTicks >= aTimerTickMax then
        timer.destroy()
    end
    aTimerTicks = aTimerTicks + 1
    -- body
end
aTimer = createTimer(MainForm, false)
aTimer.Interval = aTimerInterval
aTimer.OnTimer = aTimer_tick
aTimer.Enabled = true

Code: Select all

{$lua}
------------------------------ ENABLE ------------------------------
[ENABLE]
local aTimer = nil
local aTimerInterval = 100
local function aTimer_tick(timer)
    -- body
end
----------------------------------
if syntaxcheck then return end
aTimer = createTimer(MainForm)
aTimer.Interval = aTimerInterval
aTimer.OnTimer = aTimer_tick
------------------------------ DISABLE ------------------------------
[DISABLE]
if syntaxcheck then return end
aTimer.destroy()
Last edited by TimFun13 on Sat May 12, 2018 5:05 am, edited 4 times in total.

Post Reply

Who is online

Users browsing this forum: No registered users