Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1.  
  2.  
  3.  
  4. command /rank [<text>] [<text>] [<text>] [<text>]:
  5. trigger:
  6. if arg-1 is "help":
  7. send "&c/rank create (name)" to sender
  8. send "&c/rank set prefix (prefix)" to sender
  9. send "&c/rank perm (rank) (permission)" to sender
  10. send "&c/rank remove perm (permission) (rank)" to sender
  11. send "&c/rank delete (rank)" to sender
  12. send "&c/rank listallranks"
  13. send "&c/rank listallperms (rank)"
  14. send "&c/rankp set (player) (rank)" to sender
  15. send "&c/rankp set prefix (player)" to sender
  16. send "&c/rankp add perm (permission)" to sender
  17. stop
  18. if arg-1 is "create":
  19. if arg-2 is not set:
  20. send "&cWrong input."
  21. stop
  22. else if arg-2 is set:
  23. add arg-2 to {ranks::*}
  24. send "&cAdded %arg-2% &cto {ranks::*}"
  25. stop
  26. if arg-1 is "listallranks":
  27. send "&cList of all ranks:"
  28. send ""
  29. send "&c%{ranks::*}%"
  30. stop
  31. if arg-1 is "delete":
  32. if arg-2 is not set:
  33. send "&cWrong input."
  34. stop
  35. else if arg-2 is set:
  36. loop {ranks::*}:
  37. if {ranks::*} contains arg-2:
  38. remove arg-2 from {ranks::*}
  39. send "&cRemoved %arg-2% &cfrom {ranks::*}"
  40. stop
  41. else:
  42. send "&4&lERROR: &c%arg-2% &cdoesn't exist in {ranks::*}"
  43. stop
  44. if arg-1 is "add":
  45. if arg-2 is not set:
  46. send "&cWrong input."
  47. else if arg-2 is set:
  48. if arg-2 is not "perm":
  49. send "&cWrong input."
  50. else if arg-2 is "perm":
  51. if arg-3 is not set:
  52. send "&cWrong input."
  53. if arg-3 is set:
  54. if arg-4 is not set:
  55. send "&cWrong input."
  56. else if arg-4 is set:
  57. if {ranks::*} contains arg-3:
  58. add arg-4 to {permissions::%arg-3%::*}
  59. send "&cAdded %arg-4% &cto {permissions::%arg-3%::*}"
  60. stop
  61.  
  62.  
  63. if arg-1 is "remove":
  64. if arg-2 is not set:
  65. send "&cWrong input."
  66. else if arg-2 is set:
  67. if arg-2 is not "perm":
  68. send "&cWrong input."
  69. else if arg-2 is "perm":
  70. if arg-3 is not set:
  71. send "&cWrong input."
  72. if arg-3 is set:
  73. if arg-4 is not set:
  74. send "&cWrong input."
  75. else if arg-4 is set:
  76. if {ranks::*} contains arg-3:
  77. remove arg-4 from {permissions::%arg-3%::*}
  78. send "&cRemoved %arg-4% &cfrom {permissions::%arg-3%::*}"
  79. stop
  80.  
  81. if arg-1 is "listallperms":
  82. if arg-2 is not set:
  83. send "&cWrong input."
  84. else if arg-2 is set:
  85. if {ranks::*} contains arg-2:
  86. send "&cList of all permissions for %arg-2%:"
  87. send ""
  88. send "&c%{permissions::%arg-2%::*}%"
  89. stop
  90. else:
  91. send "&4&lERROR: &c%arg-2% &cdoesn't exist in {ranks::*}"
  92. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement