Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if arg 1 is equal to "random":
- if command sender does not have the permission "teams.random":
- message "{@P} §4Permission denied. §r(missing ""teams.random"")"
- else if arg 2 is not set:
- message "{@P} {@IS}"
- else if arg 3 is not set:
- message "{@P} {@IS}"
- else:
- set {_TeamSize} to ("%arg 2%" parsed as integer)
- set {_TeamAmount} to ("%arg 3%" parsed as integer)
- if {_TeamSize} is not set:
- message "{@P} {@IS}"
- else if {_TeamAmount} is not set:
- message "{@P} {@IS}"
- else if {_TeamSize} is less than 1:
- message "{@P} {@IS}"
- else if {_TeamAmount} is less than 1:
- message "{@P} {@IS}"
- else:
- loop all players:
- {Teams.InTeam::%loop-player%} is not set
- add (name of loop-player) to {_Players::*}
- if ({_TeamSize}*{_TeamAmount}) is not equal to (size of {_Players::*}):
- message "{@P} The amount of people does not match."
- else:
- loop {Teams::*}:
- command "/scoreboard teams remove UHC%loop-value%"
- delete {Team.%loop-value%::*}
- delete {Teams.InTeam::*}
- delete {Teams::*}
- broadcast "{@P} Randomizing &a%arg 3%&r teams of &9%arg 2%§r..."
- loop all players:
- command "/playsound note.harp %loop-player%"
- wait 10 ticks
- set {RandomTeams} to true
- loop {_TeamAmount} times:
- command "/scoreboard teams add UHC%loop-number%"
- set {Teams::%loop-number%} to loop-number
- loop {_TeamSize} times:
- set {_Player} to (random element out of {_Players::*})
- remove {_Player} from {_Players::*}
- command "/scoreboard teams join UHC%loop-number-1% %{_Player}%"
- add {_Player} to {Team.%loop-number-1%::*}
- set {Teams.InTeam::%{_Player}%} to loop-number-1
- wait 1 second
- loop {Teams::*}:
- broadcast "&9&l=-=-= Team %loop-value-1% =-=-="
- execute console command "/sall note.pling 1"
- loop {Team.%loop-value%::*}:
- wait 0.1 seconds
- broadcast " &0-&r &l%loop-value-2%"
- execute console command "/sall note.bass 1"
- wait 0.25 seconds
- broadcast "{@P} Teams are set! Leaving now is NOT allowed!"
- if {TeamSpeakChannels} is true:
- broadcast "{@P} Your TS channels have been created by %command sender%!"
- broadcast "{@P} Use &l/pm&r to talk to your team!"
- set {RandomTeams} to false
- else if arg 1 is equal to "friendly" or "fire":
- if arg-2 is "on":
- loop {Teams::*}:
- execute console command "/scoreboard teams option %loop-value% friendlyfire true"
- broadcast "{@P} Friendly fire enabled!"
- if arg-2 is "off":
- loop {Teams::*}:
- execute console command "/scoreboard teams option %loop-value% friendlyfire false"
- broadcast "{@P} Friendly fire disabled!"
- else if arg 1 is equal to "channels":
- arg-2 is "true" or "yes" or "on":
- set {TeamSpeakChannel} to true
- message "{@P} For this game, you'll be making channels!"
- message "{@P} If this isn't what you planned, use:"
- message "{@P} /team channels off"
- arg-2 is "false" or "no" or "off":
- set {TeamSpeakChannel} to false
- message "{@P} For this game, you won't be making channels!"
- message "{@P} If this isn't what you planned, use:"
- message "{@P} /team channels on"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement