Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &8&l|| &e&lTeam &8&l||
- C: &7
- H: &e
- NoPerms: {@P}&cYou 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} /sendcoords&f - {@C}Send your Teammates your coordinates!"
- send "{@P}{@H} /pmcoords&f - {@C}Send your Teammates your ores!"
- send "{@P}{@H} /pc <text>&f - {@C}Chat with your Teammates!"
- if player has permission "rank.trial":
- 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 &e/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 "skript.op":
- 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 player does not have permission "rank.trial":
- 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 player does not have permission "rank.trial":
- 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 player does not have permission "rank.trial":
- 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 player does not have permission "rank.trial":
- 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 player does not have permission "rank.trial":
- 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 player does not have permission "rank.trial":
- 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 player does not have permission "rank.trial":
- 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 player does not have permission "rank.trial":
- 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 player does not have permission "rank.trial":
- 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>:
- usage: /ct <players>
- trigger:
- if player has permission "rank.trial"::
- 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 "skript.op"
- 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 /sendcoords:
- aliases: /tl, /teamlocation
- 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 /tc <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 "/sc"
- else if arg-1 is "ores":
- command sender command "/pmores"
- else:
- loop all players:
- {Teams.InTeam::%loop-player%} is {Teams.InTeam::%command sender%}
- send "&e[Team Chat]{@C}{@H} %command sender%{@C}: %arg-1%" to loop-player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement