Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class "LibraryCheck"
- --[[
- _ _ _ _____ _ _
- | | (_) | / ____| | | |
- | | _| |__ _ __ __ _ _ __ _ _ | | | |__ ___ ___| | __
- | | | | '_ \| '__/ _` | '__| | | | | | | '_ \ / _ \/ __| |/ /
- | |____| | |_) | | | (_| | | | |_| | | |____| | | | __/ (__| <
- |______|_|_.__/|_| \__,_|_| \__, | \_____|_| |_|\___|\___|_|\_\
- __/ |
- |___/
- ]]--
- function LibraryCheck:__init()
- self:Load_Vars()
- self:Load_Check()
- end
- function LibraryCheck:Load_Vars()
- self.misFiles = { }
- self.reqFiles = {
- ["SxOrbWalk.lua"] = { name = "SxOrbWalk", link = "https://raw.githubusercontent.com/Superx321/BoL/master/common/SxOrbWalk.lua", init = function() end, req = false, isPrediction = false },
- ["ImprovedScriptConfig.lua"] = { name = "ImprovedScriptConfig", link = "https://raw.githubusercontent.com/Feez/BoL/master/Common/ImprovedScriptConfig.lua", init = function() end, req = true, isPrediction = false },
- ["VPrediction.lua"] = { name = "VPrediction", link = "https://raw.githubusercontent.com/SidaBoL/Scripts/master/Common/VPrediction.lua", init = function() VP = VPrediction() end, req = true, isPrediction = true },
- --["HPrediction.lua"] = { name = "HPrediction", link = "https://raw.githubusercontent.com/BolHTTF/BoL/master/HTTF/Common/HPrediction.lua", init = function() HP = HPrediction() end, req = true, isPrediction = true },
- --["DivinePred.lua"] = { name = "DivinePred", link = "http://www.divinetek.rocks/divineprediction/Scripts/Common/DivinePred.lua", init = function() DP = DivinePred() end, req = true, isPrediction = true },
- --["DivinePred.luac"] = { name = "DivinePred", link = "http://www.divinetek.rocks/divineprediction/Scripts/Common/DivinePred.luac", init = function() end, req = false, isPrediction = false }
- }
- self.Sprites = {}
- self.SpritesNumber = 0
- self.SpritesExist = false
- self.SpritesTable = {
- "blueleftbot",
- "bluelefttop",
- "bluerightbot",
- "bluerighttop",
- "redleftbot",
- "redlefttop",
- "redrightbot",
- "redrighttop",
- "greenleftbot",
- "greenlefttop",
- "greenrightbot",
- "greenrighttop",
- "orangeleftbot",
- "orangelefttop",
- "orangerightbot",
- "orangerighttop",
- "smiteblue",
- "smitegreen",
- "smiteksorange",
- "smiteksred",
- "OrbwalkCheckBack",
- "OrbwalkCheckFront"
- }
- end
- function LibraryCheck:Load_Check()
- for lib, data in pairs(self.reqFiles) do
- if not FileExist(LIB_PATH .. lib) then
- table.insert(self.misFiles, "lib")
- Msg("Series", "Downloading " .. lib .. ", please don't press F9.")
- DelayAction(function() DownloadFile(data.link.."?rand="..math.random(1,10000), LIB_PATH .. lib, function() Msg("Series", "Successfully downloaded " .. lib .. ", press F9 twice.") end) end, 3)
- return
- elseif data.req and #self.misFiles == 0 then
- require(lib:gsub(".lua", ""))
- data:init()
- end
- end
- for _, sprite in pairs(self.SpritesTable) do
- location = "BetterNerfSeries\\" .. sprite .. ".png"
- if FileExist(SPRITE_PATH .. location) then
- self.Sprites[sprite] = createSprite(location)
- self.SpritesExist = true
- self.SpritesNumber = self.SpritesNumber + 1
- end
- end
- if self.SpritesNumber == #self.SpritesTable then
- controlpanel = ControlPanel()
- else
- Msg("Series", "Missing " .. #self.SpritesTable - self.SpritesNumber .. " Sprites. Please download latest sprites.")
- return
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement