1
"=== This Table is Version 2 ==="
1
0
"Check for Updates"
Auto Assembler Script
{$lua}
if syntaxcheck then return end
[ENABLE]
local TABLE_VERSION = 2
local version_url = "https://docs.google.com/document/d/1h9fxfqztRnyamuXn75hElBEgf2OWJcogOPZBH3P9GN8/export?format=txt"
local table_url = "http://forum.cheatengine.org/download.php?id=119714"
local http = getInternet()
local result = http.getURL(version_url)
if result then
local version = tonumber(result:match("%d+"))
if version > TABLE_VERSION then
local answer = messageDialog("There is a newer version of this table.\nWould you like to download it now?", mtWarning, mbYes, mbNo)
if answer == mrYes then
messageDialog("Be sure to save the new table!", mtInformation, mbOK)
local latest = http.getURL(table_url)
if latest ~= nil then
local name = os.getenv("TEMP")
name = name .. "\\Zanzer.CT"
local file = io.open(name, "w")
file:write(latest)
file:close()
loadTable(name)
else
messageDialog("Failed to load the new table!", mtError, mbOK)
end
end
else
messageDialog("You currently have the latest version!", mtInformation, mbOK)
end
else
messageDialog("Failed to find latest version!", mtError, mbOK)
end
http.destroy()
{$asm}
assert(true)
[DISABLE]