Advertisement
Guest User

Untitled

a guest
Sep 21st, 2021
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. on skript load:
  2. if {group::*} does not contain "default":
  3. add "default" to {group::*}
  4. send "Created default group." to console
  5. loop all players:
  6. add "%loop-player%" to {default::people::*}
  7.  
  8.  
  9. command /rankify [<text>] [<text>] [<text>]:
  10. trigger:
  11. if arg-1 is "create":
  12. if arg-2 is not "create" or "delete":
  13. send "&3&lRankify &8| &7Created group titled %arg-2%." to player
  14. add arg-2 to {group::*}
  15. else:
  16. send "&3&lRankify &8| &cSorry! &7You can't create a group titled create or delete."
  17. stop
  18. else:
  19. if arg-1 is set:
  20. if {group::*} contains arg-1:
  21. if arg-2 is "prefix":
  22. if arg-3 is set:
  23. set {_p} to colored arg-3
  24. send "&3&lRankify &8| &7Set %arg-1%&7's prefix to %{_p}%&7." to player
  25. set {%arg-1%::prefix} to {_p}
  26.  
  27. if arg-2 is "add":
  28. set {_p} to arg-3 parsed as offline player
  29. if {_p} is online:
  30. add {_p} to {%arg-1%::people::*}
  31. send "&3&lRankify &8| &7Added %{_p}%&7 to %arg-1%&7." to player
  32. else:
  33. send "&3&lRankify &8| &cSorry! &7%{_p}%&7 is not online, or does not exist!" to player
  34. if arg-2 is "remove":
  35. set {_p} to arg-3 parsed as offline player
  36. if {_p} is online:
  37. if {%arg-1%::people::*} contains {_p}:
  38. remove {_p} from {%arg-1%::people::*}
  39.  
  40. send "&3&lRankify &8| &7Removed %{_p}%&7 from %arg-1%&7." to player
  41. if arg-1 is "groups":
  42. send "%{group::*}%"
  43. stop
  44. if arg-1 is set:
  45. if {group::*} contains arg-1:
  46. if arg-2 is "delete":
  47. remove arg-1 from {group::*}
  48. send "&3&lRankify &8| &7Deleted group, %arg-1%&7." to player
  49. else:
  50. if arg-2 is "delete":
  51. send "&3&lRankify &8| &cSorry! &7%arg-1%&7 is not a real group, or was already deleted!" to player
  52. if arg-1 is not set:
  53. stop
  54.  
  55.  
  56. on tab complete of "/rankify":
  57. set tab completions for position 1 to "groups" and "create" and {group::*}
  58. if {group::*} contains tab arg 1:
  59. set tab completions for position 2 to "add" and "delete" and "remove" and "prefix"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement