It's easy to setup updates in your scripts, want a guide?
Aug 11, 2017 18:04:34 GMT
Exilereven and chamchicaycuoc like this
Post by paladiex on Aug 11, 2017 18:04:34 GMT
So, the other day I setup a Github account and linked IntelliJ to push my updates to Github. I found out it's relatively easy to incorporate a few lines of code to download the newest lua updates from Github. Now everytime I save the script, it asks if I want to upload the changes, if I click yes then everyone who uses my bot get's the newest lua on their next startup. In the summoner's war scripts this isn't common practice yet, I was wondering if it's common knowledge to all of the script contributers/makers on the forum.
That's the section I use in my code, it takes around 3 seconds at the start of the script to run. No more updating the OP with the newest version, or finding a filehosting website to upload the file to. With a little patience you can also make a .lua file that will download the image directory again for the users
Is this common knowledge? It's free and easy to setup for users who already use the recommended file editor IntelliJ. Do you guys want a guide on setting it up?
I've gotten a little interest in this, here is the imageupdater.lua I made
--- This checks the version number on github to see if an update is needed ---
getNewestVersion = loadstring(httpGet("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/version.lua"))
latestVersion = getNewestVersion()
currentVersion = dofile(localPath .."version.lua")
if currentVersion == latestVersion then
toast ("You are running the most current version!")
else
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/version.lua", localPath .."version.lua")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/PalPowerUp.lua", localPath .."PalPowerUp.lua")
scriptExit("You have Updated PalPowerUp bot!")
end
That's the section I use in my code, it takes around 3 seconds at the start of the script to run. No more updating the OP with the newest version, or finding a filehosting website to upload the file to. With a little patience you can also make a .lua file that will download the image directory again for the users
Is this common knowledge? It's free and easy to setup for users who already use the recommended file editor IntelliJ. Do you guys want a guide on setting it up?
I've gotten a little interest in this, here is the imageupdater.lua I made
localPath = scriptPath()
imagePath = (localPath .. "images/")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/images/1starLvl0.png", imagePath .."1starLvl0.png")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/images/1starLvl1.png", imagePath .."1starLvl1.png")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/images/1starLvl2.png", imagePath .."1starLvl2.png")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/images/1starLvl3.png", imagePath .."1starLvl3.png")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/images/1starLvl4.png", imagePath .."1starLvl4.png")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/images/1starLvl5.png", imagePath .."1starLvl5.png")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/images/1starLvl6.png", imagePath .."1starLvl6.png")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/images/1starLvl7.png", imagePath .."1starLvl7.png")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/images/1starLvl8.png", imagePath .."1starLvl8.png")
httpDownload("https://raw.githubusercontent.com/Paladiex/PalPowerUp/master/images/1starLvl9.png", imagePath .."1starLvl9.png")