Slupik98

Install SDM

Jun 20th, 2014
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. if arg 1 is "install" or "instaluj":
  2. if arg 2 is set:
  3. set {_nazwa} to arg 2
  4. set {_czy.jest} to false
  5. loop {SDM.Wczytywanie.Lista::*}:
  6. if loop-value is {_nazwa}:
  7. set {_czy.jest} to true
  8. set {_name} to loop-value
  9. if {_czy.jest} is true:
  10. if file "plugins/Skript/scripts/SkriptDownloadManager/Dokumentacje/%{_nazwa}%.yml" is not exists:
  11. send "Niestety nie znaleziono dokumentacji tego skryptu. Być może musisz zaktualizować bazę danych komendą /sdm update"
  12. send "Mozliwe również, że wpisałeś niewłaściwe wielkości liter, a to również ma znaczenie!"
  13. else:
  14. set {_value} to "Link"
  15. set {_nazwa} to arg 2 parsed as text
  16. send "Skrypt jest właśnie pobierany..."
  17. set {_Wczytywanie.Linki} to value list "%{_value}%" get of "plugins/Skript/scripts/SkriptDownloadManager/Dokumentacje/%{_nazwa}%.yml"
  18. replace "]" in {_Wczytywanie.Linki} with ""
  19. replace "[" in {_Wczytywanie.Linki} with ""
  20. set {SDM.Wczytywanie.Link.%{_value}%::*} to {_Wczytywanie.Linki} split at ", "
  21. loop {SDM.Wczytywanie.Link.%{_value}%::*}:
  22. set {_url} to loop-value parsed as text
  23. exit loop
  24. download from "%{_url}%" to file "plugins/Skript/scripts/%{_nazwa}%.sk"
  25. execute player command "skript reload %{_nazwa}%"
  26. else:
  27. send "&4Błąd! Nie ma skryptu o nazwie %arg 2%"
  28. execute player command "sdm install"
  29. else:
  30. send "Dostnepne nazwy skryptów: %{SDM.Wczytywanie.Lista::*}%"
Advertisement
Add Comment
Please, Sign In to add comment