Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /setkiller [<player>] [<integer>]:
- permission: skript.setkiller
- description: Sets official killers, replaces old killers
- trigger:
- if arg 1 is not set:
- message "{@P} &e/setkiller <player> <killer ##>"
- else if arg 2 is not set:
- message "{@P} &e/setkiller <player> <killer ##>"
- else if arg 2 is greater than 8:
- message "{@P} There are not enough killers!"
- else:
- # Gets rid of previous captains
- loop {Captain.%arg 2%::*}:
- loop-value is not equal to arg 1
- set {_OldCaptain} to loop-value
- delete {Captain.%arg 2%::*}
- delete {Captain.CaptainOf::%{_OldCaptain}%}
- delete {Captains::%arg 2%}
- loop {Captains::*}:
- loop {Captain.%loop-value-1%::*}:
- loop-value-2 is equal to arg 1
- delete {Captain.%loop-value-1%::%arg 1%}
- if {_OldCaptain} is online:
- execute console command "/warp killercaptains %{_OldCaptain}%"
- set {_Player} to {_OldCaptain}
- set {_Team} to {Teams.InTeam::%{_Player}%}
- remove {_Player} from {Team.%{_Team}%::*}
- delete {Teams.InTeam::%{_Player}%}
- command "/scoreboard teams leave %{_Player}%"
- # Sets a new captain
- set {_CaptainNumber} to arg 2
- set {_Captain} to arg 1
- set {Captains::%{_CaptainNumber}%} to {_CaptainNumber}
- set {Captain.CaptainOf::%arg 1%} to {_CaptainNumber}
- add {_Captain} to {Captain.%arg 2%::*}
- broadcast "{@P} &e%arg 1% &bis the killer of &eTeam %arg 2%&b!"
- # Removes them from the team
- set {_Player} to arg 1
- set {_Team} to {Teams.InTeam::%{_Player}%}
- remove {_Player} from {Team.%{_Team}%::*}
- delete {Teams.InTeam::%{_Player}%}
- command "/scoreboard teams leave %{_Player}%"
- # Adds them to the team
- set {_Player} to arg 1
- set {_TeamNumber} to arg 2
- set {Teams.InTeam::%{_Player}%} to {_TeamNumber}
- add {_Player} to {Team.%{_TeamNumber}%::*}
- command "/scoreboard teams join UHC%{_TeamNumber}% %{_Player}%"
- command /killercaptainsbox:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement