Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- #
- # _____ _ _ _ ______ _ _
- # / ____| | (_) | | | ____| | | | |
- # | (___ | | ___ __ _ _ __ | |_| |__ _ __ | |__ __ _ _ __ ___ ___ __| |
- # \___ \| |/ / '__| | '_ \| __| __| | '_ \| '_ \ / _` | '_ \ / __/ _ \/ _` |
- # ____) | <| | | | |_) | |_| |____| | | | | | | (_| | | | | (_| __/ (_| |
- # |_____/|_|\_\_| |_| .__/ \__|______|_| |_|_| |_|\__,_|_| |_|\___\___|\__,_|
- # | |
- # Adds many |_| useful features that enhance the usage of Skript.
- #
- #
- # Script: SkriptEnhanced
- # Author: Duetro, recoded to 1.8 by FlupMC
- # Version: 2.00
- #
- #
- # Dependencies:
- # - Skript 2.3.1 # Download: https://github.com/SkriptLang/Skript/releases (use 2.3-alpha4 for 1.13)
- # - skript-mirror 2 # Download: https://skripttools.net/?q=skript-mirror
- # - MundoSK 1.8.6-BETA.55 # Download: https://skripttools.net/?q=MundoSK
- # - ProtocolLib # Download: https://www.spigotmc.org/resources/protocollib.1997/
- #
- # Settings:
- skript_prefix: &7[&bSkript&7] # Default: &7[&bSkript&7]
- skript_color: &6 # Default: &6
- preview_limit: 55 # Default: 55 | Limit of characters in one line while hovering the errors
- notify_ingame: true # Default: true
- check_update: true # Default: true
- # -> You should not change the code below unless you know what you are doing.
- version: 2.00
- mcskriptsid: 3000
- function SendMessage(p: player, type: text, message: text):
- if {_type} contains "se.":
- set {_prefix} to "&7[&bSkriptEnhanced&7]"
- replace all "se." in {_type} with ""
- else:
- set {_prefix} to "{@skript_prefix}"
- if {_type} is "error":
- set {_icon} to "&4&l✖&c "
- replace all "&r" in {_message} with "&c"
- else if {_type} is "success":
- set {_icon} to "&2&l✔&a "
- replace all "&r" in {_message} with "&a"
- else:
- set {_icon} to "&f"
- replace all "&r" in {_message} with "&f"
- send "%{_prefix}% %{_icon}%%{_message}%" to {_p}
- command /se [<text>] [<text>] [<integer>] [<text>]:
- aliases: /skriptenhanced
- permission: skript.admin
- trigger:
- if arg-1 is "update":
- SendMessage(player, "se.info", "Tjekker for opdateringer...")
- if {SkriptEnhanced::latestversion} isn't set:
- set {_dl} to text from ""
- if {_dl} isn't set:
- SendMessage(player, "se.error", "&rAn error as occurred while trying to to check for updates. Please check for Updates manually! Download: {@mcskripts}")
- exit
- set {SkriptEnhanced::latestversion} to {_dl::1}
- send " &7Nuværende version: v{@version} (Seneste: v%{SkriptEnhanced::latestversion}%)"
- if {SkriptEnhanced::latestversion} is "{@version}":
- SendMessage(player, "se.success", "Du har den seneste version af SkriptEnhanced-Flup!")
- else:
- SendMessage(player, "se.info", "Fjerner SkriptEnhanced...")
- SE2_deleteFile("plugins/Skript/scripts/%script%.sk")
- if SE2_fileExists("plugins/Skript/scripts/%script%.sk"):
- SE2_SendMessage(player, "se.error", "An error as occurred while trying to delete SkriptEnhanced. Please update manually! Download: {@skunity}")
- exit
- SE2_SendMessage(player, "se.info", "Downloading SkriptEnhanced...")
- set {_fw} to try new FileWriter(SE2_fixPath("plugins/Skript/scripts/%script%.sk") and true)
- set {_contents::*} to SE2_downloadString("http://api.duetro.de/skriptenhanced/dl/SkriptEnhanced.sk")https://mcskripts.dk/run/search/download?id=3198
- if {_contents::1} isn't "options:":
- SE2_SendMessage(player, "se.error", "An error as occurred while trying to download the script. Please update manually! Download: {@skunity}")
- exit
- loop {_contents::*}:
- {_fw}.write(loop-value)
- {_fw}.write(System.getProperty("line.separator"))
- {_fw}.close()
- if SE2_fileExists("plugins/Skript/scripts/%script%.sk") isn't true:
- SE2_SendMessage(player, "se.error", "An error as occurred while trying to download the script. Please update manually! Download: {@skunity}")
- exit
- SE2_SendMessage(player, "se.info", "Reloading SkriptEnhanced...")
- execute console command "/skript reload %script%"
- SE2_SendMessage(player, "se.success", "Successfully updated to SkriptEnhanced v%{SkriptEnhanced::latestversion}%!")
Advertisement
Add Comment
Please, Sign In to add comment