[Lua] Auto Attach to Process

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: 103
Joined: Tue May 02, 2017 6:00 am
Reputation: 15

[Lua] Auto Attach to Process

Post by UltimatePoto42 »

Code: Select all

--------
-------- Auto Attach to Process
--------
PROCESS_NAME = 'Game.exe'
local autoAttachTimer = nil
local autoAttachTimerInterval = 100
local autoAttachTimerTicks = 0
local autoAttachTimerTickMax = 5000

local function autoAttachTimer_tick(timer)
    if getProcessIDFromProcessName(PROCESS_NAME) ~= nil then
        timer.destroy()
        openProcess(PROCESS_NAME)
    elseif autoAttachTimerTickMax > 0 and autoAttachTimerTicks >= autoAttachTimerTickMax then
        timer.destroy()
    end
    autoAttachTimerTicks = autoAttachTimerTicks + 1
end

autoAttachTimer = createTimer(MainForm)
autoAttachTimer.Interval = autoAttachTimerInterval
autoAttachTimer.OnTimer = autoAttachTimer_tick
Last edited by TimFun13 on Wed May 02, 2018 6:35 am, edited 8 times in total.

Post Reply

Who is online

Users browsing this forum: No registered users