options: #+--------------------------------------------------+# Skript Name: SkriptCommandUtils Version: v2.1.3 Author: UnscriptedCode #+--------------------------------------------------+# # ==================================== # # # # CONFIG # # # # ==================================== # updateChecker: true # Do you want that the script automatically checks for updates? ScriptTab: true # Do you want that Tabcompleting for /skript is activated? PermissionStateForTabbing: true # Do you want that player need a permission for TabAutocomplete? PermissionForTabbing: skript.autocomplete # Permission for Tabbing when above is activated ScriptListCommand: /scripts # Command to list all scripts ScriptListAliases: /skripts, /scriptlist, /skriptlist, /scl, /skl # Script List command aliases ScriptListPerm: skript.list # Permission for script list command ScriptListNoPermMessage: &cYou don't have permission for this command! # Message if the player doesn't has the perm above and tries the command addonArgument: addons # Argument after the script list command to list all addons SkriptStatsGuiName: &7[&6Skript&7] &fStats SkriptStatsCommand: /skript-stats # Command to Skript Stats gui SkriptStatsAliases: /sk-stats, /skstats, /skriptstats # Script Stats command aliases SkriptStatsPerm: skript.stats # Permission for script stats command SkriptStatsNoPermMessage: &cYou don't have permission for this command! # Message if the player doesn't has the perm above and tries the command OperatingSystem: Linux # Set this to your operating system (Supported: Windows and Linux) // It's using for cutting out the file from the path (Linux = / and Windows = \) # ==================================== # # # # UPDATE CHECKER # # # # ==================================== # on script unload: send "&6[SCU] &cUnloaded sucessfully: {@Skript Name} {@Version}" to the console send "&6[SCU] &cThis script is made by &dUnscriptedCode" to the console send "&6[SCU] &cCheck out his Server: ArcadeSky.tk (German)" to the console on script load: send "&6[SCU] &aLoaded sucessfully: {@Skript Name} {@Version}" to the console send "&6[SCU] &aThis script is made by &dUnscriptedCode" to the console send "&6[SCU] &aCheck out his Server: ArcadeSky.tk (German)" to the console {@updateChecker} is true send "&6[SCU] &cChecking for updates..." to the console set {_v} to text from url "http://www.arcadesky.tk/UpdateChecker/{@Skript Name}.ver" if {_v} is "{@Version}": send "&6[SCU] &cNo new update is avialable!" to the console else: send "&6[SCU] &cA new version is avialable: %{_v}%" to the console send "&6[SCU] &cYou can download it here: http://bit.ly/SkriptCommandUtils" to the console every 6 hours: {@updateChecker} is true send "&6[SCU] &cChecking for updates..." to the console set {_v} to text from url "http://www.arcadesky.tk/UpdateChecker/{@Skript Name}.ver" if {_v} is "{@Version}": send "&6[SCU] &cNo new update is avialable!" to the console else: send "&6[SCU] &cA new version is avialable: %{_v}%" to the console send "&6[SCU] &cYou can download it here: http://bit.ly/SkriptCommandUtils" to the console # ==================================== # # # # AUTOCOMPLETE # # # # ==================================== # on tab completer for "/skript": {@ScriptTab} is true if {@PermissionStateForTabbing} is true: player doesn't have permission "{@PermissionForTabbing}" stop set {_scripts::*} to files in directory "plugins/Skript/scripts" loop {_scripts::*}: if "{@OperatingSystem}" is "Linux": set {_splitString::*} to loop-value split at "/" else if "{@OperatingSystem}" is "Windows": set {_splitString::*} to loop-value split at "\" else: send "&6[SCU] &cCRITICAL ERROR &3(AutoComplete)&c: Wrong Operating System" to the console stop set {_index} to size of {_splitString::*} set {_loop} to {_splitString::%{_index}%} if "%{_loop}%" contains ".sk": if first character of "%{_loop}%" isn't "-": replace ".sk" in {_loop} with "" add "%{_loop}%" to {_scripts.activated::*} loop {_scripts.activated::*}: add "%loop-value%" to completions # ==================================== # # # # SCRIPT STATS COMMAND # # # # ==================================== # command {@SkriptStatsCommand}: aliases: {@SkriptStatsAliases} permission: {@SkriptStatsPerm} permission message: {@SkriptStatsNoPermMessage} executable by: players trigger: set {_scripts::*} to files in directory including sub dirs "plugins/Skript/scripts" set {_scripts.activated.number} to 0 set {_scripts.deactivated.number} to 0 loop {_scripts::*}: if "{@OperatingSystem}" is "Linux": set {_splitString::*} to loop-value split at "/" else if "{@OperatingSystem}" is "Windows": set {_splitString::*} to loop-value split at "\" else: send "&6[SCU] &cCRITICAL ERROR &3(Skript Stats)&c: Wrong Operating System" to the console stop set {_index} to size of {_splitString::*} set {_loop} to {_splitString::%{_index}%} if "%{_loop}%" contains ".sk": if first character of "%{_loop}%" is "-": add 1 to {_scripts.deactivated.number} else: add 1 to {_scripts.activated.number} open better inventory "CHEST" with 1 rows named "{@SkriptStatsGuiName}" to player format gui slot 0 of player with command block named "&a&oLoaded &6&lSkript Commands" with lore "&8» &c&o%number of loaded triggers%" to do nothing format gui slot 1 of player with raw porkchop named "&a&oLoaded &2&lConditions" with lore "&8» &c&o%number of loaded conditions%" to do nothing format gui slot 2 of player with wet sponge named "&a&oLoaded &3&lEffects" with lore "&8» &c&o%number of loaded effects%" to do nothing format gui slot 3 of player with diamond sword named "&a&oLoaded &1&lEvents" with lore "&8» &c&o%number of loaded events%" to do nothing format gui slot 4 of player with paper named "&a&oLoaded &d&lExpressions" with lore "&8» &c&o%number of loaded expressions%" to do nothing format gui slot 5 of player with dispenser named "&a&oLoaded &e&lFunctions" with lore "&8» &c&o%number of loaded functions%" to do nothing format gui slot 6 of player with book and quill named "&a&oLoaded &5&lVariables" with lore "&8» &c&o%number of loaded variables%" to do nothing format gui slot 7 of player with gold ingot named "&a&oActivated &r&lScripts" with lore "&8» &c&o%{_scripts.activated.number}%" to do nothing format gui slot 8 of player with iron ingot named "&a&oDeactivated &r&lScripts" with lore "&8» &c&o%{_scripts.deactivated.number}%" to do nothing # ==================================== # # # # SCRIPT LIST COMMAND # # # # ==================================== # command {@ScriptListCommand} []: aliases: {@ScriptListAliases} permission: {@ScriptListPerm} permission message: {@ScriptListNoPermMessage} trigger: if arg-1 is "{@addonArgument}": loop addons list: add "&a%loop-value%" to {_addons::*} send "&fAll Skript-Addons (%size of {_addons::*}%): %{_addons::*}%" else: set {_scripts::*} to files in directory including sub dirs "plugins/Skript/scripts" set {_scripts.activated.number} to 0 set {_scripts.deactivated.number} to 0 loop {_scripts::*}: if "{@OperatingSystem}" is "Linux": set {_splitString::*} to loop-value split at "/" else if "{@OperatingSystem}" is "Windows": set {_splitString::*} to loop-value split at "\" else: send "&6[SCU] &cCRITICAL ERROR &3(Skript List)&c: Wrong Operating System" to the console stop set {_index} to size of {_splitString::*} set {_loop} to {_splitString::%{_index}%} if "%{_loop}%" contains ".sk": if first character of "%{_loop}%" is "-": replace "-" in {_loop} with "&c" replace ".sk" in {_loop} with "&r" add "%{_loop}%" to {_scripts.deactivated::*} add 1 to {_scripts.deactivated.number} else: replace ".sk" in {_loop} with "&r" add "&a%{_loop}%" to {_scripts.activated::*} add 1 to {_scripts.activated.number} if {_scripts.activated::*} is not set: set {_scripts.activated::*} to "" if {_scripts.deactivated::*} is not set: set {_scripts.deactivated::*} to "" send "&fActivated Scripts (%{_scripts.activated.number}%): %{_scripts.activated::*}%%nl%&fDeactivated Scripts (%{_scripts.deactivated.number}%): %{_scripts.deactivated::*}%"