forked from Pussykate/GoS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
14Yasuo_Vol2.lua
53 lines (39 loc) · 1.38 KB
/
14Yasuo_Vol2.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
local DrawInfo = false
-- [ AutoUpdate ]
do
local Version = 0.08
local Files = {
Lua = {
Path = SCRIPT_PATH,
Name = "14Yasuo_Vol2.lua",
Url = "https://raw.githubusercontent.com/Pussykate/GoS/master/14Yasuo_Vol2.lua"
},
Version = {
Path = SCRIPT_PATH,
Name = "14Yasuo_Vol2.version",
Url = "https://raw.githubusercontent.com/Pussykate/GoS/master/14Yasuo_Vol2.version"
}
}
local function AutoUpdate()
local function DownloadFile(url, path, fileName)
DownloadFileAsync(url, path .. fileName, function() end)
while not FileExist(path .. fileName) do end
end
local function ReadFile(path, fileName)
local file = io.open(path .. fileName, "r")
local result = file:read()
file:close()
return result
end
DownloadFile(Files.Version.Url, Files.Version.Path, Files.Version.Name)
local textPos = myHero.pos:To2D()
local NewVersion = tonumber(ReadFile(Files.Version.Path, Files.Version.Name))
if NewVersion > Version then
DownloadFile(Files.Lua.Url, Files.Lua.Path, Files.Lua.Name)
print("New 14Yasuo_Vol2 Version Press 2x F6")
else
DrawInfo = true
end
end
AutoUpdate()
end