Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /rank [<text>] [<text>] [<text>] [<text>]:
- trigger:
- if arg-1 is "help":
- send "&c/rank create (name)" to sender
- send "&c/rank set prefix (prefix)" to sender
- send "&c/rank perm (rank) (permission)" to sender
- send "&c/rank remove perm (permission) (rank)" to sender
- send "&c/rank delete (rank)" to sender
- send "&c/rank listallranks"
- send "&c/rank listallperms (rank)"
- send "&c/rankp set (player) (rank)" to sender
- send "&c/rankp set prefix (player)" to sender
- send "&c/rankp add perm (permission)" to sender
- stop
- if arg-1 is "create":
- if arg-2 is not set:
- send "&cWrong input."
- stop
- else if arg-2 is set:
- add arg-2 to {ranks::*}
- send "&cAdded %arg-2% &cto {ranks::*}"
- stop
- if arg-1 is "listallranks":
- send "&cList of all ranks:"
- send ""
- send "&c%{ranks::*}%"
- stop
- if arg-1 is "delete":
- if arg-2 is not set:
- send "&cWrong input."
- stop
- else if arg-2 is set:
- loop {ranks::*}:
- if {ranks::*} contains arg-2:
- remove arg-2 from {ranks::*}
- send "&cRemoved %arg-2% &cfrom {ranks::*}"
- stop
- else:
- send "&4&lERROR: &c%arg-2% &cdoesn't exist in {ranks::*}"
- stop
- if arg-1 is "add":
- if arg-2 is not set:
- send "&cWrong input."
- else if arg-2 is set:
- if arg-2 is not "perm":
- send "&cWrong input."
- else if arg-2 is "perm":
- if arg-3 is not set:
- send "&cWrong input."
- if arg-3 is set:
- if arg-4 is not set:
- send "&cWrong input."
- else if arg-4 is set:
- if {ranks::*} contains arg-3:
- add arg-4 to {permissions::%arg-3%::*}
- send "&cAdded %arg-4% &cto {permissions::%arg-3%::*}"
- stop
- if arg-1 is "remove":
- if arg-2 is not set:
- send "&cWrong input."
- else if arg-2 is set:
- if arg-2 is not "perm":
- send "&cWrong input."
- else if arg-2 is "perm":
- if arg-3 is not set:
- send "&cWrong input."
- if arg-3 is set:
- if arg-4 is not set:
- send "&cWrong input."
- else if arg-4 is set:
- if {ranks::*} contains arg-3:
- remove arg-4 from {permissions::%arg-3%::*}
- send "&cRemoved %arg-4% &cfrom {permissions::%arg-3%::*}"
- stop
- if arg-1 is "listallperms":
- if arg-2 is not set:
- send "&cWrong input."
- else if arg-2 is set:
- if {ranks::*} contains arg-2:
- send "&cList of all permissions for %arg-2%:"
- send ""
- send "&c%{permissions::%arg-2%::*}%"
- stop
- else:
- send "&4&lERROR: &c%arg-2% &cdoesn't exist in {ranks::*}"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement