mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-24 00:15:02 +02:00
Updated to OTCv8 3.1 rev 157
This commit is contained in:
40
modules/game_bot/default_configs/vBot_4.5/vBot/main.lua
Normal file
40
modules/game_bot/default_configs/vBot_4.5/vBot/main.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
local version = "4.5"
|
||||
local currentVersion
|
||||
local available = false
|
||||
|
||||
storage.checkVersion = storage.checkVersion or 0
|
||||
|
||||
-- check max once per 12hours
|
||||
if os.time() > storage.checkVersion + (12 * 60 * 60) then
|
||||
|
||||
storage.checkVersion = os.time()
|
||||
|
||||
HTTP.get("https://raw.githubusercontent.com/Vithrax/vBot/main/vBot/version.txt", function(data, err)
|
||||
if err then
|
||||
warn("[vBot updater]: Unable to check version:\n" .. err)
|
||||
return
|
||||
end
|
||||
|
||||
currentVersion = data
|
||||
available = true
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
UI.Label("vBot v".. version .." \n Vithrax#5814")
|
||||
UI.Button("Official OTCv8 Discord!", function() g_platform.openUrl("https://discord.gg/yhqBE4A") end)
|
||||
UI.Separator()
|
||||
|
||||
schedule(5000, function()
|
||||
|
||||
if not available then return end
|
||||
if currentVersion ~= version then
|
||||
|
||||
UI.Separator()
|
||||
UI.Label("New vBot is available for download! v"..currentVersion)
|
||||
UI.Button("Go to vBot GitHub Page", function() g_platform.openUrl("https://github.com/Vithrax/vBot") end)
|
||||
UI.Separator()
|
||||
|
||||
end
|
||||
|
||||
end)
|
||||
Reference in New Issue
Block a user