Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix: &6&lCLANS
- color1: &b
- color2: &7
- command /clan [<text>] [<text>]:
- aliases: clans, clancmd
- trigger:
- if arg-1 is not set:
- send ""
- send "{@color1}/clan create <name> {@color2}&oCreates a clan."
- send "{@color1}/clan invite <player> {@color2}&oInvites a player to your clan"
- send "{@color1}/clan join <name> {@color2}&oAllows you to join clans."
- send "{@color1}/clan leave {@color2}&oAllows you to leave your clan."
- send "{@color1}/clan kick <player> {@color2}&oKicks a player from your clan."
- send ""
- else:
- if arg-1 is "create" or "disband" or "join" or "leave" or "invite" or "info" or "kick":
- if arg-1 is "create":
- if arg-2 is not set:
- send "{@color1}/clan create <name>"
- else:
- if length of arg-2 is greater than 8:
- send "{@color2}Clan names can only be up to {@color1}8 {@color2}characters."
- stop
- if arg 2 matches "[a-zA-Z]+":
- if {clans::%player%} is not set:
- loop {clans::*}:
- if loop-value is argument 2:
- set {_n} to true
- if {_n} is not set:
- set {clans::%player%} to arg-2
- set {clans::%{clans::%player%}%::owner} to the player
- add player to {members::%player%::*}
- send "{@color1}%player% {@color2}has created a clan named {@color1}%arg-2%{@color2}!"
- else:
- send "{@color2}A clan with that name already exists!"
- else:
- send "{@color2}You're already in a clan!"
- else:
- send "{@color2}Name must be {@color1}alphabetical."
- stop
- if arg-1 is "disband":
- if {clans::%player%} is not set:
- send "{@color2}You're not in a clan!"
- else:
- if {clans::%{clans::%player%}%::owner} is not the player:
- send "{@color2}You aren't the leader of your clan!"
- else:
- send "{@color1}%player% {@color2}has disbanded the {@color1}%{clans::%player%}% {@color2}clan!"
- loop {invited::%{clans::%player%}%::*}:
- remove {clans::%player%} from {clansinvites::%loop-value%::*}
- loop {members::%{clans::%{clans::%player%}%::owner}%::*}:
- delete {clans::%loop-value%}
- remove loop-value from {members::%player%::*}
- delete {clans::%{clans::%player%}%::owner}
- remove player from {members::%player%::*}
- if arg-1 is "leave":
- if {clans::%player%} is not set:
- send "{@color2}You're not in a clan!"
- else:
- if {clans::%{clans::%player%}%::owner} is the player:
- send "{@color2}You cannot leave your own clan! Use /clan disband!"
- else:
- send "{@color1}%player% {@color2}has left the clan!"
- loop {members::%{clans::%{clans::%player%}%::owner}%::*}:
- set {_b} to "%loop-value%" parsed as an offline player
- send "{@color1}%player% {@color2}has left the clan!" to {_b}
- remove the player from {members::%{clans::%{clans::%player%}%::owner}%::*}
- delete {clans::%player%}
- if arg-1 is "invite":
- if {clans::%player%} is not set:
- send "{@color2}You're not in a clan!"
- else:
- if {clans::%{clans::%player%}%::owner} is not the player:
- send "{@color2}You're not the owner of the clan!"
- else:
- if arg-2 is set:
- set {_b} to arg-2 parsed as an offline player
- if {invited::%{clans::%player%}%::%arg-2%} is not set:
- send "{@color1}%player% {@color2}invited you to join {@color1}%{clans::%player%}%{@color2}!" to {_b}
- set {invited::%{clans::%player%}%::%arg-2%} to true
- loop {members::%player%::*}:
- set {_b2} to "%loop-value%" parsed as an offline player
- send "{@color1}%player% {@color2}invited {@color1}%arg-2% {@color2}to the clan!" to {_b2}
- else:
- set {_b} to arg-2 parsed as an offline player
- send "{@color1}%player% {@color2}revoked your invite." to {_b}
- delete {invited::%{clans::%player%}%::%arg-2%}
- loop {members::%player%::*}:
- set {_b2} to "%loop-value%" parsed as an offline player
- send "{@color1}%player% {@color2}revoked {@color1}%arg-2%{@color2}'s invite." to {_b2}
- else:
- send "{@color2}/clan invite <player>"
- if arg-1 is "join":
- if arg-2 is not set:
- send "{@color2}/clan join <clan name>"
- else:
- if {clans::%player%} is set:
- send "{@color2}You're already in a clan!"
- else:
- loop {clans::*}:
- if loop-value is arg-2:
- set {_n} to true
- stop loop
- else:
- set {_n} to false
- if {_n} is false:
- send "{@color2}That clan doesn't exist!"
- else:
- if {invited::%arg-2%::%player%} is set:
- set {clans::%player%} to arg-2
- set {_player} to {clans::%{clans::%player%}%::owner}
- set {clans::%player%} to {clans::%{_player}%}
- loop {members::%{clans::%{clans::%player%}%::owner}%::*}:
- set {_b} to "%loop-value%" parsed as an offline player
- send "{@color1}%player% {@color2}joined the clan!" to {_b}
- send "{@color2}You joined the {@color1}%arg-2% {@color2}clan!"
- add the player to {members::%{clans::%{clans::%player%}%::owner}%::*}
- delete {invited::%arg-2%::%player%}
- else:
- send "{@color2}You weren't invited to this clan!"
- if arg-1 is "info":
- if arg-2 is not set:
- if {clans::%player%} is not set:
- send "{@color2}You are not in a clan!"
- else:
- send ""
- send "&6%{clans::%player%}%'s Information:"
- send ""
- send "{@color1}Leader: {@color2}%{clans::%{clans::%player%}%::owner}%"
- set {_m::*} to {members::%{clans::%{clans::%player%}%::owner}%::*}
- remove {clans::%{clans::%player%}%::owner} from {_m::*}
- if size of {_m::*} is greater than 0:
- loop {_m::*}:
- add loop-value to {_local1::*}
- send "{@color1}Members: {@color2}%{_local1::*}%"
- send ""
- else:
- loop {clans::*}:
- if {clans::*} contains argument 2:
- send ""
- send "&6%arg-2%'s Information:"
- send ""
- send "{@color1}Leader: {@color2}%{clans::%arg-2%::owner}%"
- set {_m::*} to {members::%{clans::%arg-2%::owner}%::*}
- remove {clans::%arg-2%::owner} from {_m::*}
- if size of {_m::*} is greater than 0:
- loop {_m::*}:
- add loop-value-2 to {_local2::*}
- send "{@color1}Members: {@color2}%{_local2::*}%"
- send ""
- stop loop
- else:
- set {_f} to arg-2 parsed as an offline player
- if {_f} has not played before:
- send "{@color2}There is no clan or player that exists by that name."
- stop loop
- else:
- if {clans::%{_f}%} is not set:
- send "{@color2}That player isn't in a clan!"
- stop loop
- else:
- send "&6%{clans::%arg-2%}%'s Information:"
- send ""
- send "{@color1}Leader: {@color2}%{clans::%{clans::%arg-2%}%::owner}%"
- set {_m::*} to {members::%{clans::%{clans::%arg-2%}%::owner}%::*}
- remove {clans::%{clans::%arg-2%}%::owner} from {_m::*}
- if size of {_m::*} is greater than 0:
- loop {_m::*}:
- add loop-value-2 to {_local3::*}
- send "{@color1}Members: {@color2}%{_local3::*}%"
- send ""
- stop loop
- if arg-1 is "kick":
- if {clans::%player%} is not set:
- send "{@color2}You're not in a clan!"
- else:
- if {clans::%{clans::%player%}%::owner} is not the player:
- send "{@color2}Only clan leaders can kick members!"
- else:
- set {_n} to arg-2 parsed as offline player
- if {members::%player%::*} does not contain {_n}:
- send "{@color1}%arg-2% {@color2}isn't in your clan!"
- else:
- if arg-2 is not the player:
- remove {_n} from {members::%player%::*}
- delete {clans::%arg-2%}
- send "{@color1}%player% {@color2}kicked you from the clan!" to {_n}
- loop {members::%player%::*}:
- set {_n2} to "%loop-value%" parsed as offline player
- send "{@color1}%player% {@color2}kicked {@color1}%arg-2% {@color2}from the clan!" to {_n2}
- else:
- send "{@color2}You cannot kick yourself."
- else:
- send ""
- send "{@color1}/clan create <name> {@color2}&oCreates a clan."
- send "{@color1}/clan invite <player> {@color2}&oInvites a player to your clan"
- send "{@color1}/clan join <name> {@color2}&oAllows you to join clans."
- send "{@color1}/clan leave {@color2}&oAllows you to leave your clan."
- send "{@color1}/clan chat {@color2}&oToggles clan chat mode."
- send "{@color1}/clan kick <player> {@color2}&oKicks a player from your clan."
- send ""
- on damage:
- if {clans::%victim%} is set:
- if {clans::%victim%} is {clans::%attacker%}:
- cancel event
- send "{@color1}This player is in your clan!" to attacker
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement