[Video] Cheat Engine Lua Module

Section's for general approaches on hacking various options in games. No online-related discussions/posts OR warez!
Post Reply
TimFun13
Expert Cheater
Expert Cheater
Posts: 1354
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 6

[Video] Cheat Engine Lua Module

Post by TimFun13 »

Cheat Engine Lua Module



In this video I go over setting up a Lua module and how to import it as Cheat Engine table file.





Code: Select all

--------
-------- CE Table Require
--------
local tableLuaFilesDirectory = 'luaFiles'
local fileExt = '.lua'
function CETrequire(moduleStr)
 if moduleStr ~= nil then
 local localTableLuaFilePath = moduleStr
 if tableLuaFilesDirectory ~= nil and tableLuaFilesDirectory ~= '' then
 local sep = package.config:sub(1,1)
 localTableLuaFilePath = tableLuaFilesDirectory .. sep .. moduleStr
 end
 local f, err = io.open(localTableLuaFilePath .. fileExt)
 if f and not err then
 f:close()
 return dofile(localTableLuaFilePath .. fileExt)
 else
 local tableFile = findTableFile(moduleStr .. fileExt)
 if tableFile == nil then
 return nil
 end
 local stream = tableFile.getData()
 local fileStr = nil
 local bytes = stream.read(stream.Size)
 for i = 1, #bytes do
 if fileStr == nil then
 fileStr = ''
 end
 fileStr = fileStr .. string.char(bytes[i])
 end
 if fileStr then
 return loadstring(fileStr)()
 end
 end
 end
 return nil
end

Post Reply

Who is online

Users browsing this forum: No registered users