Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &7[&9Teams&7]
- C: &7
- H: &c
- NoPerms: {@P}&4You do not have the permission!
- command /team [<text>] [<text>] [<text>]:
- aliases: /teams
- trigger:
- if arg-1 is not set:
- command sender command "/team help"
- else if arg-1 is "help":
- send "&f {@H}Team Help Page&f "
- if {Teams.Management} is not set:
- send "{@P}{@C} Warning: Team Management is currently {@H}DISABLED{@C}, therefore these commands will not work."
- send "{@P}{@H} /team list&f - {@C}Lists teams"
- send "{@P}{@H} /team create&f - {@C}Create a team to invite players!"
- send "{@P}{@H} /team invite <player>&f - {@C}Invite <player> to your team!"
- send "{@P}{@H} /team accept <player>&f - {@C}Accept <player>'s invite!"
- send "{@P}{@H} /team leave&f - {@C}Leave your current team"
- send "{@P}{@H} /pmcoords&f - {@C}Send your teammates your coordinates!"
- send "{@P}{@H} /pmores&f - {@C}Send your teammates your ores!"
- send "{@P}{@H} /pm <text:coords:ores>&f - {@C}Chat with your teammates!"
- if command sender has permission "teams.help":
- send "{@P}{@H} -------"
- send "{@P}{@H} Admin Commands:"
- send "{@P}{@H} -------"
- send "{@P}{@H} /tm <off/on> <limit> - turns on team management, and sets a limit."
- send "{@P}{@H} /team createteam <number> - creates a team"
- send "{@P}{@H} /ct <player names between 1 and 6>&f - {@C}Creates teams with the listed players"
- send "{@P}{@H} /team color"
- send "{@P}{@H} /team random <size> <amt>"
- send "{@P}{@H} /team reset"
- send "{@P}{@H} /team fire <on/off>"
- send "{@P}{@H} /team join <id/player in team> [<player=you>]"
- send "{@P}{@H} /team makeleave [<player=you>]"
- send "{@P}{@H} /team uncolor"
- send "{@P}{@H} /team solos - list solos"
- send "{@P}{@H} /team management <on/off/toggle>"
- send "{@P}{@H} /team limit <number>"
- else if arg-1 is "list":
- if {teamlist} is set:
- {secretteams} is not set:
- if {Teams::*} is not set:
- send "{@P}{@C} No teams set."
- else:
- loop {Teams::*}:
- if size of {Team.%loop-value%::*} is not 0:
- send "{@P}{@C} Team {@H}%loop-value%{@C}: %{Team.%loop-value%::*}%"
- else:
- add 1 to {_0}
- if {_0} is size of {Teams::*}:
- send "{@P}{@C} No teams set."
- else:
- sender has permission "skript.op"
- if {Teams::*} is not set:
- send "{@P}{@C} No teams set."
- else:
- loop {Teams::*}:
- if size of {Team.%loop-value%::*} is not 0:
- send "{@P}{@C} Team {@H}%loop-value%{@C}: %{Team.%loop-value%::*}%"
- else:
- add 1 to {_0}
- if {_0} is size of {Teams::*}:
- send "{@P}{@C} No teams set."
- else:
- if sender has permission "skript.op":
- if {Teams::*} is not set:
- send "{@P}{@C} No teams set."
- else:
- loop {Teams::*}:
- if size of {Team.%loop-value%::*} is not 0:
- send "{@P}{@C} Team {@H}%loop-value%{@C}: %{Team.%loop-value%::*}%"
- else:
- add 1 to {_0}
- if {_0} is size of {Teams::*}:
- send "{@P}{@C} No teams set."
- else if arg-1 is "invite":
- if {Teams.Management} is not set:
- send "{@P}{@C} Team Management is currently disabled!"
- else:
- if arg-2 is not set:
- send "{@P}{@C} Please specify a player!"
- else if {Teams.InTeam::%command sender%} is not set:
- send "{@P}{@C} You don't have a team to invite {@H}%arg-2%{@C} to!"
- else if {Teams.Limit} is not set:
- send "{@P}{@C} Tell the host to set a team size limit!"
- else if size of {Team.%{Teams.InTeam::%command sender%}%::*} is greater than or equal to {Teams.Limit}:
- send "{@P}{@C} Your team is too big!"
- else:
- set {Teams.Invite::%arg-2%::%command sender%} to true
- send "{@P}{@C} You have invited {@H}%arg-2%{@C} to your team!"
- send "{@P}{@H} %command sender%{@C} invited you to their team! Do /team accept %command sender%!" to ("%arg-2%" parsed as player)
- else if arg-1 is "accept":
- if {Teams.Management} is not set:
- send "{@P}{@C} Team Management is currently disabled!"
- else:
- if arg-2 is not set:
- send "{@P}{@C} Please specify a player!"
- else if {Teams.Invite::%command sender%::%arg-2%} is not set:
- send "{@P}{@C} You don't have a team invite from {@H}%arg-2%!"
- else if {Teams.InTeam::%command sender%} is set:
- send "{@P}{@C} You are already on a team!"
- delete {Teams.Invite::%arg-2%::%command sender%}
- else if {Teams.InTeam::%arg-2%} is not set:
- send "{@P}{@C}{@H} %arg-2%{@C} does not have a team!"
- delete {Teams.Invite::%arg-2%::%command sender%}
- else if {Teams.Limit} is not set:
- send "{@P}{@C} Tell the host to set a team size limit!"
- else if size of {Team.%{Teams.InTeam::%arg-2%}%::*} is greater than or equal to {Teams.Limit}:
- send "{@P}{@C}{@H} %arg-2%'s{@C} team is too big!"
- delete {Teams.Invite::%arg-2%::%command sender%}
- else:
- set {_TM} to ({Teams.InTeam::%arg-2%})
- delete {Teams.Invite::%arg-2%::%command sender%}
- send "{@P}{@C} You have joined {@H}%arg-2%'s{@C} team!"
- loop {Team.%{_TM}%::*}:
- send "{@P}{@H} %command sender%{@C} joined your team!" to ("%loop-value%" parsed as player)
- set {Teams.InTeam::%command sender%} to ({_TM})
- add "%command sender%" to {Team.%{_TM}%::*}
- {secretteams} is not set
- command "/scoreboard teams join UHC%{_TM}% %command sender%"
- 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} {@NoPerms}"
- else if arg 3 is set:
- message "{@P} {@NoPerms}"
- else:
- set {_TeamNumber} to ("%arg 2%" parsed as integer)
- if {_TeamNumber} is not set:
- message "{@P} error"
- 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 player)
- delete {Teams.InTeam::%loop-value%}
- delete {Team.%{_TeamNumber}%::*}
- command "/scoreboard teams remove UHC%{_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} {@C} Deleted Team &6%{_TeamNumber}%" to loop-player
- else if arg-1 is "leave":
- if arg-2 is set:
- if command sender has permission "teams.mleave":
- command sender command "/team mleave %arg-2%"
- stop trigger
- else:
- if {Teams.Management} is not set:
- send "{@P}{@C} Team Management is currently disabled!"
- stop trigger
- else:
- send "{@P}{@C} Wrong syntax!"
- stop trigger
- if {Teams.Management} is not set:
- send "{@P}{@C} Team Management is currently disabled!"
- else:
- if {Teams.InTeam::%command sender%} is not set:
- send "{@P}{@C} Your not in a team!"
- else:
- send "{@P}{@C} You have left team {@H}UHC%{Teams.InTeam::%command sender%}%"
- remove "%command sender%" from {Team.%{Teams.InTeam::%command sender%}%::*}
- command "/scoreboard teams leave %command sender%"
- loop {Team.%{Teams.InTeam::%command sender%}%::*}:
- loop-value is not {_P}
- send "{@P}{@C}{@H} %command sender%{@C} left your team." to ("%loop-value%" parsed as player)
- set {_Team} to ({Teams.InTeam::%{_P}%})
- if size of {Team.%{_Team}%::*} is 1:
- delete {Team.%{_Team}%::*}
- command "/scoreboard teams remove UHC%{_Team}%"
- delete {Teams::%{_Team}%}
- delete {Teams.InTeam::%command sender%}
- else if arg 1 is equal to "createteam":
- 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} error"
- else if arg 3 is set:
- message "{@P} error"
- else:
- set {_TeamNumber} to ("%arg 2%" parsed as integer)
- if {_TeamNumber} is not set:
- message "{@P} error"
- 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}
- command "/scoreboard teams add UHC%{_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} Created Team&6%{_TeamNumber}%" to loop-player
- else if arg-1 is "create":
- if {Teams.Management} is not set:
- send "{@P}{@C} Team Management is currently disabled!"
- else:
- if {Teams.InTeam::%command sender%} is set:
- command sender does not have permission "teams.create"
- send "{@P}{@C} Your in a team already!"
- stop trigger
- set {_TM} to 1
- while {Teams::%{_TM}%} is set:
- add 1 to {_TM}
- set {Teams::%{_TM}%} to {_TM}
- command "/scoreboard teams add UHC%{_TM}%"
- if {Teams.InTeam::%command sender%} is not set:
- set {Teams.InTeam::%command sender%} to ({_TM})
- add "%command sender%" to {Team.%{_TM}%::*}
- {secretteams} is not set
- command "/scoreboard teams join UHC%{_TM}% %command sender%"
- send "{@P}{@C} You created team {@H}UHC%{_TM}%"
- else if arg-1 is "reset":
- if command sender does not have the permission "teams.reset":
- send "{@NoPerms}"
- else:
- broadcast "{@P}{@C} Teams reset by {@H}%command sender%"
- loop {Teams::*}:
- delete {Team.%loop-value%::*}
- command "/scoreboard teams remove UHC%loop-value%"
- delete {Teams::*}
- delete {Teams.InTeam::*}
- delete {Teams.Limit}
- delete {Teams.Invite::*}
- delete {Teams.Management}
- else if arg-1 is "fire":
- if command sender does not have the permission "teams.fire":
- send "{@NoPerms}"
- else:
- if arg-2 is not set:
- send "{@P}{@C} Specify to turn friendly fire on or off."
- else:
- if arg-2 is "on":
- loop {Teams::*}:
- command "/scoreboard teams option UHC%loop-value% friendlyfire true"
- broadcast "{@P}{@C}{@H} %command sender%{@C} enabled friendly fire!"
- else if arg-2 is "off":
- loop {Teams::*}:
- command "/scoreboard teams option UHC%loop-value% friendlyfire false"
- broadcast "{@P}{@C}{@H} %command sender%{@C} disabled friendly fire!"
- else if arg 1 is equal to "solos":
- if command sender does not have the permission "teams.solos":
- message "{@P} &4Permission denied. &r(missing ""teams.solos"")"
- else if arg 2 is set:
- message "{@P} &4error"
- else:
- loop all players:
- {Teams.InTeam::%loop-player%} is not set
- add (name of loop-player) to {_Solos::*}
- if {_Solos::*} is not set:
- message "{@P} There are no solos!"
- else:
- message "{@P} Solos: %join {_Solos::*} with "", ""%"
- else if arg-1 is "random":
- if command sender does not have the permission "teams.random":
- send "{@NoPerms}"
- else if arg-2 is not set:
- send "{@P}{@C} Specify a team size!"
- else if arg-3 is not set:
- send "{@P}{@C} Specify a team amount!"
- else:
- set {_Size} to ("%arg-2%" parsed as integer)
- set {_Amt} to ("%arg-3%" parsed as integer)
- if {_Size} is not set:
- send "{@P}{@C} Enter a valid team size!"
- else if {_Amt} is not set:
- send "{@P}{@C} Enter a valid team amount!"
- else if {_Size} is less than 1:
- send "{@P}{@C} Enter a valid team size!"
- else if {_Amt} is less than 1:
- send "{@P}{@C} Enter a valid team amount!"
- else:
- loop all players:
- {Teams.InTeam::%loop-player%} is not set
- {spec::%loop-player%} is not set
- add "%loop-player%" to {_RT::*}
- if ({_Size}*{_Amt}) is not (size of {_RT::*}):
- send "{@P}{@C} The amount of players and teams does not match!"
- else:
- set {_TM} to 1
- while {Teams::%{_TM}%} is set:
- add 1 to {_TM}
- set {_TM} to ({_TM} - 1)
- broadcast "{@P}{@C} Randomizing {@H}%arg-3%{@C} teams of {@H}%arg-2%{@C}..."
- loop all players:
- command "/playsound note.snare %loop-player%"
- wait 10 ticks
- loop ({_Amt}) times:
- set {_ttm} to ({_TM}+(loop-number))
- set {Teams::%{_ttm}%} to {_ttm}
- command "/scoreboard teams add UHC%{_ttm}%"
- loop {_Size} times:
- set {_P} to a random element out of {_RT::*}
- remove {_P} from {_RT::*}
- set {Teams.InTeam::%{_P}%} to ({_ttm})
- add "%{_P}%" to {Team.%{_ttm}%::*}
- {killreveal} is not set
- {secretteams} is not set
- command "/scoreboard teams join UHC%{_ttm}% %{_P}%"
- loop {Teams::*}:
- loop-value is greater than {_TM}
- loop {Team.%loop-value%::*}:
- send "{@P}{@C} Your team:{@H} %{Team.%loop-value-1%::*}%" to ("%loop-value-2%" parsed as player)
- else if arg-1 is "uncolor":
- if command sender does not have the permission "teams.uncolor":
- send "{@NoPerms}"
- else:
- if {Teams::*} is not set:
- send "{@P}{@C} No teams are set!"
- else:
- loop {Teams::*}:
- command "/scoreboard teams option UHC%loop-value% color reset"
- broadcast "{@P}{@C}{@H} %command sender%{@C} uncolored all teams!"
- else if arg-1 is "management" or "man" or "manage":
- if command sender does not have the permission "teams.manage":
- send "{@NoPerms}"
- else:
- if arg-2 is not set:
- send "{@P}{@C} Specify to toggle team management, turn it on, or off."
- else:
- if arg-2 is "on":
- set {Teams.Management} to true
- broadcast "{@P}{@C}{@H} %command sender%{@C} enabled team management!"
- else if arg-2 is "off":
- delete {Teams.Management}
- broadcast "{@P}{@C}{@H} %command sender%{@C} disabled team management!"
- else if arg-2 is "toggle":
- if {Teams.Management} is not set:
- command sender command "/team man on"
- else:
- command sender command "/team man off"
- else if arg-1 is "limit" or "lim":
- if command sender does not have the permission "teams.limit":
- send "{@NoPerms}"
- else:
- if arg-2 is not set:
- send "{@P}{@C} Specify an amount of players per team!"
- else:
- set {_L} to ("%arg-2%" parsed as integer)
- if {_L} is not set:
- send "{@P}{@C} Enter a valid amount of players per team!"
- else if {_L} is less than 1:
- send "{@P}{@C} Enter a valid amount of players per team!"
- else:
- broadcast "{@P}{@C}{@H} %command sender%{@C} set the team size limit to %{_L}%"
- set {Teams.Limit} to {_L}
- else if arg-1 is "makeleave" or "forceleave" or "mleave" or "fleave":
- 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} Invalid"
- else:
- if arg 2 is not set:
- if command sender is console:
- message "{@P} Invalid"
- 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}%::*}
- command "/scoreboard teams leave %{_Player}%"
- loop {Team.%{_TeamNumber}%::*}:
- set {_TeamPlayer} to ("%loop-value-1%" parsed as player)
- 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 player)
- message "{@P} Removed &c%{_Player}% &rfrom Team &6%{_TeamNumber}%"
- {secretteams} is not set
- loop all players:
- loop-player has the permission "teams.join.notify"
- loop-player is not command sender
- message "{@P} Removed &c%{_Player}% &rfrom Team &6%{_TeamNumber}%" to loop-player
- else if arg-1 is "join":
- if command sender does not have the permission "teams.join":
- send "{@NoPerms}"
- else:
- if arg-2 is not set:
- send "{@P}{@C} Specify a team/player that is on that team"
- else:
- set {_te} to ("%arg-2%" parsed as player)
- set {_Test1} to ("%arg-2%" parsed as integer)
- if {_Test1} is set:
- set {_TN} to ("%arg-2%" parsed as integer)
- else if {Teams.InTeam::%{_te}%} is set:
- set {_TN} to ({Teams.InTeam::%{_te}%})
- else:
- send "{@P}{@C} Specify a valid team/player that is on that team"
- stop trigger
- if arg-3 is set:
- set {_P} to ("%arg-3%" parsed as player)
- else:
- set {_P} to command sender
- if {Teams.InTeam::%{_P}%} is set:
- send "{@P}{@C}{@H} %{_P}%{@C} is already a team!"
- stop trigger
- set {Teams.InTeam::%{_P}%} to ({_TN})
- add "%{_P}%" to {Team.%{_TN}%::*}
- {secretteams} is not set:
- command "/scoreboard teams join UHC%{_TN}% %{_P}%"
- if {_P} is not command sender:
- send "{@P}{@C}{@H} %command sender% added you to team {@H}UHC%{_TN}%" to {_P}
- send "{@P}{@C} Added {@H}%{_P}%{@C} to team {@H}UHC%{_TN}%"
- loop {Team.%{Teams.InTeam::%{_P}%}%::*}:
- loop-value is not {_P}
- send "{@P}{@C}{@H} %{_P}%{@C} was added your team by {@H}%command sender%{@C}." to ("%loop-value%" parsed as player)
- else if arg-1 is "color":
- if command sender does not have the permission "teams.color":
- send "{@NoPerms}"
- else:
- if {Teams::*} is not set:
- send "{@P}{@C} No teams are set!"
- set {_choices::*} 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 {_choices2::*} 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 {_choices3::*} 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 {_choices4::*} 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 {_choices5::*} 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 {_choices6::*} 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 {_choices7::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", and "yellow"
- loop {Teams::*}:
- if loop-value is less than or equal to 15:
- set {_C} to (random element out of {_choices::*})
- remove {_C} from {_choices::*}
- command "/scoreboard teams option UHC%loop-value% color %{_C}%"
- replace all "_" with " " in {_C}
- loop {Team.%loop-value%::*}:
- send "{@P}{@C} Your team's color is <%{_C}%>%{_C}%!" to ("%loop-value-2%" parsed as player)
- else if loop-value is between 16 and 30:
- set {_C} to (random element out of {_choices2::*})
- remove {_C} from {_choices2::*}
- command "/scoreboard teams option UHC%loop-value% color %{_C}%"
- command "/italic UHC%loop-value%"
- replace all "_" with " " in {_C}
- loop {Team.%loop-value%::*}:
- send "{@P}{@C} Your team's color is <italic><%{_C}%> Italic %{_C}%!" to ("%loop-value-2%" parsed as player)
- else if loop-value is between 31 and 45:
- set {_C} to (random element out of {_choices3::*})
- remove {_C} from {_choices3::*}
- command "/scoreboard teams option UHC%loop-value% color %{_C}%"
- command "/bold UHC%loop-value%"
- replace all "_" with " " in {_C}
- loop {Team.%loop-value%::*}:
- send "{@P}{@C} Your team's color is <bold><%{_C}%> Bold %{_C}%!" to ("%loop-value-2%" parsed as player)
- else if loop-value is between 46 and 60:
- set {_C} to (random element out of {_choices4::*})
- remove {_C} from {_choices4::*}
- command "/scoreboard teams option UHC%loop-value% color %{_C}%"
- command "/underline UHC%loop-value%"
- replace all "_" with " " in {_C}
- loop {Team.%loop-value%::*}:
- send "{@P}{@C} Your team's color is <underline><%{_C}%> Underline %{_C}%!" to ("%loop-value-2%" parsed as player)
- else if loop-value is between 61 and 75:
- set {_C} to (random element out of {_choices5::*})
- remove {_C} from {_choices5::*}
- command "/scoreboard teams option UHC%loop-value% color %{_C}%"
- command "/italic UHC%loop-value%"
- command "/bold UHC%loop-value%"
- replace all "_" with " " in {_C}
- loop {Team.%loop-value%::*}:
- send "{@P}{@C} Your team's color is <underline><bold><%{_C}%> Italic Bold %{_C}%!" to ("%loop-value-2%" parsed as player)
- else if loop-value is between 76 and 90:
- set {_C} to (random element out of {_choices6::*})
- remove {_C} from {_choices6::*}
- command "/scoreboard teams option UHC%loop-value% color %{_C}%"
- command "/italic UHC%loop-value%"
- command "/underline UHC%loop-value%"
- replace all "_" with " " in {_C}
- loop {Team.%loop-value%::*}:
- send "{@P}{@C} Your team's color is <underline><italic><%{_C}%> Underline Italic %{_C}%!" to ("%loop-value-2%" parsed as player)
- else if loop-value is between 91 and 105:
- set {_C} to (random element out of {_choices7::*})
- remove {_C} from {_choices7::*}
- command "/scoreboard teams option UHC%loop-value% color %{_C}%"
- command "/bold UHC%loop-value%"
- command "/underline UHC%loop-value%"
- replace all "_" with " " in {_C}
- loop {Team.%loop-value%::*}:
- send "{@P}{@C} Your team's color is <underline><bold><%{_C}%> Underline Bold %{_C}%!" to ("%loop-value-2%" parsed as player)
- broadcast "{@P}{@C}{@H} %command sender%{@C} colored all teams!"
- else:
- command sender command "/team help"
- command /ct <text> <text> [<text>] [<text>] [<text>] [<text>]:
- permission: teams.createteam
- usage: /ct <players> [up to 6]
- trigger:
- add (arg 1) to {_ThisTeam::*}
- add (arg 2) to {_ThisTeam::*}
- if arg 3 is set:
- add (arg 3) to {_ThisTeam::*}
- if arg 4 is set:
- add (arg 4) to {_ThisTeam::*}
- if arg 5 is set:
- add (arg 5) to {_ThisTeam::*}
- if arg 6 is set:
- add (arg 6) 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}%::*}
- {secretteams} is not set
- command "/scoreboard teams join UHC%{_TeamNumber}% %loop-value%"
- set {_Buffer} to ""
- loop {_ThisTeam::*}:
- set {_Player} to ("%loop-value%" parsed as player)
- 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 player)
- 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} idk some people" to {_Player}
- message "{@P} Names in &cred &rare offline, but have been whitelisted!" to {_Player}
- message "{@P} &6&oMistake? &c&lImmediately ""&4/helpop WRONG TEAM!&c""!" to {_Player}
- message "{@P} Created a team with the following members:"
- message "{@P} %{_Buffer}%"
- {secretteams} is not set
- loop all players:
- loop-player has the permission "teams.createteam.notify"
- loop-player is not command sender
- message "{@P} {@C} Created team with members:" to loop-player
- message "{@P} %{_Buffer}%" to loop-player
- command /tm <text> [<text>]:
- permission: skript.op
- trigger:
- if arg-1 is "on" or "enable":
- if arg-2 is set:
- make player execute "team management on"
- make player execute "team limit %arg-2%"
- else:
- message "&4specify a limit"
- if arg-1 is "off" or "disable":
- make player execute "team management off"
- command /teamlist <text>:
- permission: skript.op
- trigger:
- if arg-1 is "on" or "enable":
- set {teamlist} to true
- broadcast "Enabled /team list"
- else:
- delete {teamlist}
- broadcast "Disabled /team list"
- command /secretteams <text>:
- permission: skript.op
- trigger:
- if arg-1 is "on" or "enable":
- set {secretteams} to true
- broadcast "{@P} Enabled Secret Teams"
- else:
- delete {secretteams}
- broadcast "{@P} Disabled Secret Teams"
- command /pmcoords:
- trigger:
- if {Teams.InTeam::%command sender%} is not set:
- send "{@P}{@C} You are not in a team!"
- stop trigger
- loop all players:
- {Teams.InTeam::%loop-player%} is {Teams.InTeam::%command sender%}
- send "{@P}{@C}{@H} %command sender%'s{@C} coordinates: {@C}x: {@H}%round(command sender's x-coordinate)%{@C}, {@C}y: {@H}%round(command sender's y-coordinate)%{@C}, {@C}z: {@H}%round(command sender's z-coordinate)%" to loop-player
- command /pm <text>:
- trigger:
- if {Teams.InTeam::%command sender%} is not set:
- send "{@P}{@C} You are not in a team!"
- else if arg-1 is "coords" or "coordinates":
- command sender command "/pmcoords"
- else if arg-1 is "ores":
- command sender command "/pmores"
- else:
- loop all players:
- {Teams.InTeam::%loop-player%} is {Teams.InTeam::%command sender%}
- send "{@P}{@C}{@H} %command sender%{@C}: %arg-1%" to loop-player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement