Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &7&o[&6Oro&7]
- C: &6
- H: &e
- 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} /pmcoords&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} /team management <on/off/toggle>"
- send "{@P}{@H} /team reset"
- send "{@P}{@H} /team color"
- 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 random <size> <amt>"
- send "{@P}{@H} /team uncolor"
- send "{@P}{@H} /team limit <number>"
- send "{@P}{@H} /ct <player names between 1 and infinite>&f - {@C}Creates teams with the listed players"
- else if arg-1 is "list":
- 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 offlineplayer)
- 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 offlineplayer)
- set {Teams.InTeam::%command sender%} to ({_TM})
- add "%command sender%" to {Team.%{_TM}%::*}
- command "/scoreboard teams join UHC%{_TM}% %command sender%"
- 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 offlineplayer)
- 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 "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}%::*}
- 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 "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}%::*}
- command "/scoreboard teams join UHC%{_ttm}% %{_P}%"
- broadcast "{@P}{@C} Teams Randomized! Use the teamspeak server {@H}uhc.gg"
- 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 offlineplayer)
- 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.mleave":
- send "{@NoPerms}"
- else:
- if arg-2 is set:
- set {_P} to ("%arg-2%" parsed as offlineplayer)
- else:
- set {_P} to command sender
- if {_P} is offline:
- send "{@P}{@C} Specify a online player!"
- else:
- if {Teams.InTeam::%{_P}%} is not set:
- send "{@P}{@C}{@H} %{_P}%{@C} is not in a team!"
- else:
- send "{@P}{@C} You removed %{_P}% from team {@H}UHC%{Teams.InTeam::%{_P}%}%"
- send "{@P}{@C}{@H} %command sender%{@C} removed you from team {@H}UHC%{Teams.InTeam::%{_P}%}%" to {_P}
- remove "%{_P}%" from {Team.%{Teams.InTeam::%{_P}%}%::*}
- command "/scoreboard teams leave %{_P}%"
- loop {Team.%{Teams.InTeam::%{_P}%}%::*}:
- loop-value is not {_P}
- send "{@P}{@C}{@H} %{_P}%{@C} was removed your team." to ("%loop-value%" parsed as offlineplayer)
- set {_Team} to ({Teams.InTeam::%{_P}%})
- delete {Teams.InTeam::%command sender%}
- if size of {Team.%{_Team}%::*} is 0:
- delete {Team.%{_Team}%::*}
- command "/scoreboard teams remove UHC%{_Team}%"
- delete {Teams::%{_Team}%}
- 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 offlineplayer)
- 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 offlineplayer)
- 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}%::*}
- 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 offlineplayer)
- 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", "bold", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "underline", "strikethrough" and "yellow"
- set {_choices2::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "underline", "strikethrough" 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", "underline", "strikethrough" 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", "strikethrough" and "yellow"
- loop {Teams::*}:
- if loop-value is less than or equal to 19:
- 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 offlineplayer)
- else if loop-value is between 19 and 37:
- set {_C} to (random element out of {_choices2::*})
- remove {_C} from {_choices2::*}
- 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 offlineplayer)
- else if loop-value is between 37 and 54:
- set {_C} to (random element out of {_choices3::*})
- remove {_C} from {_choices3::*}
- 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 offlineplayer)
- else if loop-value is between 54 and 70:
- 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 offlineplayer)
- broadcast "{@P}{@C}{@H} %command sender%{@C} colored all teams!"
- else:
- command sender command "/team help"
- command /ct <text>:
- permission: teams.ct
- usage: /ct <players>
- trigger:
- set {_ToCreate::*} to ((arg-1) split at " ")
- loop {_ToCreate::*}:
- if {Teams.InTeam::%loop-value%} is set:
- add loop-value to {_OT::*}
- if size of {_OT::*} is greater than or equal to 1:
- send "{@P}{@C} The following players already on a team: (cant create one)"
- send "{@P}{@C}{@H} %join {_OT::*} with "", ""%"
- else:
- set {_TM} to 1
- while {Teams::%{_]TM}%} is set:
- add 1 to {_TM}
- set {Teams::%{_TM}%} to {_TM}
- command "/scoreboard teams add UHC%{_TM}%"
- loop {_ToCreate::*}:
- set {Teams.InTeam::%loop-value%} to {_TM}
- add "%loop-value%" to {Team.%loop-value%::*}
- command "/scoreboard teams join UHC%{_TM}% %loop-value%"
- set {_P} to ("%loop-value%" parsed as offlineplayer)
- if {_P} is offline:
- command "/whitelist add %{_P}%"
- add "&c%{_P}%" to {_S::*}
- else:
- add "&a%{_P}%" to {_S::*}
- loop {_ToCreate::*}:
- set {_P} to ("%loop-value%" parsed as offlineplayer)
- if {_P} is online:
- command "/playsound random.pop %{_P}%"
- send "{@P}{@C}{@H} %command sender%{@C} put you on a team with:" to {_P}
- send "{@P}{@C} %{_S::*}%" to {_P}
- send "{@P}{@C} Names in &cred{@C} were offline, but are whitelisted (if not already)" to {_P}
- send "{@P}{@C} Mistake? Use ""&4/helpop WRONG TEAM!{@C}""" to {_P}
- loop all players:
- loop-player has permission "teams.notify"
- command sender is not loop-player
- {_ToCreate::*} does not contain "%loop-player%"
- send "{@P}{@C}{@H} %command sender%{@C}: created team with: %{_S::*}%" to loop-player
- 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 /pmores:
- 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} has &3%amount of iron ore in command sender's inventory + amount of iron ingots in command sender's inventory% iron{@C}, <gold>%amount of gold ore in command sender's inventory + amount of gold ingots in command sender's inventory% gold{@C}, and &b%amount of diamond ore in command sender's inventory + amount of diamonds in command sender's inventory% diamonds{@C}." 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