Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if arg 1 is "install" or "instaluj":
- if arg 2 is set:
- set {_nazwa} to arg 2
- set {_czy.jest} to false
- loop {SDM.Wczytywanie.Lista::*}:
- if loop-value is {_nazwa}:
- set {_czy.jest} to true
- set {_name} to loop-value
- if {_czy.jest} is true:
- if file "plugins/Skript/scripts/SkriptDownloadManager/Dokumentacje/%{_nazwa}%.yml" is not exists:
- send "Niestety nie znaleziono dokumentacji tego skryptu. Być może musisz zaktualizować bazę danych komendą /sdm update"
- send "Mozliwe również, że wpisałeś niewłaściwe wielkości liter, a to również ma znaczenie!"
- else:
- set {_value} to "Link"
- set {_nazwa} to arg 2 parsed as text
- send "Skrypt jest właśnie pobierany..."
- set {_Wczytywanie.Linki} to value list "%{_value}%" get of "plugins/Skript/scripts/SkriptDownloadManager/Dokumentacje/%{_nazwa}%.yml"
- replace "]" in {_Wczytywanie.Linki} with ""
- replace "[" in {_Wczytywanie.Linki} with ""
- set {SDM.Wczytywanie.Link.%{_value}%::*} to {_Wczytywanie.Linki} split at ", "
- loop {SDM.Wczytywanie.Link.%{_value}%::*}:
- set {_url} to loop-value parsed as text
- exit loop
- download from "%{_url}%" to file "plugins/Skript/scripts/%{_nazwa}%.sk"
- execute player command "skript reload %{_nazwa}%"
- else:
- send "&4Błąd! Nie ma skryptu o nazwie %arg 2%"
- execute player command "sdm install"
- else:
- send "Dostnepne nazwy skryptów: %{SDM.Wczytywanie.Lista::*}%"
Advertisement
Add Comment
Please, Sign In to add comment