options: prefix: &eDownloader &6» Permission: Downloader AdminPermission: {@Permission}.Admin AllowLIANetworkScripts: true version: 1.0.0 new: true command /downloader [] [] [] [] []: permission: {@AdminPermission} permission message: &c&lYou do not have permission! trigger: if argument 1 is "download": if argument 2 is "custom": if argument 3 is set: if argument 4 is set: if {Downloader::Custom::List::%arg-3%} is set: if argument 5 is "--overwrite": send "{@prefix} &aDownloading &7[CUSTOM] &e&o%arg-3%&a..." download from arg-4 to "plugins/Skript/scripts/Downloads/%arg-3%.sk" execute console command "/sk reload Downloads/%arg-3%.sk" set {Downloader::Custom::List::%arg-3%} to arg-3 send "{@prefix} &aDownloaded &7[CUSTOM] &e&o%arg-3%&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-3%&6.sk'" else: send "{@prefix} &e%arg-3% &calready exists, if you wish to overwrite the file/data then use '--overwrite' as the 5th argument." else if {Downloader::Custom::List::%arg-3%} is not set: send "{@prefix} &aDownloading &7[CUSTOM] &e&o%arg-3%&a..." download from arg-4 to "plugins/Skript/scripts/Downloads/%arg-3%.sk" execute console command "/sk reload Downloads/%arg-3%.sk" set {Downloader::Custom::List::%arg-3%} to arg-3 send "{@prefix} &aDownloaded &7[CUSTOM] &e&o%arg-3%&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-3%&6.sk'" if argument 2 is "chatmanager": if argument 3 is "1.0.0": if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oChatManager v1.0.0&a..." download from "https://raw.githubusercontent.com/LIA-Network/MC-ChatManager/master/1.0.0/ChatManager.sk" to "plugins/Skript/scripts/Downloads/ChatManager.sk" execute console command "/sk reload Downloads/%arg-2%.sk" send "{@prefix} &aDownloaded &e&oChatManager v1.0.0&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-2%&6.sk'" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 3 is "latest": if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oChatManager&a..." download from "https://raw.githubusercontent.com/LIA-Network/MC-ChatManager/master/_latest/ChatManager.sk" to "plugins/Skript/scripts/Downloads/ChatManager.sk" execute console command "/sk reload Downloads/%arg-2%.sk" send "{@prefix} &aDownloaded &e&oChatManager&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-2%&6.sk'" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 3 is not set: if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oChatManager&a..." download from "https://raw.githubusercontent.com/LIA-Network/MC-ChatManager/master/_latest/ChatManager.sk" to "plugins/Skript/scripts/Downloads/ChatManager.sk" execute console command "/sk reload Downloads/%arg-2%.sk" send "{@prefix} &aDownloaded &e&oChatManager&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-2%&6.sk'" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 2 is "customifyptb" or "customify": if argument 3 is "1.0.0": if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oCustomify PTB v1.0.0&a..." download from "https://github.com/LIA-Network/Downloader-MC-Files/raw/master/Customify.sk" to "plugins/Skript/scripts/Customify.sk" execute console command "/sk reload Customify.sk" send "{@prefix} &aDownloaded &e&oCustomify PTB v1.0.0&a!" wait 2 seconds send "{@prefix} &aDownloading &e&oCustomify PTB Data v1.0.0&a..." download from "https://github.com/LIA-Network/Downloader-MC-Files/raw/master/CustomifyData.zip" to "plugins/Skript/scripts/CustomifyData.zip" #extract "plugins/Skript/scripts/CustomifyData.zip" to "plugins/Skript/scripts/" send "{@prefix} &ePlease extract &6CustomifyData.zip in your scripts folder!" send "{@prefix} &aDownloaded &e&oCustomify PTB Data v1.0.0&a!" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 3 is "latest": if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oCustomify PTB v1.0.0&a..." download from "https://github.com/LIA-Network/Downloader-MC-Files/raw/master/Customify.sk" to "plugins/Skript/scripts/Customify.sk" execute console command "/sk reload Customify.sk" send "{@prefix} &aDownloaded &e&oCustomify PTB v1.0.0&a!" wait 2 seconds send "{@prefix} &aDownloading &e&oCustomify PTB Data v1.0.0&a..." download from "https://github.com/LIA-Network/Downloader-MC-Files/raw/master/CustomifyData.zip" to "plugins/Skript/scripts/CustomifyData.zip" #extract "plugins/Skript/scripts/CustomifyData.zip" to "plugins/Skript/scripts/" send "{@prefix} &ePlease extract &6CustomifyData.zip in your scripts folder!" send "{@prefix} &aDownloaded &e&oCustomify PTB Data v1.0.0&a!" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 3 is not set: if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oCustomify PTB v1.0.0&a..." download from "https://github.com/LIA-Network/Downloader-MC-Files/raw/master/Customify.sk" to "plugins/Skript/scripts/Customify.sk" execute console command "/sk reload Customify.sk" send "{@prefix} &aDownloaded &e&oCustomify PTB v1.0.0&a!" wait 2 seconds send "{@prefix} &aDownloading &e&oCustomify PTB Data v1.0.0&a..." download from "https://github.com/LIA-Network/Downloader-MC-Files/raw/master/CustomifyData.zip" to "plugins/Skript/scripts/CustomifyData.zip" #extract "plugins/Skript/scripts/CustomifyData.zip" to "plugins/Skript/scripts/" send "{@prefix} &aDownloaded &e&oCustomify PTB Data v1.0.0&a!" send "{@prefix} &ePlease extract &6CustomifyData.zip in your scripts folder!" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 2 is "list": send "&eDownloader &7| &eDownload List &6» %{Downloader::Custom::List::*}%" if argument 2 is "remove": if {Downloader::Custom::List::%arg-3%} is set: if argument 4 is "--confirm": send "{@prefix} &cRemoving &e&o%arg-3%&c..." delete "plugins/Skript/scripts/Downloads/%arg-3%.sk" delete {Downloader::Custom::List::%arg-3%} send "{@prefix} &cRemoved &e&o%arg-3%&c!" else: send "{@prefix} &cPlease use '--confirm' to confirm the destructive action." if argument 2 is "essentials": if argument 3 is "1.0.0": if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oEssentials v1.0.0&a..." download from "https://raw.githubusercontent.com/LIA-Network/MC-Essentials/master/1.0.0/Essentials.sk" to "plugins/Skript/scripts/Downloads/Essentials.sk" execute console command "/sk reload Downloads/%arg-2%.sk" send "{@prefix} &aDownloaded &e&oEssentials v1.0.0&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-2%&6.sk'" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 3 is "latest": if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oEssentials&a..." download from "https://github.com/LIA-Network/MC-Files/raw/master/Essentials/_latest/-Core.sk" to "plugins/Skript/scripts/Downloads/Essentials.sk" execute console command "/sk reload Downloads/%arg-2%.sk" send "{@prefix} &aDownloaded &e&oEssentials&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-2%&6.sk'" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 3 is not set: if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oEssentials&a..." download from "https://github.com/LIA-Network/MC-Files/raw/master/Essentials/_latest/-Core.sk" to "plugins/Skript/scripts/Downloads/Essentials.sk" execute console command "/sk reload Downloads/%arg-2%.sk" send "{@prefix} &aDownloaded &e&oEssentials&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-2%&6.sk'" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 2 is "undermaintenance": if argument 3 is "1.0.0": if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oUnder Maintenance v1.0.0&a..." download from "https://raw.githubusercontent.com/LIA-Network/Downloader-MC-Files/master/undermaintenance/1.0.0/UnderMaintenance.sk" to "plugins/Skript/scripts/Downloads/UnderMaintenance.sk" execute console command "/sk reload Downloads/%arg-2%.sk" send "{@prefix} &aDownloaded &e&oUnder Maintenance v1.0.0&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-2%&6.sk'" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 3 is "latest": if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oUnder Maintenance&a..." download from "https://raw.githubusercontent.com/LIA-Network/Downloader-MC-Files/master/undermaintenance/_latest/UnderMaintenance.sk" to "plugins/Skript/scripts/Downloads/UnderMaintenance.sk" execute console command "/sk reload Downloads/%arg-2%.sk" send "{@prefix} &aDownloaded &e&oUnder Maintenance&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-2%&6.sk'" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" if argument 3 is not set: if {@AllowLIANetworkScripts} is true: send "{@prefix} &aDownloading &e&oUnder Maintenance&a..." download from "https://raw.githubusercontent.com/LIA-Network/Downloader-MC-Files/master/undermaintenance/_latest/UnderMaintenance.sk" to "plugins/Skript/scripts/Downloads/UnderMaintenance.sk" execute console command "/sk reload Downloads/%arg-2%.sk" send "{@prefix} &aDownloaded &e&oUnder Maintenance&a!" send "{@prefix} &ePlease use &6'/sk reload Downloads/%arg-2%&6.sk'" else: send "{@prefix} &cThe system administrator has LIA Network Scripts disabled, please contact them to enable them!" #if argument 1 is "update" or "updatecheck" or "check": #UpdateCheck(player) if argument 1 is "downloadlist": send "&eDownloader &7| &eDownload List &6» %{Downloader::Custom::List::*}%" if argument 1 is "remove": if argument 2 is set: if {Downloader::Custom::List::%arg-2%} is set: if argument 3 is "--confirm": send "{@prefix} &cRemoving &e&o%arg-2%&c..." delete "plugins/Skript/scripts/Downloads/%arg-2%.sk" delete {Downloader::Custom::List::%arg-2%} send "{@prefix} &cRemoved &e&o%arg-2%&c!" else: send "{@prefix} &cPlease use '--confirm' to confirm the destructive action." #on join: #UpdateCheck(player) function UpdateCheck(p: player): if {_p} has permission "{@AdminPermission}": wait 3 seconds if text from "https://raw.githubusercontent.com/LIA-Network/MC-Files/master/version/Downloader" = "{@version}": stop else: set {_vers} to text from "https://raw.githubusercontent.com/LIA-Network/MC-Files/master/version/Downloader" send "&3-----------------------------------------" to {_p} send "&7Current version: &6{@version}" to {_p} send "&7Newest version: &6%{_vers}%" to {_p} send "&3-----------------------------------------" to {_p} stop on script load: if file "plugins/Skript/scripts/Downloads" does not exist: create "plugins/Skript/scripts/Downloads/test.sk" # Create temp file to create folder without WildSkript so it works on 1.14.4. delete "plugins/Skript/scripts/Downloads/test.sk" # Remove that temp file that created the folder. #on script load: #download from "https://github.com/Red-Seven-Network/MC-Files/blob/master/Downloader/_latest/Downloader.sk" to "plugins/Skript/scripts/Downloader.sk" #execute console command "/sk reload Downloader.sk"