Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: <gray>[<purple>Mystery Teams<gray>]<white>
- N: §4§o%command sender%:§r
- IS: Invalid Syntax. §b/team help§r?
- variables:
- {Team1} = 0
- {Team2} = 0
- command /team [<text>] [<text>] [<text>] [<text>] [<text>]:
- trigger:
- if arg 1 is not set:
- command sender command "/team help"
- else if arg 1 is equal to "help":
- if command sender does not have the permission "teams.help":
- message "{@P} §4Permission denied. §r(missing ""teams.help"")"
- else:
- message "§6/team help §4- §7This help page"
- message "§6/team list §4- §7List teams"
- message "§6/team create [<id>] §4- §7Create Team"
- message "§6/team delete <id> §4- §7Delete Team"
- message "§6/team join <id> [<player=you>] §4- §7Put <player> in Team"
- message "§6/team remove [<player=you>] §4- §7Remove <player> from Team"
- message "§6/team color §4- §7Color all teams at once"
- message "§6/team rebuild §4- §7Rebuild teams, skip empty"
- message "§6/team random <size> <amount> [extend] §4- §7Create Random Teams"
- message "§6/team reset §4- §7Reset all teams"
- else if arg 1 is equal to "list":
- command sender has permission "skript.op"
- if {Teams::*} is not set:
- message "{@P} No teams defined."
- else:
- loop {Teams::*}:
- message "§6Team %loop-value%:"
- loop {Team.%loop-value%::*}:
- message "§7§l- §c§o%loop-value-2%"
- else if arg 1 is equal to "create":
- if command sender does not have the permission "teams.create":
- message "{@P} §4Permission denied. §r(missing ""teams.create"")"
- else if arg 2 is not set:
- message "{@P} {@IS}"
- else if arg 3 is set:
- message "{@P} {@IS}"
- else:
- set {_TeamNumber} to ("%arg 2%" parsed as integer)
- if {_TeamNumber} is not set:
- message "{@P} {@IS}"
- else if {_TeamNumber} is smaller than 1:
- message "{@P} Invalid Team Number!"
- else if {Teams::%{_TeamNumber}%} is set:
- message "{@P} That team already exists."
- else:
- set {Teams::%{_TeamNumber}%} to {_TeamNumber}
- message "{@P} Created Team §6%{_TeamNumber}%"
- loop all players:
- loop-player has the permission "teams.create.notify"
- loop-player is not command sender
- message "{@P} {@N} Created Team§6%{_TeamNumber}%" to loop-player
- else if arg 1 is equal to "delete":
- if command sender does not have the permission "teams.delete":
- message "{@P} §4Permission denied. §r(missing ""teams.delete"")"
- else if arg 2 is not set:
- message "{@P} {@IS}"
- else if arg 3 is set:
- message "{@P} {@IS}"
- else:
- set {_TeamNumber} to ("%arg 2%" parsed as integer)
- if {_TeamNumber} is not set:
- message "{@P} {@IS}"
- else if {_TeamNumber} is smaller than 1:
- message "{@P} Invalid Team Number!"
- else if {Teams::%{_TeamNumber}%} is not set:
- message "{@P} That team does not exist."
- else:
- delete {Teams::%{_TeamNumber}%}
- loop {Team.%{_TeamNumber}%::*}:
- message "{@P} Your team was deleted." to ("%loop-value%" parsed as offlineplayer)
- delete {Teams.InTeam::%loop-value%}
- delete {Team.%{_TeamNumber}%::*}
- message "{@P} Deleted Team §6%{_TeamNumber}%"
- loop all players:
- loop-player has the permission "teams.delete.notify"
- loop-player is not command sender
- message "{@P} {@N} Deleted Team §6%{_TeamNumber}%" to loop-player
- else if arg 1 is equal to "join":
- if command sender does not have the permission "teams.join":
- message "{@P} §4Permission denied. §r(missing ""teams.join"")"
- else if arg 2 is not set:
- message "{@P} {@IS}"
- else if arg 4 is set:
- message "{@P} {@IS}"
- else:
- set {_TeamNumber} to ("%arg 2%" parsed as integer)
- if {_TeamNumber} is not set:
- message "{@P} {@IS}"
- else if {_TeamNumber} is smaller than 1:
- message "{@P} Invalid Team Number!"
- else if {Teams::%{_TeamNumber}%} is not set:
- message "{@P} Team does not exist!"
- else:
- if arg 3 is not set:
- if command sender is console:
- message "{@P} {@IS}"
- stop
- set {_Player} to (name of command sender)
- else:
- set {_Player} to arg 3
- if {Teams.InTeam::%{_Player}%} is set:
- message "{@P} Player %{_Player}% is already in a team!"
- else:
- loop {Team.%{_TeamNumber}%::*}:
- set {_TeamPlayer} to ("%loop-value-1%" parsed as offlineplayer)
- if {_TeamPlayer} is online:
- message "{@P} §6%{_Player}% §rhas been added to your team." to {_TeamPlayer}
- set {Teams.InTeam::%{_Player}%} to {_TeamNumber}
- add {_Player} to {Team.%{_TeamNumber}%::*}
- message "{@P} You were added to §6Team %{_TeamNumber}%" to ("%{_Player}%" parsed as offlineplayer)
- message "{@P} Added §c%{_Player}% §rto Team §6%{_TeamNumber}%"
- loop all players:
- loop-player has the permission "teams.join.notify"
- loop-player is not command sender
- message "{@P} {@N} Added §c%{_Player}% §rto Team §6%{_TeamNumber}%" to loop-player
- else if arg 1 is equal to "remove":
- if command sender does not have the permission "teams.leave":
- message "{@P} §4Permission denied. §r(missing ""teams.leave"")"
- else if arg 3 is set:
- message "{@P} {@IS}"
- else:
- if arg 2 is not set:
- if command sender is console:
- message "{@P} {@IS}"
- stop
- set {_Player} to (name of command sender)
- else:
- set {_Player} to arg 2
- if {Teams.InTeam::%{_Player}%} is not set:
- message "{@P} Player %{_Player}% is not in a team!"
- else:
- set {_TeamNumber} to {Teams.InTeam::%{_Player}%}
- delete {Teams.InTeam::%{_Player}%}
- remove {_Player} from {Team.%{_TeamNumber}%::*}
- loop {Team.%{_TeamNumber}%::*}:
- set {_TeamPlayer} to ("%loop-value-1%" parsed as offlineplayer)
- if {_TeamPlayer} is online:
- message "{@P} §6%{_Player}% §rhas been removed from your team." to {_TeamPlayer}
- message "{@P} You were removed from §6Team %{_TeamNumber}%" to ("%{_Player}%" parsed as offlineplayer)
- message "{@P} Removed §c%{_Player}% §rfrom Team §6%{_TeamNumber}%"
- loop all players:
- loop-player has the permission "teams.join.notify"
- loop-player is not command sender
- message "{@P} {@N} Removed §c%{_Player}% §rfrom Team §6%{_TeamNumber}%" to loop-player
- else if arg 1 is equal to "color":
- if command sender does not have the permission "teams.color":
- message "{@P} §4Permission denied. §r(missing ""teams.uncolor"")"
- else if arg 2 is set:
- message "{@P} {@IS}"
- else if {Teams::*} is not set:
- message "{@P} No teams to color!"
- else if (size of {Teams::*}) is bigger than 40:
- message "{@P} Too many teams to color!"
- else:
- if (size of {Teams::*}) is smaller than 16:
- set {_Colors::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red" and "yellow"
- else if (size of {Teams::*}) is smaller than 20:
- set {_Colors::*} to "aqua", "black", "blue", "bold", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "strikethrough", "underline" and "yellow"
- else if (size of {Teams::*}) is equal to 20:
- set {_Colors::*} to "aqua", "black", "blue", "bold", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "strikethrough", "underline", "white" and "yellow"
- else:
- set {_Colors::*} to "aqua", "black", "blue", "bold", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "strikethrough", "underline", "white", and "yellow"
- set {_Other.Colors::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", and "yellow"
- set {_Format.Codes::*} to "bold", "italic", "strikethrough", and "underline"
- loop {Teams::*}:
- if loop-value is less than or equal to 21:
- set {_Color} to (random element out of {_Colors::*})
- remove {_Color} from {_Colors::*}
- command "/scoreboard teams option UHC%loop-value% color %{_Color}%"
- replace all "_" with " " in {_Color}
- loop {Team.%loop-value%::*}:
- message "{@P} Your team's color is <%{_Color}%>%{_Color}%!" to ("%loop-value-2%" parsed as offlineplayer)
- else:
- delete {_Colors::*}
- set {_Color} to (random element out of {_Other.Colors::*})
- set {_Format} to (random element out of {_Format.Codes::*})
- remove {_Color} from {_Other.Colors::*}
- command "/scoreboard teams option UHC%loop-value% color %{_Color}%"
- replace all "_" with " " in {_Color}
- loop {Team.%loop-value%::*}:
- message "{@P} Your team's color and format is <%{_Color}%><%{_Format}%>%{_Format}% %{_Color}%!" to ("%loop-value-2%" parsed as offlineplayer)
- execute console command "/%{_Format}% UHC%loop-value%"
- message "{@P} Colored all teams"
- loop all players:
- loop-player has the permission "teams.color.notify"
- loop-player is not command sender
- message "{@P} {@N} Colored all teams" to loop-player
- else if arg 1 is equal to "rebuild":
- if command sender does not have the permission "teams.rebuild":
- message "{@P} §4Permission denied. §r(missing ""teams.rebuild"")"
- else if arg 2 is set:
- message "{@P} {@IS}"
- else:
- set {_TeamCount} to 0
- delete {Teams.InTeam::*}
- loop {Teams::*}:
- if (size of {Team.%loop-value%::*}) is not equal to 0:
- message "%loop-value%"
- set {_TeamCount} to {_TeamCount}+1
- set {_New.Team.%{_TeamCount}%::*} to {Team.%loop-value%::*}
- set {_New.Teams::%{_TeamCount}%} to {_TeamCount}
- delete {Team.%loop-value%::*}
- delete {Teams::*}
- set {Teams::*} to {_New.Teams::*}
- loop {Teams::*}:
- set {Team.%loop-value%::*} to {_New.Team.%loop-value%::*}
- loop {Team.%loop-value%::*}:
- set {Teams.InTeam::%loop-value-2%} to loop-value-1
- message "{@P} Issued Rebuild"
- loop all players:
- loop-player has the permission "teams.rebuild.notify"
- loop-player is not command sender
- message "{@P} {@N} Issued Rebuild" to loop-player
- 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 2
- set {_TeamAmount} to ("%arg 2%" 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 §6%arg 3% teams §cof %arg 2%§r..."
- loop all players:
- command "/playsound note.harp %loop-player%"
- wait 10 ticks
- 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
- loop {Teams::*}:
- loop {Team.%loop-value%::*}:
- set {_Player} to ("%loop-value-2%" parsed as offlineplayer)
- if {_Player} is online:
- message "{@P} §6Your team!" to {_Player}
- loop {Team.%loop-value-1%::*}:
- loop-value-3 is not equal to loop-value-2
- message "{@P} §7§l- §c§o%loop-value-3%" to {_Player}
- if arg 4 is set:
- if arg 4 is equal to "extend":
- set {_Extend} to true
- if {_Extend} is not set:
- broadcast "{@P} §7Teams are randomized!"
- loop all players:
- command "/playsound random.explode %loop-player%"
- else if arg 1 is equal to "reset":
- if command sender does not have the permission "teams.reset":
- message "{@P} §4Permission denied. §r(missing ""teams.reset"")"
- else if arg 2 is set:
- message "{@P} {@IS}"
- else:
- loop {Teams::*}:
- loop {Team.%loop-value%::*}:
- message "{@P} Your team was deleted in a global reset." to ("%loop-value-2%" parsed as offlineplayer)
- delete {Team.%loop-value%::*}
- delete {Teams::*}
- delete {Teams.InTeam::*}
- message "{@P} All teams reset"
- loop all players:
- loop-player has the permission "teams.reset.notify"
- loop-player is not command sender
- message "{@P} {@N} Reset all teams" to loop-player
- else:
- command sender command "/team help"
- command /ct <text> <text>:
- permission: teams.createteam
- usage: /ct <player> <player
- trigger:
- add (arg 1) to {_ThisTeam::*}
- add (arg 2) to {_ThisTeam::*}
- loop {_ThisTeam::*}:
- {Teams.InTeam::%loop-value%} is set
- add loop-value to {_AlreadyOnTeam::*}
- if {_AlreadyOnTeam::*} is set:
- message "{@P} The following players are already on a team."
- message "{@P} %join {_AlreadyOnTeam::*} with "", ""%"
- else:
- set {_TeamNumber} to 1
- while {Teams::%{_TeamNumber}%} is set:
- set {_TeamNumber} to {_TeamNumber}+1
- set {Teams::%{_TeamNumber}%} to {_TeamNumber}
- command "/scoreboard teams add UHC%{_TeamNumber}%"
- loop {_ThisTeam::*}:
- set {Teams.InTeam::%loop-value%} to {_TeamNumber}
- add "%loop-value%" to {Team.%{_TeamNumber}%::*}
- command "/scoreboard teams join UHC%{_TeamNumber}% %loop-value%"
- set {_Buffer} to ""
- loop {_ThisTeam::*}:
- set {_Player} to ("%loop-value%" parsed as offlineplayer)
- if {_Player} is online:
- set {_Buffer} to "%{_Buffer}%§a%loop-value% "
- else:
- set {_Buffer} to "%{_Buffer}%§c%loop-value% "
- command "/wl add %loop-value%"
- loop {_ThisTeam::*}:
- set {_Player} to ("%loop-value%" parsed as offlineplayer)
- command "/playsound note.pling %loop-value%"
- message "{@P} You have been put on a team with the following people!" to {_Player}
- message "{@P} %{_Buffer}%" to {_Player}
- message "{@P} Created a team with the following members:"
- message "{@P} %{_Buffer}%"
- loop all players:
- loop-player has the permission "teams.createteam.notify"
- loop-player is not command sender
- message "{@P} {@N} Created team with members:" to loop-player
- message "{@P} %{_Buffer}%" to loop-player
- command /mt <text>:
- permission: skript.op
- usage: /mt <Set/List/Give/Reset>
- aliases: /mt
- trigger:
- if arg 1 is "set":
- loop all players:
- if {MtTeam::%loop-player%} is not set:
- set {_Team} to {Teams.InTeam::%loop-player%}
- loop all players:
- loop-player-2 is not loop-player-1
- if {Teams.InTeam::%loop-player-2%} is equal to {_Team}:
- broadcast "TeamCheck"
- if {Team1} is not "8":
- broadcast "Team1Check"
- if {Team2} is not "8":
- broadcast "Team2Check"
- set {_RandomiserYay} to a random integer between 1 and 2
- broadcast "Integer and %{_RandomiserYay}%"
- set {MtTeam::%loop-player-2%} to {_RandomiserYay}
- set {MtTeam::%loop-player-1%} to {_RandomiserYay}
- broadcast "Var's for teams"
- if {_RandomiserYay} is 2:
- broadcast "Team2Cond"
- add 2 to {Team2}
- broadcast "Team2 is: %{Team2}%"
- send "{@P} You are now on the red team" to loop-player-1
- send "{@P} You are now on the red team" to loop-player-2
- else if {_RandomiserYay} is 1:
- broadcast "Team1Cond"
- add 2 to {Team1}
- broadcast "Team1 is: %{Team1}%"
- send "{@P} You are now on the blue team" to loop-player-1
- send "{@P} You are now on the blue team" to loop-player-2
- if arg 1 is "list":
- send "{@P} Teams"
- loop all players:
- if {MtTeam::%loop-player%} is 1:
- send "<blue>%loop-player%" to command sender
- wait 1 tick
- if {MtTeam::%loop-player%} is 2:
- send "<red>%loop-player%" to command sender
- if arg 1 is "clear" or "reset":
- set {Team1} to 0
- set {Team2} to 0
- loop all players:
- delete {MtTeam::%loop-player%}
- delete {Dead::%loop-player%}
- broadcast "{@P} Mystery Teams VfV Edition reset!"
- if arg 1 is "give":
- loop all players:
- if {MtTeam::%loop-player%} is 1:
- give 5 blue wool to loop-player
- else if {MtTeam::%loop-player%} is 2:
- give 5 red wool to loop-player
- on death of player:
- set {_Team} to {Teams.InTeam::%victim%}
- loop all players:
- if {Dead::%victim%} is not set:
- loop-player is not victim
- set {Dead::%victim%} to "dead"
- if {Teams.InTeam::%loop-player%} is equal to {_Team}:
- if {Dead::%loop-player%} is set:
- broadcast "{@P} A pair consisting of %victim% and %loop-player% is now gone!"
- if {MtTeam::%loop-player%} is 1:
- broadcast "{@P} %victim% and %loop-player% were on <blue>Blue Team<white>!"
- if {MtTeam::%loop-player%} is 2:
- broadcast "{@P} %victim% and %loop-player% were on <red>Red Team<white>!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement